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/panels/places/placespanel.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/panels/places/placespanel.h')
| -rw-r--r-- | src/panels/places/placespanel.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index 903f2cadb..1c46cd57d 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * + * Copyright (C) 2008-2012 by Peter Penz <[email protected]> * * Copyright (C) 2010 by Christian Muehlhaeuser <[email protected]> * * * * This program is free software; you can redistribute it and/or modify * @@ -21,12 +21,15 @@ #ifndef PLACESPANEL_H #define PLACESPANEL_H -#include <kfileplacesview.h> +#include <panels/panel.h> + +class KItemListController; +class KStandardItemModel; /** * @brief Combines bookmarks and mounted devices as list. */ -class PlacesPanel : public KFilePlacesView +class PlacesPanel : public Panel { Q_OBJECT @@ -34,18 +37,16 @@ public: PlacesPanel(QWidget* parent); virtual ~PlacesPanel(); -signals: - void urlChanged(const KUrl& url, Qt::MouseButtons buttons); - protected: - virtual void mousePressEvent(QMouseEvent* event); + virtual bool urlChanged(); + virtual void showEvent(QShowEvent* event); private slots: void slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent); - void emitExtendedUrlChangedSignal(const KUrl& url); private: - Qt::MouseButtons m_mouseButtons; + KItemListController* m_controller; + KStandardItemModel* m_model; }; #endif // PLACESPANEL_H |
