diff options
| author | Tom Lin <[email protected]> | 2022-01-16 14:01:32 +0000 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2022-01-16 14:01:32 +0000 |
| commit | d3839617193e92463806580699caa595c892b8a6 (patch) | |
| tree | 9819ace996bc994dd047206669eaa2869471a79b /src/kitemviews/kitemlistview.h | |
| parent | a286506405550fe299e1f4a5fd73543e642655a0 (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/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index cbb178119..228989cc4 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -205,6 +205,12 @@ public: void setSupportsItemExpanding(bool supportsExpanding); bool supportsItemExpanding() const; + void setHighlightEntireRow(bool highlightEntireRow); + bool highlightEntireRow() const; + + void setAlternateBackgrounds(bool alternate); + bool alternateBackgrounds() const; + /** * @return The rectangle of the item relative to the top/left of * the currently visible area (see KItemListView::offset()). @@ -374,6 +380,7 @@ protected: virtual void onScrollOffsetChanged(qreal current, qreal previous); virtual void onVisibleRolesChanged(const QList<QByteArray>& current, const QList<QByteArray>& previous); virtual void onStyleOptionChanged(const KItemListStyleOption& current, const KItemListStyleOption& previous); + virtual void onHighlightEntireRowChanged(bool highlightEntireRow); virtual void onSupportsItemExpandingChanged(bool supportsExpanding); virtual void onTransactionBegin(); @@ -426,6 +433,8 @@ private Q_SLOTS: qreal currentWidth, qreal previousWidth); + void slotLeadingPaddingChanged(qreal width); + /** * Is invoked if a column has been moved by the user. Applies * the moved role to the view. @@ -707,6 +716,8 @@ private: private: bool m_enabledSelectionToggles; bool m_grouped; + bool m_highlightEntireRow; + bool m_alternateBackgrounds; bool m_supportsItemExpanding; bool m_editingRole; int m_activeTransactions; // Counter for beginTransaction()/endTransaction() |
