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

KFile

kurlnavigatorprotocolcombo_p.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Aaron J. Seigo (<aseigo@kde.org>)               *
00003  *   Copyright (C) 2009 by Peter Penz (<peter.penz@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 KURLNAVIGATORPROTOCOLCOMBO_P_H
00022 #define KURLNAVIGATORPROTOCOLCOMBO_P_H
00023 
00024 #include "kurlnavigatorbuttonbase_p.h"
00025 
00026 #include <QtCore/QHash>
00027 
00028 class QMenu;
00029 
00038 class KUrlNavigatorProtocolCombo : public KUrlNavigatorButtonBase
00039 {
00040     Q_OBJECT
00041 
00042 public:
00043     explicit KUrlNavigatorProtocolCombo(const QString& protocol, QWidget* parent = 0);
00044 
00045     QString currentProtocol() const;
00046 
00047     void setCustomProtocols(const QStringList &protocols);
00048 
00049     virtual QSize sizeHint() const;
00050 
00051 public Q_SLOTS:
00052     void setProtocol(const QString& protocol);
00053 
00054 Q_SIGNALS:
00055     void activated(const QString& protocol);
00056 
00057 protected:
00058     virtual void showEvent(QShowEvent* event);
00059     virtual void paintEvent(QPaintEvent* event);
00060 
00061 private Q_SLOTS:
00062     void setProtocol(QAction* action);
00063 
00064 private:
00065     void updateMenu();
00066     void initializeCategories();
00067 
00068     enum ProtocolCategory
00069     {
00070         CoreCategory,
00071         PlacesCategory,
00072         DevicesCategory,
00073         SubversionCategory,
00074         OtherCategory,
00075         CategoryCount // mandatory last entry
00076     };
00077 
00078     QMenu* m_menu;
00079     QStringList m_protocols;
00080     QHash<QString, ProtocolCategory> m_categories;
00081 };
00082 
00083 #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