~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to krita/ui/widgets/kis_cmb_paintop.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
 
3
 *  Copyright (c) 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef KIS_CMB_PAINTOP_H_
 
21
#define KIS_CMB_PAINTOP_H_
 
22
 
 
23
#include <krita_export.h>
 
24
#include "kcombobox.h"
 
25
#include "kis_paintop_factory.h"
 
26
 
 
27
class KisPaintOpsModel;
 
28
class KCategorizedSortFilterProxyModel;
 
29
 
 
30
/**
 
31
 * A combobox filled with the paintops
 
32
 */
 
33
 
 
34
class KRITAUI_EXPORT KisCmbPaintop : public KComboBox
 
35
{
 
36
 
 
37
    Q_OBJECT
 
38
 
 
39
public:
 
40
 
 
41
    KisCmbPaintop(QWidget * parent = 0, const char * name = 0);
 
42
    virtual ~KisCmbPaintop();
 
43
 
 
44
    const QString& currentItem() const;
 
45
 
 
46
    void setPaintOpList(const QList<KisPaintOpFactory*>& list);
 
47
    void setCurrent(const KisPaintOpFactory* op);
 
48
    void setCurrent(const QString & paintOpId);
 
49
 
 
50
signals:
 
51
 
 
52
    void activated(const QString&);
 
53
    void highlighted(const QString&);
 
54
 
 
55
private slots:
 
56
 
 
57
    void slotOpActivated(int i);
 
58
    void slotOpHighlighted(int i);
 
59
 
 
60
private:
 
61
    // Prevent deprectated Qt3 method from being called. Use setCurrent instead.
 
62
    void setCurrentText(const QString & s);
 
63
    const QString& itemAt(int idx) const;
 
64
 
 
65
    KisPaintOpsModel* m_lastModel;
 
66
    KCategorizedSortFilterProxyModel* m_sortModel;
 
67
};
 
68
 
 
69
#endif