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
f45cd1d4
Commit
f45cd1d4
authored
Feb 07, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new Qml Control test window/menu
parent
70a55798
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
MainWindow.cc
src/ui/MainWindow.cc
+19
-1
MainWindow.h
src/ui/MainWindow.h
+4
-1
No files found.
src/ui/MainWindow.cc
View file @
f45cd1d4
...
...
@@ -71,6 +71,10 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMessageBox.h"
#include "QGCDockWidget.h"
#ifdef UNITTEST_BUILD
#include "QmlControls/QmlTestWidget.h"
#endif
#ifdef QGC_OSG_ENABLED
#include "Q3DWidgetFactory.h"
#endif
...
...
@@ -186,6 +190,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) :
#ifdef Q_OS_LINUX
menuBar
()
->
setNativeMenuBar
(
false
);
#endif
#ifdef UNITTEST_BUILD
QAction
*
qmlTestAction
=
new
QAction
(
"Test QML palette and controls"
,
NULL
);
connect
(
qmlTestAction
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
_showQmlTestWidget
);
ui
.
menuTools
->
addAction
(
qmlTestAction
);
#endif
// Setup UI state machines
centerStackActionGroup
->
setExclusive
(
true
);
...
...
@@ -338,7 +348,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) :
connect
(
&
windowNameUpdateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
configureWindowName
()));
windowNameUpdateTimer
.
start
(
15000
);
emit
initStatusChanged
(
tr
(
"Done"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
if
(
!
qgcApp
()
->
runningUnitTests
())
{
show
();
}
...
...
@@ -1519,3 +1529,11 @@ bool MainWindow::x11Event(XEvent *event)
return
false
;
}
#endif // QGC_MOUSE_ENABLED_LINUX
#ifdef UNITTEST_BUILD
void
MainWindow
::
_showQmlTestWidget
(
void
)
{
new
QmlTestWidget
();
}
#endif
src/ui/MainWindow.h
View file @
f45cd1d4
...
...
@@ -294,7 +294,10 @@ private slots:
void
_showDockWidgetAction
(
bool
show
);
void
_loadCustomWidgetFromFile
(
void
);
void
_createNewCustomWidget
(
void
);
#ifdef UNITTEST_BUILD
void
_showQmlTestWidget
(
void
);
#endif
private:
/// Constructor is private since all creation should be through MainWindow::_create
MainWindow
(
QSplashScreen
*
splashScreen
);
...
...
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