summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divetripmodel.cpp30
-rw-r--r--qt-models/divetripmodel.h3
2 files changed, 0 insertions, 33 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index 31f1a29a2..fd8a2f08a 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -442,18 +442,6 @@ DiveTripModel::DiveTripModel(QObject *parent) :
currentLayout(TREE)
{
columns = COLUMNS;
- // setup the default width of columns (px)
- columnWidthMap = QVector<int>(COLUMNS);
- // pre-fill with 50px; the rest are explicit
- for(int i = 0; i < COLUMNS; i++)
- columnWidthMap[i] = 50;
- columnWidthMap[NR] = 70;
- columnWidthMap[DATE] = 140;
- columnWidthMap[RATING] = 90;
- columnWidthMap[SUIT] = 70;
- columnWidthMap[SAC] = 70;
- columnWidthMap[PHOTOS] = 5;
- columnWidthMap[LOCATION] = 500;
}
Qt::ItemFlags DiveTripModel::flags(const QModelIndex &index) const
@@ -658,21 +646,3 @@ bool DiveTripModel::setData(const QModelIndex &index, const QVariant &value, int
return false;
return diveItem->setData(index, value, role);
}
-
-int DiveTripModel::columnWidth(int column)
-{
- if (column > COLUMNS - 1 || column < 0) {
- qWarning() << "DiveTripModel::columnWidth(): not a valid column index -" << column;
- return 50;
- }
- return columnWidthMap[column];
-}
-
-void DiveTripModel::setColumnWidth(int column, int width)
-{
- if (column > COLUMNS - 1 || column < 0) {
- qWarning() << "DiveTripModel::setColumnWidth(): not a valid column index -" << column;
- return;
- }
- columnWidthMap[column] = width;
-}
diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h
index 71a316074..0d1cff5a0 100644
--- a/qt-models/divetripmodel.h
+++ b/qt-models/divetripmodel.h
@@ -99,13 +99,10 @@ public:
DiveTripModel(QObject *parent = 0);
Layout layout() const;
void setLayout(Layout layout);
- int columnWidth(int column);
- void setColumnWidth(int column, int width);
private:
void setupModelData();
QMap<dive_trip_t *, TripItem *> trips;
- QVector<int> columnWidthMap;
Layout currentLayout;
};