KIconThemes

kicondialog.h
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 <[email protected]>
5  * (C) 2000 Kurt Granroth <[email protected]>
6  * (C) 1997 Christoph Neerfeld <[email protected]>
7  * (C) 2002 Carsten Pfeiffer <[email protected]>
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 "kiconthemes_export.h"
18 
19 #include <QDialog>
20 #include <QPushButton>
21 
22 #include <kiconloader.h>
23 
32 class KICONTHEMES_EXPORT KIconDialog: public QDialog
33 {
34  Q_OBJECT
35 
36 public:
42  explicit KIconDialog(QWidget *parent = nullptr);
43 
50  explicit KIconDialog(KIconLoader *loader, QWidget *parent = nullptr);
51 
55  ~KIconDialog();
56 
65  void setStrictIconSize(bool policy);
69  bool strictIconSize() const;
70 
75  void setCustomLocation(const QString &location);
76 
82  void setIconSize(int size);
87  int iconSize() const;
88 
95  void setup(KIconLoader::Group group,
97  bool strictIconSize = false, int iconSize = 0,
98  bool user = false, bool lockUser = false,
99  bool lockCustomDir = false);
100 
107  QString openDialog();
108 
113  void showDialog();
114 
133  static QString getIcon(KIconLoader::Group group = KIconLoader::Desktop,
135  bool strictIconSize = false, int iconSize = 0,
136  bool user = false, QWidget *parent = nullptr,
137  const QString &caption = QString());
138 
139 Q_SIGNALS:
140  void newIconName(const QString &iconName);
141 
142 protected Q_SLOTS:
143  void slotOk();
144 
145 private:
146  class KIconDialogPrivate;
147  KIconDialogPrivate *const d;
148 
149  friend class ShowEventFilter;
150 
152 
153  Q_PRIVATE_SLOT(d, void _k_slotContext(int))
154  Q_PRIVATE_SLOT(d, void _k_slotStartLoading(int))
155  Q_PRIVATE_SLOT(d, void _k_slotProgress(int))
156  Q_PRIVATE_SLOT(d, void _k_slotFinished())
157  Q_PRIVATE_SLOT(d, void _k_slotAcceptIcons())
158  Q_PRIVATE_SLOT(d, void _k_slotBrowse())
159  Q_PRIVATE_SLOT(d, void _k_customFileSelected(const QString &path))
160  Q_PRIVATE_SLOT(d, void _k_slotOtherIconClicked())
161  Q_PRIVATE_SLOT(d, void _k_slotSystemIconClicked())
162 };
163 
164 #endif // KICONDIALOG_H
Desktop icons.
Definition: kiconloader.h:133
Dialog for interactive selection of icons.
Definition: kicondialog.h:32
An icon that represents an application.
Definition: kiconloader.h:89
Q_DISABLE_COPY(Class)
Context
Defines the context of the icon.
Definition: kiconloader.h:86
Group
The group of the icon.
Definition: kiconloader.h:129
Iconloader for KDE.
Definition: kiconloader.h:78
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 31 2020 22:53:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.