Modification de la configuration système et ajout des paramètres Cloud.

This commit is contained in:
2023-02-17 16:30:47 -05:00
parent 74b6a23045
commit 3ec5677dca
30 changed files with 13461 additions and 348 deletions
@@ -365,7 +365,7 @@ int CCANbusSettingsPage::ModifyDeviceConfig()
ModifiedDevice->mDeviceName = ui->mDeviceNameEditBx->toPlainText();
ModifiedDevice->mDevicePollPeriod = ui->mDevicePollPeriodSpinBx->value();
mProgramPtr->SaveSystemConfigRequest(&mDeviceConfigList);
mProgramPtr->SaveCANDevicesConfigRequest(&mDeviceConfigList);
}
@@ -478,7 +478,7 @@ void CCANbusSettingsPage::DeleteDeviceBtnPressed()
{
delete mDeviceConfigList.takeAt(index);
}
mProgramPtr->SaveSystemConfigRequest(&mDeviceConfigList);
mProgramPtr->SaveCANDevicesConfigRequest(&mDeviceConfigList);
}
+213 -8
View File
@@ -6,29 +6,234 @@
<rect>
<x>0</x>
<y>0</y>
<width>1142</width>
<height>460</height>
<width>1196</width>
<height>676</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QLabel" name="label">
<widget class="QLabel" name="mCloudLogParamsLbl">
<property name="geometry">
<rect>
<x>500</x>
<x>20</x>
<y>20</y>
<width>191</width>
<height>16</height>
<width>181</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>Cloud Settings</string>
<string>Paramètres Cloud</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>461</width>
<height>271</height>
</rect>
</property>
<property name="title">
<string>Broker MQTT</string>
</property>
<widget class="QLabel" name="mCloudMQTTHostNameLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>21</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>HostName</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="mCloudMQTTPortLbl">
<property name="geometry">
<rect>
<x>-30</x>
<y>56</y>
<width>111</width>
<height>10</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Port</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="mCloudMQTTUsernameLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>81</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Username</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="mCloudMQTTPasswordLbl">
<property name="geometry">
<rect>
<x>-30</x>
<y>111</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Password</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLineEdit" name="mCloudMQTTHostNameEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>20</y>
<width>321</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="mCloudMQTTUserNameEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>81</y>
<width>321</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QSpinBox" name="mCloudMQTTPortSpinBx">
<property name="geometry">
<rect>
<x>90</x>
<y>51</y>
<width>111</width>
<height>22</height>
</rect>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>1883</number>
</property>
</widget>
<widget class="QLineEdit" name="mCloudMQTTPasswordEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>111</y>
<width>321</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="mCloudMQTTTopicPrefixLbl">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Topic Prefix</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLineEdit" name="mCloudMQTTTopicPrefixEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>160</y>
<width>321</width>
<height>20</height>
</rect>
</property>
</widget>
</widget>
<widget class="QLabel" name="mGeneralLogParamsLbl">
<property name="geometry">
<rect>
<x>20</x>
<y>370</y>
<width>181</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string>Paramètres généraux</string>
</property>
</widget>
<widget class="QCheckBox" name="mSaveLocalLogFileChkBx">
<property name="geometry">
<rect>
<x>20</x>
<y>410</y>
<width>261</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Sauvegarder fichier log local</string>
</property>
</widget>
</widget>
@@ -0,0 +1,14 @@
#include "StorageSettingsPage.h"
#include "ui_StorageSettingsPage.h"
CStorageSettingsPage::CStorageSettingsPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CStorageSettingsPage)
{
ui->setupUi(this);
}
CStorageSettingsPage::~CStorageSettingsPage()
{
delete ui;
}
@@ -0,0 +1,22 @@
#ifndef STORAGESETTINGSPAGE_H
#define STORAGESETTINGSPAGE_H
#include <QWidget>
namespace Ui {
class CStorageSettingsPage;
}
class CStorageSettingsPage : public QWidget
{
Q_OBJECT
public:
explicit CStorageSettingsPage(QWidget *parent = 0);
~CStorageSettingsPage();
private:
Ui::CStorageSettingsPage *ui;
};
#endif // STORAGESETTINGSPAGE_H
@@ -0,0 +1,22 @@
<?xml version='1.0'?>
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>CStorageSettingsPage</class>
<widget name="CStorageSettingsPage" class="QWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<pixmapfunction/>
<connections/>
</ui>