From dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 22:38:03 +0000 Subject: Added kmymoney git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdchart/KDChartWrapperFactory.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 libkdchart/KDChartWrapperFactory.cpp (limited to 'libkdchart/KDChartWrapperFactory.cpp') diff --git a/libkdchart/KDChartWrapperFactory.cpp b/libkdchart/KDChartWrapperFactory.cpp new file mode 100644 index 0000000..430ef3a --- /dev/null +++ b/libkdchart/KDChartWrapperFactory.cpp @@ -0,0 +1,33 @@ +#include "KDChartWrapperFactory.h" +#include +#include +#include "wrappers/KDChartParamsWrapper.h" +#include "wrappers/KDChartTableDataWrapper.h" +#include "wrappers/KDChartCustomBoxWrapper.h" +#include +#include "wrappers/KDChartAxisParamsWrapper.h" + +KDChartWrapperFactory::KDChartWrapperFactory() +{ + registerWrapper( "KDChartParams", "KDChartParamsWrapper" ); + registerWrapper( "KDChartVectorTableData", "KDChartTableDataWrapper" ); + registerWrapper( "KDChartCustomBox", "KDChartCustomBoxWrapper" ); + registerWrapper( "KDChartAxisParams", "KDChartAxisParamsWrapper" ); +} + +QObject* KDChartWrapperFactory::create( const QString& className, void* ptr ) +{ + if ( className == QString::fromLatin1( "KDChartParams" ) ) + return new KDChartParamsWrapper( static_cast( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartVectorTableData" ) ) + return new KDChartTableDataWrapper( static_cast( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartCustomBox" ) ) + return new KDChartCustomBoxWrapper( static_cast( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartAxisParams" ) ) + return new KDChartAxisParamsWrapper( static_cast( ptr ) ); + + return 0; +} -- cgit v1.2.1