summaryrefslogtreecommitdiffstats
path: root/libkdchart/KDChartCustomBox.h
diff options
context:
space:
mode:
Diffstat (limited to 'libkdchart/KDChartCustomBox.h')
-rw-r--r--libkdchart/KDChartCustomBox.h165
1 files changed, 83 insertions, 82 deletions
diff --git a/libkdchart/KDChartCustomBox.h b/libkdchart/KDChartCustomBox.h
index f4f8694..e57110a 100644
--- a/libkdchart/KDChartCustomBox.h
+++ b/libkdchart/KDChartCustomBox.h
@@ -29,10 +29,10 @@
#ifndef __KDCHARTCUSTOMBOX_H__
#define __KDCHARTCUSTOMBOX_H__
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqfont.h>
+#include <tqdom.h>
#include "KDChartGlobal.h"
#include "KDChartEnums.h"
#include "KDChartTextPiece.h"
@@ -40,7 +40,7 @@
class KDFrame;
-// needed because there was no AlignAuto before Qt 3.0
+// needed because there was no AlignAuto before TQt 3.0
#define KDCHART_AlignAuto 0
@@ -51,9 +51,10 @@ class KDFrame;
/**
Class for specifying and drawing custom boxes.
*/
-class KDCHART_EXPORT KDChartCustomBox :public QObject
+class KDCHART_EXPORT KDChartCustomBox :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class KDChartPainter;
friend class KDChartParams;
@@ -71,11 +72,11 @@ public:
_deltaY( 0 ),
_width( 0 ),
_height( 0 ),
- _color( Qt::black ),
- _paper( Qt::NoBrush ),
+ _color( TQt::black ),
+ _paper( TQt::NoBrush ),
_anchorArea( KDChartEnums::AreaInnermost ),
_anchorPos( KDChartEnums::PosTopLeft ),
- _anchorAlign( Qt::AlignTop + Qt::AlignLeft ),
+ _anchorAlign( TQt::AlignTop + TQt::AlignLeft ),
_dataRow( 0 ),
_dataCol( 0 ),
_data3rd( 0 ),
@@ -84,7 +85,7 @@ public:
_anchorBeingCalculated( false ),
_parentAxisArea( -1 )
{
- const KDChartTextPiece piece( 0, "", QFont( "helvetica", 8, QFont::Normal, false ) );
+ const KDChartTextPiece piece( 0, "", TQFont( "helvetica", 8, TQFont::Normal, false ) );
_content.deepCopy( &piece );
}
@@ -115,11 +116,11 @@ public:
_deltaY( 0 ),
_width( 0 ),
_height( 0 ),
- _color( Qt::black ),
- _paper( Qt::NoBrush ),
+ _color( TQt::black ),
+ _paper( TQt::NoBrush ),
_anchorArea( KDChartEnums::AreaInnermost ),
_anchorPos( KDChartEnums::PosTopLeft ),
- _anchorAlign( Qt::AlignTop + Qt::AlignLeft ),
+ _anchorAlign( TQt::AlignTop + TQt::AlignLeft ),
_dataRow( 0 ),
_dataCol( 0 ),
_data3rd( 0 ),
@@ -158,7 +159,7 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param width The width of the box.
@@ -180,18 +181,18 @@ public:
\param deltaAlign The way how \c deltaX and \deltaY affect the position of the box.
Leave this parameter to its default value KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. right means there will be a gap between the right side of
+ tqalignment settings: e.g. right means there will be a gap between the right side of
the box and its anchor point - if the main \c align parameter is set to right too
the anchor point will to be outside of the box / if \c align is set to left
(but the \c deltaAlign to right) the anchor point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -205,17 +206,17 @@ public:
int deltaY,
int width,
int height,
- const QColor & color = QColor( Qt::black ),
- const QBrush & paper = QBrush( Qt::NoBrush ),
+ const TQColor & color = TQColor( TQt::black ),
+ const TQBrush & paper = TQBrush( TQt::NoBrush ),
uint area = KDChartEnums::AreaInnermost,
KDChartEnums::PositionFlag position = KDChartEnums::PosTopLeft,
- uint align = Qt::AlignTop + Qt::AlignLeft,
+ uint align = TQt::AlignTop + TQt::AlignLeft,
uint dataRow = 0,
uint dataCol = 0,
uint data3rd = 0,
uint deltaAlign = KDCHART_AlignAuto,
bool deltaScaleGlobal = true,
- int parentAxis = -1 )
+ int tqparentAxis = -1 )
: _rotation( 0 ),
_fontSize( fontSize ),
_fontScaleGlobal( fontScaleGlobal ),
@@ -234,7 +235,7 @@ public:
_deltaAlign( deltaAlign ),
_deltaScaleGlobal( deltaScaleGlobal ),
_anchorBeingCalculated( false ),
- _parentAxisArea( parentAxis )
+ _parentAxisArea( tqparentAxis )
{
_content.deepCopy( &content );
}
@@ -269,13 +270,13 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
width of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in method trueRect.
\param deltaY The Y distance between the box and its anchor.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
height of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in method trueRect.
\param width The width of the box.
\param height The height of the box.
@@ -296,23 +297,23 @@ public:
\param deltaAlign The way how \c deltaX and \deltaY affect the position of the box.
Leave this parameter to its default value KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. Qt::AlignRight means the box will be moved to the left
+ tqalignment settings: e.g. TQt::AlignRight means the box will be moved to the left
(by the amount calculated using the \c deltaX value), so there will be a gap
between the right side of the box and its anchor point IF the main \c align flag
- is set to Qt::AlignRight too, so the anchor point will to be outside of the
- box then. However if the main \c align flag is set to Qt::AlignLeft the anchor
+ is set to TQt::AlignRight too, so the anchor point will to be outside of the
+ box then. However if the main \c align flag is set to TQt::AlignLeft the anchor
point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\note Moving of the box due to \c deltaAlign settings is applied after
- the box is rotated: e.g. this means a gap specified by \c deltaAlign = Qt::AlignTop
+ the box is rotated: e.g. this means a gap specified by \c deltaAlign = TQt::AlignTop
gap will actually result in a left gap if the box is rotated by 90 degrees.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -327,17 +328,17 @@ public:
int deltaY,
int width,
int height,
- const QColor & color = QColor( Qt::black ),
- const QBrush & paper = QBrush( Qt::NoBrush ),
+ const TQColor & color = TQColor( TQt::black ),
+ const TQBrush & paper = TQBrush( TQt::NoBrush ),
uint area = KDChartEnums::AreaInnermost,
KDChartEnums::PositionFlag position = KDChartEnums::PosTopLeft,
- uint align = Qt::AlignTop + Qt::AlignLeft,
+ uint align = TQt::AlignTop + TQt::AlignLeft,
uint dataRow = 0,
uint dataCol = 0,
uint data3rd = 0,
uint deltaAlign = KDCHART_AlignAuto,
bool deltaScaleGlobal = true,
- int parentAxis = -1 )
+ int tqparentAxis = -1 )
: _rotation( rotation ),
_fontSize( fontSize ),
_fontScaleGlobal( fontScaleGlobal ),
@@ -356,7 +357,7 @@ public:
_deltaAlign( deltaAlign ),
_deltaScaleGlobal( deltaScaleGlobal ),
_anchorBeingCalculated( false ),
- _parentAxisArea( parentAxis )
+ _parentAxisArea( tqparentAxis )
{
_content.deepCopy( &content );
}
@@ -367,13 +368,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 custombox the custom box to be represented
*/
- static void createCustomBoxNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createCustomBoxNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDChartCustomBox* custombox );
/**
@@ -383,7 +384,7 @@ public:
\param element the DOM element to read from
\param settings the custom box object to read the data into
*/
- static bool readCustomBoxNode( const QDomElement& element,
+ static bool readCustomBoxNode( const TQDomElement& element,
KDChartCustomBox& custombox );
public slots: // PENDING(blackie) merge slots sections.
@@ -394,8 +395,8 @@ public slots: // PENDING(blackie) merge slots sections.
int trueFontLineSpacing( double areaWidthP1000,
double areaHeightP1000,
int rectHeight ) const;
- int trueRectAlignX(const QRect& rect) const;
- int trueRectAlignY(const QRect& rect) const;
+ int trueRectAlignX(const TQRect& rect) const;
+ int trueRectAlignY(const TQRect& rect) const;
void getTrueShift( double areaWidthP1000,
double areaHeightP1000,
int rectHeight,
@@ -407,9 +408,9 @@ public slots: // PENDING(blackie) merge slots sections.
Return the actual rectangle which to draw box into.
\note When ever possible, use this method, instead of the other trueRect(), that
- has no \c QPainter parameter. Passing a QPainter will give you more exact results.
+ has no \c TQPainter parameter. Passing a TQPainter will give you more exact results.
- \param painter The QPainter to be used.
+ \param painter The TQPainter to be used.
\param anchor The anchor point which the box is to be aligned to.
This can be any point within the painter drawing area but you
will probably compute a point using anchorArea(), anchorPosition(), anchorAlign()
@@ -419,8 +420,8 @@ public slots: // PENDING(blackie) merge slots sections.
\param areaHeightP1000 The thousands part of the logical height
of the area to be used for drawing.
*/
- QRect trueRect( QPainter * painter,
- QPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const ;
+ TQRect trueRect( TQPainter * painter,
+ TQPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const ;
/**
Return the actual rectangle which to draw box into.
@@ -434,14 +435,14 @@ public slots: // PENDING(blackie) merge slots sections.
\param areaHeightP1000 The thousands part of the logical height
of the area to be used for drawing.
*/
- virtual QRect trueRect( QPoint anchor,
+ virtual TQRect trueRect( TQPoint anchor,
double areaWidthP1000,
double areaHeightP1000 ) const ;
/**
Paints the box.
- \param painter The QPainter to be used for drawing.
+ \param painter The TQPainter to be used for drawing.
\param anchor The anchor point which the box is to be aligned to.
This can be any point within the painter drawing area but you
will probably compute a point using anchorArea(), anchorPosition(), anchorAlign()
@@ -455,14 +456,14 @@ public slots: // PENDING(blackie) merge slots sections.
(that were set via Constructor or via setPosAndSize) and based upon the
logical height (or width, resp.) of the painters drawing area.
*/
- virtual void paint( QPainter* painter,
- QPoint anchor,
+ virtual void paint( TQPainter* painter,
+ TQPoint anchor,
double areaWidthP1000,
double areaHeightP1000,
const KDFrame* frame = 0,
- const QRect& frameRect = QRect(),
- const QColor * color = 0,
- const QBrush * paper = 0 ) const ;
+ const TQRect& frameRect = TQRect(),
+ const TQColor * color = 0,
+ const TQBrush * paper = 0 ) const ;
/**
Specifies the rotation angle of the box in degrees (0..360).
@@ -570,7 +571,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param width The width of the drawing region.
@@ -613,7 +614,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param align the way how the values specified for deltaX and/or deltaY
@@ -642,21 +643,21 @@ public slots: // PENDING(blackie) merge slots sections.
Set this to KDHART_KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. right means there will be a gap between the right side of
+ tqalignment settings: e.g. right means there will be a gap between the right side of
the box and its anchor point - if the main \c align parameter is set to right too
the anchor point will to be outside of the box / if \c align is set to left
(but the \c deltaAlign to right) the anchor point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\note Moving of the box due to \c deltaAlign settings is applied after
- the box is rotated: e.g. this means a gap specified by \c deltaAlign = Qt::AlignTop
+ the box is rotated: e.g. this means a gap specified by \c deltaAlign = TQt::AlignTop
gap will actually result in a left gap if the box is rotated by 90 degrees.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -718,7 +719,7 @@ public slots: // PENDING(blackie) merge slots sections.
\param color The text color.
*/
- void setColor( QColor color )
+ void setColor( TQColor color )
{
_color = color;
}
@@ -728,7 +729,7 @@ public slots: // PENDING(blackie) merge slots sections.
\param paper The brush to be used for the background.
*/
- void setPaper( const QBrush & paper )
+ void setPaper( const TQBrush & paper )
{
_paper = paper;
}
@@ -837,7 +838,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaY, deltaAlign, deltaScaleGlobal
@@ -852,7 +853,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaX, deltaAlign, deltaScaleGlobal
@@ -911,7 +912,7 @@ public slots: // PENDING(blackie) merge slots sections.
/**
Returns the text color.
*/
- QColor color() const
+ TQColor color() const
{
return _color;
}
@@ -919,7 +920,7 @@ public slots: // PENDING(blackie) merge slots sections.
/**
Returns the background brush.
*/
- const QBrush & paper() const
+ const TQBrush & paper() const
{
return _paper;
}
@@ -952,7 +953,7 @@ public:
const KDChartCustomBox* clone() const;
private:
- KDChartCustomBox( const KDChartCustomBox& ) : QObject(0) {}
+ KDChartCustomBox( const KDChartCustomBox& ) : TQObject(0) {}
protected:
/**
@@ -973,13 +974,13 @@ protected:
return _anchorBeingCalculated;
}
- void setParentAxisArea( int parentAxis ) const
+ void setParentAxisArea( int tqparentAxis ) const
{
KDChartCustomBox* that = const_cast<KDChartCustomBox*>(this);
- that->_parentAxisArea = parentAxis;
+ that->_parentAxisArea = tqparentAxis;
}
- int parentAxisArea() const
+ int tqparentAxisArea() const
{
return _parentAxisArea;
}
@@ -997,8 +998,8 @@ private:
int _width;
int _height;
- QColor _color;
- QBrush _paper;
+ TQColor _color;
+ TQBrush _paper;
uint _anchorArea;
KDChartEnums::PositionFlag _anchorPos;
@@ -1026,7 +1027,7 @@ private:
\param p the KDChartCustomBox object to write
\return the text stream after the write operation
*/
-//QTextStream& operator<<( QTextStream& s, const KDChartCustomBox& p );
+//TQTextStream& operator<<( TQTextStream& s, const KDChartCustomBox& p );
/**
@@ -1037,7 +1038,7 @@ private:
\param p the KDChartCustomBox object to read into
\return the text stream after the read operation
*/
-//QTextStream& operator>>( QTextStream& s, KDChartCustomBox& p );
+//TQTextStream& operator>>( TQTextStream& s, KDChartCustomBox& p );
#endif