diff --git a/AddChannel.cpp b/AddChannel.cpp
index 21ca984..92d7cfa 100644
--- a/AddChannel.cpp
+++ b/AddChannel.cpp
@@ -23,11 +23,10 @@ void CAddChannel::InitChannelInfo()
qDebug() <<"InitChannelInfo"<< g_ChannelBaseInfo.size()<< endl;
for (int i = 0; i < g_ChannelBaseInfo.size(); i++) {
- if(g_ChannelBaseInfo[i].channelType != "DI" && g_ChannelBaseInfo[i].channelType != "DO")
+ if(g_ChannelBaseInfo[i].channelType != "DI" && g_ChannelBaseInfo[i].channelType != "DO"
+ && g_ChannelBaseInfo[i].channelType != "AIRGAP")
ui->comboBox_channel->addItem(g_ChannelBaseInfo[i].channelName);
}
-
-
}
void CAddChannel::on_pushButton_confirm_clicked()
@@ -61,6 +60,7 @@ void CAddChannel::on_comboBox_channel_currentTextChanged(const QString &arg1)
break;
}
}
+
qDebug() << g_ChannelBaseInfo[i].channelType << endl;
ui->comboBox_charac->clear();
diff --git a/ChannelList.cpp b/ChannelList.cpp
index 4fb54ac..933fcd1 100644
--- a/ChannelList.cpp
+++ b/ChannelList.cpp
@@ -481,10 +481,12 @@ void CChannelList::putJson()
g_ChannelBaseInfo.append(tempchannelbaseinfo);
}
initReadConfig();
+#if QT_NO_DEBUG
QString str = QString("ftp://%1/CIDW/qtconfig/%2").arg(IP).arg("ChannelSettings.json");
g_FtpClient->SetServerInfo(str);
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
g_FtpClient->UpLoadFile(name,"ChannelSettings.json");
+#endif
}
void CChannelList::slotRowDoubleClicked(const QModelIndex &index)
diff --git a/ChannelSetting.cpp b/ChannelSetting.cpp
index 6f1b675..1eb0a05 100644
--- a/ChannelSetting.cpp
+++ b/ChannelSetting.cpp
@@ -324,8 +324,12 @@ void CChannelSetting::displayChannelSetting()
}
void CChannelSetting::on_pushButton_submit_clicked()
{
+#ifdef QT_DEBUG
+ PushData();
+#elif QT_NO_DEBUG
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
g_NetMgr->DetectNet();
+#endif
}
void CChannelSetting::slotNetMgr(QString sAddr, const QVariant &msg)
{
diff --git a/Configuration.cpp b/Configuration.cpp
index 2bffdb8..70f43c1 100644
--- a/Configuration.cpp
+++ b/Configuration.cpp
@@ -527,6 +527,8 @@ void CConfiguration::on_comboBox_WC_currentTextChanged2(const QString &arg1)
for (int j = 0; j < TriggerSettings.size(); j++){
QString channelName = TriggerSettings.at(j)["channelName"].toString();
QStandardItem *itemChannel = new QStandardItem(QString(channelName));
+ itemChannel->setDragEnabled(false);
+ itemChannel->setDropEnabled(false);
QJsonArray arrayConfig = TriggerSettings.at(j)["triggerConfig"].toArray();
if(arrayConfig.size() > 0){
item2->appendRow(itemChannel);
@@ -892,3 +894,9 @@ void CConfiguration::on_radioButton_10_clicked()
ViewRelay(12);
}
+
+void CConfiguration::on_treeView_Available_pressed(const QModelIndex &index)
+{
+
+}
+
diff --git a/Configuration.h b/Configuration.h
index 950a4db..572df64 100644
--- a/Configuration.h
+++ b/Configuration.h
@@ -55,6 +55,8 @@ private slots:
void slotNetMgr(QString sAddr,const QVariant& msg);
+ void on_treeView_Available_pressed(const QModelIndex &index);
+
private:
Ui::CConfiguration *ui;
diff --git a/Configuration.ui b/Configuration.ui
index 369e904..c97caa2 100644
--- a/Configuration.ui
+++ b/Configuration.ui
@@ -212,109 +212,83 @@ color: rgb(27, 30, 35);
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
+
+
+
+ 4
+
+
-
+
+
+ Available Logic Tags
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+
+
+ QAbstractItemView::DragOnly
+
+
+
+
+
-
-
-
-
-
-
- Available Logic Tags
-
-
-
- -
-
-
-
- 256
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
-
-
-
- QAbstractItemView::DragOnly
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
-
-
- Relay Logic Editor
-
-
-
- -
-
-
-
- 256
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
-
-
-
- QAbstractItemView::DragDrop
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 120
- 20
-
-
-
+
+
+
+ 4
+
+
+ 9
+
+
-
+
+
+ Relay Logic Editor
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+
+
+ QAbstractItemView::DragDrop
+
+
+
+
+
diff --git a/DataWatch3500_GUI.pro.user b/DataWatch3500_GUI.pro.user
deleted file mode 100644
index 14ddf99..0000000
--- a/DataWatch3500_GUI.pro.user
+++ /dev/null
@@ -1,321 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {168666bd-c3a3-4089-8a9e-043b6ddc15f8}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- false
- true
- false
- 0
- true
- true
- 0
- 8
- true
- false
- 1
- true
- true
- true
- *.md, *.MD, Makefile
- false
- true
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
- true
- false
- true
- true
- true
- true
-
-
- 0
- true
-
- -fno-delayed-template-parsing
-
- true
- Builtin.BuildSystem
-
- true
- true
- Builtin.DefaultTidyAndClazy
- 3
-
-
-
- true
-
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop
- Desktop Qt 5.12.11 MinGW 32-bit
- Desktop Qt 5.12.11 MinGW 32-bit
- qt.qt5.51211.win32_mingw73_kit
- 0
- 0
- 0
-
- 0
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
-
- 0
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
-
-
- true
- QtProjectManager.QMakeBuildStep
- true
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Profile
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
- 0
-
- 3
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- dwarf
-
- cpu-cycles
-
-
- 250
-
- -e
- cpu-cycles
- --call-graph
- dwarf,4096
- -F
- 250
-
- -F
- true
- 4096
- false
- false
- 1000
-
- true
-
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- kcachegrind
- 1
-
- 25
-
- 1
- true
- false
- true
-
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
-
- 2
-
- Qt4ProjectManager.Qt4RunConfiguration:E:/WorkSpace/3500/DataWatch3500_GUI/DataWatch3500_GUI.pro
- E:/WorkSpace/3500/DataWatch3500_GUI/DataWatch3500_GUI.pro
- false
- true
- true
- false
- true
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 22
-
-
- Version
- 22
-
-
diff --git a/DataWatch3500_GUI.pro.user.168666b b/DataWatch3500_GUI.pro.user.168666b
deleted file mode 100644
index 5b26ba7..0000000
--- a/DataWatch3500_GUI.pro.user.168666b
+++ /dev/null
@@ -1,321 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {168666bd-c3a3-4089-8a9e-043b6ddc15f8}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- false
- true
- false
- 0
- true
- true
- 0
- 8
- true
- false
- 1
- true
- true
- true
- *.md, *.MD, Makefile
- false
- true
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
- true
- false
- true
- true
- true
- true
-
-
- 0
- true
-
- -fno-delayed-template-parsing
-
- true
- Builtin.BuildSystem
-
- true
- true
- Builtin.DefaultTidyAndClazy
- 3
-
-
-
- true
-
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop
- Desktop Qt 5.12.11 MinGW 32-bit
- Desktop Qt 5.12.11 MinGW 32-bit
- qt.qt5.51211.win32_mingw73_kit
- 0
- 0
- 0
-
- 0
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
-
- 0
- E:\WorkSpace\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Profile
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
- 0
-
- 3
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- dwarf
-
- cpu-cycles
-
-
- 250
-
- -e
- cpu-cycles
- --call-graph
- dwarf,4096
- -F
- 250
-
- -F
- true
- 4096
- false
- false
- 1000
-
- true
-
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- kcachegrind
- 1
-
- 25
-
- 1
- true
- false
- true
-
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
-
- 2
-
- Qt4ProjectManager.Qt4RunConfiguration:E:/WorkSpace/3500/DataWatch3500_GUI/DataWatch3500_GUI.pro
- E:/WorkSpace/3500/DataWatch3500_GUI/DataWatch3500_GUI.pro
- false
- true
- true
- false
- true
- E:/WorkSpace/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 22
-
-
- Version
- 22
-
-
diff --git a/DataWatch3500_GUI.pro.user.ec39114 b/DataWatch3500_GUI.pro.user.ec39114
deleted file mode 100644
index 399992b..0000000
--- a/DataWatch3500_GUI.pro.user.ec39114
+++ /dev/null
@@ -1,319 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {ec391146-c33c-4c2a-a873-de5f75d65684}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- false
- true
- false
- 0
- true
- true
- 0
- 8
- true
- false
- 1
- true
- true
- true
- *.md, *.MD, Makefile
- false
- true
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
- true
- false
- true
- true
- true
- true
-
-
- 0
- true
-
- -fno-delayed-template-parsing
-
- true
- Builtin.BuildSystem
-
- true
- true
- Builtin.DefaultTidyAndClazy
- 8
-
-
-
- true
-
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop
- Desktop Qt 5.12.11 MinGW 32-bit
- Desktop Qt 5.12.11 MinGW 32-bit
- qt.qt5.51211.win32_mingw73_kit
- 0
- 0
- 0
-
- 0
- E:\WorkSpace\Chaos\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
- E:/WorkSpace/Chaos/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- E:\WorkSpace\Chaos\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
- E:/WorkSpace/Chaos/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
-
- 0
- E:\WorkSpace\Chaos\3500\build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
- E:/WorkSpace/Chaos/3500/build-DataWatch3500_GUI-Desktop_Qt_5_12_11_MinGW_32_bit-Profile
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
-
- Profile
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
- 0
-
- 3
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- dwarf
-
- cpu-cycles
-
-
- 250
-
- -e
- cpu-cycles
- --call-graph
- dwarf,4096
- -F
- 250
-
- -F
- true
- 4096
- false
- false
- 1000
-
- true
-
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- kcachegrind
- 1
-
- 25
-
- 1
- true
- false
- true
-
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
-
- 2
-
- ProjectExplorer.CustomExecutableRunConfiguration
-
- false
- true
- false
- true
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 22
-
-
- Version
- 22
-
-
diff --git a/SlowSpeedChannelSetting.cpp b/SlowSpeedChannelSetting.cpp
index 7490f20..7d6e327 100644
--- a/SlowSpeedChannelSetting.cpp
+++ b/SlowSpeedChannelSetting.cpp
@@ -1,6 +1,7 @@
#include "SlowSpeedChannelSetting.h"
#include "ui_SlowSpeedChannelSetting.h"
#include
+#include "CopyChannelSetting.h"
CSlowSpeedChannelSetting::CSlowSpeedChannelSetting(QWidget *parent) :
QWidget(parent),
@@ -61,6 +62,31 @@ void CSlowSpeedChannelSetting::displayChannelSetting()
if(channelSetting.sensorType == "AIRGAP"){
ui->comboBox_channelType->addItem("高速电流");
}
+
+ ui->RPMComBox->clear();
+ ui->RPMComBox->addItem("- -");
+ QMap>::iterator iterChannel = g_MapChannel.begin();
+ for (; iterChannel != g_MapChannel.end(); iterChannel++) {
+ QMap::iterator iter = iterChannel.value().begin();
+ for (;iter != iterChannel.value().end() ; iter++) {
+ if(iter.key() == "TACHOMETER"){
+ qDebug() << iter.key() << endl;
+ ui->RPMComBox->addItem(iter.value());
+ }
+ }
+ }
+
+ if(channelSetting.speedRefChannelId == "" || channelSetting.speedRefChannelId == "NONE"){
+ ui->RPMComBox->setCurrentText("- -");
+ }else{
+ for (int i = 0; i < g_ChannelBaseInfo.size(); i++) {
+ if(g_ChannelBaseInfo[i].channelID == channelSetting.speedRefChannelId){
+ ui->RPMComBox->setCurrentText(g_ChannelBaseInfo[i].channelName);
+ break;
+ }
+ }
+ }
+
QString string_modelNo = QString("%1").arg(channelSetting.sensorModuleNo);
ui->label_modelNo->setText(string_modelNo);
QString string_sensorNo = QString("%1").arg(channelSetting.sensorNo);
@@ -96,10 +122,12 @@ void CSlowSpeedChannelSetting::displayChannelSetting()
ui->textEdit_comment->setText(channelSetting.comments);
QStringList strListFs ;
- if(channelSetting.sensorType == "PULSE_CURRENT" || channelSetting.sensorType == "AIRGAP")
+ if(channelSetting.sensorType == "PULSE_CURRENT")
strListFs << "1kHz" << "2kHz" << "4kHz" << "8kHz" << "16kHz";
else if(channelSetting.sensorType == "SLOW_CURRENT")
strListFs << "1Hz"<<"8Hz" << "16Hz" << "32Hz" << "64Hz";
+ else if(channelSetting.sensorType == "AIRGAP")
+ strListFs << "1kHz" << "2kHz" << "4kHz" << "8kHz";
ui->comboBox_defaultDisplay->setCurrentText(channelSetting.defaultDisplay);
channelSetting.isEnable = 1;
@@ -163,6 +191,17 @@ void CSlowSpeedChannelSetting::on_pushButton_submit_clicked()
channelSetting.sensorType ="AIRGAP";
}
+ for (int i = 0; i < g_ChannelBaseInfo.size(); i++) {
+ if(g_ChannelBaseInfo[i].channelName == ui->RPMComBox->currentText()){
+ channelSetting.speedRefChannelId = g_ChannelBaseInfo[i].channelID;
+ channelSetting.speedRefChannelName = g_ChannelBaseInfo[i].channelName;
+ }else if(ui->RPMComBox->currentText() == "- -")
+ {
+ channelSetting.speedRefChannelId = "";
+ channelSetting.speedRefChannelName = "";
+ }
+ }
+
channelSetting.defaultDisplay = ui->comboBox_defaultDisplay->currentText();
channelSetting.firstPoleNum = ui->lineEdit_poleNum->text();
@@ -184,7 +223,7 @@ void CSlowSpeedChannelSetting::on_pushButton_submit_clicked()
else if(strSamplingRate == "4kHz")
channelSetting.samplingRate = 4096;
else if(strSamplingRate == "8kHz")
- channelSetting.samplingRate = 8092;
+ channelSetting.samplingRate = 8192;
else if(strSamplingRate == "16kHz")
channelSetting.samplingRate = 16384;
@@ -202,3 +241,61 @@ void CSlowSpeedChannelSetting::on_comboBox_channelType_currentTextChanged(const
}
}
+void CSlowSpeedChannelSetting::slotSetChannelData(QStringList& listChannelName)
+{
+ qDebug() << listChannelName << endl;
+ for (int i = 0; i < listChannelName.size(); i++)
+ {
+ QString strUpdateSql = QString(" set ChUnitCoeff = '%1' , ChUnitDot = %2,SensorICP = '%3', \
+ SensorType = '%4',bearingClearance='%5',bearingStartPosition='%6',\
+ channelIntDiff = '%7',channelRMSPkPk2Pk='%8',channelSensorType='%9',\
+ comments = '%10',couplingACDC='%11',envelopeHighpassband=%12,envelopeLowpassband=%13,\
+ equipmentId = %14,filter='%15',frequencyRangeMax='%16',frequencyRangeMin='%17',\
+ fullScalePosition=%18,highPassFrequency='%19',installMethod='%20',isEnable=%21,\
+ isWork=%22,lowPassFrequency='%23',measuringRange='%24',offset=%25,pairChannelId='%26',\
+ pairChannelName='%27',rpmMultiplier='%28',samplingRate=%29,sensor1xAmplitudeRunout='%30',\
+ sensor1xPhaseRunout='%31',sensorConfigureDate='%32',sensorEngineeringUnit='%33',\
+ sensorGapVoltage='%34',sensorLeftOrRight='%35',sensorLocationInDegree=%36,\
+ sensorRange='%37',sensorRangeCheck='%38',sensorRangeMax='%39',sensorRangeMin='%40',\
+ sensorSensitivity='%41',shaftRotationDirection='%42',speedRefChannelId='%43',\
+ startBrands='%44',stopBrands='%45',tachAutoTach='%46',tachTriggerEdge='%47',tachTriggerHysteresis=%48,\
+ tachTriggerPerRev='%49',tachTriggerVoltageLevel='%50',thermalCoupleType = '%51',xFullScalePosition='%52',\
+ xProcessVariableName='%53',xZeroScalePosition='%54',zeroScalePosition='%55',speedRefChannelName = '%56',\
+ defaultDisplay = '%57' ,confidenceDegree=%58,sectionNum=%59 where channelName = '%60'").\
+ arg(channelSetting.ChUnitCoeff).arg(channelSetting.ChUnitDot).arg(channelSetting.sensorICP).\
+ arg(channelSetting.sensorType).arg(channelSetting.bearingClearance).arg(channelSetting.bearingStartPosition).\
+ arg(channelSetting.channelIntDiff).arg(channelSetting.channelRMSPkPk2Pk).arg(channelSetting.channelSensorType).\
+ arg(channelSetting.comments).arg(channelSetting.couplingACDC).arg(channelSetting.envelopeHighpassband).arg(channelSetting.envelopeLowpassband).\
+ arg(channelSetting.equipmentId).arg(channelSetting.filter).arg(channelSetting.frequencyRangeMax).\
+ arg(channelSetting.frequencyRangeMin).arg(channelSetting.fullScalePosition).arg(channelSetting.highPassFrequency).\
+ arg(channelSetting.installMethod).arg(channelSetting.isEnable).arg(channelSetting.isWork).\
+ arg(channelSetting.lowPassFrequency).arg(channelSetting.measuringRange).arg(channelSetting.offset).\
+ arg(channelSetting.pairChannelId).arg(channelSetting.pairChannelName).arg(channelSetting.rpmMultiplier).\
+ arg(channelSetting.samplingRate).arg(channelSetting.sensor1xAmplitudeRunout).arg(channelSetting.sensor1xPhaseRunout).\
+ arg(channelSetting.sensorConfigureDate).arg(channelSetting.sensorEngineeringUnit).arg(channelSetting.sensorGapVoltage).\
+ arg(channelSetting.sensorLeftOrRight).arg(channelSetting.sensorLocationInDegree).\
+ arg(channelSetting.sensorRange).arg(channelSetting.sensorRangeCheck).\
+ arg(channelSetting.sensorRangeMax).arg(channelSetting.sensorRangeMin).arg(channelSetting.sensorSensitivity).\
+ arg(channelSetting.shaftRotationDirection).arg(channelSetting.speedRefChannelId).\
+ arg(channelSetting.startBrands).arg(channelSetting.stopBrands).arg(channelSetting.tachAutoTach).arg(channelSetting.tachTriggerEdge).\
+ arg(channelSetting.tachTriggerHysteresis).arg(channelSetting.tachTriggerPerRev).arg(channelSetting.tachTriggerVoltageLevel).\
+ arg(channelSetting.thermalCoupleType).arg(channelSetting.xFullScalePosition).arg(channelSetting.xProcessVariableName).arg(channelSetting.xZeroScalePosition).\
+ arg(channelSetting.zeroScalePosition).arg(channelSetting.speedRefChannelName).arg(channelSetting.defaultDisplay).\
+ arg(channelSetting.confidenceDegree).arg(channelSetting.sectionNum).arg(listChannelName[i]);
+
+ QString tableName = "t_ChannelSetting ";
+ g_SqliteDB->UpdateDataSql(tableName,strUpdateSql);
+ }
+}
+void CSlowSpeedChannelSetting::on_pushButton_copy_clicked()
+{
+ QString strWhere = QString(" sensorModuleNo = %1 and channelId <> '%2' ").arg(channelSetting.sensorModuleNo).arg(channelSetting.channelId);
+ QVector copyChannel = g_SqliteDB->GetDataMultiLine("t_ChannelSetting","*",strWhere);
+ CopyChannelSetting *dialog = new CopyChannelSetting();
+ connect(dialog, SIGNAL(sgSetChannelData(QStringList&)), this, SLOT(slotSetChannelData(QStringList&)));
+ dialog->copyChannel = copyChannel;
+ dialog->setWindowModality(Qt::ApplicationModal);
+ dialog->displayCopyChannel();
+ dialog->show();
+}
+
diff --git a/SlowSpeedChannelSetting.h b/SlowSpeedChannelSetting.h
index f37ac7e..fcbebb7 100644
--- a/SlowSpeedChannelSetting.h
+++ b/SlowSpeedChannelSetting.h
@@ -3,6 +3,7 @@
#include
#include "global.h"
+#include "sqlitedb.h"
namespace Ui {
class CSlowSpeedChannelSetting;
@@ -26,6 +27,9 @@ private slots:
void on_comboBox_channelType_currentTextChanged(const QString &arg1);
+ void on_pushButton_copy_clicked();
+public slots:
+ void slotSetChannelData(QStringList&);
private:
Ui::CSlowSpeedChannelSetting *ui;
diff --git a/SlowSpeedChannelSetting.ui b/SlowSpeedChannelSetting.ui
index 5d23a16..7f870f2 100644
--- a/SlowSpeedChannelSetting.ui
+++ b/SlowSpeedChannelSetting.ui
@@ -248,21 +248,6 @@ color: rgb(27, 30, 35);
通道信息
-
- 6
-
-
- 6
-
-
- 6
-
-
- 6
-
-
- 6
-
-
@@ -277,44 +262,84 @@ color: rgb(27, 30, 35);
-
-
+
-
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
- 通道类型:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ 通道类型:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 150
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+
+
-
-
-
-
- 150
- 0
-
-
-
-
- 16777215
- 16777215
-
-
-
+
+
-
+
+
+
+ 100
+ 0
+
+
+
+
+ 100
+ 16777215
+
+
+
+ 转速参考:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 150
+ 0
+
+
+
+
+
@@ -1514,6 +1539,48 @@ color: rgb(27, 30, 35);
-
+
-
+
+
+
+ 96
+ 28
+
+
+
+
+ 96
+ 28
+
+
+
+ #pushButton_copy { border-image: url(:/image/Btn/normal_Btn.png);
+ color:#1f5188 }
+#pushButton_copy:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
+ color:#ffffff}
+#pushButton_copy:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
+ color:#ffffff}
+#pushButton_copy:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
+ color:#ffffff}
+
+
+ 复制通道
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
-
diff --git a/UnitSetting.cpp b/UnitSetting.cpp
index 5a84c9c..e64f9a1 100644
--- a/UnitSetting.cpp
+++ b/UnitSetting.cpp
@@ -235,7 +235,7 @@ void CUnitSetting::PushData()
tempObj.remove("content");
tempObj.insert("content",ui->RatedPower->text());
- tempObj.insert("Unit","MW");
+ tempObj.insert("Unit","MW");
paramsObj.insert("RatedPower",tempObj);
tempObj.remove("content");
@@ -266,11 +266,13 @@ void CUnitSetting::PushData()
tempObj.insert("content",ui->PlantName->text());
paramsObj.insert("PlantName",tempObj);
- //tempObj.remove("content");
+ tempObj.remove("content");
+ tempObj.remove("Unit");
tempObj.insert("content",ui->poleNum->text());
paramsObj.insert("PoleNum",tempObj);
+
tempObj.insert("content",ui->UnitStyle->currentText());
QJsonArray array;
array.append("混流式机组");
diff --git a/channelsetting.ui b/channelsetting.ui
index c0d882c..aa60047 100644
--- a/channelsetting.ui
+++ b/channelsetting.ui
@@ -695,7 +695,7 @@ color: rgb(27, 30, 35);
- 100
+ 112
0
@@ -740,7 +740,7 @@ color: rgb(27, 30, 35);
- 100
+ 112
0
@@ -785,7 +785,7 @@ color: rgb(27, 30, 35);
- 0
+ 112
0
@@ -824,7 +824,7 @@ color: rgb(27, 30, 35);
- 0
+ 100
0
diff --git a/realtimeform.cpp b/realtimeform.cpp
index f9e479e..ce1f3a4 100644
--- a/realtimeform.cpp
+++ b/realtimeform.cpp
@@ -89,12 +89,13 @@ CRealTimeForm::CRealTimeForm(QWidget *parent) :
connect(m_pSocket, &QTcpSocket::readyRead, this, &CRealTimeForm::slotRecieve);
connect(m_pSocket, &QTcpSocket::disconnected, this, &CRealTimeForm::disConnect);
-
+#ifdef QT_NO_DEBUG
id1 = startTimer(2000); //参数1 间隔 单位 毫秒
//定时器第二种方式
QTimer * timer = new QTimer(this);
//启动定时器
timer->start(500);
+#endif
}
CRealTimeForm::~CRealTimeForm()
@@ -165,8 +166,8 @@ void CRealTimeForm::InitChannelInfo()
void CRealTimeForm::on_graphView_customContextMenuRequested(const QPoint &pos)
{
qDebug() << " custom menu!!!!!!!!!"<< "##"<< pos.x() << " ; "<< pos.y();
- if(ui->graphicsView->itemAt(pos) || ui->graphicsView_2->itemAt(pos))
- return;
+// if(ui->graphicsView->itemAt(pos) || ui->graphicsView_2->itemAt(pos))
+// return;
QMenu menu(this);
pActionVerticalLine = menu.addAction("添加竖线");
pActionHorizontalLine = menu.addAction("添加横线");