[CHANGE] UI Layout
This commit is contained in:
parent
bfee5f9d49
commit
27f3def00a
|
@ -49,7 +49,7 @@ void AppSerial::setHWND(HWND hwnd)
|
|||
this->m_hwnd = hwnd;
|
||||
}
|
||||
|
||||
bool AppSerial::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
|
||||
bool AppSerial::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
|
||||
{
|
||||
Q_UNUSED(eventType);
|
||||
Q_UNUSED(result);
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
void setHWND(HWND hwnd);
|
||||
|
||||
protected:
|
||||
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result);
|
||||
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
|
||||
|
||||
signals:
|
||||
/**
|
||||
|
|
|
@ -159,20 +159,20 @@ void MainWindow::init()
|
|||
ui->pageDebugTextBrowser->clear();
|
||||
});
|
||||
|
||||
connect(ui->pageDebugCheckBoxSaveLog, &QCheckBox::stateChanged, this, [=]{
|
||||
if(ui->pageDebugCheckBoxSaveLog->isChecked()) {
|
||||
pageDebugLogFlag = true;
|
||||
QString filename = QFileDialog::getSaveFileName(this, "Save log", "Communication log", "Log Files (*.txt);;All Files (*)");
|
||||
logFile = new QFile(filename);
|
||||
if (logFile->open(QIODevice::Append | QIODevice::Text)) {
|
||||
// connect(ui->pageDebugCheckBoxSaveLog, &QCheckBox::stateChanged, this, [=]{
|
||||
// if(ui->pageDebugCheckBoxSaveLog->isChecked()) {
|
||||
// pageDebugLogFlag = true;
|
||||
// QString filename = QFileDialog::getSaveFileName(this, "Save log", "Communication log", "Log Files (*.txt);;All Files (*)");
|
||||
// logFile = new QFile(filename);
|
||||
// if (logFile->open(QIODevice::Append | QIODevice::Text)) {
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
pageDebugLogFlag = false;
|
||||
logFile->close();
|
||||
}
|
||||
});
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// pageDebugLogFlag = false;
|
||||
// logFile->close();
|
||||
// }
|
||||
// });
|
||||
|
||||
//初始化batt
|
||||
bat = new batt();
|
||||
|
@ -194,13 +194,13 @@ void MainWindow::init()
|
|||
// sglChartInit(7);
|
||||
// ui->groupBox_color_sgl->setStyleSheet("QGroupBox { border: none; }");
|
||||
// ui->scrollArea_sgl_charts->setFrameShape(QFrame::NoFrame);
|
||||
ui->scrollAreaChart->setFrameShape(QFrame::NoFrame);
|
||||
// ui->scrollAreaChart->setFrameShape(QFrame::NoFrame);
|
||||
|
||||
ui->scrollAreaChart->setStyleSheet("background-color: #FFFFFF;"); //设置背景颜色为纯白色
|
||||
// ui->scrollAreaChart->setStyleSheet("background-color: #FFFFFF;"); //设置背景颜色为纯白色
|
||||
ui->widgetControl->setStyleSheet("background-color: #FFFFFF;");
|
||||
ui->groupBox->setStyleSheet("background-color: #FFFFFF;");
|
||||
ui->groupBox_trouble_control->setStyleSheet("background-color: #FFFFFF;");
|
||||
ui->groupBox_chart->setStyleSheet("background-color: #FFFFFF;");
|
||||
// ui->groupBox_chart->setStyleSheet("background-color: #FFFFFF;");
|
||||
ui->groupBox_class_color->setStyleSheet("QGroupBox { border: none; }");
|
||||
|
||||
ui->BCU_DIDO->setStyleSheet("background-color: #FFFFFF;");
|
||||
|
@ -1169,6 +1169,7 @@ void MainWindow::setMenuStyle()
|
|||
|
||||
void MainWindow::slot_pageDebugDisplayMessage(QByteArray byteArray, int dataType)
|
||||
{
|
||||
qDebug("#1");
|
||||
if(ui->pageDebugCheckBoxDisplay->isChecked() == true) {
|
||||
QString timeStr = QString(QDateTime::currentDateTime().toString("[yyyy-MM-dd hh:mm:ss.zzz] "));
|
||||
QString tmpStr;
|
||||
|
@ -1185,12 +1186,12 @@ void MainWindow::slot_pageDebugDisplayMessage(QByteArray byteArray, int dataType
|
|||
else {
|
||||
showStr = "<html><span body><span style=\"color:blue;\">Rx: </span></span body></html>" + tmpStr;
|
||||
}
|
||||
if(pageDebugLogFlag == true) {
|
||||
if(logFile->isOpen()) {
|
||||
QTextStream textStream(logFile);
|
||||
textStream << timeStr + "Rx: " + tmpStr + '\n';
|
||||
}
|
||||
}
|
||||
// if(pageDebugLogFlag == true) {
|
||||
// if(logFile->isOpen()) {
|
||||
// QTextStream textStream(logFile);
|
||||
// textStream << timeStr + "Rx: " + tmpStr + '\n';
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if(dataType == TypeSendData) {
|
||||
if(ui->pageDebugCheckBoxStarmp->isChecked()) {
|
||||
|
@ -1199,16 +1200,17 @@ void MainWindow::slot_pageDebugDisplayMessage(QByteArray byteArray, int dataType
|
|||
else {
|
||||
showStr = "<html><span body><span style=\"color:orange;\">Tx: </span></span body></html>" + tmpStr;
|
||||
}
|
||||
if(pageDebugLogFlag == true) {
|
||||
if(logFile->isOpen()) {
|
||||
QTextStream textStream(logFile);
|
||||
textStream << timeStr + "Rx: " + tmpStr + '\n';
|
||||
}
|
||||
}
|
||||
// if(pageDebugLogFlag == true) {
|
||||
// if(logFile->isOpen()) {
|
||||
// QTextStream textStream(logFile);
|
||||
// textStream << timeStr + "Rx: " + tmpStr + '\n';
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
ui->pageDebugTextBrowser->append(showStr);
|
||||
}
|
||||
qDebug("#2");
|
||||
}
|
||||
|
||||
void MainWindow::slot_pageHomeSglDataMessage(QByteArray byteArray, int dataType)
|
||||
|
|
38021
mainwindow.ui
38021
mainwindow.ui
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue