Code Cleanup: Merged the three TableViews shared code

Merged the shared code for the three table views into
one code, this way less code is needed if we need to
construct another tableview in the future.
I still need to clean some of the models too.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-09-02 16:21:08 -03:00
parent 430e7ab132
commit 5666f6573e
8 changed files with 91 additions and 237 deletions

View file

@ -45,16 +45,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();
@ -68,7 +61,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);
@ -78,8 +70,6 @@ private:
CylindersModel *cylindersModel;
NotesBackup notesBackup;
struct dive* currentDive;
QPushButton *addCylinder;
QPushButton *addWeight;
enum { NONE, DIVE, TRIP } editMode;
Completers completers;
void enableEdition();