|
@@ -4,8 +4,13 @@
|
|
|
#include "RenameWidget.h"
|
|
|
#include "ConfigExpertWidget.h"
|
|
|
|
|
|
+#include "common/ProjectManager.h"
|
|
|
+
|
|
|
+#include <dbService/ClassSet.h>
|
|
|
+
|
|
|
#include <Widgets/Button.h>
|
|
|
#include <Widgets/LineEdit.h>
|
|
|
+#include <Widgets/TreeView.h>
|
|
|
|
|
|
#include <QBoxLayout>
|
|
|
#include <QLabel>
|
|
@@ -36,13 +41,58 @@ ProjectInfo *ProjectView::proj() const
|
|
|
return m_proj;
|
|
|
}
|
|
|
|
|
|
-void ProjectView::setProject(ProjectInfo *proj)
|
|
|
+void ProjectView::initWidgets()
|
|
|
{
|
|
|
- m_proj = proj;
|
|
|
+ m_title = new QLabel(this);
|
|
|
+ m_title->setText(m_proj->projectName);
|
|
|
+ QFont ft("Microsoft YaHei", 14);
|
|
|
+ m_title->setFont(ft);
|
|
|
+
|
|
|
+ m_close = new PushButton("关闭", this);
|
|
|
+
|
|
|
+ m_tree = new TreeWidget(this);
|
|
|
+
|
|
|
+ QList<ProjectManager::EvalType> types = ProjectManager::evalTypeList(*m_proj);
|
|
|
+ for (int i = 0; i < types.count(); i++) {
|
|
|
+ QString projName = ProjectManager::nameOfEvalType(types[i]);
|
|
|
+ QTreeWidgetItem *item = new QTreeWidgetItem({ projName });
|
|
|
+ item->addChildren({ new QTreeWidgetItem({ "指标体系设计" }), new QTreeWidgetItem({ "评估方案规划" }),
|
|
|
+ new QTreeWidgetItem({ "评估数据采集" }), new QTreeWidgetItem({ "评估数据处理" }) });
|
|
|
+ m_tree->addTopLevelItem(item);
|
|
|
+ }
|
|
|
+
|
|
|
+ m_tree->expandAll();
|
|
|
+ m_tree->setHeaderHidden(true);
|
|
|
+ m_tree->setFixedWidth(300);
|
|
|
+
|
|
|
+ m_contentSeperator = new QWidget(this);
|
|
|
+ m_contentSeperator->setFixedWidth(1);
|
|
|
+
|
|
|
+ QPalette pal(m_contentSeperator->palette());
|
|
|
+
|
|
|
+ //设置背景黑色
|
|
|
+ pal.setColor(QPalette::Background, Qt::black);
|
|
|
+ m_contentSeperator->setAutoFillBackground(true);
|
|
|
+ m_contentSeperator->setPalette(pal);
|
|
|
}
|
|
|
|
|
|
-void ProjectView::initWidgets() { }
|
|
|
+void ProjectView::initLayout()
|
|
|
+{
|
|
|
+ m_layout = new QVBoxLayout(this);
|
|
|
+ m_headerLayout = new QHBoxLayout();
|
|
|
+ m_layout->addLayout(m_headerLayout);
|
|
|
+ m_contentLayout = new QHBoxLayout();
|
|
|
+ m_layout->addLayout(m_contentLayout);
|
|
|
+ // m_layout->addStretch();
|
|
|
+
|
|
|
+ m_headerLayout->addWidget(m_title);
|
|
|
+ m_headerLayout->addStretch();
|
|
|
+ m_headerLayout->addWidget(m_close);
|
|
|
+ m_headerLayout->addSpacing(10);
|
|
|
|
|
|
-void ProjectView::initLayout() { }
|
|
|
+ m_contentLayout->addWidget(m_tree);
|
|
|
+ m_contentLayout->addWidget(m_contentSeperator);
|
|
|
+ m_contentLayout->addStretch();
|
|
|
+}
|
|
|
|
|
|
void ProjectView::connectSigalsAndSlots() { }
|