Commit ce9d6ce1 authored by Michael Carpenter's avatar Michael Carpenter

Addition of new "view" based navigation, and moved DockWidgets inside each

view, rather than having universal dock widgets.
parent 434ac621
......@@ -374,7 +374,8 @@ HEADERS += src/MG.h \
src/ui/QGCHilJSBSimConfiguration.h \
src/ui/QGCHilXPlaneConfiguration.h \
src/ui/designer/QGCComboBox.h \
src/ui/designer/QGCTextLabel.h
src/ui/designer/QGCTextLabel.h \
src/ui/submainwindow.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
......@@ -538,7 +539,8 @@ SOURCES += src/main.cc \
src/ui/QGCHilJSBSimConfiguration.cc \
src/ui/QGCHilXPlaneConfiguration.cc \
src/ui/designer/QGCComboBox.cc \
src/ui/designer/QGCTextLabel.cc
src/ui/designer/QGCTextLabel.cc \
src/ui/submainwindow.cpp
# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
......
This diff is collapsed.
......@@ -52,6 +52,7 @@ This file is part of the QGROUNDCONTROL project
#include "MAVLinkSimulationLink.h"
#include "ObjectDetectionView.h"
#include "HUD.h"
#include "submainwindow.h"
#include "JoystickWidget.h"
#include "input/JoystickInput.h"
#if (defined MOUSE_ENABLED_WIN) | (defined MOUSE_ENABLED_LINUX)
......@@ -285,7 +286,7 @@ protected:
* @param title The entry that will appear in the Menu and in the QDockedWidget title bar
* @param location The default location for the QDockedWidget in case there is no previous key in the settings
*/
void addTool(QDockWidget* widget, const QString& title, Qt::DockWidgetArea location=Qt::RightDockWidgetArea);
void addTool(SubMainWindow *parent,VIEW_SECTIONS view,QDockWidget* widget, const QString& title, Qt::DockWidgetArea area);
/**
* @brief Adds an already instantiated QWidget to the center stack
......@@ -332,12 +333,20 @@ protected:
QActionGroup* centerStackActionGroup;
// Center widgets
QPointer<Linecharts> linechartWidget;
QPointer<HUD> hudWidget;
QPointer<QGCVehicleConfig> configWidget;
QPointer<QGCMapTool> mapWidget;
QPointer<XMLCommProtocolWidget> protocolWidget;
QPointer<QGCDataPlot2D> dataplotWidget;
QPointer<SubMainWindow> plannerView;
QPointer<SubMainWindow> pilotView;
QPointer<SubMainWindow> configView;
QPointer<SubMainWindow> dataView;
QPointer<SubMainWindow> engineeringView;
QPointer<SubMainWindow> simView;
// Center widgets
//QPointer<Linecharts> linechartWidget;
//QPointer<HUD> hudWidget;
//QPointer<QGCVehicleConfig> configWidget;
//QPointer<QGCMapTool> mapWidget;
//QPointer<XMLCommProtocolWidget> protocolWidget;
//QPointer<QGCDataPlot2D> dataplotWidget;
#ifdef QGC_OSG_ENABLED
QPointer<QWidget> _3DWidget;
#endif
......@@ -421,7 +430,9 @@ protected:
QTimer windowNameUpdateTimer;
private:
QMap<QAction*,QString > menuToDockNameMap;
QMap<QDockWidget*,QWidget*> dockToTitleBarMap;
QMap<VIEW_SECTIONS,QMap<QString,QWidget*> > centralWidgetToDockWidgetsMap;
bool isAdvancedMode;
Ui::MainWindow ui;
......
#include "submainwindow.h"
SubMainWindow::SubMainWindow(QWidget *parent) : QMainWindow(parent)
{
}
#ifndef SUBMAINWINDOW_H
#define SUBMAINWINDOW_H
#include <QMainWindow>
class SubMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit SubMainWindow(QWidget *parent = 0);
signals:
public slots:
};
#endif // SUBMAINWINDOW_H
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