chalk

kis_multi_bool_filter_widget.h
1/*
2 * Copyright (c) 2005 Michael Thaler <michael.thaler@physik.tu-muenchen.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef _KIS_MULTI_BOOL_FILTER_WIDGET_H_
20#define _KIS_MULTI_BOOL_FILTER_WIDGET_H_
21
22#include <vector>
23
24#include <tqcheckbox.h>
25
26#include "koffice_export.h"
27#include <kis_filter_config_widget.h>
28
29class KIntNumInput;
30
31struct KisBoolWidgetParam {
32 KRITA_EXPORT KisBoolWidgetParam( bool ninitvalue, TQString label, TQString name);
33 bool initvalue;
34 TQString label;
35 TQString name;
36
37};
38
39typedef std::vector<KisBoolWidgetParam> vKisBoolWidgetParam;
40
41class KRITA_EXPORT KisMultiBoolFilterWidget : public KisFilterConfigWidget
42{
43 TQ_OBJECT
44
45public:
46 KisMultiBoolFilterWidget(TQWidget * parent, const char * name, const char *caption, vKisBoolWidgetParam iwparam);
47 virtual void setConfiguration(KisFilterConfiguration * cfg);
48public:
49 inline TQ_INT32 nbValues() { return m_nbboolWidgets; };
50 inline TQ_INT32 valueAt( TQ_INT32 i ) { return m_boolWidgets[i]->isChecked(); };
51private:
52 TQCheckBox** m_boolWidgets;
53 TQ_INT32 m_nbboolWidgets;
54};
55
56#endif
A KisFilterConfiguration is the serializable representation of the filter parameters.