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


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

本文整理汇总了C++中QSplashScreen::close方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplashScreen::close方法的具体用法?C++ QSplashScreen::close怎么用?C++ QSplashScreen::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QSplashScreen的用法示例。


在下文中一共展示了QSplashScreen::close方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap(":/images/splash.jpg"));
    splash->show();
    splash->showMessage(QApplication::tr("Setting up the main window..."), Qt::AlignRight | Qt::AlignTop);

    MainWindow w;
    w.show();
    splash->finish(&w);
    splash->close();
    delete splash;

    return a.exec();
}
开发者ID:june3474,项目名称:mainwindow,代码行数:17,代码来源:main.cpp

示例2: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QTranslator t;
    QDate today = QDate::currentDate();
    if ( today.month() == 4 && today.day() == 1 )
    {
        t.load(":/translations/koi7.qm");
    }
    else
    {
        t.load(":/translations/ru.qm");
    }
    QApplication::installTranslator(&t);

    Settings::instance();
    Logger::logger();

    QPixmap logo(":/resources/logo.png");
    QSplashScreen *splash =
            new QSplashScreen(logo, Qt::FramelessWindowHint | Qt::SplashScreen);

    splash->setMask( logo.mask() );

    splash->show();
    Settings::instance()->updateLocalData();
    splash->close();

    delete splash;

    LauncherWindow w;
    w.show();

    return a.exec();
}
开发者ID:zaitsevyan,项目名称:ttyhlauncher,代码行数:36,代码来源:main.cpp

示例3: main


//.........这里部分代码省略.........
			return EXIT_FAILURE;
		}

		//splash screen
		splashStartTime.start();
		QPixmap pixmap(QString::fromUtf8(":/CC/images/imLogoV2Qt.png"));
		splash = new QSplashScreen(pixmap, Qt::WindowStaysOnTopHint);
		splash->show();
		QApplication::processEvents();
	}

	//global structures initialization
	ccTimer::Init();
	FileIOFilter::InitInternalFilters(); //load all known I/O filters (plugins will come later!)
	ccNormalVectors::GetUniqueInstance(); //force pre-computed normals array initialization
	ccColorScalesManager::GetUniqueInstance(); //force pre-computed color tables initialization

	int result = 0;

	if (commandLine)
	{
		//command line processing (no GUI)
		result = ccCommandLineParser::Parse(argc, argv);
	}
	else
	{
		//main window init.
		MainWindow* mainWindow = MainWindow::TheInstance();
		if (!mainWindow)
		{
			QMessageBox::critical(0, "Error", "Failed to initialize the main application window?!");
			return EXIT_FAILURE;
		}
		mainWindow->show();
		QApplication::processEvents();

		//show current Global Shift parameters in Console
		{
			ccLog::Print(QString("[Global Shift] Max abs. coord = %1 / max abs. diag = %2")
				.arg(ccGlobalShiftManager::MaxCoordinateAbsValue(), 0, 'e', 0)
				.arg(ccGlobalShiftManager::MaxBoundgBoxDiagonal(), 0, 'e', 0));
		}


		if (argc > lastArgumentIndex)
		{
			if (splash)
				splash->close();

			//any additional argument is assumed to be a filename --> we try to load it/them
			QStringList filenames;
			for (int i = lastArgumentIndex; i<argc; ++i)
				filenames << QString(argv[i]);

			mainWindow->addToDB(filenames);
		}
		
		if (splash)
		{
			//we want the splash screen to be visible a minimum amount of time (1000 ms.)
			while (splashStartTime.elapsed() < 1000)
			{
				splash->raise();
				QApplication::processEvents(); //to let the system breath!
			}

			splash->close();
			QApplication::processEvents();

			delete splash;
			splash = 0;
		}

		//let's rock!
		try
		{
			result = app.exec();
		}
		catch(...)
		{
			QMessageBox::warning(0, "CC crashed!","Hum, it seems that CC has crashed... Sorry about that :)");
		}
	}

	//release global structures
	MainWindow::DestroyInstance();
	FileIOFilter::UnregisterAll();

#ifdef CC_TRACK_ALIVE_SHARED_OBJECTS
	//for debug purposes
	unsigned alive = CCShareable::GetAliveCount();
	if (alive > 1)
	{
		printf("Error: some shared objects (%u) have not been released on program end!",alive);
		system("PAUSE");
	}
#endif

	return result;
}
开发者ID:TJC-AS,项目名称:trunk,代码行数:101,代码来源:main.cpp

示例4: main


//.........这里部分代码省略.........
    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.
    QString shortcut_mapping_file = QString("%1/%2").arg(QtilitiesApplication::applicationSessionPath()).arg(qti_def_PATH_SHORTCUTS_FILE);
    ACTION_MANAGER->loadShortcutMapping(shortcut_mapping_file);

    // Show the main window:
    exampleMainWindow.readSettings();
    exampleMainWindow.show();
    #ifdef QT_NO_DEBUG
    splash->close();
    #endif

    LOG_INFO("< > < >");

    // Initialize the project manager:
    // PROJECT_MANAGER->setAllowedProjectTypes(IExportable::XML);
    PROJECT_MANAGER_INITIALIZE();

    ACTION_MANAGER->commandObserver()->endProcessingCycle(false);
    ACTION_MANAGER->actionContainerObserver()->endProcessingCycle(false);
    OBJECT_MANAGER->objectPool()->endProcessingCycle(false);

    #ifndef QTILITIES_NO_HELP
    HELP_MANAGER->initialize();
    #endif

    int result = a.exec();
    exampleMainWindow.writeSettings();

    // Finalize the project manager:
    PROJECT_MANAGER_FINALIZE();

    // Save the current keyboard mapping for the next session.
    ACTION_MANAGER->saveShortcutMapping(shortcut_mapping_file);

    LOG_FINALIZE();
    return result;
}
开发者ID:CJCombrink,项目名称:Qtilities,代码行数:101,代码来源:main.cpp

示例5: runSingleSession

int runSingleSession(int argc, char *argv[]){
  //QTime clock;
  //clock.start();
  Backend::checkLocalDirs();  // Create and fill "/usr/local/share/PCDM" if needed
  Backend::openLogFile("/var/log/PCDM.log");  
  //qDebug() << "Backend Checks Finished:" << QString::number(clock.elapsed())+" ms";
  //Check for the flag to try and auto-login
  bool ALtriggered = FALSE;
  if(QFile::exists(TMPAUTOLOGINFILE)){ ALtriggered=TRUE; QFile::remove(TMPAUTOLOGINFILE); }
  
  QString changeLang; 
  // Load the configuration file
  QString confFile = "/usr/local/etc/pcdm.conf";
  if(!QFile::exists(confFile)){ 
    qDebug() << "PCDM: Configuration file missing:"<<confFile<<"\n  - Using default configuration";
    confFile = ":samples/pcdm.conf"; 
  }
  
  Config::loadConfigFile(confFile);
  //qDebug() << "Config File Loaded:" << QString::number(clock.elapsed())+" ms";
  // Startup the main application
  QApplication a(argc,argv); 
  
  // Show our splash screen, so the user doesn't freak that that it takes a few seconds to show up
  QSplashScreen splash;
  if(!Config::splashscreen().isEmpty()){
    splash.setPixmap( QPixmap(Config::splashscreen()) ); //load the splashscreen file
  }
  splash.show();
  QCoreApplication::processEvents(); //Process the splash screen event immediately
  //qDebug() << "SplashScreen Started:" << QString::number(clock.elapsed())+" ms";
  //Initialize the xprocess
  XProcess desktop;
  
  //*** STARTUP THE PROGRAM ***
  bool goodAL = FALSE; //Flag for whether the autologin was successful
  // Start the autologin procedure if applicable
  if( ALtriggered && Config::useAutoLogin() ){
    //Setup the Auto Login
    QString user = Backend::getALUsername();
    QString pwd = Backend::getALPassword();
    QString dsk = Backend::getLastDE(user);
    if( user.isEmpty() || dsk.isEmpty() ){
	 goodAL=FALSE;   
    }else{
	desktop.loginToXSession(user,pwd, dsk);
	splash.close();
	if(desktop.isRunning()){
	  goodAL=TRUE; //flag this as a good login to skip the GUI
	}
    }
  }
  //qDebug() << "AutoLogin Finished:" << QString::number(clock.elapsed())+" ms";
  if(!goodAL){
    // ------START THE PCDM GUI-------
    
    // Check what directory our app is in
    QString appDir = "/usr/local/share/PCDM";
    // Load the translator
    QTranslator translator;
    QLocale mylocale;
    QString langCode = mylocale.name();
    //Check for a language change detected
    if ( ! changeLang.isEmpty() )       
       langCode = changeLang;
    //Load the proper locale for the translator
    if ( QFile::exists(appDir + "/i18n/PCDM_" + langCode + ".qm" ) ) {
      translator.load( QString("PCDM_") + langCode, appDir + "/i18n/" );
      a.installTranslator(&translator);
      Backend::log("Loaded Translation:" + appDir + "/i18n/PCDM_" + langCode + ".qm");
    } else {
      Backend::log("Could not find: " + appDir + "/i18n/PCDM_" + langCode + ".qm");
      langCode = "";
    }
    //qDebug() << "Translation Finished:" << QString::number(clock.elapsed())+" ms";

    Backend::log("Starting up PCDM interface");
    PCDMgui w;
    //qDebug() << "Main GUI Created:" << QString::number(clock.elapsed())+" ms";
    splash.finish(&w); //close the splash when the GUI starts up

    // Set full-screen dimensions
    QRect dimensions = QApplication::desktop()->screenGeometry();
    int wid = dimensions.width();     // returns desktop width
    int hig = dimensions.height();    // returns desktop height
    w.setGeometry(0, 0, wid, hig);

    //Set the proper size on the Application
    w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
    w.setWindowState(Qt::WindowMaximized); //Qt::WindowFullScreen);

    //Setup the signals/slots to startup the desktop session
    if(USECLIBS){ QObject::connect( &w,SIGNAL(xLoginAttempt(QString,QString,QString)), &desktop,SLOT(setupDesktop(QString,QString,QString))); }
    else{ QObject::connect( &w,SIGNAL(xLoginAttempt(QString,QString,QString)), &desktop,SLOT(loginToXSession(QString,QString,QString)) ); }
    //Setup the signals/slots for return information for the GUI
    QObject::connect( &desktop, SIGNAL(InvalidLogin()), &w, SLOT(slotLoginFailure()) );
    QObject::connect( &desktop, SIGNAL(started()), &w, SLOT(slotLoginSuccess()) );
    QObject::connect( &desktop, SIGNAL(ValidLogin()), &w, SLOT(slotLoginSuccess()) );
    
    //qDebug() << "Showing GUI:" << QString::number(clock.elapsed())+" ms";
//.........这里部分代码省略.........
开发者ID:KdeOs,项目名称:pcbsd,代码行数:101,代码来源:main.cpp

示例6: main

int main(int argc, char **argv)
{
	//QT initialiation
	qccApplication app(argc, argv);

	//Force 'english' local so as to get a consistent behavior everywhere
	QLocale::setDefault(QLocale::English);

#ifdef Q_OS_LINUX
    // we reset the numeric locale. As suggested in documetation
    // see http://qt-project.org/doc/qt-5/qcoreapplication.html#locale-settings
    // Basically - from doc: - "On Unix/Linux Qt is configured to use the system locale settings by default.
    // This can cause a conflict when using POSIX functions, for instance,
    // when converting between data types such as floats and strings"
    setlocale(LC_NUMERIC,"C");
#endif

#ifdef USE_VLD
	VLDEnable();
#endif

	//splash screen
	QSplashScreen* splash = 0;
	QTime splashStartTime;

	//Command line mode?
	bool commandLine = (argc > 1 && argv[1][0] == '-');
	if (!commandLine)
	{
		//OpenGL?
		if (!QGLFormat::hasOpenGL())
		{
			QMessageBox::critical(0, "Error", "This application needs OpenGL to run!");
			return EXIT_FAILURE;
		}

		//splash screen
		splashStartTime.start();
		QPixmap pixmap(QString::fromUtf8(":/CC/images/imLogoV2Qt.png"));
		splash = new QSplashScreen(pixmap,Qt::WindowStaysOnTopHint);
		splash->show();
		QApplication::processEvents();
	}

	//global structures initialization
	ccTimer::Init();
	FileIOFilter::InitInternalFilters(); //load all known I/O filters (plugins will come later!)
	ccNormalVectors::GetUniqueInstance(); //force pre-computed normals array initialization
	ccColorScalesManager::GetUniqueInstance(); //force pre-computed color tables initialization

	int result = 0;

	if (commandLine)
	{
		//command line processing (no GUI)
		result = ccCommandLineParser::Parse(argc,argv);
	}
	else
	{
		//main window init.
		MainWindow* mainWindow = MainWindow::TheInstance();
		if (!mainWindow)
		{
			QMessageBox::critical(0, "Error", "Failed to initialize the main application window?!");
			return EXIT_FAILURE;
		}
		mainWindow->show();
		QApplication::processEvents();

		if (argc > 1)
		{
			if (splash)
				splash->close();

			//any additional argument is assumed to be a filename --> we try to load it/them
			QStringList filenames;
			for (int i=1; i<argc; ++i)
				filenames << QString(argv[i]);

			mainWindow->addToDB(filenames);
		}
		
		if (splash)
		{
			//we want the splash screen to be visible a minimum amount of time (1000 ms.)
			while (splashStartTime.elapsed() < 1000)
			{
				splash->raise();
				QApplication::processEvents(); //to let the system breath!
			}

			splash->close();
			QApplication::processEvents();

			delete splash;
			splash = 0;
		}

		//let's rock!
		try
//.........这里部分代码省略.........
开发者ID:ORNis,项目名称:CloudCompare,代码行数:101,代码来源:main.cpp

示例7: main


//.........这里部分代码省略.........
	ccPlugins::LoadPlugins(plugins, pluginPaths, dirFilters);
	
	int result = 0;

	//command line mode
	if (commandLine)
	{
		//command line processing (no GUI)
		result = ccCommandLineParser::Parse(argc, argv);
	}
	else
	{
		//main window init.
		MainWindow* mainWindow = MainWindow::TheInstance();
		if (!mainWindow)
		{
			QMessageBox::critical(0, "Error", "Failed to initialize the main application window?!");
			return EXIT_FAILURE;
		}
		mainWindow->dispatchPlugins(plugins, pluginPaths);
		mainWindow->show();
		QApplication::processEvents();

		//show current Global Shift parameters in Console
		{
			ccLog::Print(QString("[Global Shift] Max abs. coord = %1 / max abs. diag = %2")
				.arg(ccGlobalShiftManager::MaxCoordinateAbsValue(), 0, 'e', 0)
				.arg(ccGlobalShiftManager::MaxBoundgBoxDiagonal(), 0, 'e', 0));
		}

		if (argc > lastArgumentIndex)
		{
			if (splash)
				splash->close();

			//any additional argument is assumed to be a filename --> we try to load it/them
			QStringList filenames;
			for (int i = lastArgumentIndex; i < argc; ++i)
			{
				QString arg(argv[i]);
				//special command: auto start a plugin
				if (arg.startsWith(":start-plugin:"))
				{
					QString pluginName = arg.mid(14);
					QString pluginNameUpper = pluginName.toUpper();
					//look for this plugin
					bool found = false;
					for (const tPluginInfo &plugin : plugins)
					{
						if (plugin.object->getName().replace(' ', '_').toUpper() == pluginNameUpper)
						{
							found = true;
							bool success = plugin.object->start();
							if (!success)
							{
								ccLog::Error(QString("Failed to start the plugin '%1'").arg(plugin.object->getName()));
							}
							break;
						}
					}

					if (!found)
					{
						ccLog::Error(QString("Couldn't find the plugin '%1'").arg(pluginName.replace('_', ' ')));
					}
				}
开发者ID:coolshahabaz,项目名称:trunk,代码行数:67,代码来源:main.cpp

示例8: run_wallet

int run_wallet (QApplication & application, int argc, char * const * argv, boost::filesystem::path const & data_path)
{
	rai_qt::eventloop_processor processor;
	boost::filesystem::create_directories (data_path);
	QPixmap pixmap (":/logo.png");
	QSplashScreen * splash = new QSplashScreen (pixmap);
	splash->show ();
	application.processEvents ();
	splash->showMessage (QSplashScreen::tr ("Remember - Back Up Your Wallet Seed"), Qt::AlignBottom | Qt::AlignHCenter, Qt::darkGray);
	application.processEvents ();
	qt_wallet_config config (data_path);
	auto config_path ((data_path / "config.json"));
	int result (0);
	std::fstream config_file;
	auto error (rai::fetch_object (config, config_path, config_file));
	config_file.close ();
	if (!error)
	{
		boost::asio::io_service service;
		config.node.logging.init (data_path);
		std::shared_ptr<rai::node> node;
		std::shared_ptr<rai_qt::wallet> gui;
		rai::set_application_icon (application);
		auto opencl (rai::opencl_work::create (config.opencl_enable, config.opencl, config.node.logging));
		rai::work_pool work (config.node.work_threads, opencl ? [&opencl](rai::uint256_union const & root_a) {
			return opencl->generate_work (root_a);
		}
		                                                      : std::function<boost::optional<uint64_t> (rai::uint256_union const &)> (nullptr));
		rai::alarm alarm (service);
		rai::node_init init;
		node = std::make_shared<rai::node> (init, service, data_path, alarm, config.node, work);
		if (!init.error ())
		{
			auto wallet (node->wallets.open (config.wallet));
			if (wallet == nullptr)
			{
				auto existing (node->wallets.items.begin ());
				if (existing != node->wallets.items.end ())
				{
					wallet = existing->second;
					config.wallet = existing->first;
				}
				else
				{
					wallet = node->wallets.create (config.wallet);
				}
			}
			if (config.account.is_zero () || !wallet->exists (config.account))
			{
				rai::transaction transaction (wallet->store.environment, nullptr, true);
				auto existing (wallet->store.begin (transaction));
				if (existing != wallet->store.end ())
				{
					rai::uint256_union account (existing->first.uint256 ());
					config.account = account;
				}
				else
				{
					config.account = wallet->deterministic_insert (transaction);
				}
			}
			assert (wallet->exists (config.account));
			update_config (config, config_path, config_file);
			node->start ();
			std::unique_ptr<rai::rpc> rpc = get_rpc (service, *node, config.rpc);
			if (rpc && config.rpc_enable)
			{
				rpc->start ();
			}
			rai::thread_runner runner (service, node->config.io_threads);
			QObject::connect (&application, &QApplication::aboutToQuit, [&]() {
				rpc->stop ();
				node->stop ();
			});
			application.postEvent (&processor, new rai_qt::eventloop_event ([&]() {
				gui = std::make_shared<rai_qt::wallet> (application, processor, *node, wallet, config.account);
				splash->close ();
				gui->start ();
				gui->client_window->show ();
			}));
			result = application.exec ();
			runner.join ();
		}
		else
		{
			show_error ("Error initializing node");
		}
		update_config (config, config_path, config_file);
	}
	else
	{
		show_error ("Error deserializing config");
	}
	return result;
}
开发者ID:romansokolovski,项目名称:raiblocks,代码行数:95,代码来源:entry.cpp

示例9: logo


//.........这里部分代码省略.........
								m_settingsDialog->useTtl(),
								m_settingsDialog->msecsToShowInactive(),
								m_settingsDialog->msecsToShowOutOfRange(),
								m_settingsDialog->msecsToDelete());
	QObject::connect(m_tagViewManager, SIGNAL(requestTagSettings(QString)), this, SLOT(requestTagSettingsDialog(QString)));
	QObject::connect(m_tagViewManager, SIGNAL(requestTagAdvancedSettings(QString, QString)), this, SLOT(requestTagAdvancedSettingsDialog(QString, QString)));
	QObject::connect(m_tagViewManager, SIGNAL(requestReaderAdvancedSettings(QString)), this, SLOT(requestReaderAdvancedSettingsDialog(QString)));
	QObject::connect(m_tagViewManager, SIGNAL(requestReaderRegisterMap(QString)), this, SLOT(requestReaderRegisterMap(QString)));
	QObject::connect(m_tagViewManager, SIGNAL(newTagCount(int)), ui.tagCountNumber, SLOT(display(int)));
	QObject::connect(m_tagViewManager, SIGNAL(newDifferentTagCount(int)), ui.differentTagCountNumber, SLOT(display(int)));
	QObject::connect(m_tagViewManager, SIGNAL(newOverallDifferentTagCount(int)), ui.overallDifferentTagCountNumber, SLOT(display(int)));
	QObject::connect(m_tagViewManager, SIGNAL(oldTagEntryRemoved(QString,QString)), m_tagManager, SLOT(oldTagEntryRemoved(QString,QString)));
	QObject::connect(m_tagViewManager, SIGNAL(currentReaderChanged(QString)), this, SLOT(currentReaderChanged(QString)));
	QObject::connect(m_tagViewManager, SIGNAL(countTotalTags(QString)), this, SLOT(countTotalTags(QString)));
	splash->showMessage(tr("Connect..."), alignment);

	/* Connect the signals of the gui to the right slots */
	QObject::connect(QrfeTrace::getInstance(), SIGNAL(traceSignal(QString)), 	ui.traceBrowser, SLOT(append(QString)));
	QObject::connect(ui.actionAboutReaderTool, SIGNAL(triggered (bool)), 		m_aboutDialog, SLOT(exec()));
	QObject::connect(ui.actionShow_TagList, SIGNAL(triggered (bool)), 			m_tagListDialog, SLOT(exec()));

	QObject::connect(ui.readerTabWidget, SIGNAL(currentChanged(int)), 			this, SLOT(selectReader(int)));
	QObject::connect(ui.startScanButton, SIGNAL(toggled (bool)), 				this, SLOT(startScan(bool)));
	QObject::connect(ui.handleActionPushButton, SIGNAL(toggled(bool)), 			this, SLOT(handleActionsToggled(bool)));
	QObject::connect(ui.actionAdd_Serial_Reader, SIGNAL(triggered(bool)), 		this, SLOT(addSerialReader()));
	//Del by yingwei tseng for hiding AMS code, 2010/03/10
	//QObject::connect(ui.actionAdd_Tcp_Reader, SIGNAL(triggered(bool)), 			this, SLOT(addTcpReader()));
	//End by yingwei tseng for hiding AMS code, 2010/03/10	
	QObject::connect(ui.actionHandle_Actions, SIGNAL(triggered(bool)), 			this, SLOT(handleActionsToggled(bool)));
	QObject::connect(ui.actionShow_Alias_Names, SIGNAL(triggered ( bool)), 		this, SLOT(showAliasNames(bool)));
	QObject::connect(ui.actionUse_Time_To_Live, SIGNAL(triggered ( bool)), 		this, SLOT(useTimeToLive(bool)));
	QObject::connect(ui.actionPreferences, SIGNAL(triggered ( bool)), 			this, SLOT(showSettings()));
	QObject::connect(ui.actionOpen_Register_Map, SIGNAL(triggered ( bool)), 	this, SLOT(showRegisterMap()));
	QObject::connect(ui.clearButton, SIGNAL(clicked()), 						m_readRateCalc, SLOT(clearResults()));
	QObject::connect(ui.actionClear_Tags, SIGNAL(triggered (bool)), 			m_readRateCalc, SLOT(clearResults()));
	QObject::connect(ui.clearButton, SIGNAL(clicked()), 						m_tagViewManager, SLOT(clearTags()));
	QObject::connect(ui.actionClear_Tags, SIGNAL(triggered (bool)), 			m_tagViewManager, SLOT(clearTags()));
	QObject::connect(ui.clearOfflineReaderButton, SIGNAL(clicked()), 			m_tagViewManager, SLOT(clearOfflineReader()));
	QObject::connect(ui.clearOfflineReaderButton, SIGNAL(clicked()), 			this, SLOT(clearOfflineReader()));
	QObject::connect(ui.actionClear_Offline_Reader, SIGNAL(triggered(bool)), 	m_tagViewManager, SLOT(clearOfflineReader()));

	QObject::connect(m_gen2SettingsDialog,    SIGNAL(easterKeyUnlocked()),      this, SLOT(easterKeyUnlocked()));

	/* Create the scan timer to get the end of the scan */
	m_scanTimer = new QTimer(this);
	m_scanTimer->setSingleShot(true);
	QObject::connect(m_scanTimer, SIGNAL(timeout()), this, SLOT(stopScan()));

	/* Create timer for the scan progress bar */
	m_scanProgressTimer = new QTimer(this);
	m_scanProgressTimer->setSingleShot(false);
	m_scanProgressTimer->setInterval(1000);

	m_regMapWindow = NULL;

	/* Connect to the Reader Manager */
	QObject::connect(this, SIGNAL(currentReaderChanged(QrfeReaderInterface*)), m_amsComWrapper, SLOT(gotReader(QrfeReaderInterface*)));
	QObject::connect(&m_readerManager, SIGNAL(lostReader(QrfeReaderInterface*)), m_amsComWrapper, SLOT(lostReader(QrfeReaderInterface*)));
	QObject::connect(&m_readerManager, SIGNAL(gotReader(QrfeReaderInterface*)), this, SLOT(gotReader(QrfeReaderInterface*)));
	QObject::connect(&m_readerManager, SIGNAL(lostReader(QrfeReaderInterface*)), this, SLOT(lostReader(QrfeReaderInterface*)));

    //Add by yingwei tseng for using bar to set power, 2010/07/09
    QObject::connect(ui.powerSlider, SIGNAL(valueChanged(int)), this, SLOT(powerSliderChange(int)));
	//End by yingwei tseng for using bar to set power, 2010/07/09

	/* Create the timer for the multiplexer control */
	m_multiplexTimer = new QTimer(this);
	m_multiplexTimer->setSingleShot(true);
	m_multiplexTimer->setInterval(m_settingsDialog->multiplexTime());
	QObject::connect(m_multiplexTimer, SIGNAL(timeout()), this, SLOT(multiplexISR()));

	/* Finally set up the gui */
	ui.traceDockWidget->setVisible(false);
	ui.informationBox->setVisible(false);
	ui.actionShow_Alias_Names->setChecked(m_settingsDialog->showAlias());
	ui.actionUse_Time_To_Live->setChecked(m_settingsDialog->useTtl());

	splash->showMessage(tr("Starting up..."), alignment);
	ActivateSettings();
	Sleep(1000);
	splash->close();

	//Add by yingwei tseng for hiding AMS code, 2010/03/10
	ui.handleActionPushButton->hide();
	ui.clearOfflineReaderButton->hide();
	//ui.actionAdd_Serial_Reader->setVisible(false);
	ui.actionAdd_USB->setVisible(false);
	ui.actionAdd_Tcp_Reader->setVisible(false);
	ui.actionHandle_Actions->setVisible(false);
	ui.actionClear_Offline_Reader->setVisible(false);
	//End by yingwei tseng for hiding AMS code, 2010/03/10

	//Add by yingwei tseng for hiding items, 2010/12/08
    ui.actionShow_Alias_Names->setVisible(false);
	ui.actionUse_Time_To_Live->setVisible(false);
	ui.actionShow_Trace_Browser->setVisible(false);
	ui.actionShow_TagList->setVisible(false);
	//End by yingwei tseng for hiding items, 2010/12/08
	ui.groupBox_3->hide();
}
开发者ID:mti-rfid,项目名称:RFID_ME_HW_GUI,代码行数:101,代码来源:CReaderTool.cpp


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