summaryrefslogtreecommitdiffstats
path: root/libkdchart/KDChartObjectFactory.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:17 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:17 -0600
commit1f9d00360b9018301630ce062d7dda0c6583edfb (patch)
tree1013b917f9a8ad41ed928d62250e9bfe1ed91414 /libkdchart/KDChartObjectFactory.cpp
parent252fce5a2a5384702fbcc1c9987284d7bd2e6943 (diff)
downloadkmymoney-1f9d00360b9018301630ce062d7dda0c6583edfb.tar.gz
kmymoney-1f9d00360b9018301630ce062d7dda0c6583edfb.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 252fce5a2a5384702fbcc1c9987284d7bd2e6943.
Diffstat (limited to 'libkdchart/KDChartObjectFactory.cpp')
-rw-r--r--libkdchart/KDChartObjectFactory.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/libkdchart/KDChartObjectFactory.cpp b/libkdchart/KDChartObjectFactory.cpp
index a53f84c..b1dac73 100644
--- a/libkdchart/KDChartObjectFactory.cpp
+++ b/libkdchart/KDChartObjectFactory.cpp
@@ -15,42 +15,42 @@
// PENDING(blackie) Clean up code in this file, so it uses the correct getter methods like getBool.
KDChartObjectFactory::KDChartObjectFactory()
{
- registerClass( TQString::fromLatin1( "KDChartWidget" ) );
- registerClass( TQString::fromLatin1( "KDChartParams" ), new KDChartParams );
- registerClass( TQString::fromLatin1( "KDChartTableData" ) );
- registerClass( TQString::fromLatin1( "KDChartAxisParams" ), new KDChartAxisParams );
- registerClass( TQString::fromLatin1( "KDChartEnums" ), 0, new KDChartEnums );
- registerClass( TQString::fromLatin1( "KDChartTextPiece" ) );
- registerClass( TQString::fromLatin1( "KDChartCustomBox" ), new KDChartCustomBox );
- registerClass( TQString::fromLatin1( "KDChartPropertySet" ), new KDChartPropertySet );
- registerClass( TQString::fromLatin1( "KDFrame" ), TQString(), new KDFrame );
-
- registerClass( TQString::fromLatin1( "TQt" ), TQString(), new TQtFactory() );
- registerClass( TQString::fromLatin1( "TQFont" ), TQString(), new TQFontFactory );
+ registerClass( TQString::tqfromLatin1( "KDChartWidget" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartParams" ), new KDChartParams );
+ registerClass( TQString::tqfromLatin1( "KDChartTableData" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartAxisParams" ), new KDChartAxisParams );
+ registerClass( TQString::tqfromLatin1( "KDChartEnums" ), 0, new KDChartEnums );
+ registerClass( TQString::tqfromLatin1( "KDChartTextPiece" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartCustomBox" ), new KDChartCustomBox );
+ registerClass( TQString::tqfromLatin1( "KDChartPropertySet" ), new KDChartPropertySet );
+ registerClass( TQString::tqfromLatin1( "KDFrame" ), TQString(), new KDFrame );
+
+ registerClass( TQString::tqfromLatin1( "TQt" ), TQString(), new TQtFactory() );
+ registerClass( TQString::tqfromLatin1( "TQFont" ), TQString(), new TQFontFactory );
}
TQObject* KDChartObjectFactory::create( const TQString& className, const TQSArgumentList& args, TQObject* /*context*/ )
{
- if ( className == TQString::fromLatin1( "KDChartWidget" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartWidget" ) )
return createKDChartWidget( args );
- if ( className == TQString::fromLatin1("KDChartParams") )
+ if ( className == TQString::tqfromLatin1("KDChartParams") )
return new KDChartParams();
- else if ( className == TQString::fromLatin1("KDChartTableData") )
+ else if ( className == TQString::tqfromLatin1("KDChartTableData") )
return createKDChartTableData( args );
- else if ( className == TQString::fromLatin1("KDChartAxisParams") )
+ else if ( className == TQString::tqfromLatin1("KDChartAxisParams") )
return new KDChartAxisParams();
- else if ( className == TQString::fromLatin1( "KDChartTextPiece" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartTextPiece" ) )
return createKDChartTextPiece( args );
- else if ( className == TQString::fromLatin1( "KDChartCustomBox" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartCustomBox" ) )
return createKDChartCustomBox( args );
- else if ( className == TQString::fromLatin1( "KDChartPropertySet" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartPropertySet" ) )
return createKDChartPropertySet( args );
else
@@ -98,7 +98,7 @@ TQObject* KDChartObjectFactory::createKDChartTextPiece( const TQSArgumentList& a
TQString str;
if ( !getString( args, 1, &str, "KDChartTextPiece" ) ) return 0;
- if ( !checkIsTQtVariant( args, 2, TQVariant::Font, TQString::fromLatin1( "TQFont" ), "KDChartTextPiece" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 2, TQVariant::Font, TQString::tqfromLatin1( "TQFont" ), "KDChartTextPiece" ) ) return 0;
TQFont font = args[1].variant().toFont();
return new KDChartTextPiece( str, font );
@@ -145,13 +145,13 @@ TQObject* KDChartObjectFactory::createKDChartCustomBox( const TQSArgumentList& a
TQColor color = TQt::black;
if ( args.count() >= 9 ) {
- if ( !checkIsTQtVariant( args, 9, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 9, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
color = args[8].variant().toColor();
}
TQBrush paper = TQt::NoBrush;
if ( args.count() >= 10 ) {
- if ( !checkIsTQtVariant( args, 10, TQVariant::Brush, TQString::fromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 10, TQVariant::Brush, TQString::tqfromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
paper = args[9].variant().toBrush();
}
@@ -235,13 +235,13 @@ TQObject* KDChartObjectFactory::createKDChartCustomBox( const TQSArgumentList& a
TQColor color = TQt::black;
if ( args.count() >= 8 ) {
- if ( !checkIsTQtVariant( args, 8, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 8, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
color = args[7].variant().toColor();
}
TQBrush paper = TQt::NoBrush;
if ( args.count() >= 9 ) {
- if ( !checkIsTQtVariant( args, 9, TQVariant::Brush, TQString::fromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 9, TQVariant::Brush, TQString::tqfromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
paper = args[8].variant().toBrush();
}
@@ -318,7 +318,7 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
if ( !getNumber( args, 4,&idLineColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsTQtVariant( args, 5, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 5, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
TQColor lineColor = args[4].variant().toColor();
int idLineStyle;
@@ -362,7 +362,7 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
int idExtraLinesColor;
if ( !getNumber( args, 18,&idExtraLinesColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsTQtVariant( args, 19, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 19, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
TQColor extraLinesColor = args[18].variant().toColor();
int idExtraLinesStyle;
@@ -380,13 +380,13 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
int idExtraMarkersSize;
if ( !getNumber( args, 24,&idExtraMarkersSize, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsTQtVariant( args, 25, TQVariant::Size, TQString::fromLatin1( "TQSize" ), "KDChartPropertySet" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 25, TQVariant::Size, TQString::tqfromLatin1( "TQSize" ), "KDChartPropertySet" ) ) return 0;
TQSize extraMarkersSize = args[24].variant().toSize();
int idExtraMarkersColor;
if ( !getNumber( args, 26,&idExtraMarkersColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsTQtVariant( args, 27, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 27, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
TQColor extraMarkersColor = args[26].variant().toColor();
int idExtraMarkersStyle;
@@ -404,7 +404,7 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
int idBarColor;
if ( !getNumber( args, 32,&idBarColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsTQtVariant( args, 33, TQVariant::Color, TQString::fromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 33, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
TQColor barColor = args[32].variant().toColor();
KDChartPropertySet* set = new KDChartPropertySet;
@@ -438,11 +438,11 @@ bool KDChartObjectFactory::isNumber( const TQVariant& v )
bool KDChartObjectFactory::checkArgCount( const TQString& className, int count, int min, int max )
{
if ( count < min ) {
- throwError( TQObject::tr( "Too few arguments when creating %1 object." ).arg( className ) );
+ throwError( TQObject::tr( "Too few arguments when creating %1 object." ).tqarg( className ) );
return false;
}
if ( count > max ) {
- throwError( TQObject::tr( "Too many arguments when creating %1 object." ).arg( className ) );
+ throwError( TQObject::tr( "Too many arguments when creating %1 object." ).tqarg( className ) );
return false;
}
return true;
@@ -453,7 +453,7 @@ bool KDChartObjectFactory::checkArgsIsTQtClass( const TQSArgumentList& args, int
{
const TQSArgument& arg = args[index-1];
if ( arg.type() != TQSArgument::TQObjectPtr || !arg.qobject()->inherits( expected ) ) {
- throwError( TQObject::tr( "Invalid type for argument no %1 to %2, must be a %3" ).arg(index).arg(constructing).arg(expected) );
+ throwError( TQObject::tr( "Invalid type for argument no %1 to %2, must be a %3" ).tqarg(index).tqarg(constructing).tqarg(expected) );
return false;
}
return true;
@@ -464,7 +464,7 @@ bool KDChartObjectFactory::getString( const TQSArgumentList& args, int index, TQ
{
const TQSArgument& arg = args[index-1];
if ( arg.type() != TQSArgument::Variant || arg.variant().type() != TQVariant::String ) {
- throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a string" ).arg(index).arg(constructing) );
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a string" ).tqarg(index).tqarg(constructing) );
return false;
}
else {
@@ -477,7 +477,7 @@ bool KDChartObjectFactory::getNumber( const TQSArgumentList& args, int index, do
{
const TQSArgument& arg = args[index-1];
if ( arg.type() != TQSArgument::Variant || !isNumber(arg.variant()) ) {
- throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a number" ).arg(index).arg( constructing ) );
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a number" ).tqarg(index).tqarg( constructing ) );
return false;
}
else {
@@ -508,7 +508,7 @@ bool KDChartObjectFactory::getBool( const TQSArgumentList& args, int index, bool
{
const TQSArgument& arg = args[index-1];
if ( arg.type() != TQSArgument::Variant || arg.variant().type() != TQVariant::Bool ) {
- throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a boolean" ).arg(index).arg( constructing ) );
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a boolean" ).tqarg(index).tqarg( constructing ) );
return false;
}
else {
@@ -521,7 +521,7 @@ bool KDChartObjectFactory::checkIsTQtVariant( const TQSArgumentList& args, int i
{
const TQSArgument& arg = args[index-1];
if ( arg.type() != TQSArgument::Variant || arg.variant().type() != expected ) {
- throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a %3").arg(index).arg(constructing).arg(variantName) );
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a %3").tqarg(index).tqarg(constructing).tqarg(variantName) );
return false;
}
else