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
73436f42
Commit
73436f42
authored
Dec 12, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled selection of individual widgets in menu, persistence pending
parent
27737cde
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
124 additions
and
107 deletions
+124
-107
qgroundcontrol.pri
qgroundcontrol.pri
+3
-1
QGC.h
src/QGC.h
+3
-0
HUD.cc
src/ui/HUD.cc
+13
-0
HUD.h
src/ui/HUD.h
+2
-0
MainWindow.cc
src/ui/MainWindow.cc
+85
-100
MainWindow.h
src/ui/MainWindow.h
+3
-2
XMLCommProtocolWidget.cc
src/ui/XMLCommProtocolWidget.cc
+4
-3
LinechartWidget.cc
src/ui/linechart/LinechartWidget.cc
+9
-1
LinechartWidget.h
src/ui/linechart/LinechartWidget.h
+2
-0
No files found.
qgroundcontrol.pri
View file @
73436f42
...
...
@@ -133,11 +133,13 @@ macx {
exists(/opt/local/include/libfreenect) {
message("
Building
support for libfreenect")
message("
ENABLED
support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
# Include libfreenect libraries
LIBS += -lfreenect
DEFINES += QGC_LIBFREENECT_ENABLED
} else {
message("DISABLED libfreenect support")
}
# osg/osgEarth dynamic casts might fail without this compiler option.
...
...
src/QGC.h
View file @
73436f42
...
...
@@ -14,6 +14,9 @@ namespace QGC
/** @brief Get the current ground time in microseconds */
quint64
groundTimeUsecs
();
const
QString
APPNAME
=
"QGROUNDCONTROL"
;
const
QString
COMPANYNAME
=
"OPENMAV"
;
}
#endif // QGC_H
src/ui/HUD.cc
View file @
73436f42
...
...
@@ -165,6 +165,19 @@ HUD::~HUD()
}
void
HUD
::
showEvent
(
QShowEvent
*
event
)
{
Q_UNUSED
(
event
);
if
(
isVisible
())
{
refreshTimer
->
start
();
}
else
{
refreshTimer
->
stop
();
}
}
void
HUD
::
start
()
{
refreshTimer
->
start
();
...
...
src/ui/HUD.h
View file @
73436f42
...
...
@@ -123,6 +123,8 @@ protected:
float
refLineWidthToPen
(
float
line
);
/** @brief Rotate a polygon around a point clockwise */
void
rotatePolygonClockWiseRad
(
QPolygonF
&
p
,
float
angle
,
QPointF
origin
);
/** @brief Override base class show */
virtual
void
showEvent
(
QShowEvent
*
event
);
QImage
*
image
;
///< Double buffer image
QImage
glImage
;
///< The background / camera image
...
...
src/ui/MainWindow.cc
View file @
73436f42
This diff is collapsed.
Click to expand it.
src/ui/MainWindow.h
View file @
73436f42
...
...
@@ -160,8 +160,8 @@ protected:
void
arrangeCenterStack
();
void
configureWindowName
();
void
createCenterWidgetMenu
();
void
createDockWidgetMenu
();
QMenu
*
createCenterWidgetMenu
();
QMenu
*
createDockWidgetMenu
();
// TODO Should be moved elsewhere, as the protocol does not belong to the UI
MAVLinkProtocol
*
mavlink
;
...
...
@@ -203,6 +203,7 @@ protected:
QPointer
<
QDockWidget
>
headUpDockWidget
;
QPointer
<
QDockWidget
>
hsiDockWidget
;
QPointer
<
QDockWidget
>
rcViewDockWidget
;
QPointer
<
QDockWidget
>
hudDockWidget
;
QPointer
<
QDockWidget
>
slugsDataWidget
;
QPointer
<
QDockWidget
>
slugsPIDControlWidget
;
QPointer
<
QDockWidget
>
slugsHilSimWidget
;
...
...
src/ui/XMLCommProtocolWidget.cc
View file @
73436f42
...
...
@@ -7,6 +7,7 @@
#include "ui_XMLCommProtocolWidget.h"
#include "MAVLinkXMLParser.h"
#include "MAVLinkSyntaxHighlighter.h"
#include "QGC.h"
#include <QDebug>
#include <iostream>
...
...
@@ -31,7 +32,7 @@ XMLCommProtocolWidget::XMLCommProtocolWidget(QWidget *parent) :
void
XMLCommProtocolWidget
::
selectXMLFile
()
{
//QString fileName = QFileDialog::getOpenFileName(this, tr("Load Protocol Definition File"), ".", "*.xml");
QSettings
settings
;
QSettings
settings
(
QGC
::
COMPANYNAME
,
QGC
::
APPNAME
)
;
const
QString
mavlinkXML
=
"MAVLINK_XML_FILE"
;
QString
dirPath
=
settings
.
value
(
mavlinkXML
,
QCoreApplication
::
applicationDirPath
()
+
"../"
).
toString
();
QFileDialog
dialog
;
...
...
@@ -92,7 +93,7 @@ void XMLCommProtocolWidget::setXML(const QString& xml)
void
XMLCommProtocolWidget
::
selectOutputDirectory
()
{
QSettings
settings
;
QSettings
settings
(
QGC
::
COMPANYNAME
,
QGC
::
APPNAME
)
;
const
QString
mavlinkOutputDir
=
"MAVLINK_OUTPUT_DIR"
;
QString
dirPath
=
settings
.
value
(
mavlinkOutputDir
,
QCoreApplication
::
applicationDirPath
()
+
"../"
).
toString
();
QFileDialog
dialog
;
...
...
@@ -110,7 +111,7 @@ void XMLCommProtocolWidget::selectOutputDirectory()
{
m_ui
->
outputDirNameLabel
->
setText
(
fileNames
.
first
());
// Store directory for next time
settings
.
setValue
(
mavlinkOutputDir
,
fileNames
.
first
());
settings
.
setValue
(
mavlinkOutputDir
,
QFileInfo
(
fileNames
.
first
()).
absoluteFilePath
());
//QFile file(fileName);
}
}
...
...
src/ui/linechart/LinechartWidget.cc
View file @
73436f42
...
...
@@ -159,7 +159,9 @@ void LinechartWidget::createLayout()
QToolButton
*
timeButton
=
new
QToolButton
(
this
);
timeButton
->
setText
(
tr
(
"Ground Time"
));
timeButton
->
setCheckable
(
true
);
timeButton
->
setChecked
(
false
);
bool
gTimeDefault
=
true
;
if
(
activePlot
)
activePlot
->
enforceGroundTime
(
gTimeDefault
);
timeButton
->
setChecked
(
gTimeDefault
);
layout
->
addWidget
(
timeButton
,
1
,
4
);
layout
->
setColumnStretch
(
4
,
0
);
connect
(
timeButton
,
SIGNAL
(
clicked
(
bool
)),
activePlot
,
SLOT
(
enforceGroundTime
(
bool
)));
...
...
@@ -442,6 +444,12 @@ void LinechartWidget::removeCurve(QString curve)
// Remove name
}
void
LinechartWidget
::
showEvent
(
QShowEvent
*
event
)
{
Q_UNUSED
(
event
);
setActive
(
isVisible
());
}
void
LinechartWidget
::
setActive
(
bool
active
)
{
if
(
activePlot
)
...
...
src/ui/linechart/LinechartWidget.h
View file @
73436f42
...
...
@@ -77,6 +77,8 @@ public slots:
void
setPlotWindowPosition
(
int
scrollBarValue
);
void
setPlotWindowPosition
(
quint64
position
);
void
setPlotInterval
(
quint64
interval
);
/** @brief Override base class show */
virtual
void
showEvent
(
QShowEvent
*
event
);
void
setActive
(
bool
active
);
/** @brief Set the number of values to average over */
void
setAverageWindow
(
int
windowSize
);
...
...
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