lib Library API Documentation

koParagDia_p.h

00001 /* This file is part of the KDE project 00002 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef koparagdia_p_h 00021 #define koparagdia_p_h 00022 00023 // This file hides those definitions from "users" of koParagDia.h 00024 // to reduce compile-time dependencies. 00025 00026 #include <qgroupbox.h> 00027 #include <koparagcounter.h> 00028 #include <qspinbox.h> 00029 class QWidget; 00030 class QPainter; 00031 00032 00033 /******************************************************************/ 00034 /* Class: KoSpinBox */ 00035 /******************************************************************/ 00036 class KoSpinBox : public QSpinBox 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 enum counterType{ NONE,NUM,ALPHAB_L,ALPHAB_U,ROM_NUM_L,ROM_NUM_U}; 00042 00043 KoSpinBox( int minValue, int maxValue, int step = 1, 00044 QWidget * parent = 0, const char * name = 0 ); 00045 KoSpinBox( QWidget * parent = 0, const char * name = 0 ); 00046 virtual ~KoSpinBox(); 00047 virtual QString mapValueToText( int value ); 00048 virtual int mapTextToValue( bool * ok ); 00049 void setCounterType(counterType _type); 00050 private: 00051 counterType m_Etype; 00052 00053 }; 00054 00055 /******************************************************************/ 00056 /* class KPagePreview */ 00057 /******************************************************************/ 00058 class KPagePreview : public QGroupBox 00059 { 00060 Q_OBJECT 00061 00062 public: 00063 KPagePreview( QWidget*, const char* = 0L ); 00064 ~KPagePreview() {} 00065 00066 void setLeft( double _left ) 00067 { left = _left; repaint( false ); } 00068 void setRight( double _right ) 00069 { right = _right; repaint( false ); } 00070 void setFirst( double _first ) 00071 { first = _first; repaint( false ); } 00072 void setSpacing( double _spacing ) 00073 { spacing = _spacing; repaint( false ); } 00074 void setBefore( double _before ) 00075 { before = _before; repaint( false ); } 00076 void setAfter( double _after ) 00077 { after = _after; repaint( false ); } 00078 00079 protected: 00080 void drawContents( QPainter* ); 00081 int convert(double input); 00082 00083 double left, right, first, spacing, before, after; 00084 00085 }; 00086 00087 /******************************************************************/ 00088 /* class KPagePreview2 */ 00089 /******************************************************************/ 00090 00091 class KPagePreview2 : public QGroupBox 00092 { 00093 Q_OBJECT 00094 00095 public: 00096 KPagePreview2( QWidget*, const char* = 0L ); 00097 ~KPagePreview2() {} 00098 00099 void setAlign( int _align ) 00100 { align = _align; repaint( false ); } 00101 00102 protected: 00103 void drawContents( QPainter* ); 00104 00105 int align; 00106 00107 }; 00108 00109 /******************************************************************/ 00110 /* class KoBorderPreview */ 00111 /******************************************************************/ 00112 00113 class KoBorderPreview : public QFrame/*QGroupBox*/ 00114 { 00115 Q_OBJECT 00116 00117 public: 00118 KoBorderPreview( QWidget*, const char* = 0L ); 00119 ~KoBorderPreview() {} 00120 00121 KoBorder leftBorder()const { return m_leftBorder; } 00122 void setLeftBorder( KoBorder _leftBorder ) { m_leftBorder = _leftBorder; repaint( true ); } 00123 KoBorder rightBorder()const { return m_rightBorder; } 00124 void setRightBorder( KoBorder _rightBorder ) { m_rightBorder = _rightBorder; repaint( true ); } 00125 KoBorder topBorder()const { return m_topBorder; } 00126 void setTopBorder( KoBorder _topBorder ) { m_topBorder = _topBorder; repaint( true ); } 00127 KoBorder bottomBorder()const { return m_bottomBorder; } 00128 void setBottomBorder( KoBorder _bottomBorder ) { m_bottomBorder = _bottomBorder; repaint( true ); } 00129 00130 protected: 00131 virtual void mousePressEvent( QMouseEvent* _ev ); 00132 void drawContents( QPainter* ); 00133 QPen setBorderPen( KoBorder _brd ); 00134 00135 KoBorder m_leftBorder, m_rightBorder, m_topBorder, m_bottomBorder; 00136 signals: 00137 void choosearea(QMouseEvent * _ev); 00138 00139 }; 00140 00141 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 28 04:04:00 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003