From ae4d11d918938fd9087f2035dac247969c1f2313 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 21 Apr 2012 21:28:16 +0200 Subject: 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. --- src/panels/places/placespanel.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/panels/places/placespanel.h') 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 * + * Copyright (C) 2008-2012 by Peter Penz * * Copyright (C) 2010 by Christian Muehlhaeuser * * * * This program is free software; you can redistribute it and/or modify * @@ -21,12 +21,15 @@ #ifndef PLACESPANEL_H #define PLACESPANEL_H -#include +#include + +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 -- cgit v1.3.1