diff options
Diffstat (limited to 'kchart/kdchart/KDFrame.h')
-rw-r--r-- | kchart/kdchart/KDFrame.h | 149 |
1 files changed, 75 insertions, 74 deletions
diff --git a/kchart/kdchart/KDFrame.h b/kchart/kdchart/KDFrame.h index bbc49155..be31597e 100644 --- a/kchart/kdchart/KDFrame.h +++ b/kchart/kdchart/KDFrame.h @@ -29,15 +29,15 @@ #ifndef __KDFRAME_H__ #define __KDFRAME_H__ -#include <qapplication.h> -#include <qfont.h> -#include <qcolor.h> -#include <qpixmap.h> -#include <qpen.h> -#include <qmap.h> -#include <qobject.h> -#include <qtextstream.h> -#include <qdom.h> +#include <tqapplication.h> +#include <tqfont.h> +#include <tqcolor.h> +#include <tqpixmap.h> +#include <tqpen.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqtextstream.h> +#include <tqdom.h> #include <KDFrameProfileSection.h> @@ -84,9 +84,10 @@ To learn how to specify your frame profiles have a look at example code given with setProfile() \endif */ -class KDCHART_EXPORT KDFrame : public QObject +class KDCHART_EXPORT KDFrame : public TQObject { Q_OBJECT + TQ_OBJECT Q_ENUMS( BackPixmapMode ) Q_ENUMS( SimpleFrame ) Q_ENUMS( ProfileName ) @@ -116,7 +117,7 @@ public slots: \param type the background pixmap mode to convert \return the string representation of the background pixmap mode enum */ - static QString backPixmapModeToString( BackPixmapMode type ) { + static TQString backPixmapModeToString( BackPixmapMode type ) { switch( type ) { case PixCentered: return "Centered"; @@ -136,7 +137,7 @@ public slots: \param string the string to convert \return the background pixmap mode enum value */ - static BackPixmapMode stringToBackPixmapMode( const QString& string ) { + static BackPixmapMode stringToBackPixmapMode( const TQString& string ) { if( string == "Centered" ) return PixCentered; else if( string == "Scaled" ) @@ -206,7 +207,7 @@ public slots: \param midLineWidth only used for frames with 3-line edges: the width of the middle line. \param pen the basic pen to be used for this frame's lines - \param background the brush to be used for the frame's background or QBrush() if the background is not to be filled by a brush + \param background the brush to be used for the frame's background or TQBrush() if the background is not to be filled by a brush \param backPixmap if not zero points to a pixmap to be used for the background \param backPixmapMode determines how the size pixmap is adjusted to the frame size, see \c BackPixmapMode for the possible values. @@ -217,9 +218,9 @@ public slots: void setSimpleFrame( SimpleFrame frame, int lineWidth, int midLineWidth, - QPen pen, - QBrush background = QBrush(), - const QPixmap* backPixmap = 0, + TQPen pen, + TQBrush background = TQBrush(), + const TQPixmap* backPixmap = 0, BackPixmapMode backPixmapMode = PixStretched ); public: @@ -266,7 +267,7 @@ public slots: \note The sections will be drawn in the order in which they were added to the profile beginning at the outside and ending with the inner section of the frame. - Adding a gap between two sections can be done by specifying a <b>QPen( Qt::NoPen )</b>. + Adding a gap between two sections can be done by specifying a <b>TQPen( TQt::NoPen )</b>. See setProfile for a short example using this method. @@ -275,7 +276,7 @@ public slots: */ void addProfileSection( ProfileName name, int wid, - QPen pen, + TQPen pen, KDFrameProfileSection::Direction dir = KDFrameProfileSection::DirPlain, // PENDING(blackie) possible enum problem KDFrameProfileSection::Curvature curv = KDFrameProfileSection::CvtPlain ); @@ -293,17 +294,17 @@ public slots: KDFrame myFrame( 50,20, 250,120 ); // select a very simple rectangular frame with normal corners, black border, white background - myFrame.setSimpleFrame( KDFrame::FrameFlat, 1, 0, QPen( Qt::Black ), QBrush( Qt::White ) ); + myFrame.setSimpleFrame( KDFrame::FrameFlat, 1, 0, TQPen( TQt::Black ), TQBrush( TQt::White ) ); // make the top profile look more nice myFrame.clearProfile( KDFrame::ProfileTop ); - myFrame.addProfileSection( KDFrame::ProfileTop, 2, QPen( Qt::Black ), + myFrame.addProfileSection( KDFrame::ProfileTop, 2, TQPen( TQt::Black ), KDFrameProfileSection::DirPlain, KDFrameProfileSection::CvtPlain ); - myFrame.addProfileSection( KDFrame::ProfileTop, 5, QPen( Qt::NoPen ), + myFrame.addProfileSection( KDFrame::ProfileTop, 5, TQPen( TQt::NoPen ), KDFrameProfileSection::DirPlain, KDFrameProfileSection::CvtPlain ); - myFrame.addProfileSection( KDFrame::ProfileTop, 1, QPen( Qt::Black ), + myFrame.addProfileSection( KDFrame::ProfileTop, 1, TQPen( TQt::Black ), KDFrameProfileSection::DirPlain, KDFrameProfileSection::CvtPlain ); @@ -362,7 +363,7 @@ public slots: \return the string representation of the corner name enum \endif */ - static QString cornerNameToString( CornerName type ) { + static TQString cornerNameToString( CornerName type ) { switch( type ) { case CornerTopLeft: return "TopLeft"; @@ -390,7 +391,7 @@ public slots: \return the corner name enum value \endif */ - static CornerName stringToCornerName( const QString& string ) { + static CornerName stringToCornerName( const TQString& string ) { if( string == "TopLeft" ) return CornerTopLeft; else if( string == "TopRight" ) @@ -436,7 +437,7 @@ public slots: \return the string representation of the corner style enum \endif */ - static QString cornerStyleToString( CornerStyle type ) { + static TQString cornerStyleToString( CornerStyle type ) { switch( type ) { case CornerNormal: return "Normal"; @@ -460,7 +461,7 @@ public slots: \return the corner style enum value \endif */ - static CornerStyle stringToCornerStyle( const QString& string ) { + static CornerStyle stringToCornerStyle( const TQString& string ) { if( string == "Normal" ) return CornerNormal; else if( string == "Round" ) @@ -474,7 +475,7 @@ public slots: public: -// MOC_SKIP_BEGIN +// TQMOC_SKIP_BEGIN /** \ifnot v200 \deprecated Feature scheduled for future release, at present not implemented. @@ -515,14 +516,14 @@ public: in a DOM document. \param document the DOM document to which the node will belong - \param parent the parent node to which the new node will be appended + \param tqparent the tqparent node to which the new node will be appended \param elementName the name of the new node \param corner the corner to be represented \endif */ - static void createFrameCornerNode( QDomDocument& document, - QDomNode& parent, - const QString& elementName, + static void createFrameCornerNode( TQDomDocument& document, + TQDomNode& tqparent, + const TQString& elementName, const KDFrameCorner& corner ); /** @@ -536,7 +537,7 @@ public: \param corner the frame corner object to read the data into \endif */ - static bool readFrameCornerNode( const QDomElement& element, + static bool readFrameCornerNode( const TQDomElement& element, KDFrameCorner& corner ); protected: @@ -569,7 +570,7 @@ public: KDFrameProfile _profile; }; -// MOC_SKIP_END +// TQMOC_SKIP_END public slots: /** @@ -718,7 +719,7 @@ public slots: /** Specifies the brush to be used to fill the inner area of this frame, calling this methode without passing in a parameter re-sets the background brush - to \c QBrush( \cQt::NoBrush \c). + to \c TQBrush( \cTQt::NoBrush \c). \Note To have a 'tiled' background image just use a brush holding this pixmap - for other ways to show background @@ -726,7 +727,7 @@ public slots: \sa setBackPixmap, background */ - void setBackground( QBrush background = QBrush( Qt::NoBrush ) ) + void setBackground( TQBrush background = TQBrush( TQt::NoBrush ) ) { _background = background; } @@ -740,16 +741,16 @@ public slots: \sa setBackground, background */ - void setBackPixmap( const QPixmap* backPixmap = 0, + void setBackPixmap( const TQPixmap* backPixmap = 0, BackPixmapMode backPixmapMode = PixStretched ) { - _backPixmap = backPixmap ? *backPixmap : QPixmap(); + _backPixmap = backPixmap ? *backPixmap : TQPixmap(); _backPixmapMode = backPixmapMode; } /** Returns the brush that is used to fill the inner area of this frame, - or a QBrush( \cNoBrush \c) if no background is to be drawn. + or a TQBrush( \cNoBrush \c) if no background is to be drawn. \param backPixmap receives the pixmap used for drawing the background or a null pixmap, test this by calling backPixmap.isNull() @@ -759,7 +760,7 @@ public slots: \sa setBackground, setBackPixmap */ - const QBrush& background( const QPixmap*& backPixmap, + const TQBrush& background( const TQPixmap*& backPixmap, BackPixmapMode& backPixmapMode ) const { backPixmap = &_backPixmap; @@ -778,7 +779,7 @@ public slots: \sa innerRect, setCorners, setSimpleFrame, setProfile */ - void setInnerRect( QRect innerRect ) + void setInnerRect( TQRect innerRect ) { _innerRect = innerRect; } @@ -793,7 +794,7 @@ public slots: \sa setInnerRect, setProfile */ - QRect innerRect() const + TQRect innerRect() const { return _innerRect; } @@ -806,7 +807,7 @@ public slots: call this methode since it is called internally by paint() if you start it with \c PaintBackground (or with \c PaintAll, resp.) for the \c steps parameter. */ - virtual void paintBackground( QPainter& painter, const QRect& innerRect ) const; + virtual void paintBackground( TQPainter& painter, const TQRect& innerRect ) const; /** Paint methode drawing the edges (if any) of the frame. @@ -814,7 +815,7 @@ public slots: call this methode since it is called internally by paint() if you start it with \c PaintEdges (or with \c PaintAll, \c PaintBorder, resp.) for the \c steps parameter. */ - virtual void paintEdges( QPainter& painter, const QRect& innerRect ) const; + virtual void paintEdges( TQPainter& painter, const TQRect& innerRect ) const; /** Paint methode drawing the corners (if any) of the frame. @@ -822,7 +823,7 @@ public slots: call this methode since it is called internally by paint() if you start it with \c PaintCorners (or with \c PaintAll, \c PaintBorder, resp.) for the \c steps parameter. */ - virtual void paintCorners( QPainter& painter, const QRect& innerRect ) const; + virtual void paintCorners( TQPainter& painter, const TQRect& innerRect ) const; public: @@ -856,7 +857,7 @@ public slots: immediately followed by <b>paint( painter, PaintEdges );</b> then do all your inside work and finally draw <b>paint( painter, PaintCorners );</b>. - \param painter The QPainter to be used for drawing. + \param painter The TQPainter to be used for drawing. \param steps The part of the frame to be drawn, use KDFrame::PaintAll to draw the entire frame and the background, use KDFrame::PaintBackground to draw only the background, use KDFrame::PaintEdges to draw just the edges, use KDFrame::PaintCorners to draw only the corners. @@ -867,9 +868,9 @@ public slots: its paint() methode several time - giving it the appropriate innerRect for each frame. This would result in less memory usage since you could use that single KDFrame object as kind of a shared ressource. */ - virtual void paint( QPainter* painter, + virtual void paint( TQPainter* painter, KDFramePaintSteps steps = PaintAll, - QRect innerRect = QRect(0,0,0,0) ) const; + TQRect innerRect = TQRect(0,0,0,0) ) const; /** @@ -877,12 +878,12 @@ public slots: */ void clearAll() { - _background = QBrush(); - _backPixmap = QPixmap(); + _background = TQBrush(); + _backPixmap = TQPixmap(); _backPixmapMode = PixStretched; _shadowWidth = 0; _sunPos = CornerTopLeft; - _innerRect = QRect( 0,0, 0,0 ); + _innerRect = TQRect( 0,0, 0,0 ); _topProfile.clear(); _rightProfile.clear(); _bottomProfile.clear(); @@ -898,7 +899,7 @@ public: /** Default Constructor. Defines default values. - The constructor does *not* have a \c parent parameter since drawing + The constructor does *not* have a \c tqparent parameter since drawing of the frame is not done transparently but by (one or more) explicit calls of the frames paint() methode. See explanation given there to learn about the why and how of this... @@ -913,13 +914,13 @@ public: \sa rect, setInnerRect, setProfile */ - KDFrame( QRect innerRect = QRect(0,0,0,0), + KDFrame( TQRect innerRect = TQRect(0,0,0,0), SimpleFrame frame = FrameFlat, int lineWidth = 1, int midLineWidth = 0, - QPen pen = QPen(), // solid black line with 0 width - QBrush background = QBrush(), // no brush - const QPixmap* backPixmap = 0, // no pixmap + TQPen pen = TQPen(), // solid black line with 0 width + TQBrush background = TQBrush(), // no brush + const TQPixmap* backPixmap = 0, // no pixmap BackPixmapMode backPixmapMode = PixStretched, int shadowWidth = 0, CornerName sunPos = CornerTopLeft ) @@ -941,7 +942,7 @@ public: /* Constructor. Set up a frame by copying settings of another frame. - The constructor does *not* have a \c parent parameter since drawing + The constructor does *not* have a \c tqparent parameter since drawing of the frame is not done transparently but by (one or more) explicit calls of the frames paint() methode. See explanation given there to learn about the why and how of this... @@ -953,7 +954,7 @@ public: \sa rect, setInnerRect, setProfile - KDFrame( QRect innerRect, + KDFrame( TQRect innerRect, const KDFrame& R, CornerName sunPos = CornerUNKNOWN ) { @@ -967,7 +968,7 @@ public: } */ private: - KDFrame( const KDFrame& ) : QObject(0) {} + KDFrame( const KDFrame& ) : TQObject(0) {} KDFrame& operator=( const KDFrame& ){return *this;} @@ -1002,20 +1003,20 @@ public: R.setProfileSectionsAutoDelete( false ); } - friend QTextStream& operator<<( QTextStream& s, const KDFrame& p ); - friend QTextStream& operator>>( QTextStream& s, KDFrame& p ); + friend TQTextStream& operator<<( TQTextStream& s, const KDFrame& p ); + friend TQTextStream& operator>>( TQTextStream& s, KDFrame& p ); /** Creates a DOM element node that represents a frame for use in a DOM document. \param document the DOM document to which the node will belong - \param parent the parent node to which the new node will be appended + \param tqparent the tqparent node to which the new node will be appended \param elementName the name of the new node \param frame the frame to be represented */ - static void createFrameNode( QDomDocument& document, QDomNode& parent, - const QString& elementName, + static void createFrameNode( TQDomDocument& document, TQDomNode& tqparent, + const TQString& elementName, const KDFrame& frame ); /** @@ -1023,13 +1024,13 @@ public: in a DOM document. \param document the DOM document to which the node will belong - \param parent the parent node to which the new node will be appended + \param tqparent the tqparent node to which the new node will be appended \param elementName the name of the new node \param profile the profile to be represented */ - static void createFrameProfileNode( QDomDocument& document, - QDomNode& parent, - const QString& elementName, + static void createFrameProfileNode( TQDomDocument& document, + TQDomNode& tqparent, + const TQString& elementName, KDFrameProfile profile ); /** @@ -1039,7 +1040,7 @@ public: \param element the DOM element to read from \param frame the frame object to read the data into */ - static bool readFrameNode( const QDomElement& element, + static bool readFrameNode( const TQDomElement& element, KDFrame& frame ); /** @@ -1049,7 +1050,7 @@ public: \param element the DOM element to read from \param profile the frame profile object to read the data into */ - static bool readFrameProfileNode( const QDomElement& element, + static bool readFrameProfileNode( const TQDomElement& element, KDFrameProfile& profile ); signals: @@ -1077,12 +1078,12 @@ private: /** Stores the brush to be used to fill the inner area. */ - QBrush _background; + TQBrush _background; /** Stores the pixmap to be painted into the inner area. */ - QPixmap _backPixmap; + TQPixmap _backPixmap; /** Stores the way how to display the pixmap that is @@ -1093,7 +1094,7 @@ private: /** Stores the position and size of the frame. */ - QRect _innerRect; + TQRect _innerRect; /** Stores all currently used profile settings for a controlled deletion. @@ -1150,7 +1151,7 @@ private: \param p the KDFrame object to write \return the text stream after the write operation */ -QTextStream& operator<<( QTextStream& s, const KDFrame& p ); +TQTextStream& operator<<( TQTextStream& s, const KDFrame& p ); /** @@ -1161,7 +1162,7 @@ QTextStream& operator<<( QTextStream& s, const KDFrame& p ); \param p the KDFrame object to read into \return the text stream after the read operation */ -QTextStream& operator>>( QTextStream& s, KDFrame& p ); +TQTextStream& operator>>( TQTextStream& s, KDFrame& p ); #endif |