• Skip to content
  • Skip to link menu
KDE 4.7 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 
00032 namespace KDEPrivate
00033 {
00034 
00044 class KUrlNavigatorPlacesSelector : public KUrlNavigatorButtonBase
00045 {
00046     Q_OBJECT
00047 
00048 public:
00053     KUrlNavigatorPlacesSelector(QWidget* parent, KFilePlacesModel* placesModel);
00054 
00055     virtual ~KUrlNavigatorPlacesSelector();
00056 
00064     void updateSelection(const KUrl& url);
00065 
00067     KUrl selectedPlaceUrl() const;
00069     QString selectedPlaceText() const;
00070 
00072     virtual QSize sizeHint() const;
00073 
00074 Q_SIGNALS:
00079     void placeActivated(const KUrl& url);
00080 
00081 protected:
00086     virtual void paintEvent(QPaintEvent* event);
00087 
00088     virtual void dragEnterEvent(QDragEnterEvent* event);
00089     virtual void dragLeaveEvent(QDragLeaveEvent* event);
00090     virtual void dropEvent(QDropEvent* event);
00091 
00092 private Q_SLOTS:
00097     void activatePlace(QAction* action);
00098 
00099     void updateMenu();
00100     void updateTeardownAction();
00101 
00102     void onStorageSetupDone(const QModelIndex &index, bool success);
00103 
00104 private:
00105     int m_selectedItem;
00106     QPersistentModelIndex m_lastClickedIndex;
00107     KMenu* m_placesMenu;
00108     KFilePlacesModel* m_placesModel;
00109     KUrl m_selectedUrl;
00110 };
00111 
00112 } // namespace KDEPrivate
00113 
00114 #endif

KFile

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

kdelibs

Skip menu "kdelibs"
  • 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
Generated for kdelibs by doxygen 1.7.5
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