优化了redhat 日志存储目录,高速电流,气隙增加滤波设置
This commit is contained in:
parent
c39c730211
commit
4ceee47797
@ -15,7 +15,10 @@ CDIO_Board::CDIO_Board(QWidget *parent) :
|
||||
Init();
|
||||
CRealTimeForm *pRealTime = new CRealTimeForm();
|
||||
connect(pRealTime,SIGNAL(sigDOStatus(QJsonArray&,QJsonArray&)), this, SLOT(slotDOStatus(QJsonArray&,QJsonArray&)));
|
||||
|
||||
if(g_strIOControl == "1"){
|
||||
ui->pushButton_Close->setEnabled(1);
|
||||
ui->pushButton_Open->setEnabled(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -135,6 +138,18 @@ void CDIO_Board::Init()
|
||||
|
||||
void CDIO_Board::on_pushButton_Close_clicked()
|
||||
{
|
||||
QMessageBox:: StandardButton iResult = QMessageBox::question(this, QStringLiteral("提示"),
|
||||
QStringLiteral("确认后将关闭选择的开出通道!"),
|
||||
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
|
||||
switch (iResult) {
|
||||
case QMessageBox::Yes:
|
||||
break;
|
||||
case QMessageBox::No:
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
QJsonObject allObj,cmdBody,itemObj,DOContralObj;
|
||||
QJsonArray arrayBody;
|
||||
allObj.insert("cmd", "91");
|
||||
@ -238,6 +253,18 @@ void CDIO_Board::on_pushButton_Open_clicked()
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
QMessageBox:: StandardButton iResult = QMessageBox::question(this, QStringLiteral("提示"),
|
||||
QStringLiteral("确认后将打开选择的开出通道!"),
|
||||
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
|
||||
switch (iResult) {
|
||||
case QMessageBox::Yes:
|
||||
break;
|
||||
case QMessageBox::No:
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
QJsonObject allObj,cmdBody,itemObj,DOContralObj;
|
||||
QJsonArray arrayBody;
|
||||
allObj.insert("cmd", "91");
|
||||
|
||||
@ -1086,6 +1086,9 @@ color: rgb(27, 30, 35);
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_30">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Close">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
@ -1118,6 +1121,9 @@ color: rgb(27, 30, 35);
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Open">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
|
||||
@ -32,6 +32,7 @@ SOURCES += \
|
||||
CharacteristicList.cpp \
|
||||
Configuration.cpp \
|
||||
CopyChannelSetting.cpp \
|
||||
CopyDatFile.cpp \
|
||||
CustomFilter.cpp \
|
||||
DIO_Board.cpp \
|
||||
DataGraphView.cpp \
|
||||
@ -84,6 +85,7 @@ HEADERS += \
|
||||
CharacteristicList.h \
|
||||
Configuration.h \
|
||||
CopyChannelSetting.h \
|
||||
CopyDatFile.h \
|
||||
CustomFilter.h \
|
||||
DIO_Board.h \
|
||||
DataGraphView.h \
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include <QRegExpValidator>
|
||||
#include <QSettings>
|
||||
#include <QTextCodec>
|
||||
#include <QInputDialog>
|
||||
#include "ftpclient.h"
|
||||
|
||||
COtherConfig::COtherConfig(QWidget *parent) :
|
||||
@ -18,6 +19,7 @@ COtherConfig::COtherConfig(QWidget *parent) :
|
||||
ui->lineEdit_Trigger->setValidator(Validator);
|
||||
ui->lineEdit_peaktopeak->setValidator(Validator);
|
||||
|
||||
ui->radioButton_closeIO->setChecked(1);
|
||||
LoadWorkingConditionConfig();
|
||||
}
|
||||
|
||||
@ -101,7 +103,6 @@ void COtherConfig::LoadWorkingConditionConfig()
|
||||
QSettings settingsread(QCoreApplication::applicationDirPath() + "/config/config.ini",QSettings::IniFormat);
|
||||
#endif
|
||||
settingsread.setIniCodec(QTextCodec::codecForName("UTF8"));
|
||||
g_strVersion = settingsread.value("main/Version").toString();
|
||||
g_strProject = settingsread.value("main/Project").toString();
|
||||
|
||||
QTextCodec* codec = QTextCodec::codecForName("UTF-8");//添加编码格式
|
||||
@ -436,3 +437,39 @@ void COtherConfig::on_radioButton_close_clicked()
|
||||
ui->lineEdit_peaktopeak->setEnabled(1);
|
||||
}
|
||||
|
||||
|
||||
void COtherConfig::on_radioButton_openIO_clicked()
|
||||
{
|
||||
bool ok;
|
||||
QString password = QInputDialog::getText(this,
|
||||
"输入密码",
|
||||
"Enter Password:",
|
||||
QLineEdit::Password,
|
||||
"",
|
||||
&ok);
|
||||
if(!ok) {
|
||||
ui->radioButton_openIO->setChecked(0);
|
||||
ui->radioButton_closeIO->setChecked(1);
|
||||
return;
|
||||
}
|
||||
#ifdef Q_OS_WIN32
|
||||
QSettings settingsread(QCoreApplication::applicationDirPath() + "\\config\\config.ini",QSettings::IniFormat);
|
||||
#endif
|
||||
#ifdef Q_OS_LINUX
|
||||
QSettings settingsread(QCoreApplication::applicationDirPath() + "/config/config.ini",QSettings::IniFormat);
|
||||
#endif
|
||||
if(password == settingsread.value("main/passwd").toString())
|
||||
{
|
||||
g_strIOControl = "1";
|
||||
}else{
|
||||
QMessageBox::information(this, QStringLiteral("提示"), "请输入正确的密码!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void COtherConfig::on_radioButton_closeIO_clicked()
|
||||
{
|
||||
g_strIOControl = "0";
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,10 @@ private slots:
|
||||
|
||||
void on_radioButton_close_clicked();
|
||||
void slotNetMgr(QString sAddr,const QVariant& msg);
|
||||
void on_radioButton_openIO_clicked();
|
||||
|
||||
void on_radioButton_closeIO_clicked();
|
||||
|
||||
private:
|
||||
Ui::COtherConfig *ui;
|
||||
|
||||
|
||||
@ -411,6 +411,45 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>210</y>
|
||||
<width>231</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>继电器开关控制</string>
|
||||
</property>
|
||||
<widget class="QRadioButton" name="radioButton_openIO">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>89</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="radioButton_closeIO">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>30</y>
|
||||
<width>89</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "ui_SlowSpeedChannelSetting.h"
|
||||
#include <QListView>
|
||||
#include "CopyChannelSetting.h"
|
||||
#include "CustomFilter.h"
|
||||
|
||||
CSlowSpeedChannelSetting::CSlowSpeedChannelSetting(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@ -35,6 +36,7 @@ CSlowSpeedChannelSetting::CSlowSpeedChannelSetting(QWidget *parent) :
|
||||
m_DisPlayerList << "平均值" << "最小值" << "最大值";
|
||||
ui->comboBox_defaultDisplay->clear();
|
||||
ui->comboBox_defaultDisplay->addItems(m_DisPlayerList);
|
||||
ui->pushButton_CustomFilter->setVisible(false);
|
||||
}
|
||||
|
||||
CSlowSpeedChannelSetting::~CSlowSpeedChannelSetting()
|
||||
@ -58,9 +60,11 @@ void CSlowSpeedChannelSetting::displayChannelSetting()
|
||||
}
|
||||
if(channelSetting.sensorType == "PULSE_CURRENT"){
|
||||
ui->comboBox_channelType->addItem("气隙");
|
||||
ui->pushButton_CustomFilter->setVisible(true);
|
||||
}
|
||||
if(channelSetting.sensorType == "AIRGAP"){
|
||||
ui->comboBox_channelType->addItem("高速电流");
|
||||
ui->pushButton_CustomFilter->setVisible(true);
|
||||
}
|
||||
|
||||
ui->RPMComBox->clear();
|
||||
@ -299,3 +303,14 @@ void CSlowSpeedChannelSetting::on_pushButton_copy_clicked()
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
|
||||
void CSlowSpeedChannelSetting::on_pushButton_CustomFilter_clicked()
|
||||
{
|
||||
CustomFilter *pCustomFilter = new CustomFilter();
|
||||
pCustomFilter->channel_ID = channelSetting.channelId;
|
||||
pCustomFilter->vibrate_channel = 1;
|
||||
pCustomFilter->setWindowModality(Qt::ApplicationModal);
|
||||
pCustomFilter->show();
|
||||
pCustomFilter->getfilterInfo();
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,8 @@ private slots:
|
||||
void on_comboBox_channelType_currentTextChanged(const QString &arg1);
|
||||
|
||||
void on_pushButton_copy_clicked();
|
||||
void on_pushButton_CustomFilter_clicked();
|
||||
|
||||
public slots:
|
||||
void slotCopyChannelData(QStringList&);
|
||||
private:
|
||||
|
||||
@ -384,7 +384,7 @@ color: rgb(27, 30, 35);</string>
|
||||
<widget class="QLineEdit" name="lineEdit_channelName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -398,6 +398,48 @@ color: rgb(27, 30, 35);</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_CustomFilter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButton_CustomFilter { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
color:#1f5188 }
|
||||
#pushButton_CustomFilter:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_CustomFilter:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_CustomFilter:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>滤波设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "NetMgr.h"
|
||||
#include <QNetworkRequest>
|
||||
#include "ftpclient.h"
|
||||
//#include "CopyDatFile.h"
|
||||
#include "CopyDatFile.h"
|
||||
#include "Backup.h"
|
||||
#include "ImportConfig.h"
|
||||
|
||||
@ -55,6 +55,7 @@ CTerminalInfo::CTerminalInfo(QWidget *parent) :
|
||||
|
||||
double cpuUserUse = 10,memoryUse = 20,hardDiskUse = 30,temperature = 60;
|
||||
QString updateTime = "1583487670";
|
||||
ui->label_Version_GUI->setText(g_strVersion);
|
||||
//UpdateChart(cpuUserUse,memoryUse,memoryUse,temperature,updateTime);
|
||||
|
||||
|
||||
@ -301,10 +302,10 @@ void CTerminalInfo::on_pushButton_Update_clicked()
|
||||
|
||||
void CTerminalInfo::on_pushButtonCopy_clicked()
|
||||
{
|
||||
// CCopyDatFile *copyDatDialog = new CCopyDatFile();
|
||||
// copyDatDialog->setWindowModality(Qt::ApplicationModal);
|
||||
// copyDatDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
// copyDatDialog->show();
|
||||
CCopyDatFile *copyDatDialog = new CCopyDatFile();
|
||||
copyDatDialog->setWindowModality(Qt::ApplicationModal);
|
||||
copyDatDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
copyDatDialog->show();
|
||||
}
|
||||
|
||||
void CTerminalInfo::on_pushButton_export_clicked()
|
||||
|
||||
@ -14,3 +14,4 @@ QString g_LocalFile ;
|
||||
QString g_strVersion ;
|
||||
QString g_strProject ;
|
||||
QString g_strFre ;
|
||||
QString g_strIOControl ;
|
||||
|
||||
2
global.h
2
global.h
@ -16,7 +16,7 @@ extern QString g_LocalFile ;
|
||||
extern QString g_strVersion ;
|
||||
extern QString g_strProject ;
|
||||
extern QString g_strFre ;
|
||||
|
||||
extern QString g_strIOControl ;
|
||||
//#define NO_FILTER
|
||||
|
||||
typedef struct ChannelSetting{
|
||||
|
||||
7
log.h
7
log.h
@ -6,8 +6,13 @@
|
||||
#include <QMutex>
|
||||
#include <QString>
|
||||
|
||||
#define LOG_FILE_NAME QCoreApplication::applicationDirPath() + QString("\\Log\\") + QDateTime::currentDateTime().toString("yyyy-MM-dd") + QString(".log")
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#define LOG_FILE_NAME QCoreApplication::applicationDirPath() + QString("\\Log\\") + QDateTime::currentDateTime().toString("yyyy-MM-dd") + QString(".log")
|
||||
#endif
|
||||
#ifdef Q_OS_LINUX
|
||||
#define LOG_FILE_NAME QCoreApplication::applicationDirPath() + QString("/Log/") + QDateTime::currentDateTime().toString("yyyy-MM-dd") + QString(".log")
|
||||
#endif
|
||||
static int s_logLevel = 0;
|
||||
static QMutex s_logMutex;
|
||||
static QString s_logPath;
|
||||
|
||||
@ -27,7 +27,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
#ifdef Q_OS_LINUX
|
||||
QSettings settingsread(QCoreApplication::applicationDirPath() + "/config/config.ini",QSettings::IniFormat);
|
||||
#endif
|
||||
g_strVersion = "SJ90C V1.1";
|
||||
g_strVersion = "SJ90C V1.1_20241009";
|
||||
g_strProject = settingsread.value("main/Project").toString();
|
||||
g_strFre = settingsread.value("main/Fre").toString();
|
||||
|
||||
@ -249,16 +249,28 @@ void MainWindow::leftConfigClick()
|
||||
delete pWaveDisPlay;
|
||||
pWaveDisPlay = NULL;
|
||||
}
|
||||
if(pDIOBoard){
|
||||
delete pDIOBoard;
|
||||
pDIOBoard = NULL;
|
||||
}
|
||||
}else if(name == "特征值列表"){
|
||||
ui->tabWidget_main->setCurrentWidget(pCharacteristcList);
|
||||
if(pWaveDisPlay){
|
||||
delete pWaveDisPlay;
|
||||
pWaveDisPlay = NULL;
|
||||
}
|
||||
if(pDIOBoard){
|
||||
delete pDIOBoard;
|
||||
pDIOBoard = NULL;
|
||||
}
|
||||
|
||||
}else if(name == "气隙监测"){
|
||||
|
||||
}else if(name == "波形图"){
|
||||
if(pDIOBoard){
|
||||
delete pDIOBoard;
|
||||
pDIOBoard = NULL;
|
||||
}
|
||||
if(pWaveDisPlay == NULL)
|
||||
pWaveDisPlay = new CWaveDisPlay(this);
|
||||
ui->tabWidget_main->addTab(pWaveDisPlay,"");
|
||||
@ -600,8 +612,10 @@ void MainWindow::buttonClick()
|
||||
if (name == "实时监测") {
|
||||
if(pRealTimeForm == NULL)
|
||||
pRealTimeForm = new CRealTimeForm (this);
|
||||
|
||||
if(pDIOBoard == NULL)
|
||||
pDIOBoard = new CDIO_Board (this);
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
ui->tabWidget_main->setCurrentIndex(0);
|
||||
|
||||
} else if (name == "事故追溯") {
|
||||
ui->stackedWidget->setCurrentIndex(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user