1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1119 More gui

This commit is contained in:
Fredrik Arvidsson 2013-11-20 21:08:26 +01:00
parent ed18e372db
commit 72d1744676
4 changed files with 26 additions and 9 deletions

View File

@ -10,6 +10,7 @@ Rectangle {
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 10
spacing: 10 spacing: 10
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
@ -20,15 +21,18 @@ Rectangle {
height: 40 height: 40
Text { Text {
id: totalFlights id: totalFlights
font.pixelSize: 12
text: "<b>" + qsTr("Flights recorded: ") + "</b>" + logStatus.Flight text: "<b>" + qsTr("Flights recorded: ") + "</b>" + logStatus.Flight
} }
Text { Text {
id: totalEntries id: totalEntries
text: "<b>" + qsTr("Logs recorded: ") + "</b>" + logStatus.UsedSlots font.pixelSize: 12
text: "<b>" + qsTr("Logs slots used: ") + "</b>" + logStatus.UsedSlots
} }
Text { Text {
id: freeEntries id: freeEntries
text: "<b>" + qsTr("Logs left: ") + "</b>" + logStatus.FreeSlots font.pixelSize: 12
text: "<b>" + qsTr("Logs slots left: ") + "</b>" + logStatus.FreeSlots
} }
} }
} }
@ -50,16 +54,24 @@ Rectangle {
} }
} }
Rectangle { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
height: 40 height: 40
Button { Button {
id: button1 id: exportButton
anchors.bottom: parent.bottom text: qsTr("Export...")
anchors.bottomMargin: 10 activeFocusOnPress: true
anchors.right: parent.right onClicked: logManager.exportLogs()
anchors.rightMargin: 10 }
Rectangle {
Layout.fillWidth: true
}
Button {
id: okButton
text: qsTr("OK") text: qsTr("OK")
activeFocusOnPress: true
onClicked: dialog.close() onClicked: dialog.close()
} }
} }

View File

@ -11,7 +11,6 @@ class FlightLogDialog : public QDialog
public: public:
explicit FlightLogDialog(QWidget *parent, FlightLogManager *flightLogManager); explicit FlightLogDialog(QWidget *parent, FlightLogManager *flightLogManager);
~FlightLogDialog(); ~FlightLogDialog();
}; };
#endif // FLIGHTLOGDIALOG_H #endif // FLIGHTLOGDIALOG_H

View File

@ -104,3 +104,8 @@ void FlightLogManager::clearAllLogs() {
void FlightLogManager::retrieveLogs(int flight) { void FlightLogManager::retrieveLogs(int flight) {
//Get logs from flight side //Get logs from flight side
} }
void FlightLogManager::exportLogs()
{
}

View File

@ -57,6 +57,7 @@ signals:
public slots: public slots:
void clearAllLogs(); void clearAllLogs();
void retrieveLogs(int flight = -1); void retrieveLogs(int flight = -1);
void exportLogs();
private: private:
UAVObjectManager *m_objectManager; UAVObjectManager *m_objectManager;