Commit b770e5b7 authored by pixhawk's avatar pixhawk

Working on final main window version

parent 2b1967c0
......@@ -17,14 +17,14 @@
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 0.8.1 (Alpha)"
#define QGC_APPLICATION_VERSION "v. 0.8.3 (Alpha)"
namespace QGC
{
const QString APPNAME = "QGROUNDCONTROL";
const QString COMPANYNAME = "OPENMAV";
const int APPLICATIONVERSION = 80; // 0.8.0
const int APPLICATIONVERSION = 83; // 0.8.0
}
#endif // CONFIGURATION_H
......@@ -152,7 +152,7 @@ HDDisplay::~HDDisplay()
QSize HDDisplay::sizeHint() const
{
return QSize(400, 400.0f*(vwidth/vheight)*1.1f);
return QSize(400, 400.0f*(vwidth/vheight)*1.2f);
}
void HDDisplay::enableGLRendering(bool enable)
......
This diff is collapsed.
......@@ -112,6 +112,8 @@ public slots:
void stopVideoCapture();
void saveScreen();
/** @brief Load default view when no MAV is connected */
void loadUnconnectedView();
/** @brief Load view for pilot */
void loadPilotView();
/** @brief Load view for engineer */
......@@ -166,7 +168,7 @@ public slots:
* It shows the QDockedWidget based on the action sender
*
*/
void showToolWidget();
void showToolWidget(bool visible);
/**
* @brief Shows a Widget from the center stack based on the action sender
......@@ -177,8 +179,10 @@ public slots:
*/
void showCentralWidget();
/** @brief Change actively a QDockWidgets visibility by an action */
void showDockWidget(bool vis);
/** @brief Updates a QDockWidget's checked status based on its visibility */
void updateVisibilitySettings (bool vis);
void updateVisibilitySettings(bool vis);
/** @brief Updates a QDockWidget's location */
void updateLocationSettings (Qt::DockWidgetArea location);
......@@ -187,6 +191,9 @@ protected:
MainWindow(QWidget *parent = 0);
/** @brief Set default window settings for the current autopilot type */
void setDefaultSettingsForAp();
// These defines are used to save the settings when selecting with
// which widgets populate the views
// FIXME: DO NOT PUT CUSTOM VALUES IN THIS ENUM since it is iterated over
......@@ -240,6 +247,7 @@ protected:
VIEW_OPERATOR,
VIEW_PILOT,
VIEW_MAVLINK,
VIEW_UNCONNECTED, ///< View in unconnected mode, when no UAS is available
} VIEW_SECTIONS;
......
......@@ -100,7 +100,7 @@
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string>Tools</string>
<string>Widgets</string>
</property>
<addaction name="actionNewCustomWidget"/>
</widget>
......@@ -121,11 +121,18 @@
<addaction name="actionPilotsView"/>
<addaction name="separator"/>
<addaction name="actionMavlinkView"/>
<addaction name="actionUnconnectedView"/>
</widget>
<widget class="QMenu" name="menuMain">
<property name="title">
<string>Main</string>
</property>
</widget>
<addaction name="menuMGround"/>
<addaction name="menuNetwork"/>
<addaction name="menuConnected_Systems"/>
<addaction name="menuUnmanned_System"/>
<addaction name="menuMain"/>
<addaction name="menuTools"/>
<addaction name="menuPerspectives"/>
<addaction name="menuHelp"/>
......@@ -296,6 +303,9 @@
<property name="text">
<string>Operator</string>
</property>
<property name="shortcut">
<string>Meta+O</string>
</property>
</action>
<action name="actionEngineersView">
<property name="checkable">
......@@ -308,6 +318,9 @@
<property name="text">
<string>Engineer</string>
</property>
<property name="shortcut">
<string>Meta+E</string>
</property>
</action>
<action name="actionMavlinkView">
<property name="checkable">
......@@ -320,6 +333,9 @@
<property name="text">
<string>Mavlink</string>
</property>
<property name="shortcut">
<string>Meta+M</string>
</property>
</action>
<action name="actionReloadStyle">
<property name="icon">
......@@ -341,6 +357,9 @@
<property name="text">
<string>Pilot</string>
</property>
<property name="shortcut">
<string>Meta+P</string>
</property>
</action>
<action name="actionNewCustomWidget">
<property name="icon">
......@@ -379,6 +398,21 @@
<string>QGroundControl global settings</string>
</property>
</action>
<action name="actionUnconnectedView">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../mavground.qrc">
<normaloff>:/images/devices/network-wireless.svg</normaloff>:/images/devices/network-wireless.svg</iconset>
</property>
<property name="text">
<string>Unconnected</string>
</property>
<property name="shortcut">
<string>Meta+U</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
......
......@@ -308,7 +308,7 @@ Pixhawk3DWidget::insertWaypoint(void)
if (wp)
{
wp->setFrame(frame);
uas->getWaypointManager().addWaypoint(wp);
uas->getWaypointManager()->addWaypoint(wp);
}
}
}
......@@ -325,7 +325,7 @@ Pixhawk3DWidget::setWaypoint(void)
if (uas)
{
const QVector<Waypoint *> waypoints =
uas->getWaypointManager().getWaypointList();
uas->getWaypointManager()->getWaypointList();
Waypoint* waypoint = waypoints.at(selectedWpIndex);
if (frame == MAV_FRAME_GLOBAL)
......@@ -366,7 +366,7 @@ Pixhawk3DWidget::deleteWaypoint(void)
{
if (uas)
{
uas->getWaypointManager().removeWaypoint(selectedWpIndex);
uas->getWaypointManager()->removeWaypoint(selectedWpIndex);
}
}
......@@ -377,7 +377,7 @@ Pixhawk3DWidget::setWaypointAltitude(void)
{
bool ok;
const QVector<Waypoint *> waypoints =
uas->getWaypointManager().getWaypointList();
uas->getWaypointManager()->getWaypointList();
Waypoint* waypoint = waypoints.at(selectedWpIndex);
double altitude = waypoint->getZ();
......@@ -409,10 +409,10 @@ Pixhawk3DWidget::clearAllWaypoints(void)
if (uas)
{
const QVector<Waypoint *> waypoints =
uas->getWaypointManager().getWaypointList();
uas->getWaypointManager()->getWaypointList();
for (int i = waypoints.size() - 1; i >= 0; --i)
{
uas->getWaypointManager().removeWaypoint(i);
uas->getWaypointManager()->removeWaypoint(i);
}
}
}
......
......@@ -78,7 +78,7 @@ WaypointGroupNode::update(MAV_FRAME frame, UASInterface *uas)
removeChild(0, getNumChildren());
}
const QVector<Waypoint *>& list = uas->getWaypointManager().getWaypointList();
const QVector<Waypoint *>& list = uas->getWaypointManager()->getWaypointList();
for (int i = 0; i < list.size(); i++)
{
......
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