mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Rework the Export dialog
The UI design looked too tight in my screen. The explanation texts were a bit inconsistent (and in one case simply wrong). The explanation for the initial selection wasn't shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2b2e2f52c0
commit
18fa359b48
3 changed files with 36 additions and 29 deletions
|
@ -15,6 +15,7 @@ DiveLogExportDialog::DiveLogExportDialog(QWidget *parent) : QDialog(parent),
|
||||||
ui(new Ui::DiveLogExportDialog)
|
ui(new Ui::DiveLogExportDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
showExplanation();
|
||||||
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
|
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
|
||||||
connect(quit, SIGNAL(activated()), parent, SLOT(close()));
|
connect(quit, SIGNAL(activated()), parent, SLOT(close()));
|
||||||
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
|
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
|
||||||
|
@ -26,19 +27,24 @@ DiveLogExportDialog::~DiveLogExportDialog()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton *button)
|
void DiveLogExportDialog::showExplanation()
|
||||||
{
|
{
|
||||||
if (ui->exportUDDF->isChecked()) {
|
if (ui->exportUDDF->isChecked()) {
|
||||||
ui->description->setText("UDDF is a generic format that enables communication among many dive computers and computer programs");
|
ui->description->setText("Generic format that is used for data exchange between a variety of diving related programs.");
|
||||||
} else if (ui->exportCSV->isChecked()) {
|
} else if (ui->exportCSV->isChecked()) {
|
||||||
ui->description->setText("CSV format, that includes the most critical information of the dive profile.");
|
ui->description->setText("Comma separated values that include the most relevant information of the dive profile.");
|
||||||
} else if (ui->exportDivelogs->isChecked()) {
|
} else if (ui->exportDivelogs->isChecked()) {
|
||||||
ui->description->setText("Subsurface XML format. This is the native format used by Subsurface.");
|
ui->description->setText("Send the dive data to Divelogs.de website.");
|
||||||
} else if (ui->exportWorldMap->isChecked()) {
|
} 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.");
|
ui->description->setText("HTML export of the dive locations, visualized on a world map.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton *button)
|
||||||
|
{
|
||||||
|
showExplanation();
|
||||||
|
}
|
||||||
|
|
||||||
void DiveLogExportDialog::on_buttonBox_accepted()
|
void DiveLogExportDialog::on_buttonBox_accepted()
|
||||||
{
|
{
|
||||||
QFileInfo fi(system_default_filename());
|
QFileInfo fi(system_default_filename());
|
||||||
|
|
|
@ -22,6 +22,7 @@ slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DiveLogExportDialog *ui;
|
Ui::DiveLogExportDialog *ui;
|
||||||
|
void showExplanation();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIVELOGEXPORTDIALOG_H
|
#endif // DIVELOGEXPORTDIALOG_H
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
<widget class="QGroupBox" name="exportFormat">
|
<widget class="QGroupBox" name="exportFormat">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>20</x>
|
||||||
<y>100</y>
|
<y>70</y>
|
||||||
<width>120</width>
|
<width>161</width>
|
||||||
<height>141</height>
|
<height>171</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -71,8 +71,8 @@
|
||||||
<widget class="QRadioButton" name="exportUDDF">
|
<widget class="QRadioButton" name="exportUDDF">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>30</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -90,14 +90,14 @@
|
||||||
<widget class="QRadioButton" name="exportDivelogs">
|
<widget class="QRadioButton" name="exportDivelogs">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>50</y>
|
<y>60</y>
|
||||||
<width>110</width>
|
<width>131</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>divelogs</string>
|
<string>divelogs.de</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string notr="true">exportGroup</string>
|
<string notr="true">exportGroup</string>
|
||||||
|
@ -106,8 +106,8 @@
|
||||||
<widget class="QRadioButton" name="exportCSV">
|
<widget class="QRadioButton" name="exportCSV">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>80</y>
|
<y>90</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -122,8 +122,8 @@
|
||||||
<widget class="QRadioButton" name="exportWorldMap">
|
<widget class="QRadioButton" name="exportWorldMap">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>110</y>
|
<y>120</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -140,9 +140,9 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>190</x>
|
<x>190</x>
|
||||||
<y>100</y>
|
<y>70</y>
|
||||||
<width>151</width>
|
<width>191</width>
|
||||||
<height>80</height>
|
<height>141</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -155,8 +155,8 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>30</y>
|
||||||
<width>131</width>
|
<width>151</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>50</y>
|
<y>60</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -197,10 +197,10 @@
|
||||||
<widget class="QLabel" name="description">
|
<widget class="QLabel" name="description">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>30</x>
|
||||||
<y>270</y>
|
<y>260</y>
|
||||||
<width>271</width>
|
<width>341</width>
|
||||||
<height>71</height>
|
<height>91</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue