本文整理汇总了C++中QC_ApplicationWindow::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ QC_ApplicationWindow::resize方法的具体用法?C++ QC_ApplicationWindow::resize怎么用?C++ QC_ApplicationWindow::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QC_ApplicationWindow
的用法示例。
在下文中一共展示了QC_ApplicationWindow::resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
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: loading translation..");
settings.beginGroup("Appearance");
QString lang = settings.value("Language", "en").toString();
QString langCmd = settings.value("LanguageCmd", "en").toString();
settings.endGroup();
RS_SYSTEM->loadTranslation(lang, langCmd);
RS_DEBUG->print("main: loading translation: OK");
RS_DEBUG->print("main: creating main window..");
QC_ApplicationWindow appWin;
RS_DEBUG->print("main: setting caption");
appWin.setWindowTitle(app.applicationName());
RS_DEBUG->print("main: show main window");
settings.beginGroup("Geometry");
int windowWidth = settings.value("WindowWidth", 1024).toInt();
int windowHeight = settings.value("WindowHeight", 1024).toInt();
int windowX = settings.value("WindowX", 32).toInt();
int windowY = settings.value("WindowY", 32).toInt();
settings.endGroup();
if (!first_load)
appWin.resize(windowWidth, windowHeight);
appWin.move(windowX, windowY);
bool maximize = settings.value("Startup/Maximize", 0).toBool();
if (maximize || first_load)
appWin.showMaximized();
else
appWin.show();
RS_DEBUG->print("main: set focus");
appWin.setFocus();
RS_DEBUG->print("main: creating main window: OK");
if (show_splash)
{
RS_DEBUG->print("main: updating splash");
splash->raise();
splash->showMessage(QObject::tr("Loading..."),
Qt::AlignRight|Qt::AlignBottom, Qt::black);
RS_DEBUG->print("main: processing events");
qApp->processEvents();
RS_DEBUG->print("main: updating splash: OK");
}
// Set LC_NUMERIC so that entering numeric values uses . as the decimal seperator
setlocale(LC_NUMERIC, "C");
RS_DEBUG->print("main: loading files..");
bool files_loaded = false;
for (QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it )
{
if (show_splash)
{
splash->showMessage(QObject::tr("Loading File %1..")
.arg(QDir::toNativeSeparators(*it)),
Qt::AlignRight|Qt::AlignBottom, Qt::black);
qApp->processEvents();
}
appWin.slotFileOpen(*it, RS2::FormatUnknown);
files_loaded = true;
}
RS_DEBUG->print("main: loading files: OK");
if (!files_loaded)
{
appWin.slotFileNewNew();
}
if (show_splash)
splash->finish(&appWin);
else
delete splash;
if (first_load)
settings.setValue("Startup/FirstLoad", 0);
RS_DEBUG->print("main: entering Qt event loop");
int return_code = app.exec();
RS_DEBUG->print("main: exited Qt event loop");
return return_code;
}