1 /* This file is part of the KDE project
3 Copyright 2008 David Faure <faure@kde.org>
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Library General Public License as published
7 by the Free Software Foundation; either version 2 of the License or
8 ( at your option ) version 3 or, at the discretion of KDE e.V.
9 ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #include <kconfiggroup.h>
24 #include <QActionGroup>
28 class KonqCopyToMenuPrivate
: public QObject
32 KonqCopyToMenuPrivate();
39 enum MenuType
{ Copy
, Move
};
41 // The main menu, shown when opening "Copy To" or "Move To"
42 // It contains Home Folder, Root Folder, Browse, and recent destinations
43 class KonqCopyToMainMenu
: public KMenu
47 KonqCopyToMainMenu(QMenu
* parent
, KonqCopyToMenuPrivate
* d
, MenuType menuType
);
49 QActionGroup
& actionGroup() { return m_actionGroup
; } // used by submenus
50 MenuType
menuType() const { return m_menuType
; } // used by submenus
53 void slotAboutToShow();
55 void slotTriggered(QAction
* action
);
58 void copyOrMoveTo(const KUrl
& dest
);
62 QActionGroup m_actionGroup
;
63 KonqCopyToMenuPrivate
* d
; // this isn't our own d pointer, it's the one for the public class
64 KConfigGroup m_recentDirsGroup
;
67 // The menu that lists a directory
68 class KonqCopyToDirectoryMenu
: public KMenu
72 KonqCopyToDirectoryMenu(QMenu
* parent
, KonqCopyToMainMenu
* mainMenu
, const QString
& path
);
75 void slotAboutToShow();
78 KonqCopyToMainMenu
* m_mainMenu
;