本文整理汇总了C++中QC_ApplicationWindow::show方法的典型用法代码示例。如果您正苦于以下问题:C++ QC_ApplicationWindow::show方法的具体用法?C++ QC_ApplicationWindow::show怎么用?C++ QC_ApplicationWindow::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QC_ApplicationWindow
的用法示例。
在下文中一共展示了QC_ApplicationWindow::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QC_ApplicationWindow w;
w.show();
return a.exec();
}
示例2: main
/**
* Main. Creates Application window.
*
* Cleaning up #defines.
*/
int main(int argc, char** argv) {
RS_DEBUG->setLevel(RS_Debug::D_WARNING);
RS_DEBUG->print("param 0: %s", argv[0]);
QCoreApplication::setApplicationName(XSTR(QC_APPNAME));
#if QT_VERSION < 0x040400
/* No such property in Qt 4.3 */
#else
QCoreApplication::setApplicationVersion(XSTR(QC_VERSION));
#endif
QApplication app(argc, argv);
// for image mime resources from png files
// TODO: kinda dirty to call that explicitly
// QINITIMAGES_LIBRECAD();
#ifdef RS_SCRIPTING
// qInitImages_librecad();
#endif
for (int i=0; i<app.argc(); i++) {
if (QString("--debug") == app.argv()[i]) {
RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
}
}
QFileInfo prgInfo( QFile::decodeName(argv[0]) );
QString prgDir(prgInfo.absolutePath());
RS_SETTINGS->init(XSTR(QC_COMPANYKEY), XSTR(QC_APPKEY));
RS_SYSTEM->init(XSTR(QC_APPNAME), XSTR(QC_VERSION), XSTR(QC_APPDIR), prgDir);
RS_FileIO::instance()->registerFilter(&( RS_FilterLFF::createFilter));
RS_FileIO::instance()->registerFilter( &(RS_FilterDXFRW::createFilter));
RS_FileIO::instance()->registerFilter( &(RS_FilterCXF::createFilter));
RS_FileIO::instance()->registerFilter( &(RS_FilterJWW::createFilter));
RS_FileIO::instance()->registerFilter( &(RS_FilterDXF1::createFilter));
// parse command line arguments that might not need a launched program:
QStringList fileList = handleArgs(argc, argv);
QString lang;
QString langCmd;
QString unit;
RS_SETTINGS->beginGroup("/Defaults");
#ifndef QC_PREDEFINED_UNIT
unit = RS_SETTINGS->readEntry("/Unit", "Invalid");
#else
unit = RS_SETTINGS->readEntry("/Unit", QC_PREDEFINED_UNIT);
#endif
RS_SETTINGS->endGroup();
// show initial config dialog:
if (unit=="Invalid") {
RS_DEBUG->print("main: show initial config dialog..");
QG_DlgInitial di(NULL);
di.setText("<font size=\"+1\"><b>Welcome to " XSTR(QC_APPNAME) "</b></font>"
"<br>"
"Please choose the unit you want to use for new drawings and your "
"preferred language.<br>"
"You can changes these settings later in the "
"Options Dialog of " XSTR(QC_APPNAME) ".");
QPixmap pxm(":/main/intro_librecad.png");
di.setPixmap(pxm);
if (di.exec()) {
RS_SETTINGS->beginGroup("/Defaults");
unit = RS_SETTINGS->readEntry("/Unit", "None");
RS_SETTINGS->endGroup();
}
RS_DEBUG->print("main: show initial config dialog: OK");
}
#ifdef QSPLASHSCREEN_H
RS_DEBUG->print("main: splashscreen..");
QPixmap* pixmap = new QPixmap(":/main/splash_librecad.png");
# endif
RS_DEBUG->print("main: init fontlist..");
RS_FONTLIST->init();
RS_DEBUG->print("main: init fontlist: OK");
RS_DEBUG->print("main: init patternlist..");
RS_PATTERNLIST->init();
RS_DEBUG->print("main: init patternlist: OK");
RS_DEBUG->print("main: init scriptlist..");
RS_SCRIPTLIST->init();
RS_DEBUG->print("main: init scriptlist: OK");
RS_DEBUG->print("main: loading translation..");
RS_SETTINGS->beginGroup("/Appearance");
//.........这里部分代码省略.........
示例3: main
//.........这里部分代码省略.........
break;
case '0' + RS_Debug::D_INFORMATIONAL :
RS_DEBUG->setLevel( RS_Debug::D_INFORMATIONAL);
++i;
break;
case '0' + RS_Debug::D_DEBUGGING :
RS_DEBUG->setLevel( RS_Debug::D_DEBUGGING);
++i;
break;
default :
RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
break;
}
}
}
RS_DEBUG->print("param 0: %s", argv[0]);
QFileInfo prgInfo( QFile::decodeName(argv[0]) );
QString prgDir(prgInfo.absolutePath());
RS_SETTINGS->init(app.organizationName(), app.applicationName());
RS_SYSTEM->init(app.applicationName(), app.applicationVersion(), XSTR(QC_APPDIR), prgDir);
// parse command line arguments that might not need a launched program:
QStringList fileList = handleArgs(argc, argv, argClean);
QString unit = settings.value("Defaults/Unit", "Invalid").toString();
// show initial config dialog:
if (first_load)
{
RS_DEBUG->print("main: show initial config dialog..");
QG_DlgInitial di(nullptr);
QPixmap pxm(":/main/intro_librecad.png");
di.setPixmap(pxm);
if (di.exec())
{
RS_SETTINGS->beginGroup("/Defaults");
unit = RS_SETTINGS->readEntry("/Unit", "None");
RS_SETTINGS->endGroup();
}
RS_DEBUG->print("main: show initial config dialog: OK");
}
auto splash = new QSplashScreen;
bool show_splash = settings.value("Startup/ShowSplash", 1).toBool();
if (show_splash)
{
QPixmap pixmap(":/main/splash_librecad.png");
splash->setPixmap(pixmap);
splash->setAttribute(Qt::WA_DeleteOnClose);
splash->show();
splash->showMessage(QObject::tr("Loading.."),
Qt::AlignRight|Qt::AlignBottom, Qt::black);
app.processEvents();
RS_DEBUG->print("main: splashscreen: OK");
}
RS_DEBUG->print("main: init fontlist..");
RS_FONTLIST->init();
RS_DEBUG->print("main: init fontlist: OK");
示例4: main
//.........这里部分代码省略.........
RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
break;
}
// }
// else {
// RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
// }
}
}
RS_DEBUG->print("param 0: %s", argv[0]);
QFileInfo prgInfo( QFile::decodeName(argv[0]) );
QString prgDir(prgInfo.absolutePath());
RS_SETTINGS->init(XSTR(QC_COMPANYKEY), XSTR(QC_APPKEY));
RS_SYSTEM->init(XSTR(QC_APPNAME), XSTR(QC_VERSION), XSTR(QC_APPDIR), prgDir);
// parse command line arguments that might not need a launched program:
QStringList fileList = handleArgs(argc, argv, argClean);
QString lang;
QString langCmd;
QString unit;
RS_SETTINGS->beginGroup("/Defaults");
#ifndef QC_PREDEFINED_UNIT
unit = RS_SETTINGS->readEntry("/Unit", "Invalid");
#else
unit = RS_SETTINGS->readEntry("/Unit", QC_PREDEFINED_UNIT);
#endif
RS_SETTINGS->endGroup();
// show initial config dialog:
if (unit=="Invalid") {
RS_DEBUG->print("main: show initial config dialog..");
QG_DlgInitial di(NULL);
di.setText("<font size=\"+1\"><b>Welcome to " XSTR(QC_APPNAME) "</b></font>"
"<br>"
"Please choose the unit you want to use for new drawings and your "
"preferred language.<br>"
"You can changes these settings later in the "
"Options Dialog of " XSTR(QC_APPNAME) ".");
QPixmap pxm(":/main/intro_librecad.png");
di.setPixmap(pxm);
if (di.exec()) {
RS_SETTINGS->beginGroup("/Defaults");
unit = RS_SETTINGS->readEntry("/Unit", "None");
RS_SETTINGS->endGroup();
}
RS_DEBUG->print("main: show initial config dialog: OK");
}
#ifdef QSPLASHSCREEN_H
// RS_DEBUG->print("main: splashscreen..");
QPixmap* pixmap = new QPixmap(":/main/splash_librecad.png");
#endif
RS_DEBUG->print("main: init fontlist..");
RS_FONTLIST->init();
RS_DEBUG->print("main: init fontlist: OK");
RS_DEBUG->print("main: init patternlist..");
RS_PATTERNLIST->init();
RS_DEBUG->print("main: init patternlist: OK");
RS_DEBUG->print("main: init scriptlist..");