2015-05-17 19:13:41 +00:00
|
|
|
#ifndef LOCATIONINFORMATION_H
|
|
|
|
#define LOCATIONINFORMATION_H
|
|
|
|
|
|
|
|
#include "ui_locationInformation.h"
|
|
|
|
#include <stdint.h>
|
2015-05-17 19:33:23 +00:00
|
|
|
#include <QAbstractListModel>
|
|
|
|
|
2015-05-17 19:13:41 +00:00
|
|
|
class LocationInformationWidget : public QGroupBox {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
LocationInformationWidget(QWidget *parent = 0);
|
2015-05-17 20:14:23 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *);
|
2015-05-26 20:36:06 +00:00
|
|
|
|
2015-05-17 19:13:41 +00:00
|
|
|
public slots:
|
|
|
|
void acceptChanges();
|
|
|
|
void rejectChanges();
|
2015-06-04 02:50:36 +00:00
|
|
|
void updateGpsCoordinates();
|
2015-05-17 19:13:41 +00:00
|
|
|
void markChangedWidget(QWidget *w);
|
|
|
|
void enableEdition();
|
|
|
|
void resetState();
|
|
|
|
void resetPallete();
|
|
|
|
void on_diveSiteCoordinates_textChanged(const QString& text);
|
|
|
|
void on_diveSiteDescription_textChanged(const QString& text);
|
|
|
|
void on_diveSiteName_textChanged(const QString& text);
|
|
|
|
void on_diveSiteNotes_textChanged();
|
2015-06-04 02:50:36 +00:00
|
|
|
private slots:
|
2015-07-25 16:03:14 +00:00
|
|
|
void updateLabels();
|
2015-05-17 19:13:41 +00:00
|
|
|
signals:
|
2015-06-04 02:50:36 +00:00
|
|
|
void startEditDiveSite(uint32_t uuid);
|
|
|
|
void endEditDiveSite();
|
2015-05-22 19:15:53 +00:00
|
|
|
void coordinatesChanged();
|
2015-05-26 20:36:06 +00:00
|
|
|
void startFilterDiveSite(uint32_t uuid);
|
2015-05-26 20:42:45 +00:00
|
|
|
void stopFilterDiveSite();
|
2015-07-31 01:10:01 +00:00
|
|
|
void requestCoordinates();
|
|
|
|
void endRequestCoordinates();
|
2015-05-17 19:13:41 +00:00
|
|
|
private:
|
|
|
|
Ui::LocationInformation ui;
|
|
|
|
bool modified;
|
|
|
|
QAction *closeAction, *acceptAction, *rejectAction;
|
|
|
|
};
|
|
|
|
|
2015-07-08 17:27:17 +00:00
|
|
|
class LocationManagementEditHelper : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
bool eventFilter(QObject *obj, QEvent *ev);
|
|
|
|
void handleActivation(const QModelIndex& activated);
|
|
|
|
void resetDiveSiteUuid();
|
2015-07-13 18:14:46 +00:00
|
|
|
uint32_t diveSiteUuid() const;
|
2015-07-14 22:09:37 +00:00
|
|
|
signals:
|
|
|
|
void setLineEditText(const QString& text);
|
2015-07-08 17:27:17 +00:00
|
|
|
private:
|
|
|
|
uint32_t last_uuid;
|
|
|
|
|
2015-06-26 16:23:53 +00:00
|
|
|
};
|
2015-05-17 19:13:41 +00:00
|
|
|
#endif
|