|
|
|
/* 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; tqrepaint( false ); }
|
|
|
|
void setRight( double _right )
|
|
|
|
{ right = _right; tqrepaint( false ); }
|
|
|
|
void setFirst( double _first )
|
|
|
|
{ first = _first; tqrepaint( false ); }
|
|
|
|
void setSpacing( double _spacing )
|
|
|
|
{ spacing = _spacing; tqrepaint( false ); }
|
|
|
|
void setBefore( double _before )
|
|
|
|
{ before = _before; tqrepaint( false ); }
|
|
|
|
void setAfter( double _after )
|
|
|
|
{ after = _after; tqrepaint( 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; tqrepaint( 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; tqrepaint( true ); }
|
|
|
|
KoBorder rightBorder() const { return m_rightBorder; }
|
|
|
|
void setRightBorder( const KoBorder& _rightBorder )
|
|
|
|
{ m_rightBorder = _rightBorder; tqrepaint( true ); }
|
|
|
|
KoBorder topBorder()const { return m_topBorder; }
|
|
|
|
void setTopBorder( const KoBorder& _topBorder )
|
|
|
|
{ m_topBorder = _topBorder; tqrepaint( true ); }
|
|
|
|
KoBorder bottomBorder()const { return m_bottomBorder; }
|
|
|
|
void setBottomBorder( const KoBorder& _bottomBorder )
|
|
|
|
{ m_bottomBorder = _bottomBorder; tqrepaint( 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
|