krita

kis_multi_bool_filter_widget.h

00001 /*
00002  *  Copyright (c) 2005 Michael Thaler <michael.thaler@physik.tu-muenchen.de>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef _KIS_MULTI_BOOL_FILTER_WIDGET_H_
00020 #define _KIS_MULTI_BOOL_FILTER_WIDGET_H_
00021 
00022 #include <vector>
00023 
00024 #include <qcheckbox.h>
00025 
00026 #include "koffice_export.h"
00027 #include <kis_filter_config_widget.h>
00028 
00029 class KIntNumInput;
00030 
00031 struct KisBoolWidgetParam {
00032     KRITA_EXPORT KisBoolWidgetParam(  bool ninitvalue, QString label, QString name);
00033     bool initvalue;
00034     QString label;
00035     QString name;
00036     
00037 };
00038 
00039 typedef std::vector<KisBoolWidgetParam> vKisBoolWidgetParam;
00040 
00041 class KRITA_EXPORT KisMultiBoolFilterWidget : public KisFilterConfigWidget
00042 {
00043     Q_OBJECT
00044 public:
00045     KisMultiBoolFilterWidget(QWidget * parent,  const char * name, const char *caption, vKisBoolWidgetParam iwparam);
00046     virtual void setConfiguration(KisFilterConfiguration * cfg);
00047 public:
00048     inline Q_INT32 nbValues() { return m_nbboolWidgets; };
00049     inline Q_INT32 valueAt( Q_INT32 i ) { return m_boolWidgets[i]->isChecked(); };
00050 private:
00051     QCheckBox** m_boolWidgets;
00052     Q_INT32 m_nbboolWidgets;
00053 };
00054 
00055 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys