1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
/* This file is part of the KDE project
Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef koparagdia_p_h
#define koparagdia_p_h
// This file hides those definitions from "users" of koParagDia.h
// to reduce compile-time dependencies.
#include <tqgroupbox.h>
#include <KoParagCounter.h>
#include <tqspinbox.h>
class TQWidget;
class TQPainter;
/******************************************************************/
/* Class: KoSpinBox */
/******************************************************************/
class KoSpinBox : public TQSpinBox
{
Q_OBJECT
TQ_OBJECT
public:
enum counterType{ NONE,NUM,ALPHAB_L,ALPHAB_U,ROM_NUM_L,ROM_NUM_U};
KoSpinBox( int minValue, int maxValue, int step = 1,
TQWidget * parent = 0, const char * name = 0 );
KoSpinBox( TQWidget * parent = 0, const char * name = 0 );
virtual ~KoSpinBox();
virtual TQString mapValueToText( int value );
virtual int mapTextToValue( bool * ok );
void setCounterType(counterType _type);
private:
counterType m_Etype;
};
/******************************************************************/
/* class KPagePreview */
/******************************************************************/
class KPagePreview : public TQGroupBox
{
Q_OBJECT
TQ_OBJECT
public:
KPagePreview( TQWidget*, const char* = 0L );
~KPagePreview() {}
void setLeft( double _left )
{ left = _left; repaint( false ); }
void setRight( double _right )
{ right = _right; repaint( false ); }
void setFirst( double _first )
{ first = _first; repaint( false ); }
void setSpacing( double _spacing )
{ spacing = _spacing; repaint( false ); }
void setBefore( double _before )
{ before = _before; repaint( false ); }
void setAfter( double _after )
{ after = _after; repaint( false ); }
protected:
void drawContents( TQPainter* );
int convert(double input);
double left, right, first, spacing, before, after;
};
/******************************************************************/
/* class KPagePreview2 */
/******************************************************************/
class KPagePreview2 : public TQGroupBox
{
Q_OBJECT
TQ_OBJECT
public:
KPagePreview2( TQWidget*, const char* = 0L );
~KPagePreview2() {}
void setAlign( int _align )
{ align = _align; repaint( false ); }
protected:
void drawContents( TQPainter* );
int align;
};
/******************************************************************/
/* class KoBorderPreview */
/******************************************************************/
class KoBorderPreview : public TQFrame/*TQGroupBox*/
{
Q_OBJECT
TQ_OBJECT
public:
KoBorderPreview( TQWidget*, const char* = 0L );
~KoBorderPreview() {}
KoBorder leftBorder()const { return m_leftBorder; }
void setLeftBorder( const KoBorder& _leftBorder )
{ m_leftBorder = _leftBorder; repaint( true ); }
KoBorder rightBorder() const { return m_rightBorder; }
void setRightBorder( const KoBorder& _rightBorder )
{ m_rightBorder = _rightBorder; repaint( true ); }
KoBorder topBorder()const { return m_topBorder; }
void setTopBorder( const KoBorder& _topBorder )
{ m_topBorder = _topBorder; repaint( true ); }
KoBorder bottomBorder()const { return m_bottomBorder; }
void setBottomBorder( const KoBorder& _bottomBorder )
{ m_bottomBorder = _bottomBorder; repaint( true ); }
void setBorder( KoBorder::BorderType which, const KoBorder& border);
protected:
virtual void mousePressEvent( TQMouseEvent* _ev );
void drawContents( TQPainter* );
TQPen setBorderPen( KoBorder _brd );
KoBorder m_leftBorder, m_rightBorder, m_topBorder, m_bottomBorder;
signals:
void choosearea(TQMouseEvent * _ev);
};
#endif
|