MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { StringProvider::loadTemplate(); ui->setupUi(this); initLayout(); sqlLiteProvider = new SqlLiteProvider(); connect(sqlLiteProvider, SIGNAL(updateEventLogUI(QList<EventLog>)), this, SLOT(sloUpdateEventLogUI(QList<EventLog>))); sqlLiteProvider->loadDatabase(); httpProvider = new HttpProvider(); connect(httpProvider, SIGNAL(sigHttpFinished(QNetworkReply*)), this, SLOT(sloHttpFinished(QNetworkReply*))); connect(ui->tableScan, SIGNAL(signalInsertLog(EventLog)), this, SLOT(slotInsertLog(EventLog))); // Load metascan online key QSettings qs(SETTINGS_DOMAIN, SETTINGS_USER); QString moKey = qs.value(SETTINGS_MO_KEY).toString(); StringProvider::METASCAN_ONLINE_KEY = moKey; if(moKey.isEmpty()) { qDebug() << "moKey = NULLLLL"; SettingsDialog* dialogSettings = new SettingsDialog(this); dialogSettings->setModal(true); dialogSettings->show(); } else { qDebug() << "moKey = " << moKey; } }
void BalanceWindow::on_settingsAction_triggered() { SettingsDialog *d = new SettingsDialog(settings, this); connect(d,SIGNAL(testEmail()), this, SLOT(sendEmail())); d->setModal(true); d->show(); }
MainDialogImpl::MainDialogImpl( QWidget * parent, Qt::WFlags f) : QDialog(parent, f) { tray = new TrayMenu(this); connect(tray,SIGNAL(exitClicked(bool)), this,SLOT(exitClicked(bool))); QSettings settings; if(settings.value("first_launch",true).toBool()) { SettingsDialog form; form.setModal(true); form.exec(); } io = new RTorrentIO(0, settings.value("host","localhost").toString(), settings.value("port",80).toInt(), settings.value("path","/RPC2").toString()); if(io) { connect(io,SIGNAL(started()), this,SLOT(init_client())); io->start(); }else tray->disconnected(); }
void MainWindow::openSettingsDialog() { //create new SettingsDialog and open it SettingsDialog* playerSettings = new SettingsDialog(this); playerSettings->setModal(true); playerSettings->open(); }
void MainWindow::on_actionSettings_triggered() { SettingsDialog dialog; dialog.setModal( true ); connect( &dialog, SIGNAL( signalSetSettings( QString, QString) ), this, SLOT( slotSetSettings(QString, QString ) ) ); dialog.exec(); }
void MainWindow::on_actionSettings_triggered() { if (state == STATE_RUNNING) mode_switch(); SettingsDialog* dialog = new SettingsDialog(this); dialog->dropPreview = dropPreview; dialog->interval = interval; dialog->init_settings(); dialog->setModal(true); dialog->exec(); dropPreview = dialog->dropPreview; interval = dialog->interval; qDebug() << "dropPreview:" << dropPreview; qDebug() << "interval:" << interval; refreshSettings(true); }