diff options
| author | Peter Penz <[email protected]> | 2012-04-21 21:28:16 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-04-21 21:32:42 +0200 |
| commit | ae4d11d918938fd9087f2035dac247969c1f2313 (patch) | |
| tree | 0303667797c81814b46b9ed5ed20b48ef31f2d71 /src/kitemviews/kfileitemlistview.h | |
| parent | 47d7cdffdd2d2c04067a5088eaeff67add53dde3 (diff) | |
Prepare view-engine for non-KFileItem usecase
Up to now the view-engine only provided a model-implementation that
supports file-items. The view-engine always had been designed to be able
to work with any kind of model, so now a KStandardItemModel is available.
The plan is to convert the places panel to the new view-engine. It should
be no problem to fix this until the feature freeze - in the worst case
the places-panel code could be reverted while still keeping the
KStandardItemModel changes.
Diffstat (limited to 'src/kitemviews/kfileitemlistview.h')
| -rw-r--r-- | src/kitemviews/kfileitemlistview.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/kitemviews/kfileitemlistview.h b/src/kitemviews/kfileitemlistview.h index 8f7ca9063..c8a3385fd 100644 --- a/src/kitemviews/kfileitemlistview.h +++ b/src/kitemviews/kfileitemlistview.h @@ -22,7 +22,7 @@ #include <libdolphin_export.h> -#include <kitemviews/kitemlistview.h> +#include <kitemviews/kstandarditemlistview.h> class KFileItemModelRolesUpdater; class QTimer; @@ -36,18 +36,11 @@ class QTimer; * KItemListView::setWidgetCreator() and KItemListView::setGroupHeaderCreator() * to apply customized generators. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemListView : public KItemListView +class LIBDOLPHINPRIVATE_EXPORT KFileItemListView : public KStandardItemListView { Q_OBJECT public: - enum Layout - { - IconsLayout, - CompactLayout, - DetailsLayout - }; - KFileItemListView(QGraphicsWidget* parent = 0); virtual ~KFileItemListView(); @@ -62,9 +55,6 @@ public: void setEnlargeSmallPreviews(bool enlarge); bool enlargeSmallPreviews() const; - void setItemLayout(Layout layout); - Layout itemLayout() const; - /** * Sets the list of enabled thumbnail plugins that are used for previews. * Per default all plugins enabled in the KConfigGroup "PreviewSettings" @@ -86,8 +76,10 @@ public: virtual QPixmap createDragPixmap(const QSet<int>& indexes) const; protected: - virtual void initializeItemListWidget(KItemListWidget* item); - virtual bool itemSizeHintUpdateRequired(const QSet<QByteArray>& changedRoles) const; + virtual KItemListWidgetCreatorBase* defaultWidgetCreator() const; + virtual KItemListGroupHeaderCreatorBase* defaultGroupHeaderCreator() const; + virtual void onPreviewsShownChanged(bool shown); + virtual void onItemLayoutChanged(ItemLayout current, ItemLayout previous); virtual void onModelChanged(KItemModelBase* current, KItemModelBase* previous); virtual void onScrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous); virtual void onItemSizeChanged(const QSizeF& current, const QSizeF& previous); @@ -111,7 +103,6 @@ private slots: void updateIconSize(); private: - void updateLayoutOfVisibleItems(); void updateTimersInterval(); /** @@ -130,8 +121,6 @@ private: QSize availableIconSize() const; private: - Layout m_itemLayout; - KFileItemModelRolesUpdater* m_modelRolesUpdater; QTimer* m_updateVisibleIndexRangeTimer; QTimer* m_updateIconSizeTimer; |
