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

KFile

  • sources
  • kde-4.14
  • kdelibs
  • kfile
kurlnavigatorprotocolcombo_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Aaron J. Seigo (<aseigo@kde.org>) *
3  * Copyright (C) 2009 by Peter Penz (<peter.penz@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 KURLNAVIGATORPROTOCOLCOMBO_P_H
22 #define KURLNAVIGATORPROTOCOLCOMBO_P_H
23 
24 #include "kurlnavigatorbuttonbase_p.h"
25 
26 #include <QtCore/QHash>
27 
28 class QMenu;
29 
30 namespace KDEPrivate
31 {
32 
41 class KUrlNavigatorProtocolCombo : public KUrlNavigatorButtonBase
42 {
43  Q_OBJECT
44 
45 public:
46  explicit KUrlNavigatorProtocolCombo(const QString& protocol, QWidget* parent = 0);
47 
48  QString currentProtocol() const;
49 
50  void setCustomProtocols(const QStringList &protocols);
51 
52  virtual QSize sizeHint() const;
53 
54 public Q_SLOTS:
55  void setProtocol(const QString& protocol);
56 
57 Q_SIGNALS:
58  void activated(const QString& protocol);
59 
60 protected:
61  virtual void showEvent(QShowEvent* event);
62  virtual void paintEvent(QPaintEvent* event);
63 
64 private Q_SLOTS:
65  void setProtocol(QAction* action);
66 
67 private:
68  void updateMenu();
69  void initializeCategories();
70 
71  enum ProtocolCategory
72  {
73  CoreCategory,
74  PlacesCategory,
75  DevicesCategory,
76  SubversionCategory,
77  OtherCategory,
78  CategoryCount // mandatory last entry
79  };
80 
81  QMenu* m_menu;
82  QStringList m_protocols;
83  QHash<QString, ProtocolCategory> m_categories;
84 };
85 
86 } // namespace KDEPrivate
87 
88 #endif
QWidget
KDEPrivate::KUrlNavigatorProtocolCombo::setCustomProtocols
void setCustomProtocols(const QStringList &protocols)
Definition: kurlnavigatorprotocolcombo.cpp:54
KDEPrivate::KUrlNavigatorButtonBase
Base class for buttons of the URL navigator.
Definition: kurlnavigatorbuttonbase_p.h:39
KDEPrivate::KUrlNavigatorProtocolCombo::activated
void activated(const QString &protocol)
KDEPrivate::KUrlNavigatorProtocolCombo::paintEvent
virtual void paintEvent(QPaintEvent *event)
Definition: kurlnavigatorprotocolcombo.cpp:107
KDEPrivate::KUrlNavigatorProtocolCombo::sizeHint
virtual QSize sizeHint() const
Definition: kurlnavigatorprotocolcombo.cpp:65
QHash< QString, ProtocolCategory >
kurlnavigatorbuttonbase_p.h
QShowEvent
KDEPrivate::KUrlNavigatorProtocolCombo::KUrlNavigatorProtocolCombo
KUrlNavigatorProtocolCombo(const QString &protocol, QWidget *parent=0)
Definition: kurlnavigatorprotocolcombo.cpp:42
KDEPrivate::KUrlNavigatorProtocolCombo::setProtocol
void setProtocol(const QString &protocol)
Definition: kurlnavigatorprotocolcombo.cpp:76
KDEPrivate::KUrlNavigatorProtocolCombo::showEvent
virtual void showEvent(QShowEvent *event)
Definition: kurlnavigatorprotocolcombo.cpp:86
KDEPrivate::KUrlNavigatorProtocolCombo::currentProtocol
QString currentProtocol() const
Definition: kurlnavigatorprotocolcombo.cpp:81
QString
QStringList
QMenu
QSize
KDEPrivate::KUrlNavigatorProtocolCombo
A combobox listing available protocols.
Definition: kurlnavigatorprotocolcombo_p.h:41
QAction
QPushButton::event
virtual bool event(QEvent *e)
QPaintEvent
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:27 by doxygen 1.8.7 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 API Reference

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

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