增加继电器1,2
This commit is contained in:
parent
8085a2875b
commit
d76ec6e50b
@ -31,10 +31,14 @@ CConfiguration::CConfiguration(QWidget *parent) :
|
||||
pHeader2->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
pHeader2->setStretchLastSection(false);
|
||||
|
||||
|
||||
ui->treeView_Available->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
ui->treeView_Relay->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
connect(ui->comboBox_WC,SIGNAL(currentTextChanged(const QString &)),this,SLOT(on_comboBox_WC_currentTextChanged2(const QString&)));
|
||||
|
||||
ui->label_4->setVisible(0);
|
||||
ui->lineEdit_2->setVisible(0);
|
||||
ui->label_10->setVisible(0);
|
||||
}
|
||||
|
||||
CConfiguration::~CConfiguration()
|
||||
@ -665,6 +669,12 @@ void CConfiguration::on_pushButton_confirm_clicked()
|
||||
}else if(ui->radioButton_10->isChecked()){
|
||||
flag = 1;
|
||||
ConfiguraitonsObj = SelectChannel(12);
|
||||
}else if(ui->radioButton_11->isChecked()){
|
||||
flag = 1;
|
||||
ConfiguraitonsObj = SelectChannel(1);
|
||||
}else if(ui->radioButton_12->isChecked()){
|
||||
flag = 1;
|
||||
ConfiguraitonsObj = SelectChannel(2);
|
||||
}
|
||||
|
||||
if(flag == -1){
|
||||
@ -705,7 +715,7 @@ void CConfiguration::on_pushButton_confirm_clicked()
|
||||
ConfiguraitonsObj2 = ConfiguraitonsObj;
|
||||
ConfiguraitonsObj["logicExpress"] = rootArray;
|
||||
ConfiguraitonsObj2["logicExpress"] = logicExpressArray2;
|
||||
saveJsonToFile(ConfiguraitonsObj, "TreeViewToJSON.json");
|
||||
//saveJsonToFile(ConfiguraitonsObj, "TreeViewToJSON.json");
|
||||
QString strTableName = " t_UnitConfiguration ";
|
||||
QVector<UnitConfiguration_t> vecUnitConfiguration = g_SqliteDB->GetUnitConfigurationInfo(strTableName);
|
||||
for (int i = 0; i < vecUnitConfiguration.size(); i++) {
|
||||
@ -1427,3 +1437,19 @@ void CConfiguration::on_treeView_Available_pressed(const QModelIndex &index)
|
||||
|
||||
}
|
||||
|
||||
void CConfiguration::on_radioButton_11_clicked()
|
||||
{
|
||||
m_curentRLY = 1;
|
||||
ui->label_3->setText(ui->radioButton_11->text()+":");
|
||||
ViewRelay(1);
|
||||
}
|
||||
void CConfiguration::on_radioButton_12_clicked()
|
||||
{
|
||||
m_curentRLY = 2;
|
||||
ui->label_3->setText(ui->radioButton_12->text()+":");
|
||||
ViewRelay(2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -58,6 +58,10 @@ private slots:
|
||||
|
||||
void on_treeView_Available_pressed(const QModelIndex &index);
|
||||
|
||||
void on_radioButton_12_clicked();
|
||||
|
||||
void on_radioButton_11_clicked();
|
||||
|
||||
private:
|
||||
Ui::CConfiguration *ui;
|
||||
|
||||
|
||||
168
Configuration.ui
168
Configuration.ui
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1052</width>
|
||||
<height>640</height>
|
||||
<height>659</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -112,6 +112,9 @@ color: rgb(27, 30, 35);</string>
|
||||
<property name="text">
|
||||
<string>选择继电器</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -122,89 +125,104 @@ color: rgb(27, 30, 35);</string>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_1">
|
||||
<property name="text">
|
||||
<string>继电器3</string>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>18</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="text">
|
||||
<string>继电器4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_3">
|
||||
<property name="text">
|
||||
<string>继电器5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_4">
|
||||
<property name="text">
|
||||
<string>继电器6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_5">
|
||||
<property name="text">
|
||||
<string>继电器7</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_6">
|
||||
<property name="text">
|
||||
<string>继电器8</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_7">
|
||||
<property name="text">
|
||||
<string>继电器9</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_8">
|
||||
<property name="text">
|
||||
<string>继电器10</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_9">
|
||||
<property name="text">
|
||||
<string>继电器11</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_10">
|
||||
<property name="text">
|
||||
<string>继电器12</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_11">
|
||||
<property name="text">
|
||||
<string>继电器1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_12">
|
||||
<property name="text">
|
||||
<string>继电器2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_1">
|
||||
<property name="text">
|
||||
<string>继电器3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="text">
|
||||
<string>继电器4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_3">
|
||||
<property name="text">
|
||||
<string>继电器5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_4">
|
||||
<property name="text">
|
||||
<string>继电器6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_5">
|
||||
<property name="text">
|
||||
<string>继电器7</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_6">
|
||||
<property name="text">
|
||||
<string>继电器8</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_7">
|
||||
<property name="text">
|
||||
<string>继电器9</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_8">
|
||||
<property name="text">
|
||||
<string>继电器10</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_9">
|
||||
<property name="text">
|
||||
<string>继电器11</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_10">
|
||||
<property name="text">
|
||||
<string>继电器12</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user