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

KFile

  • 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Apr 16 2013 21:15:46 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.10.2 API Reference

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