调整ui界面内容

This commit is contained in:
zhangsheng 2025-03-11 16:42:00 +08:00
parent 79290f0fd3
commit 5525e96c9b
18 changed files with 6891 additions and 6197 deletions

View File

@ -56,3 +56,6 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
DISTFILES += \
TSI_Config.pro.user
RESOURCES += \
qss.qrc

View File

@ -490,13 +490,13 @@
<rect>
<x>130</x>
<y>50</y>
<width>80</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
@ -548,7 +548,7 @@
<rect>
<x>130</x>
<y>110</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
@ -633,7 +633,7 @@
<rect>
<x>130</x>
<y>180</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>

View File

@ -2,6 +2,7 @@
#define DATA_CONFIG_H
#include <QString>
#include <QPushButton>
#include <QLabel>
#include <QList>
typedef unsigned char uint8_t;
@ -16,6 +17,7 @@ typedef struct {
QString chan_display;
QString rack_type;
QPushButton* slot_btn;
QLabel* slot_label;
}SlotConfig;
enum CMTCommand {

View File

@ -6,6 +6,7 @@ KeyPhase::KeyPhase(QWidget *parent)
, ui(new Ui::KeyPhase)
{
ui->setupUi(this);
ui->widget_body->setProperty("flag", "body");
}
KeyPhase::~KeyPhase()

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,20 @@ MainWindow::MainWindow(QWidget *parent)
QMenuBar* menuBar = this->menuBar();
this->setMenuBar(menuBar); //添加到对象树
menuBar->addMenu(ui->menu_tool);
ui->widget_body->setProperty("flag", "title");
ui->menuBar->setProperty("flag", "menuBar");
//关联事件过滤器用于双击放大
ui->widget_body->installEventFilter(this);
ui->widget_body->setProperty("flag", "body");
ui->statusBar->setProperty("flag","status");
//this->initStyle();
//添加信号槽
QObject::connect(ui->action_realy, &QAction::triggered, this, &MainWindow::onMenuAction_relay);
slot = -1;
btnGroup_slot = new QButtonGroup(this);
btnGroup_slot->addButton(ui->pushButton_slot0);
btnGroup_slot->addButton(ui->pushButton_slot1);
btnGroup_slot->addButton(ui->pushButton_slot2);
btnGroup_slot->addButton(ui->pushButton_slot3);
btnGroup_slot->addButton(ui->pushButton_slot4);
btnGroup_slot->addButton(ui->pushButton_slot5);
@ -46,9 +56,25 @@ MainWindow::MainWindow(QWidget *parent)
btnGroup_slot->addButton(ui->pushButton_slot13);
btnGroup_slot->addButton(ui->pushButton_slot14);
btnGroup_slot->addButton(ui->pushButton_slot15);
btnGroup_slot->addButton(ui->pushButton_slot16);
btnGroup_slot->addButton(ui->pushButton_slot17);
btnGroup_slot->addButton(ui->pushButton_slot18);
list_label.reserve(16);
list_label.push_back(ui->label_18);
list_label.push_back(ui->label_1);
list_label.push_back(ui->label_2);
list_label.push_back(ui->label_3);
list_label.push_back(ui->label_4);
list_label.push_back(ui->label_5);
list_label.push_back(ui->label_6);
list_label.push_back(ui->label_7);
list_label.push_back(ui->label_8);
list_label.push_back(ui->label_9);
list_label.push_back(ui->label_10);
list_label.push_back(ui->label_11);
list_label.push_back(ui->label_12);
list_label.push_back(ui->label_13);
list_label.push_back(ui->label_14);
list_label.push_back(ui->label_15);
ui->pushButton_slot->setChecked(true);
readJsonFile(QCoreApplication::applicationDirPath() + "\\config\\main.json");
@ -70,7 +96,19 @@ MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::initStyle()
{
//加载样式表
QString qss;
QFile file(":/qss/soft.css");
if (file.open(QFile::ReadOnly)) {
qss = QLatin1String(file.readAll());
QString paletteColor = qss.mid(20, 7);
qApp->setPalette(QPalette(paletteColor));
qApp->setStyleSheet(qss);
file.close();
}
}
void MainWindow::readJsonFile(const QString &filePath)
{
// 创建文件对象
@ -113,8 +151,9 @@ void MainWindow::createMenu()
QList<QAbstractButton*> buttonList = btnGroup_slot->buttons();
for (int i = 0; i < buttonList.count(); i++){
buttonList[i]->setText(map_slot_config[i].chan_display);
createMenu(QString("%1").arg(i + 3), (QPushButton*)buttonList[i]);
createMenu(QString("%1").arg(i + 1), (QPushButton*)buttonList[i]);
map_slot_config[i].slot_btn = (QPushButton*)buttonList[i];
map_slot_config[i].slot_label = list_label[i];
// else
// createMenuSet(QString("%1").arg(i + 1), (QPushButton*)buttonList[i]);
}
@ -237,6 +276,7 @@ void MainWindow::onMenuActionTriggered()
QString rack_type = action->text().right(action->text().length()-4);
int button_id = button->objectName().right(button->objectName().length()-15).toInt();
qDebug() << slot_type << rack_type << button_id << map_slot_config[button_id + 1].slot_type << map_slot_config[button_id + 2].slot_type << endl;
map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}");
if(rack_type == "三冗余板卡" && (map_slot_config[button_id].slot_type != 0 || map_slot_config[button_id + 1].slot_type != 0 \
|| map_slot_config[button_id + 2].slot_type != 0)){
QMessageBox::information(this, QStringLiteral("提示"), "不要重叠三冗余板卡配置,请在创建新配置之前移除现有的配置!");
@ -347,10 +387,11 @@ void MainWindow::onMenuActionTriggered()
map_slot_config[button_id].slot_btn->setText("");
map_slot_config[button_id].chan_display = "";
}
}else if(action->text() == "升级固件"){
sendUpgradePackage(button_id - 3);
sendUpgradePackage(button_id);
}else if(action->text() == "查看版本"){
getVersion(button_id - 3);
getVersion(button_id);
}
break; // 找到按钮后,跳出循环
}
@ -368,6 +409,7 @@ void MainWindow::OnButtonGroup(QAbstractButton * slot_btn)
qDebug() << object_name << endl;
int button_id = object_name.right(object_name.length()-15).toInt();
SlotConfig slot_config = map_slot_config[button_id];
map_slot_config[button_id].slot_label->setStyleSheet("QLabel { color :#2980b9; font: bold 16px}");
if (slot_config.slot_type == KEYPHASOR){
KeyPhase *key_phase = new KeyPhase();
key_phase->setWindowModality(Qt::ApplicationModal);

View File

@ -33,6 +33,7 @@ private:
QMenu * button_menu;
QMap<int,SlotConfig> map_slot_config;
QList<QLabel*> list_label;
QButtonGroup * btnGroup_slot = nullptr;
@ -46,7 +47,7 @@ private:
void readJsonFile(const QString &filePath);
void sendUpgradePackage(int slot);
void getVersion(int slot);
void initStyle();
private slots:
void onMenuAction_relay();
void OnButtonGroup(QAbstractButton *);

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1072</width>
<width>1129</width>
<height>529</height>
</rect>
</property>
@ -15,8 +15,23 @@
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="widget" native="true">
<widget class="QWidget" name="widget_body" native="true">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QWidget" name="widget_2" native="true">
@ -407,7 +422,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_1">
<property name="minimumSize">
<size>
<width>50</width>
@ -429,7 +444,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>50</width>
@ -451,7 +466,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>50</width>
@ -473,7 +488,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>50</width>
@ -495,7 +510,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>50</width>
@ -517,7 +532,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>50</width>
@ -561,7 +576,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="label_8">
<property name="minimumSize">
<size>
<width>50</width>
@ -583,7 +598,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_15">
<widget class="QLabel" name="label_9">
<property name="minimumSize">
<size>
<width>50</width>
@ -605,7 +620,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<widget class="QLabel" name="label_10">
<property name="minimumSize">
<size>
<width>50</width>
@ -627,7 +642,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<widget class="QLabel" name="label_11">
<property name="minimumSize">
<size>
<width>50</width>
@ -649,7 +664,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_14">
<widget class="QLabel" name="label_12">
<property name="minimumSize">
<size>
<width>50</width>
@ -671,7 +686,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_17">
<widget class="QLabel" name="label_13">
<property name="minimumSize">
<size>
<width>50</width>
@ -693,7 +708,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_16">
<widget class="QLabel" name="label_14">
<property name="minimumSize">
<size>
<width>50</width>
@ -715,7 +730,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_20">
<widget class="QLabel" name="label_15">
<property name="minimumSize">
<size>
<width>50</width>
@ -777,7 +792,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot3">
<widget class="QPushButton" name="pushButton_slot0">
<property name="minimumSize">
<size>
<width>50</width>
@ -799,7 +814,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot4">
<widget class="QPushButton" name="pushButton_slot1">
<property name="minimumSize">
<size>
<width>50</width>
@ -821,7 +836,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot5">
<widget class="QPushButton" name="pushButton_slot2">
<property name="minimumSize">
<size>
<width>50</width>
@ -839,6 +854,63 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot3">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string>振动</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot4">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string>振动</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot5">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot6">
<property name="minimumSize">
@ -854,7 +926,7 @@
</size>
</property>
<property name="text">
<string>振动</string>
<string/>
</property>
</widget>
</item>
@ -873,7 +945,7 @@
</size>
</property>
<property name="text">
<string>振动</string>
<string/>
</property>
</widget>
</item>
@ -1029,63 +1101,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot16">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot17">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_slot18">
<property name="minimumSize">
<size>
<width>50</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1105,7 +1120,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1072</width>
<width>1129</width>
<height>21</height>
</rect>
</property>

View File

@ -96,269 +96,262 @@
<rect>
<x>10</x>
<y>30</y>
<width>591</width>
<height>141</height>
<width>349</width>
<height>116</height>
</rect>
</property>
<property name="title">
<string>滤波</string>
</property>
<widget class="QLabel" name="label_29">
<property name="geometry">
<rect>
<x>310</x>
<y>70</y>
<width>72</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>30 - 30000Hz</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_7">
<property name="geometry">
<rect>
<x>225</x>
<y>70</y>
<width>69</width>
<height>20</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<property name="text">
<string>30000</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="checkBox_10">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>高通:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_4">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_33">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_5">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_32">
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</widget>
<widget class="QLabel" name="label_30">
<property name="geometry">
<rect>
<x>195</x>
<y>70</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>56</x>
<y>71</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>低通:</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_2">
<property name="geometry">
<rect>
<x>105</x>
<y>71</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<item>
<property name="text">
<string>30</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox_11">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>低通:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_2">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>30</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_30">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_7">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>30000</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_29">
<property name="text">
<string>30 - 30000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</widget>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>56</x>
<y>31</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>高通:</string>
</property>
</widget>
<widget class="QLabel" name="label_32">
<property name="geometry">
<rect>
<x>310</x>
<y>30</y>
<width>60</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
<widget class="QLabel" name="label_33">
<property name="geometry">
<rect>
<x>195</x>
<y>30</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_4">
<property name="geometry">
<rect>
<x>105</x>
<y>30</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_5">
<property name="geometry">
<rect>
<x>225</x>
<y>30</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>56</x>
<y>101</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>带通:</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_6">
<property name="geometry">
<rect>
<x>105</x>
<y>100</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_34">
<property name="geometry">
<rect>
<x>195</x>
<y>100</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_7">
<property name="geometry">
<rect>
<x>225</x>
<y>100</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_35">
<property name="geometry">
<rect>
<x>310</x>
<y>100</y>
<width>60</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_10">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_11">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_12">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox_12">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>带通:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_6">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_34">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_7">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_35">
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="tab_6">
@ -408,7 +401,7 @@
<rect>
<x>20</x>
<y>110</y>
<width>71</width>
<width>81</width>
<height>16</height>
</rect>
</property>
@ -421,7 +414,7 @@
<rect>
<x>20</x>
<y>180</y>
<width>71</width>
<width>81</width>
<height>16</height>
</rect>
</property>
@ -460,10 +453,15 @@
<rect>
<x>130</x>
<y>50</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_17">
<property name="geometry">
@ -490,10 +488,15 @@
<rect>
<x>130</x>
<y>110</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_19">
<property name="geometry">
@ -578,20 +581,30 @@
<rect>
<x>130</x>
<y>180</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="comboBox_19">
<property name="geometry">
<rect>
<x>130</x>
<y>80</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QCheckBox" name="checkBox_21">
<property name="geometry">
@ -611,10 +624,15 @@
<rect>
<x>130</x>
<y>240</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_25">
<property name="geometry">
@ -631,10 +649,15 @@
<rect>
<x>130</x>
<y>270</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 500 um</string>
</property>
</item>
</widget>
<widget class="QCheckBox" name="checkBox_22">
<property name="geometry">
@ -915,6 +938,9 @@
<property name="text">
<string>2 mA 默认值</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_85">
<property name="geometry">
@ -1015,7 +1041,7 @@
<x>340</x>
<y>10</y>
<width>189</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
@ -1095,7 +1121,7 @@
<x>20</x>
<y>10</y>
<width>231</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">

View File

@ -13,7 +13,7 @@ RelaySetting::RelaySetting(QWidget *parent)
, ui(new Ui::RelaySetting)
{
ui->setupUi(this);
ui->widget_body->setProperty("flag", "body");
readJsonFile(QCoreApplication::applicationDirPath() + "\\config\\main.json");
for (int var = 0; var < map_slot_config.size(); ++var) {

View File

@ -11,11 +11,26 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>继电器设置</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="widget_2" native="true">
<widget class="QWidget" name="widget_body" native="true">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
@ -1312,25 +1327,25 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup_12"/>
<buttongroup name="buttonGroup_11"/>
<buttongroup name="buttonGroup_10"/>
<buttongroup name="buttonGroup_14"/>
<buttongroup name="buttonGroup_7"/>
<buttongroup name="buttonGroup_8"/>
<buttongroup name="buttonGroup_1"/>
<buttongroup name="buttonGroup_6"/>
<buttongroup name="buttonGroup_3"/>
<buttongroup name="buttonGroup_5"/>
<buttongroup name="buttonGroup_16"/>
<buttongroup name="buttonGroup_STATUS"/>
<buttongroup name="buttonGroup_12"/>
<buttongroup name="buttonGroup_TX_RX"/>
<buttongroup name="buttonGroup_OK"/>
<buttongroup name="buttonGroup_9"/>
<buttongroup name="buttonGroup_2"/>
<buttongroup name="buttonGroup_4"/>
<buttongroup name="buttonGroup_8"/>
<buttongroup name="buttonGroup_TEST"/>
<buttongroup name="buttonGroup_OK"/>
<buttongroup name="buttonGroup_1"/>
<buttongroup name="buttonGroup_3"/>
<buttongroup name="buttonGroup_6"/>
<buttongroup name="buttonGroup_4"/>
<buttongroup name="buttonGroup_7"/>
<buttongroup name="buttonGroup_10"/>
<buttongroup name="buttonGroup_14"/>
<buttongroup name="buttonGroup_11"/>
<buttongroup name="buttonGroup_5"/>
<buttongroup name="buttonGroup_STATUS"/>
<buttongroup name="buttonGroup_15"/>
<buttongroup name="buttonGroup_TX_RX"/>
<buttongroup name="buttonGroup_13"/>
</buttongroups>
</ui>

View File

@ -5,6 +5,7 @@
#include <QJsonArray>
#include <QJsonObject>
#include <QFile>
#include <QListView>
#include "acceleration.h"
#include "velocity.h"
#include "radial_vibration.h"
@ -14,6 +15,8 @@ Seismic_monitor::Seismic_monitor(int slot,QWidget *parent) :
ui(new Ui::Seismic_monitor)
{
ui->setupUi(this);
ui->widget_body->setProperty("flag", "body");
ui->comboBox_chan_type_1->setView(new QListView());
slot_no = slot;
QString slot_no_ = QString("%1").arg(slot_no);
ui->label_slot_no->setText(slot_no_);
@ -223,6 +226,42 @@ void Seismic_monitor::on_pushButton_config_1_clicked()
Acceleration *acceleration = new Acceleration(slot_no,channel,seismic_monitor[i].active);
acceleration->setWindowModality(Qt::ApplicationModal);
acceleration->show();
}else if(seismic_monitor[i].channel_type == "proximeter"){
channel = 1;
Radial_vibration *radial_vibration = new Radial_vibration();
radial_vibration->setWindowModality(Qt::ApplicationModal);
radial_vibration->show();
}else if(seismic_monitor[i].channel_type == "velocity"){
channel = 1;
Velocity *velocity = new Velocity();
velocity->setWindowModality(Qt::ApplicationModal);
velocity->show();
}
}
}
}
void Seismic_monitor::on_pushButton_config_3_clicked()
{
for (int i = 0 ;i < CHANNLE_COUNT ; i++) {
if(seismic_monitor[i].id == 3){
if(seismic_monitor[i].channel_type == "acceleration"){
channel = 3;
Acceleration *acceleration = new Acceleration(slot_no,channel,seismic_monitor[i].active);
acceleration->setWindowModality(Qt::ApplicationModal);
acceleration->show();
}else if(seismic_monitor[i].channel_type == "proximeter"){
channel = 3;
Radial_vibration *radial_vibration = new Radial_vibration();
radial_vibration->setWindowModality(Qt::ApplicationModal);
radial_vibration->show();
}else if(seismic_monitor[i].channel_type == "velocity"){
channel = 3;
Velocity *velocity = new Velocity();
velocity->setWindowModality(Qt::ApplicationModal);
velocity->show();
}
}
}

View File

@ -24,6 +24,8 @@ private slots:
void on_pushButton_config_1_clicked();
void on_pushButton_config_3_clicked();
private:
Ui::Seismic_monitor *ui;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ Tachometer::Tachometer(QWidget *parent)
, ui(new Ui::Tachometer)
{
ui->setupUi(this);
ui->widget_body->setProperty("flag", "body");
}
Tachometer::~Tachometer()

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
<x>340</x>
<y>10</y>
<width>189</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
@ -128,261 +128,276 @@
<property name="title">
<string>滤波</string>
</property>
<widget class="QLabel" name="label_29">
<widget class="QWidget" name="layoutWidget_4">
<property name="geometry">
<rect>
<x>310</x>
<y>70</y>
<width>72</width>
<height>16</height>
<x>40</x>
<y>59</y>
<width>329</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>30 - 30000Hz</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox_11">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>低通:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_2">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>30</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_30">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_7">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>30000</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_29">
<property name="text">
<string>30 - 30000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QComboBox" name="comboBox_7">
<widget class="QWidget" name="layoutWidget_5">
<property name="geometry">
<rect>
<x>225</x>
<y>70</y>
<width>69</width>
<height>20</height>
<x>40</x>
<y>88</y>
<width>329</width>
<height>23</height>
</rect>
</property>
<item>
<property name="text">
<string>30000</string>
</property>
</item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="checkBox_12">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>带通:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_6">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_34">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_7">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_35">
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QLabel" name="label_30">
<widget class="QWidget" name="layoutWidget_6">
<property name="geometry">
<rect>
<x>195</x>
<y>70</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>56</x>
<y>71</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>低通:</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_2">
<property name="geometry">
<rect>
<x>105</x>
<y>71</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<item>
<property name="text">
<string>30</string>
</property>
</item>
</widget>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>56</x>
<y>31</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>高通:</string>
</property>
</widget>
<widget class="QLabel" name="label_32">
<property name="geometry">
<rect>
<x>310</x>
<x>40</x>
<y>30</y>
<width>60</width>
<height>16</height>
<width>329</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
<widget class="QLabel" name="label_33">
<property name="geometry">
<rect>
<x>195</x>
<y>30</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_4">
<property name="geometry">
<rect>
<x>105</x>
<y>30</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_5">
<property name="geometry">
<rect>
<x>225</x>
<y>30</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>56</x>
<y>101</y>
<width>36</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>带通:</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_6">
<property name="geometry">
<rect>
<x>105</x>
<y>100</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_34">
<property name="geometry">
<rect>
<x>195</x>
<y>100</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QSpinBox" name="spinBox_7">
<property name="geometry">
<rect>
<x>225</x>
<y>100</y>
<width>61</width>
<height>22</height>
</rect>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
<widget class="QLabel" name="label_35">
<property name="geometry">
<rect>
<x>310</x>
<y>100</y>
<width>60</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_10">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_11">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_12">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>21</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="checkBox_10">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>高通:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_4">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_33">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_5">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>3000</number>
</property>
<property name="value">
<number>3000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_32">
<property name="text">
<string>3 - 3000Hz</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</widget>
@ -485,10 +500,15 @@
<rect>
<x>130</x>
<y>50</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 20 mm/s</string>
</property>
</item>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_17">
<property name="geometry">
@ -531,10 +551,15 @@
<rect>
<x>130</x>
<y>110</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 20 mm/s</string>
</property>
</item>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_19">
<property name="geometry">
@ -613,10 +638,15 @@
<rect>
<x>130</x>
<y>180</y>
<width>69</width>
<width>111</width>
<height>22</height>
</rect>
</property>
<item>
<property name="text">
<string>0 - 20 mm/s</string>
</property>
</item>
</widget>
<widget class="QCheckBox" name="checkBox_21">
<property name="geometry">
@ -886,13 +916,16 @@
<rect>
<x>460</x>
<y>160</y>
<width>91</width>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>2 mA 默认值</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_27">
<property name="geometry">
@ -1009,7 +1042,7 @@
<x>20</x>
<y>10</y>
<width>231</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">