完成设置页面和退出页面,开卡页面的画图
This commit is contained in:
47
mainwindow.cpp
Normal file
47
mainwindow.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "settingPage.h"
|
||||
#include "quitAppPage.h"
|
||||
#include "newCardPage.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
// 工具栏设置
|
||||
addToolBar(Qt::LeftToolBarArea, ui->toolBar);
|
||||
ui->toolBar->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
|
||||
ui->toolBar->setFloatable(false);
|
||||
ui->toolBar->setMovable(false);
|
||||
|
||||
// 状态栏设置
|
||||
ui->statusBar->setStyleSheet(QString("QStatusBar::item{border: 0px}"));
|
||||
|
||||
readerConnectStatusCheckBox = new QCheckBox();
|
||||
readerConnectStatusCheckBox->setChecked(false);
|
||||
ui->statusBar->addWidget(readerConnectStatusCheckBox);
|
||||
|
||||
comNumberLabel = new QLabel("当前无连接");
|
||||
ui->statusBar->addWidget(comNumberLabel);
|
||||
|
||||
databaseConnectStatusCheckBox = new QCheckBox();
|
||||
databaseConnectStatusCheckBox->setChecked(false);
|
||||
ui->statusBar->addWidget(databaseConnectStatusCheckBox);
|
||||
|
||||
databaseLabel = new QLabel("数据库无连接");
|
||||
ui->statusBar->addWidget(databaseLabel);
|
||||
|
||||
deviceLabel = new QLabel(device);
|
||||
ui->statusBar->addWidget(deviceLabel);
|
||||
|
||||
ui->stackedWidget->setCurrentWidget(ui->settingPage);
|
||||
}
|
||||
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user