kpresenter

KPrPolygonPreview.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
3 Base code from Kontour.
4 Copyright (C) 1998 Kai-Uwe Sattler (kus@iti.cs.uni-magdeburg.de)
5 Copyright (C) 2001 Toshitaka Fujioka <fujioka@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21*/
22
23#ifndef POLYGONPREVIEW_H
24#define POLYGONPREVIEW_H
25
26#include <tqframe.h>
27#include <tqpen.h>
28#include <tqbrush.h>
29
30class TQPainter;
31
32class KPrPolygonPreview : public TQFrame
33{
34 TQ_OBJECT
35
36
37public:
38 KPrPolygonPreview( TQWidget* parent, const char*);
39 ~KPrPolygonPreview() {}
40
41 void setPenBrush( const TQPen &_pen, const TQBrush &_brush )
42 { pen = _pen; brush = _brush; repaint( true ); }
43
44public slots:
45 void slotConvexConcave( bool convexConcave );
46 void slotConvexPolygon();
47 void slotConcavePolygon();
48 void slotCornersValue( int value );
49 void slotSharpnessValue( int value );
50
51protected:
52 void drawContents( TQPainter* );
53
54 int nCorners;
55 int sharpness;
56 bool isConcave;
57 TQPen pen;
58 TQBrush brush;
59};
60
61#endif /* POLYGONPREVIEW_H */