┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kstandarditemlistwidget.h
diff options
context:
space:
mode:
authorTom Lin <[email protected]>2022-01-16 14:01:32 +0000
committerFelix Ernst <[email protected]>2022-01-16 14:01:32 +0000
commitd3839617193e92463806580699caa595c892b8a6 (patch)
tree9819ace996bc994dd047206669eaa2869471a79b /src/kitemviews/kstandarditemlistwidget.h
parenta286506405550fe299e1f4a5fd73543e642655a0 (diff)
Full row highlight implementation
This commit implements full-row selection and hover highlights for the details view mode. This commit also contains fixes for 444680, 444753, both uncovered during this change. BUG: 181438 BUG: 444680 BUG: 444753 FIXED-IN: 22.04
Diffstat (limited to 'src/kitemviews/kstandarditemlistwidget.h')
-rw-r--r--src/kitemviews/kstandarditemlistwidget.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h
index f39f51fe4..3edec0db5 100644
--- a/src/kitemviews/kstandarditemlistwidget.h
+++ b/src/kitemviews/kstandarditemlistwidget.h
@@ -88,6 +88,9 @@ public:
void setLayout(Layout layout);
Layout layout() const;
+ void setHighlightEntireRow(bool highlightEntireRow);
+ bool highlightEntireRow() const;
+
void setSupportsItemExpanding(bool supportsItemExpanding);
bool supportsItemExpanding() const;
@@ -168,6 +171,7 @@ protected:
void dataChanged(const QHash<QByteArray, QVariant>& current, const QSet<QByteArray>& roles = QSet<QByteArray>()) override;
void visibleRolesChanged(const QList<QByteArray>& current, const QList<QByteArray>& previous) override;
void columnWidthChanged(const QByteArray& role, qreal current, qreal previous) override;
+ void leadingPaddingChanged(qreal width) override;
void styleOptionChanged(const KItemListStyleOption& current, const KItemListStyleOption& previous) override;
void hoveredChanged(bool hovered) override;
void selectedChanged(bool selected) override;
@@ -241,6 +245,7 @@ private:
QFont m_customizedFont;
QFontMetrics m_customizedFontMetrics;
bool m_isExpandable;
+ bool m_highlightEntireRow;
bool m_supportsItemExpanding;
bool m_dirtyLayout;
@@ -252,6 +257,7 @@ private:
QPixmap m_pixmap;
QSize m_scaledPixmapSize; //Size of the pixmap in device independent pixels
+ qreal m_columnWidthSum;
QRectF m_iconRect; // Cache for KItemListWidget::iconRect()
QPixmap m_hoverPixmap; // Cache for modified m_pixmap when hovering the item