1 /***************************************************************************
2 * Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com> *
3 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef _SIDEBARPAGE_H_
22 #define _SIDEBARPAGE_H_
26 #include <kfileitem.h>
29 * @brief Base widget for all pages that can be embedded into the Sidebar.
32 class SidebarPage
: public QWidget
36 explicit SidebarPage(QWidget
* parent
=0);
37 virtual ~SidebarPage();
41 * This is invoked every time the folder being displayed in the
42 * file-management views changes.
44 virtual void setUrl(const KUrl
& url
);
47 * This is invoked to inform the sidebar that the user has selected a new
50 virtual void setSelection(const KFileItemList
& selection
);
54 * This signal is emited when the sidebar requests an URL-change in the
55 * currently active file-management view. The view is not requested to
56 * accept this change, if it is accepted the sidebar will be informed via
59 void changeUrl(const KUrl
& url
);
62 * This signal is emitted when the sidebar requests a change in the
63 * current selection. The file-management view recieving this signal is
64 * not required to select all listed files, limiting the selection to
65 * e.g. the current folder. The new selection will be reported via the
68 void changeSelection(const KFileItemList
& selection
);
71 * This signal is emitted whenever a drop action on this widget needs the
72 * MainWindow's attention.
74 void urlsDropped(const KUrl::List
& urls
, const KUrl
& destination
);
78 KFileItemList m_currentSelection
;
81 #endif // _SIDEBARPAGE_H_