diff options
Diffstat (limited to 'src/kitemviews/kstandarditemlistwidget.h')
| -rw-r--r-- | src/kitemviews/kstandarditemlistwidget.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index 7d33419bc..3edec0db5 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -23,12 +23,13 @@ class DOLPHIN_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetIn public: KStandardItemListWidgetInformant(); ~KStandardItemListWidgetInformant() override; - - void calculateItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const override; + + void calculateItemSizeHints(QVector<std::pair<qreal /* height */, bool /* isElided */>>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const override; qreal preferredRoleColumnWidth(const QByteArray& role, int index, const KItemListView* view) const override; + protected: /** * @return The value of the "text" role. The default implementation returns @@ -59,9 +60,9 @@ protected: */ virtual QFont customizedFontForLinks(const QFont& baseFont) const; - void calculateIconsLayoutItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; - void calculateCompactLayoutItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; - void calculateDetailsLayoutItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; + void calculateIconsLayoutItemSizeHints(QVector<std::pair<qreal, bool>>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; + void calculateCompactLayoutItemSizeHints(QVector<std::pair<qreal, bool>>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; + void calculateDetailsLayoutItemSizeHints(QVector<std::pair<qreal, bool>>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const; friend class KStandardItemListWidget; // Accesses roleText() }; @@ -87,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; @@ -167,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; @@ -240,6 +245,7 @@ private: QFont m_customizedFont; QFontMetrics m_customizedFontMetrics; bool m_isExpandable; + bool m_highlightEntireRow; bool m_supportsItemExpanding; bool m_dirtyLayout; @@ -251,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 |
