Commit 2a18b17f authored by Michael Carpenter's avatar Michael Carpenter

Changes for the new "View" navigation, and fixes to get most of the...

Changes for the new "View" navigation, and fixes to get most of the dockwidgets working with the new view system
parent ce9d6ce1
This diff is collapsed.
...@@ -228,6 +228,7 @@ public slots: ...@@ -228,6 +228,7 @@ public slots:
*/ */
void showTool(bool visible); void showTool(bool visible);
/** /**
* @brief Shows a Widget from the center stack based on the action sender * @brief Shows a Widget from the center stack based on the action sender
* *
...@@ -265,8 +266,8 @@ protected: ...@@ -265,8 +266,8 @@ protected:
typedef enum _VIEW_SECTIONS typedef enum _VIEW_SECTIONS
{ {
VIEW_ENGINEER, VIEW_ENGINEER,
VIEW_OPERATOR, VIEW_MISSION,
VIEW_PILOT, VIEW_FLIGHT,
VIEW_SIMULATION, VIEW_SIMULATION,
VIEW_MAVLINK, VIEW_MAVLINK,
VIEW_FIRMWAREUPDATE, VIEW_FIRMWAREUPDATE,
...@@ -287,7 +288,7 @@ protected: ...@@ -287,7 +288,7 @@ protected:
* @param location The default location for the QDockedWidget in case there is no previous key in the settings * @param location The default location for the QDockedWidget in case there is no previous key in the settings
*/ */
void addTool(SubMainWindow *parent,VIEW_SECTIONS view,QDockWidget* widget, const QString& title, Qt::DockWidgetArea area); void addTool(SubMainWindow *parent,VIEW_SECTIONS view,QDockWidget* widget, const QString& title, Qt::DockWidgetArea area);
void createDockWidget(QWidget *parent,QWidget *child,QString title,QString objectname,VIEW_SECTIONS view,Qt::DockWidgetArea area,int minwidth=0,int minheight=0);
/** /**
* @brief Adds an already instantiated QWidget to the center stack * @brief Adds an already instantiated QWidget to the center stack
* *
......
...@@ -102,10 +102,11 @@ ...@@ -102,10 +102,11 @@
<property name="title"> <property name="title">
<string>Perspectives</string> <string>Perspectives</string>
</property> </property>
<addaction name="actionOperatorsView"/> <addaction name="actionMissionView"/>
<addaction name="actionEngineersView"/> <addaction name="actionFlightView"/>
<addaction name="actionPilotsView"/>
<addaction name="actionConfiguration_2"/> <addaction name="actionConfiguration_2"/>
<addaction name="actionEngineersView"/>
<addaction name="actionSimulationView"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionFirmwareUpdateView"/> <addaction name="actionFirmwareUpdateView"/>
<addaction name="actionMavlinkView"/> <addaction name="actionMavlinkView"/>
...@@ -281,7 +282,7 @@ ...@@ -281,7 +282,7 @@
<string>Developer Credits</string> <string>Developer Credits</string>
</property> </property>
</action> </action>
<action name="actionOperatorsView"> <action name="actionMissionView">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
...@@ -335,7 +336,7 @@ ...@@ -335,7 +336,7 @@
<string>Select Stylesheet</string> <string>Select Stylesheet</string>
</property> </property>
</action> </action>
<action name="actionPilotsView"> <action name="actionFlightView">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
...@@ -490,6 +491,11 @@ ...@@ -490,6 +491,11 @@
<string>Advanced Mode</string> <string>Advanced Mode</string>
</property> </property>
</action> </action>
<action name="actionSimulationView">
<property name="text">
<string>Simulation</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources> <resources>
......
...@@ -65,6 +65,8 @@ UASListWidget::UASListWidget(QWidget *parent) : QWidget(parent), m_ui(new Ui::UA ...@@ -65,6 +65,8 @@ UASListWidget::UASListWidget(QWidget *parent) : QWidget(parent), m_ui(new Ui::UA
uasViews = QMap<UASInterface*, UASView*>(); uasViews = QMap<UASInterface*, UASView*>();
this->setVisible(false); this->setVisible(false);
connect(UASManager::instance(),SIGNAL(UASCreated(UASInterface*)),this,SLOT(addUAS(UASInterface*)));
} }
UASListWidget::~UASListWidget() UASListWidget::~UASListWidget()
......
...@@ -290,7 +290,7 @@ void UASView::hideEvent(QHideEvent* event) ...@@ -290,7 +290,7 @@ void UASView::hideEvent(QHideEvent* event)
// React only to internal (pre-display) // React only to internal (pre-display)
// events // events
Q_UNUSED(event); Q_UNUSED(event);
refreshTimer->stop(); // refreshTimer->stop();
} }
void UASView::receiveHeartbeat(UASInterface* uas) void UASView::receiveHeartbeat(UASInterface* uas)
......
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