1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
/*
**************************************************************************
description
--------------------
copyright : (C) 2000-2002 by Andreas Zehender
email : [email protected]
**************************************************************************
**************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
**************************************************************************/
#include <tdelocale.h>
#include <kinstance.h>
#include <tdeaboutdata.h>
#include "pmfactory.h"
#include "pmpart.h"
#include "pmdebug.h"
#include "version.h"
extern "C"
{
void* init_libkpovmodelerpart( )
{
return new PMFactory( );
}
}
static const char description[] = I18N_NOOP( "Modeler for POV-Ray Scenes" );
TDEInstance* PMFactory::s_instance = 0L;
TDEAboutData* PMFactory::s_aboutData = 0L;
PMFactory::PMFactory( )
{
kdDebug( ) << "PMFactory::PMFactory( )\n";
}
PMFactory::~PMFactory( )
{
if( s_instance )
delete s_instance;
if( s_aboutData )
delete s_aboutData;
s_instance = 0L;
s_aboutData = 0L;
}
KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget,
const char* widgetName,
TQObject* parent, const char* name,
const char* classname,
const TQStringList& /*args*/ )
{
kdDebug( ) << "PMFactory: Created new part\n";
bool readwrite = !( ( strcmp( classname, "Browser/View" ) == 0 )
|| ( strcmp( classname, "KParts::ReadOnlyPart" ) == 0 ) );
KParts::ReadWritePart *part = new PMPart( parentWidget, widgetName,
parent, name, readwrite );
return part;
}
TDEInstance* PMFactory::instance( )
{
if( !s_instance )
s_instance = new TDEInstance( aboutData( ) );
return s_instance;
}
const TDEAboutData* PMFactory::aboutData( )
{
if( !s_aboutData )
{
s_aboutData =
new TDEAboutData( "kpovmodeler", I18N_NOOP( "KPovModeler" ),
KPOVMODELER_VERSION, description,
TDEAboutData::License_GPL, "(c) 2001-2006, Andreas Zehender" );
s_aboutData->addAuthor( "Andreas Zehender", 0,
"[email protected]", "http://www.azweb.de" );
s_aboutData->addAuthor( "Luis Passos Carvalho", I18N_NOOP( "Textures" ),
"[email protected]" );
s_aboutData->addAuthor( "Leon Pennington", I18N_NOOP( "POV-Ray 3.5 objects" ),
"[email protected]" );
s_aboutData->addAuthor( "Philippe Van Hecke", I18N_NOOP( "Some graphical objects" ),
"[email protected]" );
s_aboutData->addAuthor( "Leonardo Skorianez", I18N_NOOP( "Some graphical objects" ),
"[email protected]" );
}
return s_aboutData;
}
#include "pmfactory.moc"
|