]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/sidebarpage.h
replace QList<KFileItem> by KFileItemList, as KFileItemList is not QList<KFileItem...
[dolphin.git] / src / sidebarpage.h
index 587e435c14bfddca9260bbb7b116e684a280971a..697e8de58d30688fec43271663ccc41b0014047f 100644 (file)
@@ -1,6 +1,6 @@
 /***************************************************************************
  *   Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com>       *
- *   Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>
+ *   Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>                  *
  *                                                                         *
  *   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  *
 #ifndef _SIDEBARPAGE_H_
 #define _SIDEBARPAGE_H_
 
-#include <QWidget>
+#include <QtGui/QWidget>
 #include <kurl.h>
 #include <kfileitem.h>
 
 /**
  * @brief Base widget for all pages that can be embedded into the Sidebar.
- *
  */
 class SidebarPage : public QWidget
 {
@@ -36,22 +35,28 @@ public:
     explicit SidebarPage(QWidget* parent = 0);
     virtual ~SidebarPage();
 
+    /** Returns the current set URL of the active Dolphin view. */
+    const KUrl& url() const;
+
+    /** Returns the current selected items of the active Dolphin view. */
+    const KFileItemList& selection() const;
+
 public slots:
     /**
      * This is invoked every time the folder being displayed in the
-     * file-management views changes.
+     * active Dolphin view changes.
      */
     virtual void setUrl(const KUrl& url);
 
     /**
      * This is invoked to inform the sidebar that the user has selected a new
-     * set of files.
+     * set of items.
      */
     virtual void setSelection(const KFileItemList& selection);
 
 signals:
     /**
-     * This signal is emited when the sidebar requests an URL-change in the
+     * This signal is emitted when the sidebar requests an URL-change in the
      * currently active file-management view. The view is not requested to
      * accept this change, if it is accepted the sidebar will be informed via
      * the setUrl() slot.
@@ -73,7 +78,7 @@ signals:
      */
     void urlsDropped(const KUrl::List& urls, const KUrl& destination);
 
-protected:
+private:
     KUrl m_url;
     KFileItemList m_currentSelection;
 };