mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5ba573240f
commit
2b2e2f52c0
3 changed files with 65 additions and 3 deletions
|
@ -1,6 +1,9 @@
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
#include <QAbstractButton>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "divelogexportdialog.h"
|
#include "divelogexportdialog.h"
|
||||||
|
@ -23,6 +26,19 @@ DiveLogExportDialog::~DiveLogExportDialog()
|
||||||
delete ui;
|
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()
|
void DiveLogExportDialog::on_buttonBox_accepted()
|
||||||
{
|
{
|
||||||
QFileInfo fi(system_default_filename());
|
QFileInfo fi(system_default_filename());
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define DIVELOGEXPORTDIALOG_H
|
#define DIVELOGEXPORTDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QAbstractButton>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class DiveLogExportDialog;
|
class DiveLogExportDialog;
|
||||||
|
@ -17,6 +18,7 @@ public:
|
||||||
private
|
private
|
||||||
slots:
|
slots:
|
||||||
void on_buttonBox_accepted();
|
void on_buttonBox_accepted();
|
||||||
|
void on_exportGroup_buttonClicked(QAbstractButton *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DiveLogExportDialog *ui;
|
Ui::DiveLogExportDialog *ui;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>300</height>
|
<height>419</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>20</x>
|
||||||
<y>240</y>
|
<y>360</y>
|
||||||
<width>341</width>
|
<width>341</width>
|
||||||
<height>32</height>
|
<height>32</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -83,6 +83,9 @@
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">exportGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QRadioButton" name="exportDivelogs">
|
<widget class="QRadioButton" name="exportDivelogs">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
@ -96,6 +99,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>divelogs</string>
|
<string>divelogs</string>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">exportGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QRadioButton" name="exportCSV">
|
<widget class="QRadioButton" name="exportCSV">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
@ -109,6 +115,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>CSV</string>
|
<string>CSV</string>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">exportGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QRadioButton" name="exportWorldMap">
|
<widget class="QRadioButton" name="exportWorldMap">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
@ -122,6 +131,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Worldmap</string>
|
<string>Worldmap</string>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">exportGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="exportSelection">
|
<widget class="QGroupBox" name="exportSelection">
|
||||||
|
@ -169,6 +181,35 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>240</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="description">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>270</y>
|
||||||
|
<width>271</width>
|
||||||
|
<height>71</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -205,4 +246,7 @@
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="exportGroup"/>
|
||||||
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Add table
Reference in a new issue