• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 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
29class KFilePlacesModel;
30class KMenu;
31
32namespace KDEPrivate
33{
34
44class KUrlNavigatorPlacesSelector : public KUrlNavigatorButtonBase
45{
46 Q_OBJECT
47
48public:
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
74Q_SIGNALS:
79 void placeActivated(const KUrl& url);
80
81protected:
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
92private Q_SLOTS:
97 void activatePlace(QAction* action);
98
99 void updateMenu();
100 void updateTeardownAction();
101
102 void onStorageSetupDone(const QModelIndex &index, bool success);
103
104private:
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
KDEPrivate::KUrlNavigatorButtonBase
Base class for buttons of the URL navigator.
Definition: kurlnavigatorbuttonbase_p.h:40
KDEPrivate::KUrlNavigatorPlacesSelector
Allows to select a bookmark from a popup menu.
Definition: kurlnavigatorplacesselector_p.h:45
KDEPrivate::KUrlNavigatorPlacesSelector::updateSelection
void updateSelection(const KUrl &url)
Updates the selection dependent from the given URL url.
Definition: kurlnavigatorplacesselector.cpp:116
KDEPrivate::KUrlNavigatorPlacesSelector::dropEvent
virtual void dropEvent(QDropEvent *event)
Definition: kurlnavigatorplacesselector.cpp:181
KDEPrivate::KUrlNavigatorPlacesSelector::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *event)
Definition: kurlnavigatorplacesselector.cpp:163
KDEPrivate::KUrlNavigatorPlacesSelector::selectedPlaceText
QString selectedPlaceText() const
Returns the selected bookmark.
Definition: kurlnavigatorplacesselector.cpp:138
KDEPrivate::KUrlNavigatorPlacesSelector::selectedPlaceUrl
KUrl selectedPlaceUrl() const
Returns the selected bookmark.
Definition: kurlnavigatorplacesselector.cpp:132
KDEPrivate::KUrlNavigatorPlacesSelector::sizeHint
virtual QSize sizeHint() const
Definition: kurlnavigatorplacesselector.cpp:144
KDEPrivate::KUrlNavigatorPlacesSelector::placeActivated
void placeActivated(const KUrl &url)
Is send when a bookmark has been activated by the user.
KDEPrivate::KUrlNavigatorPlacesSelector::paintEvent
virtual void paintEvent(QPaintEvent *event)
Draws the icon of the selected Url as content of the Url selector.
Definition: kurlnavigatorplacesselector.cpp:150
KDEPrivate::KUrlNavigatorPlacesSelector::~KUrlNavigatorPlacesSelector
virtual ~KUrlNavigatorPlacesSelector()
Definition: kurlnavigatorplacesselector.cpp:65
KDEPrivate::KUrlNavigatorPlacesSelector::dragLeaveEvent
virtual void dragLeaveEvent(QDragLeaveEvent *event)
Definition: kurlnavigatorplacesselector.cpp:173
KFilePlacesModel
This class is a list view model.
Definition: kfileplacesmodel.h:41
KMenu
KUrl
QAction
QWidget
kurl.h
kurlnavigatorbuttonbase_p.h
KDEPrivate
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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