本文整理汇总了C++中ConfigDialog::exec方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigDialog::exec方法的具体用法?C++ ConfigDialog::exec怎么用?C++ ConfigDialog::exec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigDialog
的用法示例。
在下文中一共展示了ConfigDialog::exec方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showOptions
void MainWindow::showOptions()
{
ConfigDialog *options = new ConfigDialog();
#ifdef SG_GLOBAL_SHORTCUTS
globalShortcutBlock(true);
#endif
if (isMinimized())
{
showNormal();
if (options->exec() == QDialog::Accepted)
updateUI();
hideToShot();
}
else
{
if (options->exec() == QDialog::Accepted)
updateUI();
}
#ifdef SG_GLOBAL_SHORTCUTS
globalShortcutBlock(false);
#endif
delete options;
}
示例2: ts3plugin_configure
/* Plugin might offer a configuration window. If ts3plugin_offersConfigure returns 0, this function does not need to be implemented. */
void ts3plugin_configure(void* handle, void* qParentWidget) {
debuglog("GW2Plugin: configure\n");
ConfigDialog qConfigDialog;
qConfigDialog.SetupUi();
qConfigDialog.exec();
}
示例3: main
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(configdialog);
QApplication app(argc, argv);
ConfigDialog dialog;
return dialog.exec();
}
示例4: openSettingsWindow
void MainWindow::openSettingsWindow()
{
this->hide();
ConfigDialog dialog;
dialog.exec();
this->show();
this->loadPref();
}
示例5: showConfigDialog
void soundKonverter::showConfigDialog()
{
ConfigDialog *dialog = new ConfigDialog( config, this/*, ConfigDialog::Page(configStartPage)*/ );
connect( dialog, SIGNAL(updateFileList()), m_view, SLOT(updateFileList()) );
dialog->resize( size() );
dialog->exec();
delete dialog;
}
示例6: openConfig
void KueueApp::openConfig()
{
ConfigDialog* c = new ConfigDialog( mWindow );
connect( c, SIGNAL( settingsChanged() ),
this, SLOT( settingsChanged() ) );
c->exec();
delete c;
}
示例7: configDialog
void MainWindow::configDialog()
{
if(this->visitorMode == true)
{
QMessageBox::warning(this, QString::fromLocal8Bit("失败"), QString::fromLocal8Bit("游客身份无法修改配置文件"));
return;
}
ConfigDialog *configDialog = new ConfigDialog(this);
configDialog->setDefaultInfo(this->configInfo);
connect(configDialog, &ConfigDialog::configChanged, this, &MainWindow::setConfig);
configDialog->exec();
}
示例8: onPreferencesPressed
void MainWindow::onPreferencesPressed()
{
ConfigDialog configdialog;
if (configdialog.exec()) {
util::Config::instance().save("data/config.xml");
MessageDialog("The configuration has been saved.", "You should restart the program in order to activate the changes.",
gui::MessageDialog::QINFO);
} else {
util::Config::instance().destroy();
util::Config::instance().load("data/config.xml");
}
}
示例9: on_actionPreferences_triggered
void MainWindow::on_actionPreferences_triggered()
{
ConfigDialog *dialog = new ConfigDialog();
dialog->exec();
/* TODO */
}
示例10: configure
void Datenums::configure(QWidget *parent)
{
ConfigDialog *dlg = new ConfigDialog(parent);
dlg->exec();
delete dlg;
}
示例11:
int
P300ClassifierMain( int argc, char **argv, QApplication& app )
{
ConfigDialog dialog;
CCmdLine cmdLine;
QString arg_TrainingDataFiles;
QString arg_TestingDataFiles;
QString arg_inicfg;
QStringList arg_TrainingDataFilesList;
QStringList arg_TestingDataFilesList;
bool barg_TrainingDataFiles;
bool barg_TestingDataFiles;
bool barg_inicfg;
cmdLine.SplitLine(argc, argv);
barg_TrainingDataFiles =cmdLine.HasSwitch("-TrainingDataFiles");
barg_TestingDataFiles =cmdLine.HasSwitch("-TestingDataFiles");
barg_inicfg =cmdLine.HasSwitch("-inicfg");
//int co = cmdLine.GetArgumentCount("-TrainingDataFiles");
if (barg_TrainingDataFiles)
{
for (int i=0; i<cmdLine.GetArgumentCount("-TrainingDataFiles"); i++)
{
arg_TrainingDataFiles = arg_TrainingDataFiles.fromStdString(cmdLine.GetArgument("-TrainingDataFiles",i));
arg_TrainingDataFilesList.insert(i, arg_TrainingDataFiles);
}
}
else
{
arg_TrainingDataFiles = "";
}
if (barg_TestingDataFiles)
{
for (int i=0; i<cmdLine.GetArgumentCount("-TestingDataFiles"); i++)
{
arg_TestingDataFiles = arg_TestingDataFiles.fromStdString(cmdLine.GetArgument("-TestingDataFiles",i));
arg_TestingDataFilesList.insert(i, arg_TestingDataFiles);
}
}
else
{
arg_TestingDataFiles = "";
}
if (barg_inicfg)
{
arg_inicfg = arg_inicfg.fromStdString(cmdLine.GetArgument("-inicfg",0));
}
else
{
arg_inicfg = "";
}
QString classifierOutputFile = cmdLine.GetSafeArgument( "-ClassifierOutputFile", 0, "" ).c_str();
dialog.SetFiles(arg_TrainingDataFilesList, arg_TestingDataFilesList, arg_inicfg, classifierOutputFile);
return dialog.exec();
}
示例12: main
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
//all the translation stuff was taken from minitube
const QString locale = QLocale::system().name();
// qt translations
QTranslator qtTranslator;
qtTranslator.load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
// app translations
QString dataDir = QLatin1String(PKGDATADIR);
qDebug() << __METHOD_NAME__ << "Data dir: " << __FUNCTION__ << dataDir;
#ifdef USE_DEVELOPING
qDebug() << __METHOD_NAME__ << "Developing";
QString localeDir = qApp->applicationDirPath() + QDir::separator() + "locale";
#else
qDebug() << __METHOD_NAME__ << "Not developing";
#if defined(Q_OS_OS2) //|| defined(Q_OS_WIN) ->this isn't checked
QString localeDir = qApp->applicationDirPath() + QDir::separator() + "locale";
#else
QString localeDir = dataDir + QDir::separator() + "locale";
#endif
#endif
qDebug() << __METHOD_NAME__ << "Locale dir: " << localeDir;
QTranslator translator;
translator.load(locale, localeDir);
app.installTranslator(&translator);
#ifndef Q_OS_LINUX
QString BUILTIN_ICON_THEME = "oxygen";
QIcon::setThemeName(BUILTIN_ICON_THEME);
#endif
/**
*command line stuff
*/
int next_option;
int re = 0;
const char* const short_options = "hevc";
const struct option long_options[] =
{
{"help", 0, NULL, 'h'},
{"eggs", 0, NULL, 'e'},
{"version", 0, NULL, 'v'},
{"configure",0, NULL, 'c'},
{NULL, 0, NULL, 0}
};
next_option = getopt_long(argc, argv, short_options, long_options, NULL);
if (next_option == 'h')
{
std::cout << QString("If you have problems with the toolbar and the actions, try deleting the file .config/QIviewer/qiviewer.conf\n"
"How to use: qiviewer [OPTION/FILE]\n"
"Avaible options:\n"
" -h --help shows this help and finish\n"
" -v --version shows qiviewer version\n"
" -e --eggs shows eggs dialog\n"
" -c --configuration shows the configuration dialog\n").toStdString();
re = 0;
}
else if (next_option == 'c')
{
ConfigDialog con;
con.setWindowTitle("QIviewer configuration");
con.exec();
re = 0;
}
else if (next_option == '?')
{
std::cout << QString("Try 'qiviewer --help' for more information\n").toStdString();
re = 0;
}
else if (next_option == 'v')
{
std::cout << QString("QIviewer %1\n"
"Copyright (C) 2011 Aguilera Dario.\n"
"License GPLv2+.\n"
"<http://gnu.org/licenses/gpl.html>.\n"
"This is free software: you are free to change it and redistribute.\n"
"There is NO WARRANTY.\n"
).arg(QLatin1String(PROJECT_VERSION)).toStdString();
re = 0;
}
else if (next_option == 'e')
{
EggsDialog ed;
re = ed.exec();
}
else if (next_option == -1)
//.........这里部分代码省略.........