Implementing export dialog

As our menus are getting many export entries, it is better to create a
single export dialog where user is able to select the export type and
whether to export selected dives or all of them. This should also be
more intuitive than the current way when export from file menu export
all dives and right click menu on divelist exports only selected dives.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-05-20 19:33:32 +03:00 committed by Dirk Hohndel
parent 0b6cbe0f79
commit 7dc642860d
11 changed files with 322 additions and 91 deletions

View file

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DiveLogExportDialog</class>
<widget class="QDialog" name="DiveLogExportDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>240</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>-50</x>
<y>10</y>
<width>497</width>
<height>24</height>
</rect>
</property>
<property name="font">
<font>
<family>Droid Sans [unknown]</family>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Export Dive Log Files</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QGroupBox" name="exportFormat">
<property name="geometry">
<rect>
<x>30</x>
<y>100</y>
<width>120</width>
<height>141</height>
</rect>
</property>
<property name="title">
<string>Export format</string>
</property>
<widget class="QRadioButton" name="exportUDDF">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>110</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>UDDF</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="exportDivelogs">
<property name="geometry">
<rect>
<x>0</x>
<y>50</y>
<width>110</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>divelogs</string>
</property>
</widget>
<widget class="QRadioButton" name="exportCSV">
<property name="geometry">
<rect>
<x>0</x>
<y>80</y>
<width>110</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>CSV</string>
</property>
</widget>
<widget class="QRadioButton" name="exportWorldMap">
<property name="geometry">
<rect>
<x>0</x>
<y>110</y>
<width>110</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Worldmap</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="exportSelection">
<property name="geometry">
<rect>
<x>190</x>
<y>100</y>
<width>151</width>
<height>80</height>
</rect>
</property>
<property name="title">
<string>Selection</string>
</property>
<widget class="QRadioButton" name="exportSelected">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>131</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Selected dives</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="exportAll">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>110</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>All dives</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DiveLogExportDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DiveLogExportDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>