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


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

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


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

示例1: logo

/*
 * @brief 	Constructor of the main class
 * The Constructor initializes all needed variables and one instance of every used dialog.
 */
CReaderTool::CReaderTool(QWidget *parent)
    : QMainWindow(parent)
	, QrfeTraceModule("Reader_Tool")
{
	m_updateThread = NULL;

	int alignment = Qt::AlignHCenter | Qt::AlignBottom;

	//Mod by yingwei tseng for hiding AMS code, 2010/03/10
	#if 0
	QPixmap logo(":/ams logos/amsStartupLogo");
	#endif
	QPixmap logo(":/ams logos/mtiRfidLogo");
	//End by yingwei tseng for hiding AMS code, 2010/03/10
	
	//clark 2011.12.15
	//logo.setMask(logo.createHeuristicMask());
	QSplashScreen *splash = new QSplashScreen(logo);
	splash->setMask(logo.mask());
	splash->setWindowOpacity(0);
	splash->show();
	for(double i = 0; i < 1; i += 0.05)
	{
		splash->setWindowOpacity(i);
		Sleep(50);
	}

	/* Init variables */
	m_scanActive = false;

	splash->showMessage(tr("Initialize GUI..."), alignment);
	/* Setup the ui */
	ui.setupUi(this);

	this->setWindowTitle(QString(APPLICATION_NAME));

	splash->showMessage(tr("Create Handlers..."), alignment);

	/* Create Action Handler */
	m_actionHandler = new CActionHandler(&m_dataHandler, this);

	/* Create Read Rate Calculator */
	m_readRateCalc = new CReadRateCalc(this);

	/* Create Tag Manager */
	m_tagManager = new CTagManager(this);

	m_amsComWrapper = new USBHIDWrapper(0x0);

	splash->showMessage(tr("Create Dialogs..."), alignment);

	/* Create Dialogs */
	m_aboutDialog = new QrfeAboutDialog(this);
	m_keyDialog = new QrfeKeyWindow(this);
	m_tagListDialog = new CTagListView(m_tagManager, this);
	m_settingsDialog = new CSettingsDialog(this);
	m_tagSettingsDialog = new CTagSettingsDialog(&m_dataHandler, this);
	m_gen2SettingsDialog = new CGen2TagDialog(this);

       
	/* Create the view manager */
	m_tagViewManager = new CTagViewManager(ui.readerTreeWidget, &m_dataHandler, m_readRateCalc, this);
	m_tagViewManager->setUp(	m_settingsDialog->showAlias(),
								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()));
//.........这里部分代码省略.........
开发者ID:mti-rfid,项目名称:RFID_ME_HW_GUI,代码行数:101,代码来源:CReaderTool.cpp


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