|
@@ -0,0 +1,71 @@
|
|
|
+#include "ConfigMeasureDataWidget.h"
|
|
|
+
|
|
|
+#include <Widgets/Button.h>
|
|
|
+#include <Common/Icon.h>
|
|
|
+
|
|
|
+#include <QLabel>
|
|
|
+#include <QListWidget>
|
|
|
+#include <QBoxLayout>
|
|
|
+
|
|
|
+#include <QDebug>
|
|
|
+
|
|
|
+ConfigMeasureDataWidget::ConfigMeasureDataWidget(QWidget *parent) : QWidget(parent)
|
|
|
+{
|
|
|
+ initWidget();
|
|
|
+ initLayout();
|
|
|
+ connectSignalsAndSlots();
|
|
|
+}
|
|
|
+
|
|
|
+void ConfigMeasureDataWidget::initWidget()
|
|
|
+{
|
|
|
+ m_titleLabel = new QLabel("导入实测数据", this);
|
|
|
+ m_titleLabel->setObjectName("titleLabel");
|
|
|
+ m_titleLabel->setFixedHeight(50);
|
|
|
+ m_titleLabel->setContentsMargins(10, 0, 0, 0);
|
|
|
+ m_listTitleLabel = new QLabel("数据列表", this);
|
|
|
+ m_listTitleLabel->setObjectName("listTitleLabel");
|
|
|
+ m_tipsLabel = new QLabel("已导入的数据将会显示在这里", this);
|
|
|
+ m_tipsLabel->setObjectName("tipsLabel");
|
|
|
+ m_tipsLabel->setHidden(true);
|
|
|
+ m_exportButton = new QPushButton(NEWFLICON(FluentIcon, DOWNLOAD)->icon(), "", this);
|
|
|
+ m_exportButton->setToolTip("导入数据");
|
|
|
+ m_listWidget = new QListWidget(this);
|
|
|
+
|
|
|
+ setStyleSheet("#titleLabel {color:#333333; font-size:16px}"
|
|
|
+ "#listTitleLabel {color:#333333; font-size:12px}"
|
|
|
+ "QPushButton {border: 0;background-color: qlineargradient(x1: 0, y1: 0, x2: "
|
|
|
+ "0, y2: 1,stop: 0 #f8f8f8, stop: 1 #f8f8f8);}"
|
|
|
+ "QPushButton::hover {border: 1px solid rgba(0, 0, 0, 0.073);}"
|
|
|
+ "QPushButton::pressed {background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #dadbde, "
|
|
|
+ "stop: 1 #f6f7fa);}"
|
|
|
+ "QListWidget {border: 1px solid rgba(0, 0, 0, 0.073);}"
|
|
|
+ "QListView::item {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #ffffff, stop: 0.9 "
|
|
|
+ "#ffffff,stop: 1 #eeeeee);height:44;}");
|
|
|
+}
|
|
|
+
|
|
|
+void ConfigMeasureDataWidget::initLayout()
|
|
|
+{
|
|
|
+ m_layout = new QVBoxLayout(this);
|
|
|
+ m_layout->setMargin(0);
|
|
|
+ m_layout->setSpacing(0);
|
|
|
+ m_layout->addWidget(m_titleLabel);
|
|
|
+ m_headerLayout = new QHBoxLayout();
|
|
|
+ m_layout->addLayout(m_headerLayout);
|
|
|
+ m_layout->addSpacing(10);
|
|
|
+ m_layout->addWidget(m_tipsLabel);
|
|
|
+ m_layout->addWidget(m_listWidget);
|
|
|
+
|
|
|
+ m_headerLayout->addWidget(m_listTitleLabel);
|
|
|
+ m_headerLayout->addStretch();
|
|
|
+ m_headerLayout->addWidget(m_exportButton);
|
|
|
+}
|
|
|
+
|
|
|
+void ConfigMeasureDataWidget::connectSignalsAndSlots()
|
|
|
+{
|
|
|
+ connect(m_exportButton, &PushButton::clicked, this, &ConfigMeasureDataWidget::slotExportClicked);
|
|
|
+}
|
|
|
+
|
|
|
+void ConfigMeasureDataWidget::slotExportClicked()
|
|
|
+{
|
|
|
+ qDebug() << __FUNCTION__ << __LINE__ << endl;
|
|
|
+}
|