Move the YearlyStatisticsModel to qt-models

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-05-28 18:12:11 -03:00 committed by Dirk Hohndel
parent 9bc62748af
commit 7171d2e1eb
7 changed files with 241 additions and 243 deletions

View file

@ -25,7 +25,6 @@
*
*/
struct DiveItem : public TreeItem {
enum Column {
NR,
@ -61,7 +60,6 @@ struct DiveItem : public TreeItem {
struct TripItem;
class DiveTripModel : public TreeModel {
Q_OBJECT
public:
@ -109,33 +107,6 @@ private:
Layout currentLayout;
};
class YearlyStatisticsModel : public TreeModel {
Q_OBJECT
public:
enum {
YEAR,
DIVES,
TOTAL_TIME,
AVERAGE_TIME,
SHORTEST_TIME,
LONGEST_TIME,
AVG_DEPTH,
MIN_DEPTH,
MAX_DEPTH,
AVG_SAC,
MIN_SAC,
MAX_SAC,
AVG_TEMP,
MIN_TEMP,
MAX_TEMP,
COLUMNS
};
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
YearlyStatisticsModel(QObject *parent = 0);
void update_yearly_stats();
};
/* TablePrintModel:
* for now we use a blank table model with row items TablePrintItem.
* these are pretty much the same as DiveItem, but have color