diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-05-29 13:59:16 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-29 14:13:32 -0700 |
commit | 33918e686765ac97da006c751c8919ef59cfa65a (patch) | |
tree | 2066dda5dbf86a8dff8989be3ca52e0db941e71c /qt-models/profileprintmodel.h | |
parent | 60dc9f4ab36acf83ed599a7909ca164af3c9c227 (diff) | |
download | subsurface-33918e686765ac97da006c751c8919ef59cfa65a.tar.gz |
Move ProfilePrintModel to qt-models
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/profileprintmodel.h')
-rw-r--r-- | qt-models/profileprintmodel.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/qt-models/profileprintmodel.h b/qt-models/profileprintmodel.h new file mode 100644 index 000000000..b15f2df61 --- /dev/null +++ b/qt-models/profileprintmodel.h @@ -0,0 +1,26 @@ +#ifndef PROFILEPRINTMODEL_H +#define PROFILEPRINTMODEL_H + +#include <QAbstractTableModel> + +/* ProfilePrintModel: + * this model is used when printing a data table under a profile. it requires + * some exact usage of setSpan(..) on the target QTableView widget. + */ +class ProfilePrintModel : public QAbstractTableModel { + Q_OBJECT + +private: + int diveId; + double fontSize; + +public: + ProfilePrintModel(QObject *parent = 0); + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + void setDive(struct dive *divePtr); + void setFontsize(double size); +}; + +#endif
\ No newline at end of file |