Пример #1
0
void LazyWord::createActions()		//the trayicon's menu action to control the soft
{
    ActionRestore = new QAction(tr("&Restore"), this);
    connect(ActionRestore, SIGNAL(triggered()), this, SLOT(ShowNormal()));
    	
    ActionQuit = new QAction(tr("&Quit"), this);
    connect(ActionQuit, SIGNAL(triggered()), this, SLOT(storequit()));
}
Пример #2
0
LazyWord::LazyWord( QWidget * parent ) : QDialog(parent) ,LID(0),CheckEnd(0),GetTheSlot(0)
{
	//-----------Open the database--------------
	SqlOperate a;
	a.connectdatabase();
	//-----------Open the database--------------
	
//================Initial the UI start=================
	RestoreConfig_color();
	RestoreConfigall();
    ConfigureUI();
    createActions();
    IconMenu();
	ShowIcon();
	
	
	//************For test*************
	T = new QTimer(this);
	connect(T,SIGNAL(timeout()),this,SLOT(remind()));
	T->start(3600 * 1000);
	
	//************For test**************
	
	
	connect(ActionRestore, SIGNAL(triggered()), this, SLOT(ShowNormal()));
	
	connect(UpdateLibButton, SIGNAL(clicked()), this, SLOT(updateLib()));
	connect(InsertLibButton, SIGNAL(clicked()), this, SLOT(InsertLib()));    
    connect(ShowTestButton, SIGNAL(clicked()), this, SLOT(ShowMessage()));
    connect(OkButton,SIGNAL(clicked()),this,SLOT(OkSubmit()));
    connect(AboutButton,SIGNAL(clicked()),this,SLOT(about()));
    connect(GetAllExplainButton,SIGNAL(clicked()),this,SLOT(getAllExplain()));
    connect(ChangeColorButton,SIGNAL(clicked()),this,SLOT(setshowcolor()));
	connect(ItimeBox,SIGNAL(valueChanged(int)),this,SLOT(changeItime(int)));
   
    connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(LetterClicked()));
     
    connect(show_AllBox, SIGNAL(toggled(bool)),this, SLOT(setBoxVisible(bool)));
    connect(show_StrangeBox, SIGNAL(toggled(bool)),this, SLOT(setBoxVisibleSingle()));
    connect(show_UnderstandBox, SIGNAL(toggled(bool)),this, SLOT(setBoxVisibleSingle()));
    connect(show_MasterBox, SIGNAL(toggled(bool)),this, SLOT(setBoxVisibleSingle()));

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(ConfigureBox);
    setLayout(mainLayout);

    
    trayIcon->show();
    
    setWindowTitle(tr("LazyWord"));
    setGeometry(QRect(400, 200, 449, 407));
    resize(400, 300);
//======================Initial the UI end==========================  
}
Пример #3
0
void WindowManager::ToggleFullscreen()
{
	if(_Fullscreen)		// Check if we are already in fullscreen, and if we are
	{
		ShowNormal();		// Switch to windowed
	}
	else				// Otherwise
	{
		ShowFullscreen();		// Switch to Fullscreen
	}

	IsGLErrors("ToggleFullscreen");
}
Пример #4
0
bool TrigEditorWindow::CreateThis(HWND hParent)
{
	if ( getHandle() == NULL &&
		 ClassDialog::CreateModelessDialog(MAKEINTRESOURCE(IDD_TRIGEDIT), hParent) )
	{
		ShowNormal();
		ChangeTab(currTab);
		return true;
	}
	else
	{
		ChangeTab(currTab);
		return false;
	}
	RefreshWindow();
}
Пример #5
0
bool TrigModifyWindow::CreateThis(HWND hParent, u32 trigIndex)
{
    if ( getHandle() == NULL &&
         ClassDialog::CreateModelessDialog(MAKEINTRESOURCE(IDD_TRIGMODIFY), hParent) )
    {
        ShowNormal();
        ChangeTab(currTab);
        RefreshWindow(trigIndex);
        return true;
    }
    else if ( getHandle() != NULL )
    {
        Show();
        ChangeTab(currTab);
        RefreshWindow(trigIndex);
    }
    return false;
}