• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

libkonq

  • sources
  • kde-4.12
  • applications
  • kde-baseapps
  • lib
  • konq
konq_copytomenu_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright 2008 David Faure <faure@kde.org>
4 
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.
10 
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.
15 
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.
20 */
21 
22 #include <kconfiggroup.h>
23 #include <kmenu.h>
24 #include <QActionGroup>
25 #include <QObject>
26 #include <kurl.h>
27 
28 class KonqCopyToMenuPrivate
29 {
30 public:
31  KonqCopyToMenuPrivate(QWidget* parentWidget = 0);
32 
33  KUrl::List m_urls;
34  bool m_readOnly;
35  QWidget* m_parentWidget;
36 };
37 
38 enum MenuType { Copy, Move };
39 
40 // The main menu, shown when opening "Copy To" or "Move To"
41 // It contains Home Folder, Root Folder, Browse, and recent destinations
42 class KonqCopyToMainMenu : public KMenu
43 {
44  Q_OBJECT
45 public:
46  KonqCopyToMainMenu(QMenu* parent, KonqCopyToMenuPrivate* d, MenuType menuType);
47 
48  QActionGroup& actionGroup() { return m_actionGroup; } // used by submenus
49  MenuType menuType() const { return m_menuType; } // used by submenus
50 
51 private Q_SLOTS:
52  void slotAboutToShow();
53  void slotBrowse();
54  void slotTriggered(QAction* action);
55 
56 private:
57  void copyOrMoveTo(const KUrl& dest);
58 
59 private:
60  MenuType m_menuType;
61  QActionGroup m_actionGroup;
62  KonqCopyToMenuPrivate* d; // this isn't our own d pointer, it's the one for the public class
63  KConfigGroup m_recentDirsGroup;
64 };
65 
66 // The menu that lists a directory
67 class KonqCopyToDirectoryMenu : public KMenu
68 {
69  Q_OBJECT
70 public:
71  KonqCopyToDirectoryMenu(QMenu* parent, KonqCopyToMainMenu* mainMenu, const QString& path);
72 
73 private Q_SLOTS:
74  void slotAboutToShow();
75 
76 private:
77  KonqCopyToMainMenu* m_mainMenu;
78  QString m_path;
79 };
KonqCopyToMainMenu::actionGroup
QActionGroup & actionGroup()
Definition: konq_copytomenu_p.h:48
KonqCopyToMainMenu::KonqCopyToMainMenu
KonqCopyToMainMenu(QMenu *parent, KonqCopyToMenuPrivate *d, MenuType menuType)
Definition: konq_copytomenu.cpp:96
KonqCopyToMainMenu
Definition: konq_copytomenu_p.h:42
KMenu
QWidget
KonqCopyToMenuPrivate::m_readOnly
bool m_readOnly
Definition: konq_copytomenu_p.h:34
KonqCopyToMenuPrivate
Definition: konq_copytomenu_p.h:28
KonqCopyToMenuPrivate::m_urls
KUrl::List m_urls
Definition: konq_copytomenu_p.h:33
KonqCopyToMenuPrivate::KonqCopyToMenuPrivate
KonqCopyToMenuPrivate(QWidget *parentWidget=0)
Definition: konq_copytomenu.cpp:38
Copy
Definition: konq_copytomenu_p.h:38
KonqCopyToMenuPrivate::m_parentWidget
QWidget * m_parentWidget
Definition: konq_copytomenu_p.h:35
KonqCopyToMainMenu::menuType
MenuType menuType() const
Definition: konq_copytomenu_p.h:49
KonqCopyToDirectoryMenu::KonqCopyToDirectoryMenu
KonqCopyToDirectoryMenu(QMenu *parent, KonqCopyToMainMenu *mainMenu, const QString &path)
Definition: konq_copytomenu.cpp:216
QMenu
MenuType
MenuType
Definition: konq_copytomenu_p.h:38
Move
Definition: konq_copytomenu_p.h:38
KonqCopyToDirectoryMenu
Definition: konq_copytomenu_p.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkonq

Skip menu "libkonq"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal