浏览代码

系统资源管理

chengxr 1 年之前
父节点
当前提交
eb490dc0f6

+ 6 - 2
QFD/QFD.pro

@@ -92,6 +92,7 @@ SOURCES += \
     view/SettingView.cpp \
     view/UserView.cpp \
     widgets/AddSchemeWidget.cpp \
+    widgets/AlgorithmWidget.cpp \
     widgets/AppInfoWidget.cpp \
     widgets/ConfigExpertWidget.cpp \
     widgets/CreateProjWidget.cpp \
@@ -115,7 +116,8 @@ SOURCES += \
     widgets/RegisterWidget.cpp \
     widgets/RenameWidget.cpp \
     widgets/SchemeOptionWidget.cpp \
-    widgets/SchemeWidget.cpp
+    widgets/SchemeWidget.cpp \
+    widgets/StandardWidget.cpp
 
 HEADERS += \
     algorithm/AverageMethod.h \
@@ -145,6 +147,7 @@ HEADERS += \
     view/SettingView.h \
     view/UserView.h \
     widgets/AddSchemeWidget.h \
+    widgets/AlgorithmWidget.h \
     widgets/AppInfoWidget.h \
     widgets/ConfigExpertWidget.h \
     widgets/CreateProjWidget.h \
@@ -168,7 +171,8 @@ HEADERS += \
     widgets/RegisterWidget.h \
     widgets/RenameWidget.h \
     widgets/SchemeOptionWidget.h \
-    widgets/SchemeWidget.h
+    widgets/SchemeWidget.h \
+    widgets/StandardWidget.h
 
 
 include(./CCanvas/CCanvas.pri)

+ 28 - 1
QFD/view/SettingView.cpp

@@ -1,6 +1,33 @@
-#include "SettingView.h"
+#include "SettingView.h"
+
+#include "ExpertManageView.h"
+#include "ExpertListWidget.h"
+#include "AlgorithmWidget.h"
+#include "StandardWidget.h"
+
+#include <QTabWidget>
+#include <QBoxLayout>
 
 SettingView::SettingView(QWidget *parent) : QWidget(parent)
 {
+    initWidgets();
+    initLayout();
+}
+
+void SettingView::initWidgets()
+{
+    m_tab       = new QTabWidget(this);
+    m_expert    = new ExpertManageView(this);
+    m_algorithm = new AlgorithmWidget(this);
+    m_standard  = new StandardWidget(this);
+}
+
+void SettingView::initLayout()
+{
+    m_layout = new QVBoxLayout(this);
+    m_layout->addWidget(m_tab);
 
+    m_tab->addTab(m_expert, "专家信息管理");
+    m_tab->addTab(m_algorithm, "算法管理");
+    m_tab->addTab(m_standard, "标准管理");
 }

+ 24 - 2
QFD/view/SettingView.h

@@ -1,8 +1,17 @@
-#ifndef SETTINGVIEW_H
+#ifndef SETTINGVIEW_H
 #define SETTINGVIEW_H
 
 #include <QWidget>
 
+class ExpertListWidget;
+
+class ExpertManageView;
+class AlgorithmWidget;
+class StandardWidget;
+
+class QTabWidget;
+class QVBoxLayout;
+
 class SettingView : public QWidget
 {
     Q_OBJECT
@@ -11,6 +20,19 @@ public:
 
 signals:
 
+private:
+    void initWidgets();
+    void initLayout();
+
+private:
+    QTabWidget *m_tab = nullptr;
+
+    ExpertManageView *m_expert = nullptr;
+    //    ExpertListWidget *m_expert   = nullptr;
+    AlgorithmWidget *m_algorithm = nullptr;
+    StandardWidget *m_standard   = nullptr;
+
+    QVBoxLayout *m_layout = nullptr;
 };
 
-#endif // SETTINGVIEW_H
+#endif  // SETTINGVIEW_H

+ 6 - 0
QFD/widgets/AlgorithmWidget.cpp

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

+ 16 - 0
QFD/widgets/AlgorithmWidget.h

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

+ 6 - 0
QFD/widgets/StandardWidget.cpp

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

+ 16 - 0
QFD/widgets/StandardWidget.h

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