summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-16 13:28:59 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-16 13:28:59 -0300
commit20849f014eafa7ed697fb65af139ce3ee0561605 (patch)
treef2ad19b21559fdf13e2db59b871951024ad2a331 /qt-ui/models.h
parentf9b4c6b889e2444533af1baabdee3687020c1e7b (diff)
downloadsubsurface-20849f014eafa7ed697fb65af139ce3ee0561605.tar.gz
Make the columns have a sane default width for 'type'
Make the columns on Cylinders edit and Wheight Edit to have sane values for 'type', this is needed because the old behavior was to set it fixed size, and the default fixed size was silly. this calculates a good predefined value taking the font size in consideration. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 09a2c6a68..79af13bed 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -32,10 +32,12 @@ public:
/*reimp*/ int rowCount(const QModelIndex& parent = QModelIndex()) const;
/*reimp*/ bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());
/*reimp*/ bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
+ const QString& biggerString() const;
void clear();
void update();
private:
int rows;
+ QString biggerEntry;
};
/* Encapsulate ws_info */
@@ -53,11 +55,12 @@ public:
/*reimp*/ int rowCount(const QModelIndex& parent = QModelIndex()) const;
/*reimp*/ bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());
/*reimp*/ bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
+ const QString& biggerString() const;
void clear();
void update();
private:
int rows;
-
+ QString biggerEntry;
};
/* Encapsulation of the Cylinder Model, that presents the