diff --git a/src/ui/configuration/SerialSettingsDialog.cc b/src/ui/configuration/SerialSettingsDialog.cc index 8056afdcc7a9d439d6d15768c5704f6c0e0acb66..83418c9d992ccd9d535a94941590dbf3a6489646 100644 --- a/src/ui/configuration/SerialSettingsDialog.cc +++ b/src/ui/configuration/SerialSettingsDialog.cc @@ -44,9 +44,9 @@ This file is part of the APM_PLANNER project QT_USE_NAMESPACE -SettingsDialog::SettingsDialog(QWidget *parent) : +SerialSettingsDialog::SerialSettingsDialog(QWidget *parent) : QDialog(parent), - ui(new Ui::SettingsDialog) + ui(new Ui::SerialSettingsDialog) { ui->setupUi(this); @@ -67,17 +67,17 @@ SettingsDialog::SettingsDialog(QWidget *parent) : updateSettings(); } -SettingsDialog::~SettingsDialog() +SerialSettingsDialog::~SerialSettingsDialog() { delete ui; } -const SerialSettings& SettingsDialog::settings() const +const SerialSettings& SerialSettingsDialog::settings() const { return m_currentSettings; } -void SettingsDialog::showPortInfo(int idx) +void SerialSettingsDialog::showPortInfo(int idx) { if (idx != -1) { QStringList list = ui->serialPortInfoListBox->itemData(idx).toStringList(); @@ -89,13 +89,13 @@ void SettingsDialog::showPortInfo(int idx) } } -void SettingsDialog::apply() +void SerialSettingsDialog::apply() { updateSettings(); hide(); } -void SettingsDialog::checkCustomBaudRatePolicy(int idx) +void SerialSettingsDialog::checkCustomBaudRatePolicy(int idx) { bool isCustomBaudRate = !ui->baudRateBox->itemData(idx).isValid(); ui->baudRateBox->setEditable(isCustomBaudRate); @@ -106,7 +106,7 @@ void SettingsDialog::checkCustomBaudRatePolicy(int idx) } } -void SettingsDialog::fillPortsParameters() +void SerialSettingsDialog::fillPortsParameters() { // fill baud rate (is not the entire list of available values, // desired values??, add your independently) @@ -145,7 +145,7 @@ void SettingsDialog::fillPortsParameters() ui->flowControlBox->addItem(QLatin1String("XON/XOFF"), QSerialPort::SoftwareControl); } -void SettingsDialog::fillPortsInfo() +void SerialSettingsDialog::fillPortsInfo() { ui->serialPortInfoListBox->clear(); foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) { @@ -161,7 +161,7 @@ void SettingsDialog::fillPortsInfo() } } -void SettingsDialog::updateSettings() +void SerialSettingsDialog::updateSettings() { m_currentSettings.name = ui->serialPortInfoListBox->currentText(); diff --git a/src/ui/configuration/SerialSettingsDialog.h b/src/ui/configuration/SerialSettingsDialog.h index a52358ae0d661c759180f2108419078caeddda75..79eff0e72c70f247c033a1a84c18da83a7b4648b 100644 --- a/src/ui/configuration/SerialSettingsDialog.h +++ b/src/ui/configuration/SerialSettingsDialog.h @@ -33,14 +33,14 @@ This file is part of the APM_PLANNER project * */ -#ifndef SETTINGSDIALOG_H -#define SETTINGSDIALOG_H +#ifndef SERIALSETTINGSDIALOG_H +#define SERIALSETTINGSDIALOG_H #include #include namespace Ui { -class SettingsDialog; +class SerialSettingsDialog; } class QIntValidator; @@ -62,13 +62,13 @@ public: QSerialPort::FlowControl flowControl; }; -class SettingsDialog : public QDialog +class SerialSettingsDialog : public QDialog { Q_OBJECT public: - explicit SettingsDialog(QWidget *parent = 0); - ~SettingsDialog(); + explicit SerialSettingsDialog(QWidget *parent = 0); + ~SerialSettingsDialog(); const SerialSettings &settings() const; @@ -83,9 +83,9 @@ private: void updateSettings(); private: - Ui::SettingsDialog *ui; + Ui::SerialSettingsDialog *ui; SerialSettings m_currentSettings; QIntValidator *m_intValidator; }; -#endif // SETTINGSDIALOG_H +#endif diff --git a/src/ui/configuration/SerialSettingsDialog.ui b/src/ui/configuration/SerialSettingsDialog.ui index 5f2706fa2868f99f6775ea2375668e9fa54f5fa5..46f31a2df97e1cb08f6945e3789a7892bfc6fee1 100644 --- a/src/ui/configuration/SerialSettingsDialog.ui +++ b/src/ui/configuration/SerialSettingsDialog.ui @@ -1,7 +1,7 @@ - SettingsDialog - + SerialSettingsDialog + 0 diff --git a/src/ui/configuration/terminalconsole.cpp b/src/ui/configuration/terminalconsole.cpp index a2dcdc416c58889e94fe747922be2f917e476de8..0ad03b62a838589814e3be6e485b56a16105eaeb 100644 --- a/src/ui/configuration/terminalconsole.cpp +++ b/src/ui/configuration/terminalconsole.cpp @@ -66,7 +66,7 @@ TerminalConsole::TerminalConsole(QWidget *parent) : layout->addWidget(m_statusBar); m_serial = new QSerialPort(this); - m_settingsDialog = new SettingsDialog; + m_settingsDialog = new SerialSettingsDialog; ui->connectButton->setEnabled(true); ui->disconnectButton->setEnabled(false); diff --git a/src/ui/configuration/terminalconsole.h b/src/ui/configuration/terminalconsole.h index cb547e292243ef83b30f4779e313280738ff4117..f100a6ef24e83fdeed46bc8100af3f5daf65f6eb 100644 --- a/src/ui/configuration/terminalconsole.h +++ b/src/ui/configuration/terminalconsole.h @@ -88,7 +88,7 @@ private: Console *m_console; QStatusBar *m_statusBar; - SettingsDialog *m_settingsDialog; + SerialSettingsDialog *m_settingsDialog; QSerialPort *m_serial; SerialSettings m_settings; ConsoleMode m_consoleMode;