• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.11.5 API Reference
  • KDE Home
  • Contact Us
 

KFile

  • kfile
kurlnavigatorplacesselector_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Peter Penz (peter.penz@gmx.at) *
3  * Copyright (C) 2007 by Kevin Ottens (ervin@kde.org) *
4  * *
5  * This library is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2 of the License, or (at your option) any later version. *
9  * *
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  * Lesser General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Lesser General Public *
16  * License along with this library; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19  ***************************************************************************/
20 
21 #ifndef KURLNAVIGATORPLACESSELECTOR_P_H
22 #define KURLNAVIGATORPLACESSELECTOR_P_H
23 
24 #include "kurlnavigatorbuttonbase_p.h"
25 #include <kurl.h>
26 
27 #include <QtCore/QPersistentModelIndex>
28 
29 class KFilePlacesModel;
30 class KMenu;
31 
32 namespace KDEPrivate
33 {
34 
44 class KUrlNavigatorPlacesSelector : public KUrlNavigatorButtonBase
45 {
46  Q_OBJECT
47 
48 public:
53  KUrlNavigatorPlacesSelector(QWidget* parent, KFilePlacesModel* placesModel);
54 
55  virtual ~KUrlNavigatorPlacesSelector();
56 
64  void updateSelection(const KUrl& url);
65 
67  KUrl selectedPlaceUrl() const;
69  QString selectedPlaceText() const;
70 
72  virtual QSize sizeHint() const;
73 
74 Q_SIGNALS:
79  void placeActivated(const KUrl& url);
80 
81 protected:
86  virtual void paintEvent(QPaintEvent* event);
87 
88  virtual void dragEnterEvent(QDragEnterEvent* event);
89  virtual void dragLeaveEvent(QDragLeaveEvent* event);
90  virtual void dropEvent(QDropEvent* event);
91 
92 private Q_SLOTS:
97  void activatePlace(QAction* action);
98 
99  void updateMenu();
100  void updateTeardownAction();
101 
102  void onStorageSetupDone(const QModelIndex &index, bool success);
103 
104 private:
105  int m_selectedItem;
106  QPersistentModelIndex m_lastClickedIndex;
107  KMenu* m_placesMenu;
108  KFilePlacesModel* m_placesModel;
109  KUrl m_selectedUrl;
110 };
111 
112 } // namespace KDEPrivate
113 
114 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Thu Sep 25 2014 04:22:37 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

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

kdelibs-4.11.5 API Reference

Skip menu "kdelibs-4.11.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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