diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 22:38:03 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 22:38:03 +0000 |
commit | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch) | |
tree | 99e72842fe687baea16376a147619b6048d7e441 /libkdchart/KDChartWrapperFactory.cpp | |
download | kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip |
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdchart/KDChartWrapperFactory.cpp')
-rw-r--r-- | libkdchart/KDChartWrapperFactory.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
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 <KDChartTable.h> +#include <qfont.h> +#include "wrappers/KDChartParamsWrapper.h" +#include "wrappers/KDChartTableDataWrapper.h" +#include "wrappers/KDChartCustomBoxWrapper.h" +#include <KDChartCustomBox.h> +#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<KDChartParams*>( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartVectorTableData" ) ) + return new KDChartTableDataWrapper( static_cast<KDChartTableData*>( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartCustomBox" ) ) + return new KDChartCustomBoxWrapper( static_cast<KDChartCustomBox*>( ptr ) ); + + if ( className == QString::fromLatin1( "KDChartAxisParams" ) ) + return new KDChartAxisParamsWrapper( static_cast<KDChartAxisParams*>( ptr ) ); + + return 0; +} |