From 2b2e2f52c037e6660808f2e47983a2103fee32a6 Mon Sep 17 00:00:00 2001 From: Gehad Date: Fri, 23 May 2014 23:28:08 +0300 Subject: Add descriptions for different formats in the export dialog When choosing a format from the export dialog a two line description of the format appears. This is helpful and prevents confusion. Signed-off-by: Gehad elrobey Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 16 ++++++++++++++ qt-ui/divelogexportdialog.h | 2 ++ qt-ui/divelogexportdialog.ui | 50 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 65 insertions(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index 7f77cef2f..94b9c9fc9 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -1,6 +1,9 @@ #include #include #include +#include +#include +#include #include "mainwindow.h" #include "divelogexportdialog.h" @@ -23,6 +26,19 @@ DiveLogExportDialog::~DiveLogExportDialog() delete ui; } +void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton *button) +{ + if (ui->exportUDDF->isChecked()) { + ui->description->setText("UDDF is a generic format that enables communication among many dive computers and computer programs"); + } else if (ui->exportCSV->isChecked()) { + ui->description->setText("CSV format, that includes the most critical information of the dive profile."); + } else if (ui->exportDivelogs->isChecked()) { + ui->description->setText("Subsurface XML format. This is the native format used by Subsurface."); + } else if (ui->exportWorldMap->isChecked()) { + ui->description->setText("Export the currently open dive logbook locations in HTML format and draw these on a world map."); + } +} + void DiveLogExportDialog::on_buttonBox_accepted() { QFileInfo fi(system_default_filename()); diff --git a/qt-ui/divelogexportdialog.h b/qt-ui/divelogexportdialog.h index 998df4971..8020b481c 100644 --- a/qt-ui/divelogexportdialog.h +++ b/qt-ui/divelogexportdialog.h @@ -2,6 +2,7 @@ #define DIVELOGEXPORTDIALOG_H #include +#include namespace Ui { class DiveLogExportDialog; @@ -17,6 +18,7 @@ public: private slots: void on_buttonBox_accepted(); + void on_exportGroup_buttonClicked(QAbstractButton *); private: Ui::DiveLogExportDialog *ui; diff --git a/qt-ui/divelogexportdialog.ui b/qt-ui/divelogexportdialog.ui index 38e23932b..e5dc77083 100644 --- a/qt-ui/divelogexportdialog.ui +++ b/qt-ui/divelogexportdialog.ui @@ -7,7 +7,7 @@ 0 0 400 - 300 + 419 @@ -16,8 +16,8 @@ - 30 - 240 + 20 + 360 341 32 @@ -83,6 +83,9 @@ true + + exportGroup + @@ -96,6 +99,9 @@ divelogs + + exportGroup + @@ -109,6 +115,9 @@ CSV + + exportGroup + @@ -122,6 +131,9 @@ Worldmap + + exportGroup + @@ -169,6 +181,35 @@ + + + + 60 + 240 + 231 + 16 + + + + Qt::Horizontal + + + + + + 40 + 270 + 271 + 71 + + + + + + + true + + @@ -205,4 +246,7 @@ + + + -- cgit v1.2.3-70-g09d2