aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/locationinformation.cpp12
-rw-r--r--qt-ui/locationinformation.h12
-rw-r--r--qt-ui/maintab.cpp9
-rw-r--r--qt-ui/maintab.h2
4 files changed, 33 insertions, 2 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 0578d553f..6aad1a3cc 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -226,3 +226,15 @@ void LocationInformationWidget::resetPallete()
ui.diveSiteName->setPalette(p);
ui.diveSiteNotes->setPalette(p);
}
+
+SimpleDiveSiteEditDialog::SimpleDiveSiteEditDialog(QWidget *parent) :
+ QDialog(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint),
+ ui(new Ui::SimpleDiveSiteEditDialog())
+{
+ ui->setupUi(this);
+}
+
+SimpleDiveSiteEditDialog::~SimpleDiveSiteEditDialog()
+{
+ delete ui;
+}
diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h
index d78af62f8..f26432183 100644
--- a/qt-ui/locationinformation.h
+++ b/qt-ui/locationinformation.h
@@ -44,4 +44,16 @@ private:
mode current_mode;
};
+
+#include "ui_simpledivesiteedit.h"
+class SimpleDiveSiteEditDialog : public QDialog {
+Q_OBJECT
+public:
+ SimpleDiveSiteEditDialog(QWidget *parent);
+ virtual ~SimpleDiveSiteEditDialog();
+
+private:
+ Ui::SimpleDiveSiteEditDialog *ui;
+
+};
#endif
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 31a94b73a..592157111 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -22,6 +22,7 @@
#include "divecomputerextradatamodel.h"
#include "divelocationmodel.h"
#include "divesite.h"
+#include "locationinformation.h"
#if defined(FBSUPPORT)
#include "socialnetworks.h"
@@ -57,7 +58,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.extraData->setModel(extraDataModel);
closeMessage();
- connect(ui.addDiveSite, SIGNAL(clicked()), this, SIGNAL(requestDiveSiteAdd()));
+ connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit()));
QAction *action = new QAction(tr("Apply changes"), this);
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
@@ -237,6 +238,12 @@ void MainTab::setCurrentLocationIndex()
}
}
+void MainTab::showDiveSiteSimpleEdit()
+{
+ SimpleDiveSiteEditDialog dlg(this);
+ dlg.exec();
+}
+
void MainTab::enableGeoLookupEdition()
{
ui.waitingSpinner->stop();
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 39350c956..6193abaf7 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -56,7 +56,6 @@ public:
signals:
void addDiveFinished();
void dateTimeChanged();
- void requestDiveSiteAdd();
void diveSiteChanged(uint32_t uuid);
public
slots:
@@ -96,6 +95,7 @@ slots:
void enableGeoLookupEdition();
void disableGeoLookupEdition();
void setCurrentLocationIndex();
+ void showDiveSiteSimpleEdit();
private:
Ui::MainTab ui;
WeightModel *weightModel;