feat(dpConfigurationDialog): 添加数据服务配置选项
This commit is contained in:
parent
5ba65992c4
commit
121119ab6b
|
|
@ -3,6 +3,7 @@
|
|||
#include "dataPanel.h"
|
||||
#include "global.h"
|
||||
#include <QStandardItemModel>
|
||||
#include <QRegularExpressionValidator>
|
||||
|
||||
dpConfigurationDialog::dpConfigurationDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
|
@ -28,7 +29,8 @@ dpConfigurationDialog::~dpConfigurationDialog()
|
|||
|
||||
void dpConfigurationDialog::showEvent(QShowEvent* event)
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
//ui->stackedWidget->setCurrentIndex(0);
|
||||
ui->tabDataType->click();
|
||||
if(m_pModel_typeSelected && m_pModel_typeSelected->rowCount() == 0)
|
||||
{
|
||||
ui->errorTip->setVisible(true);
|
||||
|
|
@ -92,6 +94,7 @@ void dpConfigurationDialog::initialize()
|
|||
ui->typeSelectedList->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
m_pModel_typeSelected = new QStandardItemModel(this);
|
||||
ui->typeSelectedList->setModel(m_pModel_typeSelected);
|
||||
|
||||
///数据源
|
||||
//dataSourceList
|
||||
m_pModel_dataSource = new QStandardItemModel(this);
|
||||
|
|
@ -101,6 +104,15 @@ void dpConfigurationDialog::initialize()
|
|||
ui->dataSelectedList->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
m_pModel_dataSelected = new QStandardItemModel(this);
|
||||
ui->dataSelectedList->setModel(m_pModel_dataSelected);
|
||||
|
||||
///数据配置
|
||||
QRegularExpression regExp_ip("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}"
|
||||
"(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
|
||||
QRegularExpressionValidator* validator_ip = new QRegularExpressionValidator(regExp_ip, this);
|
||||
ui->serverIP->setValidator(validator_ip);
|
||||
QRegularExpression regExp_port("^(?:[0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$");
|
||||
QRegularExpressionValidator* validator_port = new QRegularExpressionValidator(regExp_port, this);
|
||||
ui->serverPort->setValidator(validator_port);
|
||||
}
|
||||
|
||||
void dpConfigurationDialog::copyModelData(QStandardItemModel* sourceModel, QStandardItemModel* destModel)
|
||||
|
|
|
|||
|
|
@ -41,11 +41,13 @@ background-color:rgba(36,43,50,250);
|
|||
QLabel
|
||||
{
|
||||
font: 12pt "黑体";
|
||||
color: rgb(250, 250, 250);
|
||||
}
|
||||
|
||||
QLineEdit
|
||||
{
|
||||
font: 12pt "黑体";
|
||||
color: rgb(250, 250, 250);
|
||||
border:1px solid rgb(200,200,200);
|
||||
background:transparent;
|
||||
}
|
||||
|
|
@ -238,7 +240,7 @@ QPushButton:pressed
|
|||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>显示设置</string>
|
||||
<string>数据配置</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="tabDataType">
|
||||
|
|
@ -284,7 +286,7 @@ QPushButton:pressed
|
|||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageDataType">
|
||||
<property name="styleSheet">
|
||||
|
|
@ -482,13 +484,79 @@ QPushButton:pressed
|
|||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageDisplaySetting">
|
||||
<widget class="QWidget" name="pageSettings">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget #pageDisplaySetting
|
||||
<string notr="true">QWidget #pageSettings
|
||||
{
|
||||
background-color:transparent;
|
||||
}</string>
|
||||
}
|
||||
|
||||
QLineEdit
|
||||
{
|
||||
font: 10pt "黑体";
|
||||
background-color: rgb(24, 32, 38);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="setting_Server">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>10</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据服务</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_serverIP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>31</x>
|
||||
<y>40</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>服务地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="serverIP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>40</y>
|
||||
<width>201</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_serverPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>70</y>
|
||||
<width>81</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>服务端口:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="serverPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>70</y>
|
||||
<width>61</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnCancle">
|
||||
|
|
|
|||
Loading…
Reference in New Issue