1 | /* |
2 | SPDX-FileCopyrightText: 2008, 2015 David Faure <faure@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef KFILECOPYTOMENU_P_H |
8 | #define |
9 | |
10 | #include <KConfigGroup> |
11 | #include <QActionGroup> |
12 | #include <QMenu> |
13 | #include <QUrl> |
14 | |
15 | class |
16 | { |
17 | public: |
18 | (KFileCopyToMenu *qq, QWidget *parentWidget); |
19 | |
20 | KFileCopyToMenu *const ; |
21 | QList<QUrl> ; |
22 | QWidget *; |
23 | bool ; |
24 | bool m_autoErrorHandling; |
25 | }; |
26 | |
27 | enum { Copy, Move }; |
28 | |
29 | // The main menu, shown when opening "Copy To" or "Move To" |
30 | // It contains Home Folder, Root Folder, Browse, and recent destinations |
31 | class KFileCopyToMainMenu : public QMenu |
32 | { |
33 | Q_OBJECT |
34 | public: |
35 | KFileCopyToMainMenu(QMenu *parent, KFileCopyToMenuPrivate *d, MenuType ); |
36 | |
37 | QActionGroup &actionGroup() |
38 | { |
39 | return m_actionGroup; // used by submenus |
40 | } |
41 | MenuType menuType() const |
42 | { |
43 | return m_menuType; // used by submenus |
44 | } |
45 | |
46 | private Q_SLOTS: |
47 | void slotAboutToShow(); |
48 | void slotBrowse(); |
49 | void slotTriggered(QAction *action); |
50 | |
51 | private: |
52 | void copyOrMoveTo(const QUrl &dest); |
53 | |
54 | private: |
55 | MenuType m_menuType; |
56 | QActionGroup m_actionGroup; |
57 | KFileCopyToMenuPrivate *d; // this isn't our own d pointer, it's the one for the public class |
58 | KConfigGroup m_recentDirsGroup; |
59 | }; |
60 | |
61 | // The menu that lists a directory |
62 | class : public QMenu |
63 | { |
64 | Q_OBJECT |
65 | public: |
66 | KFileCopyToDirectoryMenu(QMenu *parent, KFileCopyToMainMenu *mainMenu, const QString &path); |
67 | |
68 | private Q_SLOTS: |
69 | void (); |
70 | |
71 | private: |
72 | KFileCopyToMainMenu *m_mainMenu; |
73 | QString ; |
74 | }; |
75 | |
76 | #endif |
77 | |