From 431da0482caa72f90a6a04785383eb1d133f678e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 7 Oct 2010 14:09:30 +0000 Subject: Internal cleanup for panels: Let the panel-implementations decide whether they accept an URL or not. svn path=/trunk/KDE/kdebase/apps/; revision=1183480 --- src/panels/panel.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/panels/panel.h') diff --git a/src/panels/panel.h b/src/panels/panel.h index b056ca1cb..11558e2de 100644 --- a/src/panels/panel.h +++ b/src/panels/panel.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2006 by Cvetoslav Ludmiloff * - * Copyright (C) 2006 by Peter Penz * + * Copyright (C) 2006-2010 by Peter Penz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -37,14 +37,24 @@ public: virtual ~Panel(); /** Returns the current set URL of the active Dolphin view. */ - const KUrl& url() const; + KUrl url() const; public slots: /** * This is invoked every time the folder being displayed in the * active Dolphin view changes. */ - virtual void setUrl(const KUrl& url); + void setUrl(const KUrl& url); + +protected: + /** + * Must be implemented by derived classes and is invoked when + * the URL has been changed (see Panel::setUrl()). + * @return True, if the new URL will get accepted by the derived + * class. If false is returned, + * the URL will be reset to the previous URL. + */ + virtual bool urlChanged() = 0; private: KUrl m_url; -- cgit v1.3