┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemlistwidget.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-04-01 16:42:46 +0200
committerPeter Penz <[email protected]>2012-04-01 16:46:54 +0200
commita4ede4e0ebaf0bba57da8fc2924577f1a8ff7b54 (patch)
tree954d5394838230f20646f17727460aaae1fbcb34 /src/kitemviews/kfileitemlistwidget.h
parentaced85db1f7c72268860f0368402cf97f34e55c2 (diff)
Allow showing Nepomuk metadata inside views
Metadata like image-size, rating, comments, tags, ... can be shown now in the view (e.g. as column in the Details mode). Still open: The rating-information needs to be shown as stars. In the context of this feature also the following bugs have been fixed: - Fix visual glitches in the header of the Details mode - Improve the minimum column width calculation to respect also the headling and not only the content BUG: 296782 FIXED-IN: 4.9.0
Diffstat (limited to 'src/kitemviews/kfileitemlistwidget.h')
-rw-r--r--src/kitemviews/kfileitemlistwidget.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h
index 76d090040..d68a22405 100644
--- a/src/kitemviews/kfileitemlistwidget.h
+++ b/src/kitemviews/kfileitemlistwidget.h
@@ -109,17 +109,11 @@ private slots:
void slotCutItemsChanged();
private:
- enum TextId {
+ enum RoleType {
Name,
Size,
Date,
- Permissions,
- Owner,
- Group,
- Type,
- Destination,
- Path,
- TextIdCount // Mandatory last entry
+ Generic // Mandatory last entry
};
void triggerCacheRefreshing();
@@ -139,7 +133,7 @@ private:
static QPixmap pixmapForIcon(const QString& name, int size);
static void applyCutEffect(QPixmap& pixmap);
static void applyHiddenEffect(QPixmap& pixmap);
- static TextId roleTextId(const QByteArray& role);
+ static RoleType roleType(const QByteArray& role);
/**
* @return Shown string for the role \p role of the item with the values \p values.
@@ -164,8 +158,13 @@ private:
QRectF m_iconRect; // Cache for KItemListWidget::iconRect()
QPixmap m_hoverPixmap; // Cache for modified m_pixmap when hovering the item
- QPointF m_textPos[TextIdCount];
- QStaticText m_text[TextIdCount];
+ struct TextInfo
+ {
+ QPointF pos;
+ QStaticText staticText;
+ };
+ QHash<QByteArray, TextInfo*> m_textInfo;
+
QRectF m_textRect;
QList<QByteArray> m_sortedVisibleRoles;