本文整理汇总了C++中QSplashScreen::clearMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplashScreen::clearMessage方法的具体用法?C++ QSplashScreen::clearMessage怎么用?C++ QSplashScreen::clearMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplashScreen
的用法示例。
在下文中一共展示了QSplashScreen::clearMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
// Add the code editor config widget:
CodeEditorWidgetConfig code_editor_config;
OBJECT_MANAGER->registerObject(&code_editor_config,QtilitiesCategory("GUI::Configuration Pages (IConfigPage)","::"));
// Create the Example before plugin loading since it registers a project items:
ExampleMode* example_mode = new ExampleMode;
file_menu->addSeperator();
command = ACTION_MANAGER->registerActionPlaceHolder("File.ToggleModeIcon",QObject::tr("Toggle Mode Icon"),QKeySequence(),std_context);
QObject::connect(command->action(),SIGNAL(triggered()),example_mode,SLOT(toggleModeIcon()));
file_menu->addAction(command);
OBJECT_MANAGER->registerObject(example_mode);
file_menu->addSeperator();
command = ACTION_MANAGER->registerActionPlaceHolder(qti_action_FILE_EXIT,QObject::tr("Exit"),QKeySequence(QKeySequence::Close),std_context);
QObject::connect(command->action(),SIGNAL(triggered()),QCoreApplication::instance(),SLOT(quit()));
file_menu->addAction(command);
// About Menu
command = ACTION_MANAGER->registerActionPlaceHolder(qti_action_ABOUT_QTILITIES,QObject::tr("About Qtilities"),QKeySequence(),std_context);
QObject::connect(command->action(),SIGNAL(triggered()),QtilitiesApplication::instance(),SLOT(aboutQtilities()));
about_menu->addAction(command);
command = ACTION_MANAGER->registerActionPlaceHolder("General.AboutQt","About Qt",QKeySequence(),std_context);
about_menu->addAction(command);
QObject::connect(command->action(),SIGNAL(triggered()),QApplication::instance(),SLOT(aboutQt()));
// Load plugins using the extension system:
Log->toggleQtMsgEngine(true);
EXTENSION_SYSTEM->enablePluginActivityControl();
EXTENSION_SYSTEM->addPluginPath("../../plugins/");
EXTENSION_SYSTEM->initialize();
Log->toggleQtMsgEngine(false);
#ifdef QT_NO_DEBUG
splash->clearMessage();
#endif
// Create the example file system side widget and add it to the global object pool
QList<int> modes;
modes << MODE_EXAMPLE_ID;
SideViewerWidgetFactory* file_system_side_widget_helper = new SideViewerWidgetFactory(&SideWidgetFileSystem::factory,"File System",modes,modes);
OBJECT_MANAGER->registerObject(file_system_side_widget_helper,QtilitiesCategory("GUI::Side Viewer Widgets (ISideViewerWidget)","::"));
QObject::connect(file_system_side_widget_helper,SIGNAL(newWidgetCreated(QWidget*,QString)),example_mode,SLOT(handleNewFileSystemWidget(QWidget*)));
SideViewerWidgetFactory* object_scope_side_widget_helper = new SideViewerWidgetFactory(&ObjectScopeWidget::factory,"Object Scope",modes,modes);
OBJECT_MANAGER->registerObject(object_scope_side_widget_helper,QtilitiesCategory("GUI::Side Viewer Widgets (ISideViewerWidget)","::"));
#ifdef QTILITIES_PROPERTY_BROWSER
SideViewerWidgetFactory* property_editor_side_widget_helper = new SideViewerWidgetFactory(&ObjectPropertyBrowser::factory,"Property Browser",modes,modes);
OBJECT_MANAGER->registerObject(property_editor_side_widget_helper,QtilitiesCategory("GUI::Side Viewer Widgets (ISideViewerWidget)","::"));
#endif
exampleMainWindow.modeManager()->initialize();
// Register command editor config page.
OBJECT_MANAGER->registerObject(ACTION_MANAGER->commandEditor(),QtilitiesCategory("GUI::Configuration Pages (IConfigPage)","::"));
// Register extension system config page.
OBJECT_MANAGER->registerObject(EXTENSION_SYSTEM->configWidget(),QtilitiesCategory("GUI::Configuration Pages (IConfigPage)","::"));
// Report on the number of config pages found.
QList<QObject*> registered_config_pages = OBJECT_MANAGER->registeredInterfaces("IConfigPage");
LOG_INFO(QString("%1 configuration page(s) found in set of loaded plugins.").arg(registered_config_pages.count()));
config_widget.initialize(registered_config_pages);
// Report on the number of side widgets found.
QList<QObject*> registered_side_widgets = OBJECT_MANAGER->registeredInterfaces("ISideViewerWidget");
LOG_INFO(QString("%1 side viewer widget(s) found in set of loaded plugins.").arg(registered_side_widgets.count()));
// Load the previous session's keyboard mapping file.
示例2: main
int main(int argc, char **argv)
{
QApplication* app = new QApplication(argc, argv);
Q_INIT_RESOURCE(ngrt4n);
INIT_TRANSLATION;
app->setWindowIcon(QIcon(":images/built-in/icon.png"));
app->setApplicationName(APP_NAME.toUpper());
app->setStyleSheet(GuiPreferences::style());
QString cmdName = ngrt4n::basename(argv[0]);
QString versionMsg = ngrt4n::getWelcomeMsg("Workstation");
QString module = "config";
QString file = (argc >= 2)? argv[1] : "";
int opt;
if ((opt = getopt(argc, argv, "chvd:e:")) != -1) {
switch (opt) {
case 'c':
module = "config";
break;
case 'd':
module = "dashboard";
file = optarg;
break;
case 'e':
module = "editor";
file = optarg;
break;
case 'v':
std::cout << versionMsg.toStdString()<<"\n";
exit(0);
case 'h': {
std::cout << usage.arg(cmdName).toStdString();
exit(0);
}
default:
std::cout << usage.arg(cmdName).toStdString();
exit(1);
break;
}
}
std::clog << versionMsg.toStdString()<<"\n";
Auth authentication;
int userRole = authentication.exec();
if (userRole != Auth::AdmUserRole && userRole != Auth::OpUserRole) exit(1);
if (module == "dashboard") {
QSplashScreen* info = ngrt4n::infoScreen(versionMsg);
ngrt4n::delay(1);
if (file == "") {
info->clearMessage();
info->showMessage(QObject::tr("You need to select a description file!"), Qt::AlignCenter|Qt::AlignCenter);
ngrt4n::delay(1); info->finish(0);
file = QFileDialog::getOpenFileName(0,
QObject::tr("%1 | Select a description file").arg(APP_NAME),
".",
QObject::tr("Xml files (*.xml);;All files (*)"));
if (!file.length()){
ngrt4n::alert(QObject::tr("No description file has been selected and the program will exit!"));
exit (1);
}
}
info->finish(0);
MainWindow* console= new MainWindow(userRole, file);
console->render();
} else if (module == "editor") {
SvCreator* editor = new SvCreator(userRole);
editor->load(file);
} else if (module == "config") {
GuiPreferences* monPref = new GuiPreferences(userRole, Preferences::ChangeMonitoringSettings);
monPref->exec();
exit(0);
}
return app->exec();
}