输出协议完成并测试
This commit is contained in:
@@ -20,6 +20,9 @@ GlobalSetting::GlobalSetting(QWidget *parent) :
|
||||
ui->comboBox_TTS->addItem(tr("开"),true);
|
||||
ui->comboBox_TTS->addItem(tr("关"),false);
|
||||
|
||||
ui->comboBox_InfoExport->addItem(tr("输出开启"),true);
|
||||
ui->comboBox_InfoExport->addItem(tr("输出关闭"),false);
|
||||
|
||||
|
||||
Config *cfg = new Config();
|
||||
|
||||
@@ -27,6 +30,10 @@ GlobalSetting::GlobalSetting(QWidget *parent) :
|
||||
cfg->get_GCS_ID(&id);
|
||||
ui->comboBox_ID->setCurrentIndex(ui->comboBox_ID->findData(id.toInt()));
|
||||
|
||||
QVariant exportinfo;
|
||||
cfg->get_ExportInfo(&exportinfo);
|
||||
ui->comboBox_InfoExport->setCurrentIndex(ui->comboBox_InfoExport->findData(exportinfo.toBool()));
|
||||
|
||||
|
||||
QVariant beep;
|
||||
cfg->getBeep(&beep);
|
||||
@@ -63,9 +70,7 @@ GlobalSetting::GlobalSetting(QWidget *parent) :
|
||||
ui->comboBox_HeartBeat_State->setCurrentIndex(ui->comboBox_HeartBeat_Frq->findData(state));
|
||||
|
||||
on_pushButton_getHeartBeat_clicked();
|
||||
|
||||
|
||||
getVirtualMargin();
|
||||
getVirtualMargin();
|
||||
}
|
||||
|
||||
GlobalSetting::~GlobalSetting()
|
||||
@@ -442,3 +447,27 @@ void GlobalSetting::on_pushButton_saveVirtualMargin_clicked()
|
||||
{
|
||||
setVirtualMargin();
|
||||
}
|
||||
|
||||
void GlobalSetting::getExportInfo(void)
|
||||
{
|
||||
on_pushButton_InfoExport_clicked();
|
||||
}
|
||||
|
||||
void GlobalSetting::on_pushButton_InfoExport_clicked()
|
||||
{
|
||||
QVariant state;
|
||||
|
||||
state = ui->comboBox_InfoExport->currentData();
|
||||
|
||||
emit setExportInfo(state);
|
||||
|
||||
Config *cfg = new Config();
|
||||
|
||||
cfg->set_ExportInfo(state);
|
||||
|
||||
cfg->deleteLater();
|
||||
delete cfg;
|
||||
|
||||
|
||||
emit showMessage((state.toBool())?(tr("信息输出开启")):(tr("信息输出关闭")));
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@ public:
|
||||
void getServo(void);
|
||||
void getHeartBeat(void);
|
||||
void getTTS(void);
|
||||
|
||||
void getExportInfo(void);
|
||||
void getVirtualMargin(void);
|
||||
void setVirtualMargin(void);
|
||||
|
||||
|
||||
|
||||
QMap<int, Config::_latlng> red = {
|
||||
{0,{0, 50,-50}},
|
||||
{1,{1, 50, 50}},
|
||||
@@ -68,6 +69,8 @@ private slots:
|
||||
|
||||
void on_pushButton_saveVirtualMargin_clicked();
|
||||
|
||||
void on_pushButton_InfoExport_clicked();
|
||||
|
||||
signals:
|
||||
void showMessage(const QString &message,int TimeOut = 0);
|
||||
|
||||
@@ -91,6 +94,8 @@ signals:
|
||||
|
||||
void setMargin(int type,QMap<int,Config::_latlng> latlng);
|
||||
|
||||
void setExportInfo(QVariant value);
|
||||
|
||||
private:
|
||||
Ui::GlobalSetting *ui;
|
||||
};
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>ID设置</string>
|
||||
<string>系统设置</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
@@ -367,8 +367,12 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_ID"/>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>提示声</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_setGCSID">
|
||||
@@ -380,6 +384,9 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox_Beep"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox_ID"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
@@ -390,27 +397,37 @@
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_Beep">
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
<string>设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButton_TTS">
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
<string>设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox_TTS"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButton_InfoExport">
|
||||
<property name="text">
|
||||
<string>提示声</string>
|
||||
<string>设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>输出经纬高信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="comboBox_InfoExport"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user