Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_cmb_idlist.h
Go to the documentation of this file.
1/*
2 * kis_cmb_imagetype.h - part of KImageShop/Krayon/Krita
3 *
4 * SPDX-FileCopyrightText: 2005 Boudewijn Rempt (boud@valdyas.org)
5 * SPDX-FileCopyrightText: 2011 Silvio Heinrich <plassy@web.de>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef KIS_CMB_IDLIST_H_
11#define KIS_CMB_IDLIST_H_
12
13#include <QComboBox>
14#include <QString>
15#include <KoID.h>
16#include <kritaui_export.h>
17
23class KRITAUI_EXPORT KisCmbIDList: public QComboBox
24{
25 Q_OBJECT
26
27public:
28 KisCmbIDList(QWidget * parent = 0, const char * name = 0);
29 ~KisCmbIDList() override;
30
31 static const KoID AutoOptionID;
32
40 void setIDList(const QList<KoID> & list, bool sorted = true);
41
47 void allowAuto(bool setAuto = true);
48
49 void setAutoHint(const QString & hint);
50
51 void setCurrent(const KoID id);
52 void setCurrent(const QString & id);
53
54 KoID currentItem() const;
55
56Q_SIGNALS:
57 void activated(const KoID &);
58 void highlighted(const KoID &);
59
60private Q_SLOTS:
61 void slotIDActivated(int index);
62 void slotIDHighlighted(int index);
63
64private:
65 void buildItems();
66
68 bool m_sorted = true;
69 bool m_autoOption = false;
70 QString m_autoHint;
71};
72#endif
QString m_autoHint
void activated(const KoID &)
static const KoID AutoOptionID
QList< KoID > m_idList
void highlighted(const KoID &)
Definition KoID.h:30