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

KIO

kurlcombobox.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2, as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef KURLCOMBOBOX_H
00020 #define KURLCOMBOBOX_H
00021 
00022 #include <kio/kio_export.h>
00023 
00024 #include <QtCore/QList>
00025 #include <QtCore/QMap>
00026 #include <QtCore/QStringList>
00027 #include <QtGui/QIcon>
00028 
00029 #include <kcombobox.h>
00030 #include <kurl.h>
00031 
00042 class KIO_EXPORT KUrlComboBox : public KComboBox
00043 {
00044     Q_OBJECT
00045     Q_PROPERTY(QStringList urls READ urls WRITE setUrls DESIGNABLE true)
00046     Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true)
00047 
00048 public:
00052     enum Mode { Files = -1, Directories = 1, Both = 0 };
00060     enum OverLoadResolving { RemoveTop, RemoveBottom };
00061 
00076     explicit KUrlComboBox(Mode mode, QWidget *parent = 0);
00077     KUrlComboBox( Mode mode, bool rw, QWidget *parent=0);
00081     ~KUrlComboBox();
00082 
00095     void setUrl( const KUrl& url );
00096 
00104     void setUrls( const QStringList &urls );
00105 
00113     void setUrls( const QStringList &urls, OverLoadResolving remove );
00114 
00125     QStringList urls() const;
00126 
00131     void setMaxItems( int );
00132 
00137     int maxItems() const;
00138 
00147     void addDefaultUrl( const KUrl& url, const QString& text = QString() );
00148 
00157     void addDefaultUrl( const KUrl& url, const QIcon& icon,
00158             const QString& text = QString() );
00159 
00165     void setDefaults();
00166 
00171     void removeUrl( const KUrl& url, bool checkDefaultURLs = true );
00172 
00173 Q_SIGNALS:
00179     void urlActivated( const KUrl& url );
00180 
00181 protected:
00182     virtual void mousePressEvent(QMouseEvent *event);
00183     virtual void mouseMoveEvent(QMouseEvent *event);
00184 
00185 private:
00186     class KUrlComboBoxPrivate;
00187     KUrlComboBoxPrivate* const d;
00188 
00189     Q_DISABLE_COPY(KUrlComboBox)
00190 
00191     Q_PRIVATE_SLOT( d, void _k_slotActivated( int ) )
00192 };
00193 
00194 
00195 #endif // KURLCOMBOBOX_H

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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