From 72d1744676297e6899623189bc71863123dc60fa Mon Sep 17 00:00:00 2001 From: Fredrik Arvidsson Date: Wed, 20 Nov 2013 21:08:26 +0100 Subject: [PATCH] OP-1119 More gui --- .../src/plugins/flightlog/FlightLogDialog.qml | 28 +++++++++++++------ .../src/plugins/flightlog/flightlogdialog.h | 1 - .../plugins/flightlog/flightlogmanager.cpp | 5 ++++ .../src/plugins/flightlog/flightlogmanager.h | 1 + 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/flightlog/FlightLogDialog.qml b/ground/openpilotgcs/src/plugins/flightlog/FlightLogDialog.qml index d33e4ead0..8da2fd5ee 100644 --- a/ground/openpilotgcs/src/plugins/flightlog/FlightLogDialog.qml +++ b/ground/openpilotgcs/src/plugins/flightlog/FlightLogDialog.qml @@ -10,6 +10,7 @@ Rectangle { ColumnLayout { anchors.fill: parent + anchors.margins: 10 spacing: 10 RowLayout { Layout.fillWidth: true @@ -20,15 +21,18 @@ Rectangle { height: 40 Text { id: totalFlights + font.pixelSize: 12 text: "" + qsTr("Flights recorded: ") + "" + logStatus.Flight } Text { id: totalEntries - text: "" + qsTr("Logs recorded: ") + "" + logStatus.UsedSlots + font.pixelSize: 12 + text: "" + qsTr("Logs slots used: ") + "" + logStatus.UsedSlots } Text { id: freeEntries - text: "" + qsTr("Logs left: ") + "" + logStatus.FreeSlots + font.pixelSize: 12 + text: "" + qsTr("Logs slots left: ") + "" + logStatus.FreeSlots } } } @@ -50,16 +54,24 @@ Rectangle { } } - Rectangle { + RowLayout { Layout.fillWidth: true height: 40 Button { - id: button1 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 - anchors.right: parent.right - anchors.rightMargin: 10 + id: exportButton + text: qsTr("Export...") + activeFocusOnPress: true + onClicked: logManager.exportLogs() + } + + Rectangle { + Layout.fillWidth: true + } + + Button { + id: okButton text: qsTr("OK") + activeFocusOnPress: true onClicked: dialog.close() } } diff --git a/ground/openpilotgcs/src/plugins/flightlog/flightlogdialog.h b/ground/openpilotgcs/src/plugins/flightlog/flightlogdialog.h index 45649a13d..64cfbdd3b 100644 --- a/ground/openpilotgcs/src/plugins/flightlog/flightlogdialog.h +++ b/ground/openpilotgcs/src/plugins/flightlog/flightlogdialog.h @@ -11,7 +11,6 @@ class FlightLogDialog : public QDialog public: explicit FlightLogDialog(QWidget *parent, FlightLogManager *flightLogManager); ~FlightLogDialog(); - }; #endif // FLIGHTLOGDIALOG_H diff --git a/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.cpp b/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.cpp index eea99b90e..e1a30bc0f 100644 --- a/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.cpp +++ b/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.cpp @@ -104,3 +104,8 @@ void FlightLogManager::clearAllLogs() { void FlightLogManager::retrieveLogs(int flight) { //Get logs from flight side } + +void FlightLogManager::exportLogs() +{ + +} diff --git a/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.h b/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.h index e19b228cc..d6e7df31b 100644 --- a/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.h +++ b/ground/openpilotgcs/src/plugins/flightlog/flightlogmanager.h @@ -57,6 +57,7 @@ signals: public slots: void clearAllLogs(); void retrieveLogs(int flight = -1); + void exportLogs(); private: UAVObjectManager *m_objectManager;