KIconThemes

kicondialog.h
1 /* vi: ts=8 sts=4 sw=4
2 
3  This file is part of the KDE project, module kfile.
4  SPDX-FileCopyrightText: 2000 Geert Jansen <[email protected]>
5  SPDX-FileCopyrightText: 2000 Kurt Granroth <[email protected]>
6  SPDX-FileCopyrightText: 1997 Christoph Neerfeld <[email protected]>
7  SPDX-FileCopyrightText: 2002 Carsten Pfeiffer <[email protected]>
8 
9  SPDX-License-Identifier: LGPL-2.0-only
10 */
11 
12 #ifndef KICONDIALOG_H
13 #define KICONDIALOG_H
14 
15 #include "kiconthemes_export.h"
16 
17 #include <QDialog>
18 #include <QPushButton>
19 
20 #include <kiconloader.h>
21 
30 class KICONTHEMES_EXPORT KIconDialog: public QDialog
31 {
32  Q_OBJECT
33 
34 public:
40  explicit KIconDialog(QWidget *parent = nullptr);
41 
48  explicit KIconDialog(KIconLoader *loader, QWidget *parent = nullptr);
49 
53  ~KIconDialog();
54 
63  void setStrictIconSize(bool policy);
67  bool strictIconSize() const;
68 
73  void setCustomLocation(const QString &location);
74 
80  void setIconSize(int size);
85  int iconSize() const;
86 
93  void setup(KIconLoader::Group group,
95  bool strictIconSize = false, int iconSize = 0,
96  bool user = false, bool lockUser = false,
97  bool lockCustomDir = false);
98 
105  QString openDialog();
106 
111  void showDialog();
112 
131  static QString getIcon(KIconLoader::Group group = KIconLoader::Desktop,
133  bool strictIconSize = false, int iconSize = 0,
134  bool user = false, QWidget *parent = nullptr,
135  const QString &caption = QString());
136 
137 Q_SIGNALS:
138  void newIconName(const QString &iconName);
139 
140 protected Q_SLOTS:
141  void slotOk();
142 
143 private:
144  class KIconDialogPrivate;
145  KIconDialogPrivate *const d;
146 
147  friend class ShowEventFilter;
148 
150 
151  Q_PRIVATE_SLOT(d, void _k_slotContext(int))
152  Q_PRIVATE_SLOT(d, void _k_slotStartLoading(int))
153  Q_PRIVATE_SLOT(d, void _k_slotProgress(int))
154  Q_PRIVATE_SLOT(d, void _k_slotFinished())
155  Q_PRIVATE_SLOT(d, void _k_slotAcceptIcons())
156  Q_PRIVATE_SLOT(d, void _k_slotBrowse())
157  Q_PRIVATE_SLOT(d, void _k_customFileSelected(const QString &path))
158  Q_PRIVATE_SLOT(d, void _k_slotOtherIconClicked())
159  Q_PRIVATE_SLOT(d, void _k_slotSystemIconClicked())
160 };
161 
162 #endif // KICONDIALOG_H
Desktop icons.
Definition: kiconloader.h:122
Dialog for interactive selection of icons.
Definition: kicondialog.h:30
An icon that represents an application.
Definition: kiconloader.h:78
Q_DISABLE_COPY(Class)
Context
Defines the context of the icon.
Definition: kiconloader.h:75
Group
The group of the icon.
Definition: kiconloader.h:118
Iconloader for KDE.
Definition: kiconloader.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 21 2021 22:43:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.