summaryrefslogtreecommitdiffstats
path: root/libkdchart/KDChartPropertySet.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /libkdchart/KDChartPropertySet.cpp
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz
kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdchart/KDChartPropertySet.cpp')
-rw-r--r--libkdchart/KDChartPropertySet.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/libkdchart/KDChartPropertySet.cpp b/libkdchart/KDChartPropertySet.cpp
index 6abec75..247a918 100644
--- a/libkdchart/KDChartPropertySet.cpp
+++ b/libkdchart/KDChartPropertySet.cpp
@@ -31,8 +31,8 @@
#include "KDChartParams.h"
#include <KDXMLTools.h>
-#include <qpainter.h>
-#include <qvaluestack.h>
+#include <tqpainter.h>
+#include <tqvaluestack.h>
#include <stdlib.h>
@@ -78,7 +78,7 @@ const KDChartPropertySet* KDChartPropertySet::clone() const
return newSet;
}
-void KDChartPropertySet::quickReset( const QString& name, int idParent )
+void KDChartPropertySet::quickReset( const TQString& name, int idParent )
{
// set the name
mName = name;
@@ -107,7 +107,7 @@ void KDChartPropertySet::quickReset( const QString& name, int idParent )
mIdAreaBrush = idParent;
}
-void KDChartPropertySet::fullReset( const QString& name, int idParent )
+void KDChartPropertySet::fullReset( const TQString& name, int idParent )
{
quickReset( name, idParent );
fillValueMembersWithDummyValues();
@@ -117,32 +117,32 @@ void KDChartPropertySet::fillValueMembersWithDummyValues()
{
// fill with dummy values to avoid problems when saving us into a stream
mLineWidth = 1;
- mLineColor = Qt::black;
+ mLineColor = TQt::black;
mLineStyle = Qt::SolidLine;
mShowMarker = true;
- mMarkerAlign = Qt::AlignCenter;
- mMarkerSize = QSize(6,6);
- mMarkerColor = Qt::black;
+ mMarkerAlign = TQt::AlignCenter;
+ mMarkerSize = TQSize(6,6);
+ mMarkerColor = TQt::black;
mMarkerStyle = 0;
- mExtraLinesAlign = Qt::AlignLeft|Qt::AlignTop;
+ mExtraLinesAlign = TQt::AlignLeft|TQt::AlignTop;
mExtraLinesInFront = false;
mExtraLinesLength = -20;
mExtraLinesWidth = 1;
- mExtraLinesColor = Qt::black;
+ mExtraLinesColor = TQt::black;
mExtraLinesStyle = Qt::SolidLine;
- mExtraMarkersAlign = Qt::AlignLeft|Qt::AlignTop;
- mExtraMarkersSize = QSize(6,6);
- mExtraMarkersColor = Qt::black;
+ mExtraMarkersAlign = TQt::AlignLeft|TQt::AlignTop;
+ mExtraMarkersSize = TQSize(6,6);
+ mExtraMarkersColor = TQt::black;
mExtraMarkersStyle = 0;
mShowBar = true;
- mBarColor = Qt::black;
- mAreaBrush = QBrush( Qt::blue );
+ mBarColor = TQt::black;
+ mAreaBrush = TQBrush( TQt::blue );
}
-QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
+TQDomElement KDChartPropertySet::saveXML(TQDomDocument& doc) const
{
- QDomElement propertySetElement = doc.createElement( "PropertySet" );
+ TQDomElement propertySetElement = doc.createElement( "PropertySet" );
propertySetElement.setAttribute( "OwnID", mOwnID );
KDXML::createStringNode( doc, propertySetElement, "Name", mName );
// normal bar properties:
@@ -159,7 +159,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDLineColor", mIdLineColor );
KDXML::createColorNode( doc, propertySetElement, "LineColor", mLineColor );
KDXML::createIntNode( doc, propertySetElement, "IDLineStyle", mIdLineStyle );
- QDomElement lineStyleElement = doc.createElement( "LineStyle" );
+ TQDomElement lineStyleElement = doc.createElement( "LineStyle" );
propertySetElement.appendChild( lineStyleElement );
lineStyleElement.setAttribute( "Style", KDXML::penStyleToString( mLineStyle));
// normal marker properties:
@@ -172,7 +172,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDMarkerColor", mIdMarkerColor );
KDXML::createColorNode( doc, propertySetElement, "MarkerColor", mMarkerColor );
KDXML::createIntNode( doc, propertySetElement, "IDMarkerStyle", mIdMarkerStyle );
- QDomElement markerStElem = doc.createElement( "MarkerStyle" );
+ TQDomElement markerStElem = doc.createElement( "MarkerStyle" );
propertySetElement.appendChild( markerStElem );
markerStElem.setAttribute("Style",
KDChartParams::lineMarkerStyleToString( (KDChartParams::LineMarkerStyle)mMarkerStyle));
@@ -188,7 +188,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDExtraLinesColor", mIdExtraLinesColor );
KDXML::createColorNode( doc, propertySetElement, "ExtraLinesColor", mExtraLinesColor );
KDXML::createIntNode( doc, propertySetElement, "IDExtraLinesStyle", mIdExtraLinesStyle );
- QDomElement specLineStElem = doc.createElement( "ExtraLinesStyle" );
+ TQDomElement specLineStElem = doc.createElement( "ExtraLinesStyle" );
propertySetElement.appendChild( specLineStElem );
specLineStElem.setAttribute( "Style", KDXML::penStyleToString( mExtraLinesStyle));
// extra markers:
@@ -199,20 +199,20 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDExtraMarkersColor", mIdExtraMarkersColor );
KDXML::createColorNode( doc, propertySetElement, "ExtraMarkersColor", mExtraMarkersColor );
KDXML::createIntNode( doc, propertySetElement, "IDExtraMarkersStyle", mIdExtraMarkersStyle );
- QDomElement specMarkerStElem = doc.createElement( "ExtraMarkersStyle" );
+ TQDomElement specMarkerStElem = doc.createElement( "ExtraMarkersStyle" );
propertySetElement.appendChild( specMarkerStElem );
specMarkerStElem.setAttribute("Style",
KDChartParams::lineMarkerStyleToString( (KDChartParams::LineMarkerStyle)mExtraMarkersStyle));
return propertySetElement;
}
-bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet& set )
+bool KDChartPropertySet::loadXML( const TQDomElement& element, KDChartPropertySet& set )
{
bool bOwnIDFound = false;
- QString s;
- QColor color;
- QBrush brush;
- QSize size;
+ TQString s;
+ TQColor color;
+ TQBrush brush;
+ TQSize size;
bool bValue;
int i;
// initialize the property set with default values
@@ -222,11 +222,11 @@ bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet
i = element.attribute( "OwnID" ).toInt( &bOwnIDFound );
if( bOwnIDFound ){
set.mOwnID = i;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Name" ) {
if( KDXML::readStringNode( element, s ) )
set.mName = s;
@@ -251,7 +251,7 @@ bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet
set.mIdAreaBrush = i;
} else if( tagName == "AreaBrush" ) {
if( KDXML::readBrushNode( element, brush ) )
- set.mAreaBrush = color;
+ set.mAreaBrush = TQBrush(color);
} else
// normal line properties:
if( tagName == "IDLineWidth" ) {