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
9f94fef5
Commit
9f94fef5
authored
Mar 23, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73 from Susurrus/linechart_adj
Linechart UI improvements
parents
1b8cec27
387e4884
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
56 deletions
+112
-56
Linechart.ui
src/ui/Linechart.ui
+104
-42
LinechartWidget.cc
src/ui/linechart/LinechartWidget.cc
+7
-13
LinechartWidget.h
src/ui/linechart/LinechartWidget.h
+0
-1
Linecharts.cc
src/ui/linechart/Linecharts.cc
+1
-0
No files found.
src/ui/Linechart.ui
View file @
9f94fef5
...
@@ -25,8 +25,11 @@
...
@@ -25,8 +25,11 @@
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
<string>
Form
</string>
<string>
Form
</string>
</property>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"5,5,5,5,100"
>
<property
name=
"styleSheet"
>
<item
row=
"0"
column=
"0"
colspan=
"4"
>
<string
notr=
"true"
/>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"5,0,0"
>
<item
row=
"0"
column=
"0"
rowspan=
"3"
>
<widget
class=
"QGroupBox"
name=
"curveGroupBox"
>
<widget
class=
"QGroupBox"
name=
"curveGroupBox"
>
<property
name=
"sizePolicy"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"MinimumExpanding"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"MinimumExpanding"
>
...
@@ -46,13 +49,16 @@
...
@@ -46,13 +49,16 @@
<height>
16777215
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
</property>
<property
name=
"title"
>
<property
name=
"title"
>
<string>
Curve Selection
</string>
<string>
Curve Selection
</string>
</property>
</property>
<property
name=
"alignment"
>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
stretch=
"0,0"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
<number>
2
</number>
<number>
2
</number>
</property>
</property>
...
@@ -82,6 +88,9 @@
...
@@ -82,6 +88,9 @@
<property
name=
"autoFillBackground"
>
<property
name=
"autoFillBackground"
>
<bool>
false
</bool>
<bool>
false
</bool>
</property>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
</property>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
<enum>
QFrame::NoFrame
</enum>
</property>
</property>
...
@@ -99,75 +108,128 @@
...
@@ -99,75 +108,128 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
219
</width>
<width>
368
</width>
<height>
4
75
</height>
<height>
4
88
</height>
</rect>
</rect>
</property>
</property>
</widget>
</widget>
</widget>
</widget>
</item>
</item>
</layout>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<property
name=
"spacing"
>
<number>
2
</number>
</property>
<item>
<widget
class=
"QComboBox"
name=
"uasSelectionBox"
>
<item>
<property
name=
"text"
>
<string>
All MAVs
</string>
</property>
</item>
</widget>
</widget>
</item>
</item>
<item
row=
"0"
column=
"4"
rowspan=
"4"
>
<item>
<widget
class=
"QGroupBox"
name=
"diagramGroupBox"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"1,0"
>
<property
name=
"sizePolicy"
>
<property
name=
"spacing"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"MinimumExpanding"
>
<number>
0
</number>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</property>
<property
name=
"minimumSize"
>
<item>
<size>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<width>
200
</width>
<property
name=
"spacing"
>
<height>
200
</height>
<number>
0
</number>
</size>
</property>
</property>
<property
name=
"baseSize"
>
<item>
<size>
<widget
class=
"QCheckBox"
name=
"shortNameCheckBox"
>
<width>
800
</width>
<property
name=
"toolTip"
>
<height>
300
</height>
<string>
Display only variable names in curve list
</string>
</size>
</property>
</property>
<property
name=
"title
"
>
<property
name=
"text
"
>
<string>
Diagram
</string>
<string>
Short Names
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"0"
>
<item>
<widget
class=
"QCheckBox"
name=
"shortNameCheckBox"
>
<widget
class=
"QCheckBox"
name=
"showUnitsCheckBox"
>
<property
name=
"toolTip"
>
<string>
Display variable units in curve list
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Display variable units in curve list
</string>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Short Names
</string>
<string>
Show units
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"2"
colspan=
"2"
>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<widget
class=
"QPushButton"
name=
"recolorButton"
>
<widget
class=
"QPushButton"
name=
"recolorButton"
>
<property
name=
"toolTip"
>
<string>
Rotate color scheme for all curves
</string>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Recolor
</string>
<string>
Recolor
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"1"
>
<item
>
<spacer
name=
"horizont
alSpacer"
>
<spacer
name=
"vertic
alSpacer"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Minimum
</enum>
</property>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<size>
<width>
4
0
</width>
<width>
2
0
</width>
<height>
2
0
</height>
<height>
0
</height>
</size>
</size>
</property>
</property>
</spacer>
</spacer>
</item>
</item>
<item
row=
"2"
column=
"0"
colspan=
"4"
>
</layout>
<widget
class=
"QComboBox"
name=
"uasSelectionBox"
>
</item>
<item>
</layout>
<property
name=
"text"
>
</item>
<string>
All MAVs
</string>
</layout>
</property>
</item>
</layout>
</widget>
</item>
</item>
<item
row=
"0"
column=
"2"
rowspan=
"3"
>
<widget
class=
"QGroupBox"
name=
"diagramGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
800
</width>
<height>
300
</height>
</size>
</property>
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
</property>
<property
name=
"title"
>
<string>
Diagram
</string>
</property>
</widget>
</widget>
</item>
</item>
</layout>
</layout>
...
...
src/ui/linechart/LinechartWidget.cc
View file @
9f94fef5
...
@@ -135,8 +135,6 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
...
@@ -135,8 +135,6 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
variance
->
setText
(
"Variance"
);
variance
->
setText
(
"Variance"
);
curvesWidgetLayout
->
addWidget
(
variance
,
labelRow
,
6
);
curvesWidgetLayout
->
addWidget
(
variance
,
labelRow
,
6
);
// Add and customize plot elements (right side)
// Create the layout
// Create the layout
createLayout
();
createLayout
();
...
@@ -184,7 +182,7 @@ void LinechartWidget::writeSettings()
...
@@ -184,7 +182,7 @@ void LinechartWidget::writeSettings()
QSettings
settings
;
QSettings
settings
;
settings
.
beginGroup
(
"LINECHART"
);
settings
.
beginGroup
(
"LINECHART"
);
if
(
timeButton
)
settings
.
setValue
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
());
if
(
timeButton
)
settings
.
setValue
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
());
if
(
u
nitsCheckBox
)
settings
.
setValue
(
"SHOW_UNITS"
,
u
nitsCheckBox
->
isChecked
());
if
(
u
i
.
showUnitsCheckBox
)
settings
.
setValue
(
"SHOW_UNITS"
,
ui
.
showU
nitsCheckBox
->
isChecked
());
if
(
ui
.
shortNameCheckBox
)
settings
.
setValue
(
"SHORT_NAMES"
,
ui
.
shortNameCheckBox
->
isChecked
());
if
(
ui
.
shortNameCheckBox
)
settings
.
setValue
(
"SHORT_NAMES"
,
ui
.
shortNameCheckBox
->
isChecked
());
settings
.
endGroup
();
settings
.
endGroup
();
settings
.
sync
();
settings
.
sync
();
...
@@ -200,7 +198,7 @@ void LinechartWidget::readSettings()
...
@@ -200,7 +198,7 @@ void LinechartWidget::readSettings()
activePlot
->
enforceGroundTime
(
settings
.
value
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
()).
toBool
());
activePlot
->
enforceGroundTime
(
settings
.
value
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
()).
toBool
());
timeButton
->
setChecked
(
settings
.
value
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
()).
toBool
());
timeButton
->
setChecked
(
settings
.
value
(
"ENFORCE_GROUNDTIME"
,
timeButton
->
isChecked
()).
toBool
());
}
}
if
(
u
nitsCheckBox
)
unitsCheckBox
->
setChecked
(
settings
.
value
(
"SHOW_UNITS"
,
u
nitsCheckBox
->
isChecked
()).
toBool
());
if
(
u
i
.
showUnitsCheckBox
)
ui
.
showUnitsCheckBox
->
setChecked
(
settings
.
value
(
"SHOW_UNITS"
,
ui
.
showU
nitsCheckBox
->
isChecked
()).
toBool
());
if
(
ui
.
shortNameCheckBox
)
ui
.
shortNameCheckBox
->
setChecked
(
settings
.
value
(
"SHORT_NAMES"
,
ui
.
shortNameCheckBox
->
isChecked
()).
toBool
());
if
(
ui
.
shortNameCheckBox
)
ui
.
shortNameCheckBox
->
setChecked
(
settings
.
value
(
"SHORT_NAMES"
,
ui
.
shortNameCheckBox
->
isChecked
()).
toBool
());
settings
.
endGroup
();
settings
.
endGroup
();
}
}
...
@@ -278,13 +276,9 @@ void LinechartWidget::createLayout()
...
@@ -278,13 +276,9 @@ void LinechartWidget::createLayout()
connect
(
timeButton
,
SIGNAL
(
clicked
(
bool
)),
activePlot
,
SLOT
(
enforceGroundTime
(
bool
)));
connect
(
timeButton
,
SIGNAL
(
clicked
(
bool
)),
activePlot
,
SLOT
(
enforceGroundTime
(
bool
)));
connect
(
timeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeSettings
()));
connect
(
timeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeSettings
()));
unitsCheckBox
=
new
QCheckBox
(
this
);
// Initialize the "Show units" checkbox. This is configured in the .ui file, so all
unitsCheckBox
->
setText
(
tr
(
"Show units"
));
// we do here is attach the clicked() signal.
unitsCheckBox
->
setChecked
(
true
);
connect
(
ui
.
showUnitsCheckBox
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeSettings
()));
unitsCheckBox
->
setToolTip
(
tr
(
"Enable unit display in curve list"
));
unitsCheckBox
->
setWhatsThis
(
tr
(
"Enable unit display in curve list"
));
layout
->
addWidget
(
unitsCheckBox
,
1
,
5
);
connect
(
unitsCheckBox
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeSettings
()));
ui
.
diagramGroupBox
->
setLayout
(
layout
);
ui
.
diagramGroupBox
->
setLayout
(
layout
);
...
@@ -671,8 +665,8 @@ void LinechartWidget::addCurve(const QString& curve, const QString& unit)
...
@@ -671,8 +665,8 @@ void LinechartWidget::addCurve(const QString& curve, const QString& unit)
unitLabel
->
setToolTip
(
tr
(
"Unit of "
)
+
curve
);
unitLabel
->
setToolTip
(
tr
(
"Unit of "
)
+
curve
);
unitLabel
->
setWhatsThis
(
tr
(
"Unit of "
)
+
curve
);
unitLabel
->
setWhatsThis
(
tr
(
"Unit of "
)
+
curve
);
curvesWidgetLayout
->
addWidget
(
unitLabel
,
labelRow
,
4
);
curvesWidgetLayout
->
addWidget
(
unitLabel
,
labelRow
,
4
);
unitLabel
->
setVisible
(
unitsCheckBox
->
isChecked
());
unitLabel
->
setVisible
(
u
i
.
showU
nitsCheckBox
->
isChecked
());
connect
(
unitsCheckBox
,
SIGNAL
(
clicked
(
bool
)),
unitLabel
,
SLOT
(
setVisible
(
bool
)));
connect
(
u
i
.
showU
nitsCheckBox
,
SIGNAL
(
clicked
(
bool
)),
unitLabel
,
SLOT
(
setVisible
(
bool
)));
// Mean
// Mean
mean
=
new
QLabel
(
this
);
mean
=
new
QLabel
(
this
);
...
...
src/ui/linechart/LinechartWidget.h
View file @
9f94fef5
...
@@ -163,7 +163,6 @@ protected:
...
@@ -163,7 +163,6 @@ protected:
QToolButton
*
scalingLinearButton
;
QToolButton
*
scalingLinearButton
;
QToolButton
*
scalingLogButton
;
QToolButton
*
scalingLogButton
;
QToolButton
*
logButton
;
QToolButton
*
logButton
;
QPointer
<
QCheckBox
>
unitsCheckBox
;
QPointer
<
QCheckBox
>
timeButton
;
QPointer
<
QCheckBox
>
timeButton
;
QFile
*
logFile
;
QFile
*
logFile
;
...
...
src/ui/linechart/Linecharts.cc
View file @
9f94fef5
...
@@ -63,6 +63,7 @@ void Linecharts::hideEvent(QHideEvent* event)
...
@@ -63,6 +63,7 @@ void Linecharts::hideEvent(QHideEvent* event)
void
Linecharts
::
selectSystem
(
int
systemid
)
void
Linecharts
::
selectSystem
(
int
systemid
)
{
{
Q_UNUSED
(
systemid
);
// QWidget* prevWidget = currentWidget();
// QWidget* prevWidget = currentWidget();
// if (prevWidget)
// if (prevWidget)
// {
// {
...
...
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