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

KIO

  • kio
  • kfile
kurlcombobox.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2, as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KURLCOMBOBOX_H
20#define KURLCOMBOBOX_H
21
22#include <kio/kio_export.h>
23
24#include <QtCore/QList>
25#include <QtCore/QMap>
26#include <QtCore/QStringList>
27#include <QtGui/QIcon>
28
29#include <kcombobox.h>
30#include <kurl.h>
31
47class KIO_EXPORT KUrlComboBox : public KComboBox
48{
49 Q_OBJECT
50 Q_PROPERTY(QStringList urls READ urls WRITE setUrls DESIGNABLE true)
51 Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true)
52
53public:
57 enum Mode { Files = -1, Directories = 1, Both = 0 };
65 enum OverLoadResolving { RemoveTop, RemoveBottom };
66
81 explicit KUrlComboBox(Mode mode, QWidget *parent = 0);
82 KUrlComboBox( Mode mode, bool rw, QWidget *parent=0);
86 ~KUrlComboBox();
87
100 void setUrl( const KUrl& url );
101
109 void setUrls( const QStringList &urls );
110
118 void setUrls( const QStringList &urls, OverLoadResolving remove );
119
130 QStringList urls() const;
131
136 void setMaxItems( int );
137
142 int maxItems() const;
143
152 void addDefaultUrl( const KUrl& url, const QString& text = QString() );
153
162 void addDefaultUrl( const KUrl& url, const QIcon& icon,
163 const QString& text = QString() );
164
170 void setDefaults();
171
176 void removeUrl( const KUrl& url, bool checkDefaultURLs = true );
177
182 virtual void setCompletionObject(KCompletion* compObj, bool hsig = true);
183
184Q_SIGNALS:
190 void urlActivated( const KUrl& url );
191
192protected:
193 virtual void mousePressEvent(QMouseEvent *event);
194 virtual void mouseMoveEvent(QMouseEvent *event);
195
196private:
197 class KUrlComboBoxPrivate;
198 KUrlComboBoxPrivate* const d;
199
200 Q_DISABLE_COPY(KUrlComboBox)
201
202 Q_PRIVATE_SLOT( d, void _k_slotActivated( int ) )
203};
204
205
206#endif // KURLCOMBOBOX_H
KComboBox
KCompletion
KUrlComboBox
This combobox shows a number of recent URLs/directories, as well as some default directories.
Definition: kurlcombobox.h:48
KUrlComboBox::OverLoadResolving
OverLoadResolving
This Enumeration is used in setUrl() to determine which items will be removed when the given list is ...
Definition: kurlcombobox.h:65
KUrlComboBox::Mode
Mode
This enum describes which kind of items is shown in the combo box.
Definition: kurlcombobox.h:57
KUrlComboBox::urlActivated
void urlActivated(const KUrl &url)
Emitted when an item was clicked at.
KUrl
QWidget
kcombobox.h
kio_export.h
kurl.h
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.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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