kpresenter

KPrPenStyleWidget.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Thorsten Zachmann <zachmann@kde.orgReginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef PENSTYLEWIDGET_H
21#define PENSTYLEWIDGET_H
22
23#include "global.h"
24
25#include <tqwidget.h>
26
27#include "KPrCommand.h"
28#include <KoPen.h>
29
30class PenStyleUI;
31
32
33class KPrPenStyleWidget : public TQWidget
34{
35 TQ_OBJECT
36
37public:
38 KPrPenStyleWidget( TQWidget *parent, const char *name, const KoPenCmd::Pen &pen, bool configureLineEnds = true );
39 ~KPrPenStyleWidget();
40
41 int getPenConfigChange() const;
42 KoPenCmd::Pen getPen() const;
43
44 void setPen( const KoPenCmd::Pen &pen );
45 void apply();
46
47private:
48 KoPen getKPPen() const;
49 LineEnd getLineBegin() const;
50 LineEnd getLineEnd() const;
51
52 void setPen( const KoPen &pen );
53 void setLineBegin( LineEnd lb );
54 void setLineEnd( LineEnd le );
55
56 KoPenCmd::Pen m_pen;
57
58 PenStyleUI *m_ui;
59
60private slots:
61 void slotReset();
62 void slotPenChanged();
63 void slotLineBeginChanged();
64 void slotLineEndChanged();
65};
66
67#endif /* PENSTYLEWIDGET_H */