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

KIO

  • kio
  • kfile
kicondialog.h
Go to the documentation of this file.
1/* vi: ts=8 sts=4 sw=4
2 *
3 * This file is part of the KDE project, module kfile.
4 * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
5 * (C) 2000 Kurt Granroth <granroth@kde.org>
6 * (C) 1997 Christoph Neerfeld <chris@kde.org>
7 * (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
8 *
9 * This is free software; it comes under the GNU Library General
10 * Public License, version 2. See the file "COPYING.LIB" for the
11 * exact licensing terms.
12 */
13
14#ifndef KICONDIALOG_H
15#define KICONDIALOG_H
16
17#include <kio/kio_export.h>
18
19#include <QtCore/QStringList>
20#include <QtGui/QPushButton>
21
22#include <kdialog.h>
23#include <klistwidget.h>
24
25class KIconLoader;
26
30class KIO_EXPORT KIconCanvas: public KListWidget
31{
32 Q_OBJECT
33
34public:
40 explicit KIconCanvas(QWidget *parent=0L);
41
45 ~KIconCanvas();
46
50 void loadFiles(const QStringList& files);
51
55 QString getCurrent() const;
56
57public Q_SLOTS:
61 void stopLoading();
62
63Q_SIGNALS:
67 void nameChanged(const QString&);
68
75 void startLoading(int count);
76
82 void progress(int number);
83
88 void finished();
89
90private:
91 class KIconCanvasPrivate;
92 KIconCanvasPrivate* const d;
93
94 Q_DISABLE_COPY(KIconCanvas)
95
96 Q_PRIVATE_SLOT(d, void _k_slotLoadFiles())
97 Q_PRIVATE_SLOT(d, void _k_slotCurrentChanged(QListWidgetItem *item))
98};
99
100
107class KIO_EXPORT KIconDialog: public KDialog
108{
109 Q_OBJECT
110
111public:
117 explicit KIconDialog(QWidget *parent=0L);
118
125 explicit KIconDialog(KIconLoader *loader, QWidget *parent=0);
126
130 ~KIconDialog();
131
138 void setStrictIconSize(bool b);
142 bool strictIconSize() const;
146 void setCustomLocation( const QString& location );
147
153 void setIconSize(int size);
154
159 int iconSize() const;
160
168 void setup( KIconLoader::Group group,
169 KIconLoader::Context context = KIconLoader::Application,
170 bool strictIconSize = false, int iconSize = 0,
171 bool user = false, bool lockUser = false,
172 bool lockCustomDir = false );
173
180 QString openDialog();
181
186 void showDialog();
187
206 static QString getIcon(KIconLoader::Group group=KIconLoader::Desktop,
207 KIconLoader::Context context=KIconLoader::Application,
208 bool strictIconSize=false, int iconSize = 0,
209 bool user=false, QWidget *parent=0,
210 const QString &caption=QString());
211
212Q_SIGNALS:
213 void newIconName(const QString&);
214
215protected Q_SLOTS:
216 void slotOk();
217
218private:
219 class KIconDialogPrivate;
220 KIconDialogPrivate* const d;
221
222 Q_DISABLE_COPY(KIconDialog)
223
224 Q_PRIVATE_SLOT(d, void _k_slotContext(int))
225 Q_PRIVATE_SLOT(d, void _k_slotStartLoading(int))
226 Q_PRIVATE_SLOT(d, void _k_slotProgress(int))
227 Q_PRIVATE_SLOT(d, void _k_slotFinished())
228 Q_PRIVATE_SLOT(d, void _k_slotAcceptIcons())
229 Q_PRIVATE_SLOT(d, void _k_slotBrowse())
230 Q_PRIVATE_SLOT(d, void _k_slotOtherIconClicked())
231 Q_PRIVATE_SLOT(d, void _k_slotSystemIconClicked())
232};
233
234
243class KIO_EXPORT KIconButton: public QPushButton
244{
245 Q_OBJECT
246 Q_PROPERTY( QString icon READ icon WRITE setIcon RESET resetIcon )
247 Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize)
248 Q_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
249
250public:
256 explicit KIconButton(QWidget *parent=0L);
257
264 KIconButton(KIconLoader *loader, QWidget *parent);
268 ~KIconButton();
269
275 void setStrictIconSize(bool b);
279 bool strictIconSize() const;
280
285 void setIconType(KIconLoader::Group group, KIconLoader::Context context, bool user=false);
286
290 void setIcon(const QString& icon);
291
292 void setIcon(const QIcon& icon);
293
297 void resetIcon();
298
302 const QString &icon() const;
303
309 void setIconSize( int size );
310
315 int iconSize() const;
316
323 void setButtonIconSize( int size );
324
329 int buttonIconSize() const;
330
331
332Q_SIGNALS:
336 void iconChanged(const QString &icon);
337
338private:
339 class KIconButtonPrivate;
340 KIconButtonPrivate* const d;
341
342 Q_DISABLE_COPY(KIconButton)
343
344 Q_PRIVATE_SLOT(d, void _k_slotChangeIcon())
345 Q_PRIVATE_SLOT(d, void _k_newIconName(const QString&))
346};
347
348
349#endif // KICONDIALOG_H
KDialog
KIconButton
A pushbutton for choosing an icon.
Definition: kicondialog.h:244
KIconButton::iconChanged
void iconChanged(const QString &icon)
Emitted when the icon has changed.
KIconCanvas
Icon canvas for KIconDialog.
Definition: kicondialog.h:31
KIconCanvas::nameChanged
void nameChanged(const QString &)
Emitted when the current icon has changed.
KIconCanvas::finished
void finished()
This signal is emitted when the loading of the icons has been finished.
KIconCanvas::startLoading
void startLoading(int count)
This signal is emitted when the loading of the icons has started.
KIconCanvas::progress
void progress(int number)
This signal is emitted whenever an icon has been loaded.
KIconDialog
Dialog for interactive selection of icons.
Definition: kicondialog.h:108
KIconDialog::newIconName
void newIconName(const QString &)
KIconLoader
KIconLoader::Group
Group
KIconLoader::Desktop
Desktop
KIconLoader::Context
Context
KIconLoader::Application
Application
KListWidget
QPushButton
QWidget
kdialog.h
kio_export.h
klistwidget.h
caption
QString caption()
group
group
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