kpresenter

KPrRotationDialogImpl.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thomas Zander <zander@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; version 2.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17*/
18#ifndef __rotationdialogimpl_h__
19#define __rotationdialogimpl_h__
20
21#include <tqlabel.h>
22#include <kdialogbase.h>
23
24class KPrTextPreview;
25class RotationPropertyUI;
26class TQObject;
27class TQEvent;
28class KPrCircleGroup;
29
33class KPrRotationDialogImpl : public KDialogBase
34{
35 TQ_OBJECT
36
37
38public:
39 KPrRotationDialogImpl( TQWidget *parent, const char* name = 0 );
40 ~KPrRotationDialogImpl() {}
41
42 void setAngle( double angle );
43 double angle();
44
45protected slots:
46 void angleChanged( double );
47 void angleMode( int );
48 void slotOk();
49
50protected:
51 KPrTextPreview *m_preview;
52 RotationPropertyUI *m_dialog;
53 KPrCircleGroup *m_angleGroup;
54
55private:
56 bool noSignals;
57};
58
63class KPrCircleToggle : public TQLabel
64{
65 TQ_OBJECT
66
67public:
75 KPrCircleToggle(TQWidget *parent, const TQString &image, int id);
77 int id() { return m_id; }
78
79signals:
81 void clicked(int id);
82
83public slots:
88 void setChecked(bool on);
89
90protected:
92 void mousePressEvent ( TQMouseEvent * e );
93
94private:
95 TQPixmap m_on, m_off;
96 bool m_selected;
97 int m_id;
98};
99
103class KPrCircleGroup : public TQFrame
104{
105 TQ_OBJECT
106
107public:
112 KPrCircleGroup(TQWidget *parent);
119 void setAngle(int angle);
124 void add(KPrCircleToggle *button);
125
126signals:
128 void clicked(int id);
129
130private slots:
131 void selectionChanged(int buttonId);
132
133private:
134 TQPtrList<KPrCircleToggle> m_buttons;
135 bool noSignals;
136};
137
138#endif
A button-group equivalent for a set of KPrCircleToggle classes.
void add(KPrCircleToggle *button)
Add a KPrCircleToggle button as one of the representers of this circle.
void setAngle(int angle)
Set the angle the group is currently representing.
KPrCircleGroup(TQWidget *parent)
Constructor.
void clicked(int id)
clicked will be emitted when one of the child buttons is clicked.
A toggle-button like widget that shows one pixmap when it is checked, and another when it is unselect...
KPrCircleToggle(TQWidget *parent, const TQString &image, int id)
Constructor.
void setChecked(bool on)
Check or uncheck the button.
void mousePressEvent(TQMouseEvent *e)
overwritten method from TQWidget.
int id()
return the id which is passed in the constructor
void clicked(int id)
this signal will be emitted whenever the button becomes checked