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
f2cbf7bc
Commit
f2cbf7bc
authored
Jul 30, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified Serial port selection window
parent
78c4673f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
518 additions
and
405 deletions
+518
-405
CommConfigurationWindow.cc
src/ui/CommConfigurationWindow.cc
+10
-3
CommSettings.ui
src/ui/CommSettings.ui
+99
-81
SerialConfigurationWindow.cc
src/ui/SerialConfigurationWindow.cc
+3
-0
SerialSettings.ui
src/ui/SerialSettings.ui
+406
-321
No files found.
src/ui/CommConfigurationWindow.cc
View file @
f2cbf7bc
...
...
@@ -68,11 +68,18 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn
ui
.
connectionType
->
setEnabled
(
false
);
ui
.
linkType
->
setEnabled
(
false
);
ui
.
protocolGroupBox
->
setVisible
(
false
);
ui
.
protocolTypeGroupBox
->
setVisible
(
false
);
// Connect UI element visibility to checkbox
connect
(
ui
.
advancedOptionsCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
connectionType
,
SLOT
(
setEnabled
(
bool
)));
connect
(
ui
.
advancedOptionsCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
linkType
,
SLOT
(
setEnabled
(
bool
)));
connect
(
ui
.
advancedOptionsCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
protocolGroupBox
,
SLOT
(
setVisible
(
bool
)));
//connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.connectionType, SLOT(setEnabled(bool)));
//connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.linkType, SLOT(setEnabled(bool)));
//connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.protocolGroupBox, SLOT(setVisible(bool)));
ui
.
advancedOptionsCheckBox
->
setVisible
(
false
);
//connect(ui.advCheckBox,SIGNAL(clicked(bool)),ui.advancedOptionsCheckBox,SLOT(setChecked(bool)));
connect
(
ui
.
advCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
protocolTypeGroupBox
,
SLOT
(
setVisible
(
bool
)));
connect
(
ui
.
advCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
connectionType
,
SLOT
(
setEnabled
(
bool
)));
connect
(
ui
.
advCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
linkType
,
SLOT
(
setEnabled
(
bool
)));
connect
(
ui
.
advCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
protocolGroupBox
,
SLOT
(
setVisible
(
bool
)));
// add link types
ui
.
linkType
->
addItem
(
tr
(
"Serial"
),
QGC_LINK_SERIAL
);
...
...
src/ui/CommSettings.ui
View file @
f2cbf7bc
...
...
@@ -6,34 +6,60 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
413
</width>
<height>
37
3
</height>
<width>
770
</width>
<height>
56
3
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
rowstretch=
"1,1,1,100,100,1"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QGroupBox"
name=
"linkGroupBox"
>
<property
name=
"title"
>
<string>
Link
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
6
</number>
<number>
0
</number>
</property>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"verticalSpacer
"
>
<property
name=
"orientation
"
>
<enum>
Qt::Vertical
</enum
>
<item
>
<widget
class=
"QScrollArea"
name=
"linkScrollArea
"
>
<property
name=
"widgetResizable
"
>
<bool>
true
</bool
>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
<widget
class=
"QWidget"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
748
</width>
<height>
97
</height>
</rect>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
5
</width>
<height>
5
</height>
</size>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"advCheckBox"
>
<property
name=
"text"
>
<string>
Show Advanced Protocol Options
</string>
</property>
</
spacer
>
</
widget
>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<item>
<widget
class=
"QGroupBox"
name=
"protocolTypeGroupBox"
>
<property
name=
"title"
>
<string>
GroupBox
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
...
...
@@ -45,13 +71,6 @@
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"linkType"
/>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Protocol
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"connectionType"
>
<property
name=
"currentIndex"
>
...
...
@@ -66,48 +85,26 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Protocol
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
</layout>
</widget>
</item>
<item>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<widget
class=
"QGroupBox"
name=
"linkGroupBox"
>
<property
name=
"title"
>
<string>
Link
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QScrollArea"
name=
"linkScrollArea"
>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
</property>
<widget
class=
"QWidget"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
393
</width>
<height>
76
</height>
</rect>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<widget
class=
"QGroupBox"
name=
"protocolGroupBox"
>
<property
name=
"title"
>
<string>
Protocol
</string>
...
...
@@ -129,8 +126,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
393
</width>
<height>
7
6
</height>
<width>
748
</width>
<height>
9
6
</height>
</rect>
</property>
</widget>
...
...
@@ -139,20 +136,20 @@
</layout>
</widget>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"connectionStatusLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"text"
>
<string>
Disconnected
</string>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</
widget
>
</
spacer
>
</item>
<item
row=
"5"
column=
"1"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"spacing"
>
<number>
12
</number>
...
...
@@ -189,6 +186,19 @@
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"connectionStatusLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Disconnected
</string>
</property>
</widget>
</item>
</layout>
<action
name=
"actionDelete"
>
<property
name=
"text"
>
...
...
@@ -214,6 +224,14 @@
<string>
Close the configuration window
</string>
</property>
</action>
<zorder>
line
</zorder>
<zorder>
linkGroupBox
</zorder>
<zorder>
protocolGroupBox
</zorder>
<zorder>
connectionStatusLabel
</zorder>
<zorder>
advCheckBox
</zorder>
<zorder>
protocolTypeGroupBox
</zorder>
<zorder>
label_5
</zorder>
<zorder>
verticalSpacer
</zorder>
</widget>
<resources/>
<connections>
...
...
src/ui/SerialConfigurationWindow.cc
View file @
f2cbf7bc
...
...
@@ -129,6 +129,9 @@ SerialConfigurationWindow::SerialConfigurationWindow(LinkInterface* link, QWidge
connect
(
ui
.
parEven
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
setParityEven
(
bool
)));
connect
(
ui
.
dataBitsSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
->
link
,
SLOT
(
setDataBits
(
int
)));
connect
(
ui
.
stopBitsSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
->
link
,
SLOT
(
setStopBits
(
int
)));
connect
(
ui
.
advCheckBox
,
SIGNAL
(
clicked
(
bool
)),
ui
.
advGroupBox
,
SLOT
(
setShown
(
bool
)));
ui
.
advCheckBox
->
setChecked
(
false
);
ui
.
advGroupBox
->
setVisible
(
false
);
//connect(this->link, SIGNAL(connected(bool)), this, SLOT());
ui
.
portName
->
setSizeAdjustPolicy
(
QComboBox
::
AdjustToContentsOnFirstShow
);
...
...
src/ui/SerialSettings.ui
View file @
f2cbf7bc
...
...
@@ -6,25 +6,24 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
304
</width>
<height>
283
</height>
<width>
546
</width>
<height>
457
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
rowstretch=
"0,0,0,0,0,0,0"
columnstretch=
"100,1"
>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_7"
stretch=
"0,1,5"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel"
>
<property
name=
"text"
>
<string>
Serial Port
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<item
>
<widget
class=
"QComboBox"
name=
"portName"
>
<property
name=
"toolTip"
>
<string>
The serial port to which the system is connected. All ports listed here should work.
</string>
...
...
@@ -48,14 +47,31 @@
</item>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<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>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
stretch=
"0,1,5"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel_2"
>
<property
name=
"text"
>
<string>
Baud Rate
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<item
>
<widget
class=
"QComboBox"
name=
"baudRate"
>
<property
name=
"toolTip"
>
<string>
The data transmission rate. If unsure 57600 and 115200 are very common rates.
</string>
...
...
@@ -199,14 +215,46 @@
</item>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<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>
<item>
<widget
class=
"QCheckBox"
name=
"advCheckBox"
>
<property
name=
"text"
>
<string>
Show Advanced Port Settings
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_8"
>
<item>
<widget
class=
"QGroupBox"
name=
"advGroupBox"
>
<property
name=
"title"
>
<string>
Advanced
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel_3"
>
<property
name=
"text"
>
<string>
Flow Control
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<item
>
<widget
class=
"QCheckBox"
name=
"flowControlCheckBox"
>
<property
name=
"toolTip"
>
<string>
Activate / deactivate hardware flow control. Commonly deactivated
</string>
...
...
@@ -222,14 +270,18 @@
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel_4"
>
<property
name=
"text"
>
<string>
Parity
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<item
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QRadioButton"
name=
"parNone"
>
...
...
@@ -284,7 +336,18 @@
</item>
</layout>
</item>
<item
row=
"4"
column=
"1"
>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel_5"
>
<property
name=
"text"
>
<string>
Data bits
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"dataBitsSpinBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
...
...
@@ -318,14 +381,18 @@
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
>
<item>
<widget
class=
"QLabel"
name=
"portlabel_6"
>
<property
name=
"text"
>
<string>
Stop bits
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<item
>
<widget
class=
"QSpinBox"
name=
"stopBitsSpinBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
...
...
@@ -359,25 +426,43 @@
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
colspan=
"2"
>
<spacer
name=
"verticalSpacer"
>
</layout>
</item>
</layout>
<zorder>
horizontalLayoutWidget
</zorder>
<zorder>
horizontalLayoutWidget_2
</zorder>
<zorder>
horizontalLayoutWidget_4
</zorder>
<zorder>
portlabel_5
</zorder>
<zorder>
horizontalLayoutWidget_3
</zorder>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertic
al
</enum>
<enum>
Qt::Horizont
al
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
0
</width>
<height>
0
</height>
<width>
4
0
</width>
<height>
2
0
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"portlabel_5"
>
<property
name=
"text"
>
<string>
Data bits
</string>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
</widget>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
<action
name=
"actionDelete"
>
...
...
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