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
Expand all
Hide 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,76 +6,15 @@
<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"
>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
5
</width>
<height>
5
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Link Type
</string>
</property>
</widget>
</item>
<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"
>
<number>
-1
</number>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"advancedOptionsCheckBox"
>
<property
name=
"text"
>
<string>
Advanced Options
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QGroupBox"
name=
"linkGroupBox"
>
<property
name=
"title"
>
<string>
Link
</string>
...
...
@@ -97,8 +36,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
393
</width>
<height>
76
</height>
<width>
748
</width>
<height>
97
</height>
</rect>
</property>
</widget>
...
...
@@ -107,7 +46,65 @@
</layout>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<item>
<widget
class=
"QCheckBox"
name=
"advCheckBox"
>
<property
name=
"text"
>
<string>
Show Advanced Protocol Options
</string>
</property>
</widget>
</item>
<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"
>
<property
name=
"text"
>
<string>
Link Type
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"linkType"
/>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"connectionType"
>
<property
name=
"currentIndex"
>
<number>
-1
</number>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"advancedOptionsCheckBox"
>
<property
name=
"text"
>
<string>
Advanced Options
</string>
</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>
</layout>
</widget>
</item>
<item>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<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
This diff is collapsed.
Click to expand it.
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