2013-04-14 03:44:02 +00:00
|
|
|
/*
|
|
|
|
* maintab.h
|
|
|
|
*
|
|
|
|
* header file for the main tab of Subsurface
|
|
|
|
*
|
|
|
|
*/
|
2013-04-07 22:20:43 +00:00
|
|
|
#ifndef MAINTAB_H
|
|
|
|
#define MAINTAB_H
|
|
|
|
|
|
|
|
#include <QTabWidget>
|
2013-04-13 13:17:59 +00:00
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include "models.h"
|
2013-04-07 22:20:43 +00:00
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MainTab;
|
|
|
|
}
|
|
|
|
|
2013-05-18 23:42:59 +00:00
|
|
|
struct NotesBackup{
|
|
|
|
QString location;
|
|
|
|
QString notes;
|
|
|
|
QString buddy;
|
|
|
|
QString suit;
|
|
|
|
int rating;
|
|
|
|
QString divemaster;
|
|
|
|
};
|
|
|
|
|
2013-04-07 22:20:43 +00:00
|
|
|
class MainTab : public QTabWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
MainTab(QWidget *parent);
|
2013-04-13 13:17:59 +00:00
|
|
|
void clearStats();
|
|
|
|
void clearInfo();
|
|
|
|
void clearEquipment();
|
|
|
|
void reload();
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void on_addCylinder_clicked();
|
|
|
|
void on_editCylinder_clicked();
|
|
|
|
void on_delCylinder_clicked();
|
2013-05-01 21:30:34 +00:00
|
|
|
void on_addWeight_clicked();
|
|
|
|
void on_editWeight_clicked();
|
|
|
|
void on_delWeight_clicked();
|
2013-05-06 16:23:14 +00:00
|
|
|
void updateDiveInfo(int dive);
|
2013-05-18 23:42:59 +00:00
|
|
|
void on_editNotes_clicked(bool edit);
|
|
|
|
void on_resetNotes_clicked();
|
|
|
|
void on_location_textChanged(const QString& text);
|
|
|
|
void on_divemaster_textChanged(const QString& text);
|
|
|
|
void on_buddy_textChanged(const QString& text);
|
|
|
|
void on_suit_textChanged(const QString& text);
|
|
|
|
void on_notes_textChanged();
|
|
|
|
void on_rating_valueChanged(int value);
|
2013-05-06 16:23:14 +00:00
|
|
|
|
2013-04-07 22:20:43 +00:00
|
|
|
private:
|
|
|
|
Ui::MainTab *ui;
|
2013-04-13 13:17:59 +00:00
|
|
|
WeightModel *weightModel;
|
|
|
|
CylindersModel *cylindersModel;
|
2013-05-18 23:42:59 +00:00
|
|
|
NotesBackup notesBackup;
|
|
|
|
struct dive* currentDive;
|
2013-04-07 22:20:43 +00:00
|
|
|
};
|
|
|
|
|
2013-04-13 13:17:59 +00:00
|
|
|
#endif
|