当前位置: 首页>>代码示例>>C++>>正文


C++ QSplashScreen::clearMessage方法代码示例

本文整理汇总了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.
开发者ID:CJCombrink,项目名称:Qtilities,代码行数:67,代码来源:main.cpp

示例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();
}
开发者ID:RealOpInsightLabs,项目名称:realopinsight-workstation,代码行数:74,代码来源:ngrt4n-manager.cpp


注:本文中的QSplashScreen::clearMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。