krita/plugins/paintops/libpaintop

kis_brush_selection_widget.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (c) 2008 Boudewijn Rempt <boud@valdyas.org>
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 #ifndef KIS_BRUSH_SELECTION_WIDGET_H
00019 #define KIS_BRUSH_SELECTION_WIDGET_H
00020 
00021 #include <QWidget>
00022 #include "kis_brush.h"
00023 
00024 class QTabWidget;
00025 class KisAutoBrushWidget;
00026 class KisBrushChooser;
00027 class KisTextBrushChooser;
00028 class KisCustomBrushWidget;
00029 class KisBrush;
00030 
00031 class KisView2;
00032 
00036 class PAINTOP_EXPORT KisBrushSelectionWidget : public QWidget
00037 {
00038     Q_OBJECT
00039 
00040 public:
00041     KisBrushSelectionWidget(QWidget * parent = 0);
00042 
00043     ~KisBrushSelectionWidget();
00044 
00045     KisBrushSP brush();
00046 
00047     void setAutoBrush(bool on);
00048     void setPredefinedBrushes(bool on);
00049     void setCustomBrush(bool on);
00050     void setTextBrush(bool on);
00051 
00052     void setImage(KisImageWSP image);
00053 
00054     void setCurrentBrush(KisBrushSP brush);
00055     
00056     void setAutoBrushDiameter(qreal diameter);
00057     qreal autoBrushDiameter();
00058 
00059 signals:
00060 
00061     void sigBrushChanged();
00062 
00063 private:
00064 
00065     QTabWidget * m_brushesTab;
00066     KisAutoBrushWidget * m_autoBrushWidget;
00067     KisBrushChooser * m_brushChooser;
00068     KisTextBrushChooser * m_textBrushWidget;
00069     KisCustomBrushWidget * m_customBrushWidget;
00070 
00071 };
00072 
00073 #endif