Commit f45cd1d4 authored by Don Gagne's avatar Don Gagne

Add new Qml Control test window/menu

parent 70a55798
......@@ -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
......@@ -187,6 +191,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) :
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);
......@@ -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
......@@ -294,6 +294,9 @@ 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment