- 博客(0)
- 资源 (1)
空空如也
智能停车场
#include "accesscontrolsystem.h"
AccessControlSystem::AccessControlSystem(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
ui.setupUi(this);
initialization();
validateUserLogin();
}
AccessControlSystem::~AccessControlSystem()
{
}
/*-------------------------------------------
*
* 初始化
*
---------------------------------------------*/
void AccessControlSystem::initialization()
{
this->showFullScreen();
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
verifcation = new VerificationDlg(0);
/*-------------------------------------------
* 固定窗口大小
---------------------------------------------*/
this->setFixedSize(this->geometry().size());
switchUser = new SwitchUserDlg(this);
systemSetting = new SystemSettingDlg(this);
cardIssuer = new CardIssuerDlg(this);
rechargePostponed = new RechargePostponedDlg(this);
cardDownload = new CardDownloadDlg(this);
rateSetting = new RateSettingDlg(this);
onlineMonitoring = new OnlineMonitoringDlg(this);
ui.rightLogoLabel->setPixmap(QPixmap("Resources\\rightLogo.png"));
}
/*-------------------------------------------
*
* 验证用户登录
*
---------------------------------------------*/
void AccessControlSystem::validateUserLogin()
{
/*-------------------------------------------
* 密码狗验证
---------------------------------------------*/
//codeValidate.startValidate();
if (verifcation->exec() == QDialog::Accepted)
{
this->show();
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
}else
{
exit(1);
}
}
/*-------------------------------------------
*
* 退出系统
*
---------------------------------------------*/
void AccessControlSystem::on_close_clicked()
{
//写退出对话框
exit(1);
}
/*-------------------------------------------
*
* 最小化
*
---------------------------------------------*/
void AccessControlSystem::on_min_clicked()
{
this->showMinimized();
}
/*-------------------------------------------
*
* 最大化
*
---------------------------------------------*/
void AccessControlSystem::on_max_clicked()
{
this->showNormal();
}
/*-------------------------------------------
*
* 切换用户
*
---------------------------------------------*/
void AccessControlSystem::on_switchUserButton_clicked()
{
switchUser->exec();
}
/*-------------------------------------------
*
* 系统设置
*
---------------------------------------------*/
void AccessControlSystem::on_systemSettingButton_clicked()
{
systemSetting->exec();
}
/*-------------------------------------------
*
* 卡片发行
*
---------------------------------------------*/
void AccessControlSystem::on_cardIssuerButton_clicked()
{
cardIssuer->exec();
}
/*-------------------------------------------
*
* 充值延期
*
---------------------------------------------*/
void AccessControlSystem::on_rechargePostponedButton_clicked()
{
rechargePostponed->exec();
}
/*-------------------------------------------
*
* 卡片下载
*
---------------------------------------------*/
void AccessControlSystem::on_cardDownloadButton_clicked()
{
cardDownload->exec();
}
/*-------------------------------------------
*
* 费率计算
*
---------------------------------------------*/
void AccessControlSystem::on_rateSettingButton_clicked()
{
rateSetting->exec();
}
/*-------------------------------------------
*
* 在线监控
*
---------------------------------------------*/
void AccessControlSystem::on_onlineMonitoringButton_clicked()
{
this->hide();
onlineMonitoring->showFullScreen();
if (onlineMonitoring->exec() == QDialog::Rejected)
{
this->show();
}
}
/*-------------------------------------------
*
* 人事信息
*
---------------------------------------------*/
void AccessControlSystem::on_personnelQueryButton_clicked()
{
}
/*-------------------------------------------
*
* 提取记录
*
---------------------------------------------*/
void AccessControlSystem::on_extractRecordButton_clicked()
{
}
2013-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人