summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-11-25 19:47:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-25 13:19:49 -0800
commit1b74947bf56a2ef3b38470044d991a75ed0c5e30 (patch)
treea4b63ce2d76ee024870d5b1dc8d6039f7b391702 /qt-ui
parent3b3d8949f7b3aede87fd779b314c6604020cbd16 (diff)
downloadsubsurface-1b74947bf56a2ef3b38470044d991a75ed0c5e30.tar.gz
Allow user to select date format on manual CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.cpp1
-rw-r--r--qt-ui/divelogimportdialog.ui72
2 files changed, 48 insertions, 25 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 91c1d738e..8946e6a78 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -107,6 +107,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
parse_manual_file(fileNames[i].toUtf8().data(),
ui->ManualSeparator->currentIndex(),
ui->Units->currentIndex(),
+ ui->DateFormat->currentIndex(),
VALUE_IF_CHECKED(DiveNumber),
VALUE_IF_CHECKED(Date), VALUE_IF_CHECKED(Time),
VALUE_IF_CHECKED(Duration), VALUE_IF_CHECKED(Location),
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index 97b698901..accf3fe2a 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -296,6 +296,53 @@
<string>Manual dives</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="title">
+ <string>Field separator</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="ManualSeparator"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QGroupBox" name="groupBox_8">
+ <property name="toolTip">
+ <string>Choose day, month and year order for date format. The field separator can be any of the characters .-/.</string>
+ </property>
+ <property name="title">
+ <string>Date format</string>
+ </property>
+ <widget class="QComboBox" name="DateFormat">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>40</y>
+ <width>131</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <item>
+ <property name="text">
+ <string>dd.mm.yyyy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>mm/dd/yyyy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>yyyy-mm-dd</string>
+ </property>
+ </item>
+ </widget>
+ </widget>
+ </item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
@@ -544,31 +591,6 @@
</layout>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QGroupBox" name="groupBox_5">
- <property name="title">
- <string>Field separator</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QComboBox" name="ManualSeparator"/>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="1">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</widget>