Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
4d92b1d3
Commit
4d92b1d3
authored
Nov 23, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename SettingsDialog->SerialSettingsDialog
This avoids collision with main app SettingsDialog class
parent
69d34ea8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
22 deletions
+22
-22
SerialSettingsDialog.cc
src/ui/configuration/SerialSettingsDialog.cc
+10
-10
SerialSettingsDialog.h
src/ui/configuration/SerialSettingsDialog.h
+8
-8
SerialSettingsDialog.ui
src/ui/configuration/SerialSettingsDialog.ui
+2
-2
terminalconsole.cpp
src/ui/configuration/terminalconsole.cpp
+1
-1
terminalconsole.h
src/ui/configuration/terminalconsole.h
+1
-1
No files found.
src/ui/configuration/SerialSettingsDialog.cc
View file @
4d92b1d3
...
...
@@ -44,9 +44,9 @@ This file is part of the APM_PLANNER project
QT_USE_NAMESPACE
Se
ttingsDialog
::
SettingsDialog
(
QWidget
*
parent
)
:
Se
rialSettingsDialog
::
Serial
SettingsDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
SettingsDialog
)
ui
(
new
Ui
::
Se
rialSe
ttingsDialog
)
{
ui
->
setupUi
(
this
);
...
...
@@ -67,17 +67,17 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
updateSettings
();
}
Se
ttingsDialog
::~
SettingsDialog
()
Se
rialSettingsDialog
::~
Serial
SettingsDialog
()
{
delete
ui
;
}
const
SerialSettings
&
SettingsDialog
::
settings
()
const
const
SerialSettings
&
Se
rialSe
ttingsDialog
::
settings
()
const
{
return
m_currentSettings
;
}
void
SettingsDialog
::
showPortInfo
(
int
idx
)
void
Se
rialSe
ttingsDialog
::
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
Se
rialSe
ttingsDialog
::
apply
()
{
updateSettings
();
hide
();
}
void
SettingsDialog
::
checkCustomBaudRatePolicy
(
int
idx
)
void
Se
rialSe
ttingsDialog
::
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
Se
rialSe
ttingsDialog
::
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
Se
rialSe
ttingsDialog
::
fillPortsInfo
()
{
ui
->
serialPortInfoListBox
->
clear
();
foreach
(
const
QSerialPortInfo
&
info
,
QSerialPortInfo
::
availablePorts
())
{
...
...
@@ -161,7 +161,7 @@ void SettingsDialog::fillPortsInfo()
}
}
void
SettingsDialog
::
updateSettings
()
void
Se
rialSe
ttingsDialog
::
updateSettings
()
{
m_currentSettings
.
name
=
ui
->
serialPortInfoListBox
->
currentText
();
...
...
src/ui/configuration/SerialSettingsDialog.h
View file @
4d92b1d3
...
...
@@ -33,14 +33,14 @@ This file is part of the APM_PLANNER project
*
*/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#ifndef SE
RIALSE
TTINGSDIALOG_H
#define SE
RIALSE
TTINGSDIALOG_H
#include <QDialog>
#include <QSerialPort>
namespace
Ui
{
class
SettingsDialog
;
class
Se
rialSe
ttingsDialog
;
}
class
QIntValidator
;
...
...
@@ -62,13 +62,13 @@ public:
QSerialPort
::
FlowControl
flowControl
;
};
class
SettingsDialog
:
public
QDialog
class
Se
rialSe
ttingsDialog
:
public
QDialog
{
Q_OBJECT
public:
explicit
SettingsDialog
(
QWidget
*
parent
=
0
);
~
SettingsDialog
();
explicit
Se
rialSe
ttingsDialog
(
QWidget
*
parent
=
0
);
~
Se
rialSe
ttingsDialog
();
const
SerialSettings
&
settings
()
const
;
...
...
@@ -83,9 +83,9 @@ private:
void
updateSettings
();
private:
Ui
::
SettingsDialog
*
ui
;
Ui
::
Se
rialSe
ttingsDialog
*
ui
;
SerialSettings
m_currentSettings
;
QIntValidator
*
m_intValidator
;
};
#endif
// SETTINGSDIALOG_H
#endif
src/ui/configuration/SerialSettingsDialog.ui
View file @
4d92b1d3
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
SettingsDialog
</class>
<widget
class=
"QDialog"
name=
"SettingsDialog"
>
<class>
Se
rialSe
ttingsDialog
</class>
<widget
class=
"QDialog"
name=
"Se
rialSe
ttingsDialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
src/ui/configuration/terminalconsole.cpp
View file @
4d92b1d3
...
...
@@ -66,7 +66,7 @@ TerminalConsole::TerminalConsole(QWidget *parent) :
layout
->
addWidget
(
m_statusBar
);
m_serial
=
new
QSerialPort
(
this
);
m_settingsDialog
=
new
SettingsDialog
;
m_settingsDialog
=
new
Se
rialSe
ttingsDialog
;
ui
->
connectButton
->
setEnabled
(
true
);
ui
->
disconnectButton
->
setEnabled
(
false
);
...
...
src/ui/configuration/terminalconsole.h
View file @
4d92b1d3
...
...
@@ -88,7 +88,7 @@ private:
Console
*
m_console
;
QStatusBar
*
m_statusBar
;
SettingsDialog
*
m_settingsDialog
;
Se
rialSe
ttingsDialog
*
m_settingsDialog
;
QSerialPort
*
m_serial
;
SerialSettings
m_settings
;
ConsoleMode
m_consoleMode
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment