21 #include "tdehtml_factory.h"
22 #include "tdehtml_part.h"
23 #include "tdehtml_settings.h"
25 #include "css/cssstyleselector.h"
26 #include "html/html_imageimpl.h"
27 #include "rendering/render_style.h"
28 #include "rendering/break_lines.h"
29 #include "misc/loader.h"
30 #include "misc/arena.h"
32 #include <kinstance.h>
33 #include <tdeaboutdata.h>
40 template class TQPtrList<TDEHTMLPart>;
42 extern "C" TDE_EXPORT
void *init_libtdehtml()
56 return new TDEHTMLFactory(
true );
59 TDEHTMLFactory *TDEHTMLFactory::s_self = 0;
60 unsigned long int TDEHTMLFactory::s_refcnt = 0;
64 TQPtrList<TDEHTMLPart> *TDEHTMLFactory::s_parts = 0;
65 TQString *TDEHTMLSettings::avFamilies = 0;
67 TDEHTMLFactory::TDEHTMLFactory(
bool clone )
73 TDEHTMLFactory::~TDEHTMLFactory()
82 delete TDEHTMLSettings::avFamilies;
85 assert( s_parts->isEmpty() );
93 TDEHTMLSettings::avFamilies = 0;
96 tdehtml::CSSStyleSelector::clear();
97 tdehtml::RenderStyle::cleanup();
98 tdehtml::Cache::clear();
99 tdehtml::cleanup_thaibreaks();
100 tdehtml::ArenaFinish();
106 KParts::Part *TDEHTMLFactory::createPartObject( TQWidget *parentWidget,
const char *widgetName, TQObject *parent,
const char *name,
const char *className,
const TQStringList & )
108 TDEHTMLPart::GUIProfile prof = TDEHTMLPart::DefaultGUI;
109 if ( strcmp( className,
"Browser/View" ) == 0 )
110 prof = TDEHTMLPart::BrowserViewGUI;
112 return new TDEHTMLPart( parentWidget, widgetName, parent, name, prof );
115 void TDEHTMLFactory::ref()
117 if ( !s_refcnt && !s_self )
128 s_self =
new TDEHTMLFactory;
129 tdehtml::Cache::init();
135 void TDEHTMLFactory::deref()
137 if ( !--s_refcnt && s_self )
144 void TDEHTMLFactory::registerPart(
TDEHTMLPart *part )
147 s_parts =
new TQPtrList<TDEHTMLPart>;
149 if ( !s_parts->containsRef( part ) )
151 s_parts->append( part );
156 void TDEHTMLFactory::deregisterPart(
TDEHTMLPart *part )
160 if ( s_parts->removeRef( part ) )
162 if ( s_parts->isEmpty() )
178 I18N_NOOP(
"Embeddable HTML component" ),
179 TDEAboutData::License_LGPL );
180 s_about->addAuthor(
"Lars Knoll", 0,
"knoll@kde.org" );
181 s_about->addAuthor(
"Antti Koivisto", 0,
"koivisto@kde.org" );
182 s_about->addAuthor(
"Waldo Bastian", 0,
"bastian@kde.org" );
183 s_about->addAuthor(
"Dirk Mueller", 0,
"mueller@kde.org" );
184 s_about->addAuthor(
"Peter Kelly", 0,
"pmk@kde.org" );
185 s_about->addAuthor(
"Torben Weis", 0,
"weis@kde.org" );
186 s_about->addAuthor(
"Martin Jones", 0,
"mjones@kde.org" );
187 s_about->addAuthor(
"Simon Hausmann", 0,
"hausmann@kde.org" );
188 s_about->addAuthor(
"Tobias Anton", 0,
"anton@stud.fbi.fh-darmstadt.de" );
205 using namespace KParts;
206 #include "tdehtml_factory.moc"
This class is tdehtml's main class.
Settings for the HTML view.