diff --git a/HPPA/HPPA.cpp b/HPPA/HPPA.cpp index 15abd71..18ada9a 100644 --- a/HPPA/HPPA.cpp +++ b/HPPA/HPPA.cpp @@ -107,6 +107,7 @@ HPPA::HPPA(QWidget* parent) initPanelToolbar(); setDockNestingEnabled(true); + connect(this->ui.mSetting, SIGNAL(triggered()), this, SLOT(settingWindow())); connect(this->ui.action_about, SIGNAL(triggered()), this, SLOT(onAbout())); connect(this->ui.mActionOneMotorScenario, SIGNAL(triggered()), this, SLOT(createOneMotorScenario())); connect(this->ui.mActionPlantPhenotypeScenario, SIGNAL(triggered()), this, SLOT(createPlantPhenotypeScenario())); @@ -1954,6 +1955,13 @@ void HPPA::onAbout() about.exec(); } +void HPPA::settingWindow() +{ + setWindow w; + w.show(); + w.exec(); +} + void HPPA::onDark() { QMessageBox msgBox; diff --git a/HPPA/HPPA.h b/HPPA/HPPA.h index 2492ed7..395b4c0 100644 --- a/HPPA/HPPA.h +++ b/HPPA/HPPA.h @@ -73,6 +73,8 @@ #include "recordFrameCounter.h" +#include "setWindow.h" + #define PI 3.1415926 QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用 @@ -313,6 +315,7 @@ public Q_SLOTS: void onFocus2(int command); void onFocusWindowClosed(); void onAbout(); + void settingWindow(); void onDark(); void recordDarkFinish(); void onReference(); diff --git a/HPPA/HPPA.ui b/HPPA/HPPA.ui index b536069..094d598 100644 --- a/HPPA/HPPA.ui +++ b/HPPA/HPPA.ui @@ -72,7 +72,7 @@ color:white; - + @@ -797,7 +797,7 @@ QPushButton:pressed 关闭影像 - + 设置 diff --git a/HPPA/HPPA.vcxproj b/HPPA/HPPA.vcxproj index a41b3c4..2a12430 100644 --- a/HPPA/HPPA.vcxproj +++ b/HPPA/HPPA.vcxproj @@ -145,6 +145,7 @@ + Create Create @@ -178,6 +179,7 @@ + @@ -224,6 +226,7 @@ + diff --git a/HPPA/HPPA.vcxproj.filters b/HPPA/HPPA.vcxproj.filters index 198447c..e3c9832 100644 --- a/HPPA/HPPA.vcxproj.filters +++ b/HPPA/HPPA.vcxproj.filters @@ -199,6 +199,9 @@ Source Files + + Source Files + @@ -324,6 +327,9 @@ Header Files + + Header Files + @@ -403,6 +409,9 @@ Form Files + + Form Files + diff --git a/HPPA/set.ui b/HPPA/set.ui new file mode 100644 index 0000000..f7ffd06 --- /dev/null +++ b/HPPA/set.ui @@ -0,0 +1,284 @@ + + + setDialog + + + Qt::ApplicationModal + + + + 0 + 0 + 486 + 401 + + + + Dialog + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QWidget #contentWidget +{ + background: #040125; + /*border-radius: 8px 8px 8px 8px;*/ + border: 1px solid #2f6bff; +} + +QLineEdit { + background-color: #142D7F; + color: #e6eeff; + border: 1px solid #2f6bff; + border-radius: 6px; + padding: 4px 8px; + min-width: 70px; + min-height: 20px; + font-size: 13px; +} + +QLabel { + color: rgb(255, 255, 255); +} + +QPushButton +{ + /*width: 172px; + height: 56px;*/ + font: 10pt "新宋体"; + background-color: qlineargradient( + spread:pad, + x1:0.5, y1:0, x2:0.5, y2:1, + stop:0 #283D86, + stop:1 #0F1A40 + ); + color: white; + border: none; + padding: 8px 8px; + border-radius: 4px; +} +QPushButton:hover +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #3A4875, + stop:1 #5F6B91 + ); +} +/* 按下时的效果 */ +QPushButton:pressed +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #1A254F, + stop:1 #3A466B + ); + /* 可选:添加下压效果 */ + padding-top: 9px; + padding-bottom: 7px; +} + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 10 + + + + + + 0 + 0 + + + + + 0 + 43 + + + + + 16777215 + 43 + + + + QWidget #titlebarWidget +{ + background: #0E1C4C; + border: 1px solid #2f6bff; +} + + + + + + + + + :/png/resources/icons/png/Spectral_Insight_27.png + + + + + + + QLabel +{ + color:#E2EDFF; +} + + + 设置 + + + + + + + Qt::Horizontal + + + + 505 + 20 + + + + + + + + QPushButton +{ + /*width: 172px; + height: 56px;*/ + font: 10pt "新宋体"; + background-color: qlineargradient( + spread:pad, + x1:0.5, y1:0, x2:0.5, y2:1, + stop:0 #283D86, + stop:1 #0F1A40 + ); + color: white; + border: none; + padding: 8px 8px; + border-radius: 4px; +} + +QPushButton:hover +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #3A4875, + stop:1 #5F6B91 + ); +} +/* 按下时的效果 */ +QPushButton:pressed +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #1A254F, + stop:1 #3A466B + ); + /* 可选:添加下压效果 */ + padding-top: 9px; + padding-bottom: 7px; +} + + + + + + + :/svg/resources/icons/svg/close.svg:/svg/resources/icons/svg/close.svg + + + + + + + + + + + + 20 + 60 + 54 + 12 + + + + 数据路径 + + + + + + 80 + 50 + 113 + 30 + + + + + + + 210 + 50 + 101 + 31 + + + + ... + + + + + + + + + + + + + + diff --git a/HPPA/setWindow.cpp b/HPPA/setWindow.cpp new file mode 100644 index 0000000..03a64b2 --- /dev/null +++ b/HPPA/setWindow.cpp @@ -0,0 +1,27 @@ +#include "setWindow.h" +#include +#include + +setWindow::setWindow(QWidget* parent) +{ + ui.setupUi(this); + + //Qt::WindowFlags flags = 0; + ////flags |= Qt::WindowMinimizeButtonHint; + //flags |= Qt::WindowCloseButtonHint; + //flags |= Qt::MSWindowsFixedSizeDialogHint; + //setWindowFlags(flags); + setWindowFlags(Qt::FramelessWindowHint); + + connect(this->ui.closeBtn, SIGNAL(released()), this, SLOT(onExit())); +} + +setWindow::~setWindow() +{ + +} + +void setWindow::onExit() +{ + this->close(); +} diff --git a/HPPA/setWindow.h b/HPPA/setWindow.h new file mode 100644 index 0000000..15bf78e --- /dev/null +++ b/HPPA/setWindow.h @@ -0,0 +1,27 @@ +#pragma once +#include +#include + + +#include "ui_set.h" + +class setWindow :public QDialog +{ + Q_OBJECT + + +public: + setWindow(QWidget* parent = Q_NULLPTR); + ~setWindow(); + + + +private: + Ui::setDialog ui; + +public Q_SLOTS: + void onExit(); + +signals: + +};