2
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
3
* Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef KIS_CMB_PAINTOP_H_
21
#define KIS_CMB_PAINTOP_H_
23
#include <krita_export.h>
24
#include "kcombobox.h"
25
#include "kis_paintop_factory.h"
27
class KisPaintOpsModel;
28
class KCategorizedSortFilterProxyModel;
31
* A combobox filled with the paintops
34
class KRITAUI_EXPORT KisCmbPaintop : public KComboBox
41
KisCmbPaintop(QWidget * parent = 0, const char * name = 0);
42
virtual ~KisCmbPaintop();
44
const QString& currentItem() const;
46
void setPaintOpList(const QList<KisPaintOpFactory*>& list);
47
void setCurrent(const KisPaintOpFactory* op);
48
void setCurrent(const QString & paintOpId);
52
void activated(const QString&);
53
void highlighted(const QString&);
57
void slotOpActivated(int i);
58
void slotOpHighlighted(int i);
61
// Prevent deprectated Qt3 method from being called. Use setCurrent instead.
62
void setCurrentText(const QString & s);
63
const QString& itemAt(int idx) const;
65
KisPaintOpsModel* m_lastModel;
66
KCategorizedSortFilterProxyModel* m_sortModel;