summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/maintab.h')
-rw-r--r--qt-ui/maintab.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index af76fbb67..f9f65a3ff 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -9,9 +9,12 @@
#include <QTabWidget>
#include <QDialog>
+#include <QMap>
#include "models.h"
+class QCompleter;
+struct dive;
namespace Ui
{
class MainTab;
@@ -27,6 +30,13 @@ struct NotesBackup{
QString divemaster;
};
+struct Completers{
+ QCompleter *location;
+ QCompleter *divemaster;
+ QCompleter *buddy;
+ QCompleter *suit;
+};
+
class MainTab : public QTabWidget
{
Q_OBJECT
@@ -36,16 +46,9 @@ public:
void clearInfo();
void clearEquipment();
void reload();
-
bool eventFilter(QObject* , QEvent*);
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
- virtual void hideEvent(QHideEvent* );
-
void initialUiSetup();
void equipmentPlusUpdate();
-
-
public slots:
void addCylinder_clicked();
void addWeight_clicked();
@@ -59,7 +62,6 @@ public slots:
void on_notes_textChanged();
void on_rating_valueChanged(int value);
void on_visibility_valueChanged(int value);
- void tabChanged(int idx);
void editCylinderWidget(const QModelIndex& index);
void editWeigthWidget(const QModelIndex& index);
@@ -67,11 +69,10 @@ private:
Ui::MainTab *ui;
WeightModel *weightModel;
CylindersModel *cylindersModel;
- NotesBackup notesBackup;
- struct dive* currentDive;
- QPushButton *addCylinder;
- QPushButton *addWeight;
+ QMap<dive*, NotesBackup> notesBackup;
enum { NONE, DIVE, TRIP } editMode;
+ Completers completers;
+ void enableEdition();
};
#endif