add more spacing
[personal-kdebase.git] / apps / lib / konq / konq_copytomenu.h
blob54b97a9e1508e572408dc5885cc216941788b219
1 /* This file is part of the KDE project
2 Copyright 2008 David Faure <faure@kde.org>
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2 of the License or
7 ( at your option ) version 3 or, at the discretion of KDE e.V.
8 ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
10 This library 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 GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef KONQ_COPYTOMENU_H
22 #define KONQ_COPYTOMENU_H
24 #include <kurl.h>
25 #include <kfileitem.h>
26 #include <libkonq_export.h>
28 class QMenu;
29 class KonqCopyToMenuPrivate;
31 /**
32 * This class adds "Copy To" and "Move To" submenus to a popupmenu.
34 class LIBKONQ_EXPORT KonqCopyToMenu
36 public:
37 /**
38 * Creates a KonqCopyToMenu instance.
39 * Note that this instance must stay alive for at least as long as the popupmenu;
40 * it has the slots for the actions created by addActionsTo.
42 KonqCopyToMenu();
44 /**
45 * Destructor
47 ~KonqCopyToMenu();
49 /**
50 * Sets the list of fileitems which the actions apply to.
51 * Either call this or setUrls.
53 void setItems(const KFileItemList& items);
55 /**
56 * Sets the URLs which the actions apply to.
57 * Either call this or setItems.
59 void setUrls(const KUrl::List& urls);
61 /**
62 * If setReadOnly(true) is called, the "Move To" submenu will not appear.
64 void setReadOnly(bool ro);
66 /**
67 * Generate the actions and submenus, and adds them to the @p menu.
68 * All actions are created as children of the menu.
70 void addActionsTo(QMenu* menu);
72 private:
73 KonqCopyToMenuPrivate* const d;
76 #endif /* KONQ_COPYTOMENU_H */