Fix login modal bug
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include "models/User.h"
|
#include "models/User.h"
|
||||||
#include "AdminSettingForm.h"
|
#include "AdminSettingForm.h"
|
||||||
|
#include "appvals/AppGlobalValues.h"
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::QMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
void MainWindow::QMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
||||||
@@ -75,6 +76,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
"QComboBox QAbstractItemView::item {min-height:60px;max-height:60px; border:1px solid white;}"
|
"QComboBox QAbstractItemView::item {min-height:60px;max-height:60px; border:1px solid white;}"
|
||||||
//"QScrollBar:vertical {min-width: 50px;}"
|
//"QScrollBar:vertical {min-width: 50px;}"
|
||||||
"QLabel{color:white; font-weight:bold; font-size:16px;}\n"
|
"QLabel{color:white; font-weight:bold; font-size:16px;}\n"
|
||||||
|
"QLabel#sliderPickerLabel{color:silver;padding:0;background:#505050;font-weight:normal;font-size:50px;}\n"
|
||||||
"QWidget#topbarWidget{min-height:36px;max-height:36px;}\n"
|
"QWidget#topbarWidget{min-height:36px;max-height:36px;}\n"
|
||||||
"QWidget#contentWidget{border-top:1px solid #515151;}\n"
|
"QWidget#contentWidget{border-top:1px solid #515151;}\n"
|
||||||
"QWidget#commandWidget{min-height:123px;max-height:123px;border-top:1px solid #515151; border-bottom:1px solid #323232;}\n"
|
"QWidget#commandWidget{min-height:123px;max-height:123px;border-top:1px solid #515151; border-bottom:1px solid #323232;}\n"
|
||||||
@@ -90,6 +92,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
"QWidget QToolButton:checked{border:5px solid darkorange;padding:0px;}"
|
"QWidget QToolButton:checked{border:5px solid darkorange;padding:0px;}"
|
||||||
"QWidget#editcmdWidget{min-height:83px;max-height:83px;}"
|
"QWidget#editcmdWidget{min-height:83px;max-height:83px;}"
|
||||||
"QWidget#verSpaceLine{ border-right:1px solid #0078d8;}"
|
"QWidget#verSpaceLine{ border-right:1px solid #0078d8;}"
|
||||||
|
"QWidget#topBottomLine{ border-top:2px solid #0078d8;border-bottom:2px solid #0078d8;background:transparent}"
|
||||||
//蒙版Dialog
|
//蒙版Dialog
|
||||||
"QDialog QWidget#innerWidget{ background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
"QDialog QWidget#innerWidget{ background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||||
"stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);"
|
"stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);"
|
||||||
@@ -101,6 +104,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
"QPushButton{border:1px solid silver ;padding-left:50px;padding-right:50px; border-radius:5px; min-height:28px; max-height:28px; background:#4c5052}"
|
"QPushButton{border:1px solid silver ;padding-left:50px;padding-right:50px; border-radius:5px; min-height:28px; max-height:28px; background:#4c5052}"
|
||||||
"QPushButton#btnOK{background:#365880; font-weight:bold}"
|
"QPushButton#btnOK{background:#365880; font-weight:bold}"
|
||||||
"QDialog#formDialog{border:3px solid silver; border-radius:8px}"
|
"QDialog#formDialog{border:3px solid silver; border-radius:8px}"
|
||||||
|
"QWidget#slider_one{border:1px solid silver; border-radius:8px}"
|
||||||
"QWidget#formWidget QLabel#endline{border-bottom:1px solid silver}"
|
"QWidget#formWidget QLabel#endline{border-bottom:1px solid silver}"
|
||||||
"QWidget#formWidget QLabel#title{font-size:30px; }"
|
"QWidget#formWidget QLabel#title{font-size:30px; }"
|
||||||
"QListView{border:none;margin:5px; font-weight:bold}"
|
"QListView{border:none;margin:5px; font-weight:bold}"
|
||||||
@@ -203,6 +207,9 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
});
|
});
|
||||||
DeviceManager::Default()->initDevice();
|
DeviceManager::Default()->initDevice();
|
||||||
centerWidgetHide();
|
centerWidgetHide();
|
||||||
|
screenTimer = new QTimer(this);
|
||||||
|
connect(screenTimer, SIGNAL(timeout()), this, SLOT(coverScreen()));
|
||||||
|
screenTimer->start(counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@@ -211,6 +218,25 @@ MainWindow::~MainWindow()
|
|||||||
delete redir;
|
delete redir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::coverScreen()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (AppGlobalValues::InProcessing().toBool()) {
|
||||||
|
refreshTimer();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
screenTimer->stop();
|
||||||
|
requestLogin();
|
||||||
|
qDebug() << "coverScreen()";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::refreshTimer()
|
||||||
|
{
|
||||||
|
screenTimer->stop();
|
||||||
|
screenTimer->start(counter);
|
||||||
|
}
|
||||||
void MainWindow::centerWidgetHide() {
|
void MainWindow::centerWidgetHide() {
|
||||||
ui->centralWidget->setVisible(false);
|
ui->centralWidget->setVisible(false);
|
||||||
}
|
}
|
||||||
@@ -241,6 +267,7 @@ QTextEdit* MainWindow::getEdit()
|
|||||||
|
|
||||||
void MainWindow::requestLogin() {
|
void MainWindow::requestLogin() {
|
||||||
LoginWindow l(this);
|
LoginWindow l(this);
|
||||||
|
l.setWindowModality(Qt::WindowModal);
|
||||||
l.showFullScreen();
|
l.showFullScreen();
|
||||||
this->centerWidgetHide();
|
this->centerWidgetHide();
|
||||||
while(l.result() != QDialog::Accepted)
|
while(l.result() != QDialog::Accepted)
|
||||||
|
|||||||
Reference in New Issue
Block a user