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

KFile

kurlnavigatorplacesselector_p.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Peter Penz (peter.penz@gmx.at)                  *
00003  *   Copyright (C) 2007 by Kevin Ottens (ervin@kde.org)                    *
00004  *                                                                         *
00005  *   This library is free software; you can redistribute it and/or         *
00006  *   modify it under the terms of the GNU Lesser General Public            *
00007  *   License as published by the Free Software Foundation; either          *
00008  *   version 2 of the License, or (at your option) any later version.      *
00009  *                                                                         *
00010  *   This library is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00013  *   Lesser General Public License for more details.                       *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU Lesser General Public      *
00016  *   License along with this library; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
00019  ***************************************************************************/
00020 
00021 #ifndef KURLNAVIGATORPLACESSELECTOR_P_H
00022 #define KURLNAVIGATORPLACESSELECTOR_P_H
00023 
00024 #include "kurlnavigatorbuttonbase_p.h"
00025 #include <kurl.h>
00026 
00027 #include <QtCore/QPersistentModelIndex>
00028 
00029 class KFilePlacesModel;
00030 class KMenu;
00031 
00040 class KUrlNavigatorPlacesSelector : public KUrlNavigatorButtonBase
00041 {
00042     Q_OBJECT
00043 
00044 public:
00049     KUrlNavigatorPlacesSelector(QWidget* parent, KFilePlacesModel* placesModel);
00050 
00051     virtual ~KUrlNavigatorPlacesSelector();
00052 
00060     void updateSelection(const KUrl& url);
00061 
00063     KUrl selectedPlaceUrl() const;
00065     QString selectedPlaceText() const;
00066 
00068     virtual QSize sizeHint() const;
00069 
00070 Q_SIGNALS:
00075     void placeActivated(const KUrl& url);
00076 
00077 protected:
00082     virtual void paintEvent(QPaintEvent* event);
00083 
00084     virtual void dragEnterEvent(QDragEnterEvent* event);
00085     virtual void dragLeaveEvent(QDragLeaveEvent* event);
00086     virtual void dropEvent(QDropEvent* event);
00087 
00088 private Q_SLOTS:
00093     void activatePlace(QAction* action);
00094 
00095     void updateMenu();
00096     void updateTeardownAction();
00097 
00098     void onStorageSetupDone(const QModelIndex &index, bool success);
00099 
00100 private:
00101     int m_selectedItem;
00102     QPersistentModelIndex m_lastClickedIndex;
00103     KMenu* m_placesMenu;
00104     KFilePlacesModel* m_placesModel;
00105     KUrl m_selectedUrl;
00106 };
00107 
00108 #endif

KFile

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal