void MainPage::init(){ this->man = NULL; ToolUtil::initStyle(this); IconHelper::Instance()->SetIcon(ui->btnMenu_Close, QChar(0xf00d), 10); IconHelper::Instance()->SetIcon(ui->btnMenu_Min, QChar(0xf068), 10); IconHelper::Instance()->SetIcon(ui->btnMenu, QChar(0xf0c9), 10); // IconHelper::Instance()->Set(ui->lab_Ico, QChar(0xf19c), 12); IconHelper::Instance()->SetBackground(ui->lab_Ico, "logo.png"); main_menu = new MainMenu(); icon_menu = new IconMenu(); //信号量注册 connect(ui->bt_quit,SIGNAL(clicked()),this,SLOT(userLogout())); /***********menu slot****************/ connect(main_menu,SIGNAL(setting()),this,SLOT(menuSetting())); connect(main_menu,SIGNAL(aboutus()),this,SLOT(menuAboutus())); connect(icon_menu,SIGNAL(login()),this,SLOT(menuLogin())); connect(icon_menu,SIGNAL(logout()),this,SLOT(userLogout())); connect(icon_menu,SIGNAL(min()),this,SLOT(on_btnMenu_Min_clicked())); connect(icon_menu,SIGNAL(useradd()),this,SLOT(userAdd())); connect(icon_menu,SIGNAL(clo()),this,SLOT(close())); connect(icon_menu,SIGNAL(pwdchange()),this,SLOT(menuPwdChange())); /*********login************/ this->showLoginDlg(); }
int main (void) { int user_select; while(1) { user_select = menuLogin(); switch(user_select) { case 1: onRegister(); break; case 2: onLogin(); break; case 0: return -1; defualt: break; } } return 0; }