diff options
| author | Peter Penz <[email protected]> | 2012-03-24 23:46:44 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-03-24 23:47:42 +0100 |
| commit | 1cbe55b97c3b8fd9265ad6b40ce6cc169d4451c1 (patch) | |
| tree | 24d4017240ee701701d13d9c20bc4cc78e9bb3cb /src/kitemviews/kitemlistheaderwidget_p.h | |
| parent | 3f88f79f862a570b68fe64781955cf7d14124127 (diff) | |
Cleanup and minor fixes for column-handling
Diffstat (limited to 'src/kitemviews/kitemlistheaderwidget_p.h')
| -rw-r--r-- | src/kitemviews/kitemlistheaderwidget_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistheaderwidget_p.h b/src/kitemviews/kitemlistheaderwidget_p.h index ea8bb1ef9..e27106066 100644 --- a/src/kitemviews/kitemlistheaderwidget_p.h +++ b/src/kitemviews/kitemlistheaderwidget_p.h @@ -53,6 +53,12 @@ public: void setColumnWidth(const QByteArray& role, qreal width); qreal columnWidth(const QByteArray& role) const; + /** + * Sets the column-width that is required to show the role unclipped. + */ + void setPreferredColumnWidth(const QByteArray& role, qreal width); + qreal preferredColumnWidth(const QByteArray& role) const; + qreal minimumColumnWidth() const; virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); @@ -139,7 +145,8 @@ private: bool m_automaticColumnResizing; KItemModelBase* m_model; QList<QByteArray> m_columns; - QHash<QByteArray, qreal> m_columnsWidths; + QHash<QByteArray, qreal> m_columnWidths; + QHash<QByteArray, qreal> m_preferredColumnWidths; int m_hoveredRoleIndex; int m_pressedRoleIndex; |
