本文整理汇总了C++中ConfigDialog::setWindowTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigDialog::setWindowTitle方法的具体用法?C++ ConfigDialog::setWindowTitle怎么用?C++ ConfigDialog::setWindowTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigDialog
的用法示例。
在下文中一共展示了ConfigDialog::setWindowTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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)
//.........这里部分代码省略.........