Documentation
[yamf.git] / yamf / drawing / private / paintareapanel.h
blobc57d00b6b0e69ba510a74469e4a7083eeed71128
1 /***************************************************************************
2 * Copyright (C) 2007 David Cuadrado *
3 * krawek@gmail.com *
4 * *
5 * This library is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU Lesser General Public *
7 * License as published by the Free Software Foundation; either *
8 * version 2.1 of the License, or (at your option) any later version. *
9 * *
10 * This library 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 GNU *
13 * Lesser General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Lesser General Public *
16 * License along with this library; if not, write to the Free Software *
17 * Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
22 #ifndef YAMF_DRAWING_PRIVATEPAINTAREAPANEL_H
23 #define YAMF_DRAWING_PRIVATEPAINTAREAPANEL_H
25 #include <QFrame>
27 namespace Ui {
28 class PaintAreaPanel;
31 namespace YAMF {
32 namespace Drawing {
34 class PaintArea;
36 namespace Private {
38 /**
39 * @ingroup drawing
40 * @author David Cuadrado <krawek@gmail.com>
42 class PaintAreaPanel : public QFrame
44 Q_OBJECT;
46 public:
47 PaintAreaPanel(YAMF::Drawing::PaintArea *paintArea, QWidget *parent = 0);
48 ~PaintAreaPanel();
50 void setCurrentBrush(const QBrush &brush);
52 public slots:
53 void setBrush(const QBrush &brush);
54 void setPen(const QPen &pen);
56 private slots:
57 void onRotationSelected(int index);
58 void onZoomSelected(int index);
59 void onForegroundChanged(const QBrush &fg);
60 void onBackgroundChanged(const QBrush &bg);
62 void onSetThickness(int tickness);
63 void onStyleChanged(QAction *action);
64 void onCapStyleChanged( QAction *action );
65 void onJoinStyleChanged( QAction *action );
67 private:
68 Ui::PaintAreaPanel *builder;
69 YAMF::Drawing::PaintArea *m_paintArea;
71 class IconDrawer;
80 #endif