summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-06 14:12:29 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-06 19:34:45 -0800
commit48775c530e887bf3c64b4ec5ece3e289250e03a2 (patch)
tree7c3943829a7e1d9c059adcef4d3292e4d673a596 /qt-ui
parent37830bdb53192ff1d38342a15ca47d49c138a425 (diff)
downloadsubsurface-48775c530e887bf3c64b4ec5ece3e289250e03a2.tar.gz
Clean a lot of code for a new and improved CSV import dialog
This mostly cleans out stuff that is going to be uneeded. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.cpp187
-rw-r--r--qt-ui/divelogimportdialog.h20
-rw-r--r--qt-ui/divelogimportdialog.ui1271
3 files changed, 98 insertions, 1380 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 3318bc90b..02fc03e69 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -31,53 +31,10 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi
for (int i = 0; !CSVApps[i].name.isNull(); ++i)
ui->knownImports->addItem(CSVApps[i].name);
- ui->CSVSeparator->addItem("Tab");
- ui->CSVSeparator->addItem(",");
- ui->CSVSeparator->addItem(";");
+ ui->CSVSeparator->addItems( QStringList() << tr("Separator") << tr("Tab") << ";" << ",");
ui->knownImports->setCurrentIndex(1);
- ui->ManualSeparator->addItem("Tab");
- ui->ManualSeparator->addItem(",");
- ui->ManualSeparator->addItem(";");
- ui->knownImports->setCurrentIndex(1);
-
- connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->CSVTime, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->CSVTemperature, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVndl, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->ndlCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVtts, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->ttsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
- connect(ui->CSVpressure, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
- connect(ui->pressureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
/* manually import CSV file */
- connect(ui->DiveNumberCheck, SIGNAL(clicked(bool)), this, SLOT(manualDiveNumber()));
- connect(ui->DateCheck, SIGNAL(clicked(bool)), this, SLOT(manualDate()));
- connect(ui->TimeCheck, SIGNAL(clicked(bool)), this, SLOT(manualTime()));
- connect(ui->LocationCheck, SIGNAL(clicked(bool)), this, SLOT(manualLocation()));
- connect(ui->GpsCheck, SIGNAL(clicked(bool)), this, SLOT(manualGps()));
- connect(ui->MaxDepthCheck, SIGNAL(clicked(bool)), this, SLOT(manualMaxDepth()));
- connect(ui->MeanDepthCheck, SIGNAL(clicked(bool)), this, SLOT(manualMeanDepth()));
- connect(ui->BuddyCheck, SIGNAL(clicked(bool)), this, SLOT(manualBuddy()));
- connect(ui->NotesCheck, SIGNAL(clicked(bool)), this, SLOT(manualNotes()));
- connect(ui->TagsCheck, SIGNAL(clicked(bool)), this, SLOT(manualTags()));
- connect(ui->WeightCheck, SIGNAL(clicked(bool)), this, SLOT(manualWeight()));
- connect(ui->DurationCheck, SIGNAL(clicked(bool)), this, SLOT(manualDuration()));
- connect(ui->CylinderSizeCheck, SIGNAL(clicked(bool)), this, SLOT(manualCylinderSize()));
- connect(ui->StartPressureCheck, SIGNAL(clicked(bool)), this, SLOT(manualStartPressure()));
- connect(ui->EndPressureCheck, SIGNAL(clicked(bool)), this, SLOT(manualEndPressure()));
- connect(ui->O2Check, SIGNAL(clicked(bool)), this, SLOT(manualO2()));
- connect(ui->HeCheck, SIGNAL(clicked(bool)), this, SLOT(manualHe()));
- connect(ui->AirTempCheck, SIGNAL(clicked(bool)), this, SLOT(manualAirTemp()));
- connect(ui->WaterTempCheck, SIGNAL(clicked(bool)), this, SLOT(manualWaterTemp()));
-
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
connect(close, SIGNAL(activated()), this, SLOT(close()));
QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
@@ -92,11 +49,11 @@ DiveLogImportDialog::~DiveLogImportDialog()
#define VALUE_IF_CHECKED(x) (ui->x->isEnabled() ? ui->x->value() - 1 : -1)
void DiveLogImportDialog::on_buttonBox_accepted()
{
- if (ui->tabWidget->currentIndex() == 0) {
- for (int i = 0; i < fileNames.size(); ++i) {
- if (ui->knownImports->currentText() == QString("Seabear CSV")) {
- parse_seabear_csv_file(fileNames[i].toUtf8().data(), ui->CSVTime->value() - 1,
- ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature),
+ /*
+ for (int i = 0; i < fileNames.size(); ++i) {
+ if (ui->knownImports->currentText() == QString("Seabear CSV")) {
+ parse_seabear_csv_file(fileNames[i].toUtf8().data(), ui->CSVTime->value() - 1,
+ ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature),
VALUE_IF_CHECKED(CSVpo2),
VALUE_IF_CHECKED(CSVcns),
VALUE_IF_CHECKED(CSVndl),
@@ -107,7 +64,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv",
ui->CSVUnits->currentIndex());
- /* Seabear CSV stores NDL and TTS in Minutes, not seconds */
+ // Seabear CSV stores NDL and TTS in Minutes, not seconds
struct dive *dive = dive_table.dives[dive_table.nr - 1];
for(int s_nr = 0 ; s_nr <= dive->dc.samples ; s_nr++) {
struct sample *sample = dive->dc.sample + s_nr;
@@ -147,7 +104,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
VALUE_IF_CHECKED(WaterTemp));
}
}
-
+*/
process_dives(true, false);
MainWindow::instance()->refreshDisplay();
@@ -159,34 +116,12 @@ void DiveLogImportDialog::on_buttonBox_accepted()
ui->CSV->setEnabled(VAL >= 0);\
ui->BOX->setChecked(VAL >= 0);\
ui->CSV->blockSignals(false); })
+
void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index)
{
- if (specialCSV.contains(index)) {
- ui->groupBox_3->setEnabled(false);
- } else {
- ui->groupBox_3->setEnabled(true);
- }
if (index == 0)
return;
- ui->CSVTime->blockSignals(true);
- ui->CSVDepth->blockSignals(true);
- ui->CSVTime->setValue(CSVApps[index].time);
- ui->CSVDepth->setValue(CSVApps[index].depth);
- ui->CSVTime->blockSignals(false);
- ui->CSVDepth->blockSignals(false);
- SET_VALUE_AND_CHECKBOX(CSVTemperature, temperatureCheckBox, CSVApps[index].temperature);
- SET_VALUE_AND_CHECKBOX(CSVpo2, po2CheckBox, CSVApps[index].po2);
- SET_VALUE_AND_CHECKBOX(CSVcns, cnsCheckBox, CSVApps[index].cns);
- SET_VALUE_AND_CHECKBOX(CSVndl, ndlCheckBox, CSVApps[index].ndl);
- SET_VALUE_AND_CHECKBOX(CSVtts, ttsCheckBox, CSVApps[index].tts);
- SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth);
- SET_VALUE_AND_CHECKBOX(CSVpressure, pressureCheckBox, CSVApps[index].pressure);
- ui->CSVSeparator->blockSignals(true);
- int separator_index = ui->CSVSeparator->findText(CSVApps[index].separator);
- if (separator_index != -1)
- ui->CSVSeparator->setCurrentIndex(separator_index);
- ui->CSVSeparator->blockSignals(false);
}
void DiveLogImportDialog::unknownImports()
@@ -194,107 +129,3 @@ void DiveLogImportDialog::unknownImports()
if (!specialCSV.contains(ui->knownImports->currentIndex()))
ui->knownImports->setCurrentIndex(0);
}
-
-#define SET_COLUMN(CHECK, VALUE) ({\
- if (ui->CHECK->isChecked()) {\
- ui->VALUE->setEnabled(true);\
- ui->VALUE->setValue(++column);\
- } else {\
- ui->VALUE->setEnabled(false);\
- --column;}\
- })
-
-void DiveLogImportDialog::manualDiveNumber()
-{
- SET_COLUMN(DiveNumberCheck, DiveNumber);
-}
-
-void DiveLogImportDialog::manualDate()
-{
- SET_COLUMN(DateCheck, Date);
-}
-
-void DiveLogImportDialog::manualTime()
-{
- SET_COLUMN(TimeCheck, Time);
-}
-
-void DiveLogImportDialog::manualLocation()
-{
- SET_COLUMN(LocationCheck, Location);
-}
-
-void DiveLogImportDialog::manualGps()
-{
- SET_COLUMN(GpsCheck, Gps);
-}
-
-void DiveLogImportDialog::manualMaxDepth()
-{
- SET_COLUMN(MaxDepthCheck, MaxDepth);
-}
-
-void DiveLogImportDialog::manualMeanDepth()
-{
- SET_COLUMN(MeanDepthCheck, MeanDepth);
-}
-
-void DiveLogImportDialog::manualBuddy()
-{
- SET_COLUMN(BuddyCheck, Buddy);
-}
-
-void DiveLogImportDialog::manualNotes()
-{
- SET_COLUMN(NotesCheck, Notes);
-}
-
-void DiveLogImportDialog::manualTags()
-{
- SET_COLUMN(TagsCheck, Tags);
-}
-
-void DiveLogImportDialog::manualWeight()
-{
- SET_COLUMN(WeightCheck, Weight);
-}
-
-void DiveLogImportDialog::manualDuration()
-{
- SET_COLUMN(DurationCheck, Duration);
-}
-
-void DiveLogImportDialog::manualCylinderSize()
-{
- SET_COLUMN(CylinderSizeCheck, CylinderSize);
-}
-
-void DiveLogImportDialog::manualStartPressure()
-{
- SET_COLUMN(StartPressureCheck, StartPressure);
-}
-
-void DiveLogImportDialog::manualEndPressure()
-{
- SET_COLUMN(EndPressureCheck, EndPressure);
-}
-
-void DiveLogImportDialog::manualO2()
-{
- SET_COLUMN(O2Check, O2);
-}
-
-void DiveLogImportDialog::manualHe()
-{
- SET_COLUMN(HeCheck, He);
-}
-
-void DiveLogImportDialog::manualAirTemp()
-{
- SET_COLUMN(AirTempCheck, AirTemp);
-}
-
-void DiveLogImportDialog::manualWaterTemp()
-{
- SET_COLUMN(WaterTempCheck, WaterTemp);
-}
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
index 36314f7f5..b2ee4ff99 100644
--- a/qt-ui/divelogimportdialog.h
+++ b/qt-ui/divelogimportdialog.h
@@ -23,26 +23,6 @@ slots:
void on_knownImports_currentIndexChanged(int index);
void unknownImports();
- void manualDiveNumber();
- void manualDate();
- void manualTime();
- void manualLocation();
- void manualGps();
- void manualMaxDepth();
- void manualMeanDepth();
- void manualBuddy();
- void manualNotes();
- void manualTags();
- void manualWeight();
- void manualDuration();
- void manualCylinderSize();
- void manualStartPressure();
- void manualEndPressure();
- void manualO2();
- void manualHe();
- void manualAirTemp();
- void manualWaterTemp();
-
private:
bool selector;
QStringList fileNames;
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index 7b4e909bf..13ee3e9de 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>522</width>
- <height>436</height>
+ <width>709</width>
+ <height>646</height>
</rect>
</property>
<property name="windowTitle">
@@ -20,815 +20,103 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string>CSV options</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="1">
- <widget class="QGroupBox" name="groupBox_7">
- <property name="title">
- <string>Units</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_4b">
- <item>
- <widget class="QComboBox" name="CSVUnits">
- <item>
- <property name="text">
- <string>Metric</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Imperial</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Field separator</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QComboBox" name="CSVSeparator"/>
- </item>
- </layout>
- </widget>
- </item>
- <item row="3" column="1">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" rowspan="3">
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Field configuration</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="3" column="1">
- <widget class="QSpinBox" name="CSVpo2">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="CSVDepth">
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>2</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="CSVTemperature">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Depth</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QSpinBox" name="CSVstopdepth">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QCheckBox" name="stopdepthCheckBox">
- <property name="text">
- <string>Stopdepth</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QSpinBox" name="CSVpressure">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QCheckBox" name="pressureCheckBox">
- <property name="text">
- <string>Pressure</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="po2CheckBox">
- <property name="text">
- <string>pO₂</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Time</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="temperatureCheckBox">
- <property name="text">
- <string>Temp</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="CSVTime">
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="CSVcns">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QCheckBox" name="ndlCheckBox">
- <property name="text">
- <string>NDL</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QSpinBox" name="CSVndl">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QCheckBox" name="ttsCheckBox">
- <property name="text">
- <string>TTS</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QSpinBox" name="CSVtts">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="cnsCheckBox">
- <property name="text">
- <string>Cns</string>
- </property>
- </widget>
- </item>
- </layout>
- <zorder>CSVpressure</zorder>
- <zorder>pressureCheckBox</zorder>
- <zorder>ndlCheckBox</zorder>
- <zorder>CSVndl</zorder>
- <zorder>ttsCheckBox</zorder>
- <zorder>CSVtts</zorder>
- <zorder>label</zorder>
- <zorder>label_2</zorder>
- <zorder>CSVTime</zorder>
- <zorder>CSVDepth</zorder>
- <zorder>temperatureCheckBox</zorder>
- <zorder>CSVTemperature</zorder>
- <zorder>po2CheckBox</zorder>
- <zorder>CSVpo2</zorder>
- <zorder>cnsCheckBox</zorder>
- <zorder>CSVcns</zorder>
- <zorder>stopdepthCheckBox</zorder>
- <zorder>CSVstopdepth</zorder>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>Pre-configured imports</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QComboBox" name="knownImports">
- <property name="currentIndex">
- <number>-1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
- <string>Manual dives</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="3" column="1">
- <widget class="QGroupBox" name="groupBox_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>70</height>
- </size>
- </property>
- <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>100</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="2" column="1">
- <widget class="QGroupBox" name="groupBox_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>70</height>
- </size>
- </property>
- <property name="title">
- <string>Units</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QComboBox" name="Units">
- <item>
- <property name="text">
- <string>Metric</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Imperial</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="0" rowspan="7">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Field configuration</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="0">
- <widget class="QCheckBox" name="DiveNumberCheck">
- <property name="text">
- <string>Dive #</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="DiveNumber">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QCheckBox" name="MaxDepthCheck">
- <property name="text">
- <string>Max depth</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QSpinBox" name="MaxDepth">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="DateCheck">
- <property name="toolTip">
- <string>Date in dd.mm.yyyy, yyyy-mm-dd or mm/dd/yyyy format</string>
- </property>
- <property name="text">
- <string>Date</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="Date">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Date in dd.mm.yyyy, yyyy-mm-dd or mm/dd/yyyy format</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="MeanDepthCheck">
- <property name="text">
- <string>Mean depth</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QSpinBox" name="MeanDepth">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="TimeCheck">
- <property name="text">
- <string>Time</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="Time">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QCheckBox" name="BuddyCheck">
- <property name="text">
- <string>Buddy</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QSpinBox" name="Buddy">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="DurationCheck">
- <property name="toolTip">
- <string>Dive duration in seconds or in min:sec format</string>
- </property>
- <property name="text">
- <string>Duration</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="Duration">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Dive duration in seconds or in min:sec format</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QCheckBox" name="NotesCheck">
- <property name="text">
- <string>Notes</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QSpinBox" name="Notes">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="LocationCheck">
- <property name="text">
- <string>Location</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="Location">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QCheckBox" name="WeightCheck">
- <property name="text">
- <string>Weight</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QSpinBox" name="Weight">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QCheckBox" name="GpsCheck">
- <property name="text">
- <string>GPS</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QSpinBox" name="Gps">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="4" column="2">
- <widget class="QCheckBox" name="TagsCheck">
- <property name="text">
- <string>Tags</string>
- </property>
- </widget>
- </item>
- <item row="4" column="3">
- <widget class="QSpinBox" name="Tags">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QCheckBox" name="CylinderSizeCheck">
- <property name="text">
- <string>Cyl size</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QSpinBox" name="CylinderSize">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="5" column="2">
- <widget class="QCheckBox" name="AirTempCheck">
- <property name="text">
- <string>Air temp</string>
- </property>
- </widget>
- </item>
- <item row="5" column="3">
- <widget class="QSpinBox" name="AirTemp">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QCheckBox" name="StartPressureCheck">
- <property name="text">
- <string>Start Pressure</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QSpinBox" name="StartPressure">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="6" column="2">
- <widget class="QCheckBox" name="WaterTempCheck">
- <property name="text">
- <string>Water temp</string>
- </property>
- </widget>
- </item>
- <item row="6" column="3">
- <widget class="QSpinBox" name="WaterTemp">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QCheckBox" name="EndPressureCheck">
- <property name="text">
- <string>End Press</string>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="QSpinBox" name="EndPressure">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="8" column="2">
- <widget class="QCheckBox" name="O2Check">
- <property name="text">
- <string>O₂</string>
- </property>
- </widget>
- </item>
- <item row="8" column="3">
- <widget class="QSpinBox" name="O2">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="9" column="2">
- <widget class="QCheckBox" name="HeCheck">
- <property name="text">
- <string>He</string>
- </property>
- </widget>
- </item>
- <item row="9" column="3">
- <widget class="QSpinBox" name="He">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QGroupBox" name="groupBox_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>70</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Choose duration format.</string>
- </property>
- <property name="title">
- <string>Duration format</string>
- </property>
- <widget class="QComboBox" name="DurationFormat">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>40</y>
- <width>100</width>
- <height>27</height>
- </rect>
- </property>
- <item>
- <property name="text">
- <string>Seconds</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Minutes</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Minutes:seconds</string>
- </property>
- </item>
- </widget>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="groupBox_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>70</height>
- </size>
- </property>
- <property name="title">
- <string>Field separator</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QComboBox" name="ManualSeparator"/>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
<widget class="QWidget" name="horizontalWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
+ <property name="margin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="verticalWidget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="knownImports">
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="CSVSeparator"/>
+ </item>
+ <item>
+ <widget class="QComboBox" name="DateFormat">
+ <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>
+ </item>
+ <item>
+ <widget class="QComboBox" name="DurationFormat">
+ <item>
+ <property name="text">
+ <string>Seconds</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Minutes</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Minutes:seconds</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="CSVUnits">
+ <item>
+ <property name="text">
+ <string>Metric</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Imperial</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QListView" name="avaliableColumns">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>150</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Drag the tags above to each corresponding column below</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTableView" name="tableView"/>
+ </item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
@@ -848,19 +136,6 @@
</layout>
</widget>
<tabstops>
- <tabstop>tabWidget</tabstop>
- <tabstop>CSVTime</tabstop>
- <tabstop>CSVDepth</tabstop>
- <tabstop>temperatureCheckBox</tabstop>
- <tabstop>CSVTemperature</tabstop>
- <tabstop>po2CheckBox</tabstop>
- <tabstop>CSVpo2</tabstop>
- <tabstop>cnsCheckBox</tabstop>
- <tabstop>CSVcns</tabstop>
- <tabstop>stopdepthCheckBox</tabstop>
- <tabstop>CSVstopdepth</tabstop>
- <tabstop>CSVSeparator</tabstop>
- <tabstop>knownImports</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
@@ -897,373 +172,5 @@
</hint>
</hints>
</connection>
- <connection>
- <sender>temperatureCheckBox</sender>
- <signal>clicked(bool)</signal>
- <receiver>CSVTemperature</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>108</x>
- <y>169</y>
- </hint>
- <hint type="destinationlabel">
- <x>238</x>
- <y>171</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>po2CheckBox</sender>
- <signal>clicked(bool)</signal>
- <receiver>CSVpo2</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>108</x>
- <y>201</y>
- </hint>
- <hint type="destinationlabel">
- <x>238</x>
- <y>203</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>cnsCheckBox</sender>
- <signal>clicked(bool)</signal>
- <receiver>CSVcns</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>108</x>
- <y>233</y>
- </hint>
- <hint type="destinationlabel">
- <x>238</x>
- <y>235</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>stopdepthCheckBox</sender>
- <signal>clicked(bool)</signal>
- <receiver>CSVstopdepth</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>108</x>
- <y>265</y>
- </hint>
- <hint type="destinationlabel">
- <x>238</x>
- <y>267</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>DiveNumberCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>DiveNumber</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>103</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>105</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>DateCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Date</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>135</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>137</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>TimeCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Time</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>167</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>169</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>LocationCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Location</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>231</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>233</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>GpsCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Gps</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>263</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>265</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MaxDepthCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>MaxDepth</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>103</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>105</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>MeanDepthCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>MeanDepth</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>135</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>137</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>BuddyCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Buddy</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>167</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>169</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>NotesCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Notes</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>199</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>201</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>TagsCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Tags</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>263</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>265</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>WeightCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Weight</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>185</x>
- <y>231</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>233</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>DurationCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>Duration</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>96</x>
- <y>199</y>
- </hint>
- <hint type="destinationlabel">
- <x>176</x>
- <y>201</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>CylinderSizeCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>CylinderSize</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>StartPressureCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>StartPressure</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>EndPressureCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>EndPressure</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>O2Check</sender>
- <signal>clicked(bool)</signal>
- <receiver>O2</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>HeCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>He</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>AirTempCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>AirTemp</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>WaterTempCheck</sender>
- <signal>clicked(bool)</signal>
- <receiver>WaterTemp</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
</connections>
</ui>