┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemlistwidget.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-24 00:18:09 +0200
committerPeter Penz <[email protected]>2011-09-24 00:20:24 +0200
commit740e9569327c0026257dfcea38ab2efac4a29d67 (patch)
tree96d09d0f89d8ebd3974522200c5337195bbbfcc8 /src/kitemviews/kfileitemlistwidget.h
parent9ea4d3c70c3765c1ef417642a392465caa31997c (diff)
Fix size-hint calculation in KFileItemListView
The current approach works fine but should be replaced in the longterm by a helper class shared by KFileItemListWidget and KFileItemListView to share information that is required to calculate the size hints in KFileItemListView and to represent the actual data in KFileItemListWidget.
Diffstat (limited to 'src/kitemviews/kfileitemlistwidget.h')
-rw-r--r--src/kitemviews/kfileitemlistwidget.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h
index 4f1cf1133..71c57ea73 100644
--- a/src/kitemviews/kfileitemlistwidget.h
+++ b/src/kitemviews/kfileitemlistwidget.h
@@ -52,6 +52,14 @@ public:
virtual QRectF textBoundingRect() const;
virtual QRectF expansionToggleRect() const;
+ /**
+ * @return Shown string for the role \p role of the item with the values \p values.
+ */
+ // TODO: Move this method to a helper class shared by KFileItemListWidget and
+ // KFileItemListView to share information that is required to calculate the size hints
+ // in KFileItemListView and to represent the actual data in KFileItemListWidget.
+ static QString roleText(const QByteArray& role, const QHash<QByteArray, QVariant>& values);
+
protected:
/**
* Invalidates the cache which results in calling KFileItemListWidget::refreshCache() as
@@ -103,8 +111,6 @@ private:
void updateAdditionalInfoTextColor();
- QString roleText(TextId textId, const QVariant& roleValue) const;
-
void drawPixmap(QPainter* painter, const QPixmap& pixmap);
static QPixmap pixmapForIcon(const QString& name, int size);