chengxr 1 år sedan
förälder
incheckning
2a7d8cc57b

+ 4 - 2
QFD/QFD.pro

@@ -83,7 +83,8 @@ SOURCES += \
     widgets/ProjectListWidget.cpp \
     widgets/ProjectStateWidget.cpp \
     widgets/RegisterWidget.cpp \
-    widgets/RenameWidget.cpp
+    widgets/RenameWidget.cpp \
+    widgets/SchemeWidget.cpp
 
 HEADERS += \
     common/QFDIcon.h \
@@ -108,7 +109,8 @@ HEADERS += \
     widgets/ProjectListWidget.h \
     widgets/ProjectStateWidget.h \
     widgets/RegisterWidget.h \
-    widgets/RenameWidget.h
+    widgets/RenameWidget.h \
+    widgets/SchemeWidget.h
 
 
 include(./mindmap/mindmap.pri)

+ 7 - 4
QFD/view/EvaluateView.cpp

@@ -36,10 +36,11 @@ void EvaluateView::initialize()
 
     m_projListWidget   = new ProjectListWidget(this);
     m_projDetailWidget = new QWidget(this);
-    m_projLayout       = new QVBoxLayout();
+    m_projLayout       = new QVBoxLayout(m_projDetailWidget);
 
     m_projNameLabel = new QLabel(this);
-    m_projNameLabel->setText("工程名");
+    m_projNameLabel->setObjectName("projNameLabel");
+    m_projNameLabel->setText("工程1-技术方案评估");
 }
 
 void EvaluateView::initLayout()
@@ -53,8 +54,10 @@ void EvaluateView::initLayout()
 
     m_hBoxLayout->addWidget(m_projDetailWidget);
 
-    m_projDetailWidget->setLayout(m_projLayout);
-    m_projLayout->addWidget(m_projNameLabel, Qt::AlignTop);
+    m_projLayout->addWidget(m_projNameLabel);
+    m_projLayout->addStretch();
+
+    setStyleSheet("#projNameLabel {font-size:20px;font:bold;color:#333333}");
 }
 
 void EvaluateView::connectSiganlsAndSlots() { }

+ 6 - 2
QFD/view/ProjectView.cpp

@@ -48,7 +48,8 @@ void ProjectView::initialize()
     m_projLayout       = new QVBoxLayout(m_projDetailWidget);
 
     m_projNameLabel = new QLabel(this);
-    m_projNameLabel->setText("工程名");
+    m_projNameLabel->setObjectName("projNameLabel");
+    m_projNameLabel->setText("工程1-技术方案评估");
 
     m_separator = new QWidget(this);
     m_separator->setFixedWidth(1);
@@ -77,10 +78,13 @@ void ProjectView::initLayout()
 
     m_hBoxLayout->addWidget(m_projDetailWidget);
 
-    m_projLayout->addWidget(m_projNameLabel, Qt::AlignTop);
+    m_projLayout->addWidget(m_projNameLabel);
+    m_projLayout->addStretch();
 
     m_hBoxLayout->addWidget(m_separator, Qt::AlignRight);
     m_hBoxLayout->addWidget(m_configExpWidget, Qt::AlignRight);
+
+    setStyleSheet("#projNameLabel {font-size:20px;font:bold;color:#333333}");
 }
 
 void ProjectView::connectSiganlsAndSlots()

+ 11 - 5
QFD/widgets/ConfigExpertWidget.cpp

@@ -45,9 +45,13 @@ void ConfigExpertWidget::initialize()
     m_addedListHeader->setObjectName("addedListHeader");
     m_addedListHeader->setFixedHeight(30);
     m_addedListHeaderLayout = new QHBoxLayout(m_addedListHeader);
-    m_addedListTitleLabel   = new QLabel("已配置权重", this);
+    m_addedListTitleLabel   = new QLabel("已添加", this);
     m_addedListTitleLabel->setObjectName("addedListTitleLabel");
     m_addedListTitleLabel->setMargin(5);
+    m_addedListTipsLabel = new QLabel("注:已添加专家的权重之和须等于1", this);
+    m_addedListTipsLabel->setObjectName("addedListTipsLabel");
+    m_addedListTipsLabel->setFixedHeight(20);
+
     m_saveButton = new QPushButton(NEWFLICON(FluentIcon, SAVE)->icon(), "", this);
     m_saveButton->setObjectName("saveButton");
     m_saveButton->setFixedSize(QSize(28, 28));
@@ -87,6 +91,7 @@ void ConfigExpertWidget::initLayout()
 
     m_addedWidgetLayout->addWidget(m_addedListHeader);
     m_addedWidgetLayout->addWidget(m_addedListWidget);
+    m_addedWidgetLayout->addWidget(m_addedListTipsLabel, Qt::AlignBottom);
 
     m_expWidgetLayout->addWidget(m_expListHeader);
     m_expWidgetLayout->addWidget(m_expListWidget);
@@ -103,6 +108,7 @@ void ConfigExpertWidget::initLayout()
     m_splitter->setStretchFactor(1, 3);
 
     setStyleSheet("#titleLabel {color:#333333; font-size:16px}"
+                  "#addedListTipsLabel {color:#999999;}"
                   "#addedListHeader {background-color:#f8f8f8;border: 1px solid rgba(0, 0, 0, 0.073);}"
                   "#expListHeader {background-color:#f8f8f8;border: 1px solid rgba(0, 0, 0, 0.073);}"
                   "QPushButton {border: 0;background-color: qlineargradient(x1: 0, y1: 0, x2: "
@@ -114,8 +120,8 @@ void ConfigExpertWidget::initLayout()
                   "QListView::item {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #ffffff, stop: 0.9 "
                   "#ffffff,stop: 1 #eeeeee);height:44;}"
                   "QDoubleSpinBox {border: 1px solid rgba(0, 0, 0, 0.173);}"
-                  "#addedListTitleLabel {font:bold;}"
-                  "#expListTitleLabel {font:bold;}");
+                  "#addedListTitleLabel {font:bold; font-size:12px;}"
+                  "#expListTitleLabel {font:bold; font-size:12px;}");
 }
 
 void ConfigExpertWidget::connectSignalsAndSlots() { }
@@ -136,7 +142,7 @@ void ConfigExpertWidget::refreshAddedList()
         spin->setSingleStep(0.01);
         spin->setFixedSize(QSize(60, 25));
         QPushButton *button = new QPushButton(NEWFLICON(QFDIcon, Minus)->icon(), "", w);
-        button->setFixedSize(QSize(20, 20));
+        button->setFixedSize(QSize(25, 25));
         button->setIconSize(QSize(10, 10));
 
         hBox->setSpacing(0);
@@ -167,7 +173,7 @@ void ConfigExpertWidget::refreshExpList()
         idx->setFixedWidth(25);
         QLabel *name        = new QLabel(QString("专家%1").arg(i));
         QPushButton *button = new QPushButton(NEWFLICON(FluentIcon, ADD)->icon(), "", w);
-        button->setFixedSize(QSize(20, 20));
+        button->setFixedSize(QSize(25, 25));
         button->setIconSize(QSize(10, 10));
 
         if (i % 2 == 0 && i <= 6) {

+ 1 - 0
QFD/widgets/ConfigExpertWidget.h

@@ -39,6 +39,7 @@ private:
     QWidget *m_addedListHeader           = nullptr;
     QHBoxLayout *m_addedListHeaderLayout = nullptr;
     QLabel *m_addedListTitleLabel        = nullptr;
+    QLabel *m_addedListTipsLabel         = nullptr;
     QPushButton *m_saveButton            = nullptr;
     QListWidget *m_addedListWidget       = nullptr;
 

+ 6 - 0
QFD/widgets/SchemeWidget.cpp

@@ -0,0 +1,6 @@
+#include "SchemeWidget.h"
+
+SchemeWidget::SchemeWidget(QWidget *parent) : QWidget(parent)
+{
+
+}

+ 16 - 0
QFD/widgets/SchemeWidget.h

@@ -0,0 +1,16 @@
+#ifndef SCHEMEWIDGET_H
+#define SCHEMEWIDGET_H
+
+#include <QWidget>
+
+class SchemeWidget : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit SchemeWidget(QWidget *parent = nullptr);
+
+signals:
+
+};
+
+#endif // SCHEMEWIDGET_H