comparison main/NetworkPermissionTester.cpp @ 1770:893f556cd5c9

Untabify
author Chris Cannam
date Thu, 01 Mar 2018 18:02:33 +0000
parents 3dbfe3ba0d1f
children 2de306979a2a
comparison
equal deleted inserted replaced
1769:0698743f52a4 1770:893f556cd5c9
43 SVDEBUG << "NetworkPermissionTester: Asked already, result was " << permish << endl; 43 SVDEBUG << "NetworkPermissionTester: Asked already, result was " << permish << endl;
44 } else { 44 } else {
45 SVDEBUG << "NetworkPermissionTester: Asking for permission" << endl; 45 SVDEBUG << "NetworkPermissionTester: Asking for permission" << endl;
46 46
47 QDialog d; 47 QDialog d;
48 d.setWindowTitle(QCoreApplication::translate("NetworkPermissionTester", "Welcome to Sonic Visualiser")); 48 d.setWindowTitle(QCoreApplication::translate("NetworkPermissionTester", "Welcome to Sonic Visualiser"));
49 49
50 QGridLayout *layout = new QGridLayout; 50 QGridLayout *layout = new QGridLayout;
51 d.setLayout(layout); 51 d.setLayout(layout);
52 52
53 QString preamble; 53 QString preamble;
54 preamble = QCoreApplication::translate 54 preamble = QCoreApplication::translate
55 ("NetworkPermissionTester", 55 ("NetworkPermissionTester",
56 "<h2>Welcome to Sonic Visualiser!</h2>" 56 "<h2>Welcome to Sonic Visualiser!</h2>"
82 postamble = QCoreApplication::translate 82 postamble = QCoreApplication::translate
83 ("NetworkPermissionTester", 83 ("NetworkPermissionTester",
84 "<p><b>No personal information will be sent, no tracking is carried out, and no individual information will be shared with anyone else.</b> We will however make aggregate counts of distinct requests for usage reporting.</p>" 84 "<p><b>No personal information will be sent, no tracking is carried out, and no individual information will be shared with anyone else.</b> We will however make aggregate counts of distinct requests for usage reporting.</p>"
85 "<p>We recommend that you allow this, because it makes Sonic Visualiser more useful to you and supports the public funding of this work. But if you do not wish to allow it, please un-check the box below.<br></p>"); 85 "<p>We recommend that you allow this, because it makes Sonic Visualiser more useful to you and supports the public funding of this work. But if you do not wish to allow it, please un-check the box below.<br></p>");
86 86
87 QLabel *label = new QLabel; 87 QLabel *label = new QLabel;
88 label->setWordWrap(true); 88 label->setWordWrap(true);
89 label->setText(preamble + bullets + postamble); 89 label->setText(preamble + bullets + postamble);
90 layout->addWidget(label, 0, 0); 90 layout->addWidget(label, 0, 0);
91 91
92 QCheckBox *cb = new QCheckBox(QCoreApplication::translate("NetworkPermissionTester", "Allow this")); 92 QCheckBox *cb = new QCheckBox(QCoreApplication::translate("NetworkPermissionTester", "Allow this"));
93 cb->setChecked(true); 93 cb->setChecked(true);
94 layout->addWidget(cb, 1, 0); 94 layout->addWidget(cb, 1, 0);
95 95
96 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok); 96 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok);
97 QObject::connect(bb, SIGNAL(accepted()), &d, SLOT(accept())); 97 QObject::connect(bb, SIGNAL(accepted()), &d, SLOT(accept()));
98 layout->addWidget(bb, 2, 0); 98 layout->addWidget(bb, 2, 0);
99 99
100 d.exec(); 100 d.exec();
101 101
102 permish = cb->isChecked(); 102 permish = cb->isChecked();
103 settings.setValue(tag, permish); 103 settings.setValue(tag, permish);
104 104
105 SVDEBUG << "NetworkPermissionTester: asked, answer was " << permish << endl; 105 SVDEBUG << "NetworkPermissionTester: asked, answer was " << permish << endl;
106 } 106 }
107 107
108 settings.endGroup(); 108 settings.endGroup();