Rename kiobuffer and KHTML

pull/1/head
Timothy Pearson 11 years ago
parent 5544d5f4a6
commit e76ee03c02

@ -359,7 +359,7 @@ There is more going on, like checking for duplicate keys, but this is the core.
As of Kommander 1.3 Kommander automatically makes KParts using the libkommander_part.la. In addition to this there is a KPart plugin which allows Kommander to load plugins. Being curious developers we tried loading a Kommander part into Kommander. Why do that? Why not? The results were interesting and are demonstrated here. One interesting thing is the parent part can directly access all of the child part. While this is handy it has a down side. Any child widget being called with the same name as a parent widget will cause a lock up! In addition to that the DCOP interface is generated all over again for the part which wipes out the parent interface and disables most of the old parser functionality as well as Kommander specific DCOP to the parent. This is too difficult to fix for the remaining life of the KDE3 version. Even with these limitations and cautions this can be useful, if used carefully. The example files to look at this are in the current examples as kpartmwframe.kmdr and kpartpart.kmdr. Remember you will need the KPart plugin to fully run this example. As of Kommander 1.3 Kommander automatically makes KParts using the libkommander_part.la. In addition to this there is a KPart plugin which allows Kommander to load plugins. Being curious developers we tried loading a Kommander part into Kommander. Why do that? Why not? The results were interesting and are demonstrated here. One interesting thing is the parent part can directly access all of the child part. While this is handy it has a down side. Any child widget being called with the same name as a parent widget will cause a lock up! In addition to that the DCOP interface is generated all over again for the part which wipes out the parent interface and disables most of the old parser functionality as well as Kommander specific DCOP to the parent. This is too difficult to fix for the remaining life of the KDE3 version. Even with these limitations and cautions this can be useful, if used carefully. The example files to look at this are in the current examples as kpartmwframe.kmdr and kpartpart.kmdr. Remember you will need the KPart plugin to fully run this example.
</para> </para>
<para> <para>
You can also load KMail, KOrganizer and many other TDE applications right into Kommander, of course without the problems. KHTML and KDE's file manager widgets seem not to have some functionality but there is a special KHTML plugin if you really want to incorporate a browser. You can also load KMail, KOrganizer and many other TDE applications right into Kommander, of course without the problems. TDEHTML and KDE's file manager widgets seem not to have some functionality but there is a special TDEHTML plugin if you really want to incorporate a browser.
</para> </para>
</sect2> </sect2>
<sect2 id="example-passed-params"> <sect2 id="example-passed-params">

@ -2127,7 +2127,7 @@ Setup the <link linkend="configure-quanta">behavior</link> of &quantaplus;.
</term> </term>
<listitem> <listitem>
<para> <para>
Setup the behavior of the integrated preview. <important><para>The changes made in the dialog have effects on every application using the KHTML part, including the &konqueror; web browser.</para></important> Setup the behavior of the integrated preview. <important><para>The changes made in the dialog have effects on every application using the TDEHTML part, including the &konqueror; web browser.</para></important>
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>

@ -39,10 +39,10 @@ noinst_HEADERS = \
libkimagemapeditor_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP libkimagemapeditor_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP
libkimagemapeditor_la_LIBADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML) libkimagemapeditor_la_LIBADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEHTML)
kimagemapeditor_LDFLAGS = $(all_libraries) $(KDE_RPATH) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP kimagemapeditor_LDFLAGS = $(all_libraries) $(KDE_RPATH) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP
kimagemapeditor_LDADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML) kimagemapeditor_LDADD = libkimagemapeditorcommon.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEHTML)
# set the include path for X, qt and KDE # set the include path for X, qt and KDE
INCLUDES= $(all_includes) INCLUDES= $(all_includes)

@ -847,8 +847,8 @@ HTMLPreviewDialog::HTMLPreviewDialog(TQWidget* parent, KURL url, const TQString
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
htmlPart = new KHTMLPart(page,"htmlpart"); htmlPart = new TDEHTMLPart(page,"htmlpart");
// htmlView = new KHTMLView(htmlPart, page); // htmlView = new TDEHTMLView(htmlPart, page);
// htmlView->setVScrollBarMode(TQScrollView::Auto); // htmlView->setVScrollBarMode(TQScrollView::Auto);
// htmlView->setHScrollBarMode(TQScrollView::Auto); // htmlView->setHScrollBarMode(TQScrollView::Auto);
// dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*)); // dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*));

@ -197,7 +197,7 @@ class PreferencesDialog : public KDialogBase {
TDEConfig *config; TDEConfig *config;
}; };
class KHTMLPart; class TDEHTMLPart;
class KTempFile; class KTempFile;
class HTMLPreviewDialog : public KDialogBase { class HTMLPreviewDialog : public KDialogBase {
@ -206,7 +206,7 @@ class HTMLPreviewDialog : public KDialogBase {
~HTMLPreviewDialog(); ~HTMLPreviewDialog();
virtual void show(); virtual void show();
private: private:
KHTMLPart* htmlPart; TDEHTMLPart* htmlPart;
KTempFile* tempFile; KTempFile* tempFile;
}; };

@ -6,4 +6,4 @@ libengine_la_LDFLAGS = $(all_libraries)
noinst_LTLIBRARIES = libengine.la noinst_LTLIBRARIES = libengine.la
libengine_la_SOURCES = linkchecker.cpp linkstatus.cpp searchmanager.cpp \ libengine_la_SOURCES = linkchecker.cpp linkstatus.cpp searchmanager.cpp \
linkfilter.cpp linkfilter.cpp
libengine_la_LIBADD = $(LIB_KHTML) libengine_la_LIBADD = $(LIB_TDEHTML)

@ -577,12 +577,12 @@ void LinkChecker::checkRef(KURL const& url)
Q_ASSERT(search_manager_); Q_ASSERT(search_manager_);
TQString url_string = url.url(); TQString url_string = url.url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string); TDEHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part) if(!html_part)
{ {
kdDebug() << "new KHTMLPart: " + url_string << endl; kdDebug() << "new TDEHTMLPart: " + url_string << endl;
html_part = new KHTMLPart(); html_part = new TDEHTMLPart();
html_part->setOnlyLocalReferences(true); html_part->setOnlyLocalReferences(true);
TQString tmpFile; TQString tmpFile;
@ -623,12 +623,12 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
Q_ASSERT(search_manager_); Q_ASSERT(search_manager_);
TQString url_string = linkstatus_parent->absoluteUrl().url(); TQString url_string = linkstatus_parent->absoluteUrl().url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string); TDEHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part) if(!html_part)
{ {
kdDebug() << "new KHTMLPart: " + url_string << endl; kdDebug() << "new TDEHTMLPart: " + url_string << endl;
html_part = new KHTMLPart(); html_part = new TDEHTMLPart();
html_part->setOnlyLocalReferences(true); html_part->setOnlyLocalReferences(true);
html_part->begin(); html_part->begin();
@ -653,7 +653,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
finnish(); finnish();
} }
bool LinkChecker::hasAnchor(KHTMLPart* html_part, TQString const& anchor) bool LinkChecker::hasAnchor(TDEHTMLPart* html_part, TQString const& anchor)
{ {
DOM::HTMLDocument htmlDocument = html_part->htmlDocument(); DOM::HTMLDocument htmlDocument = html_part->htmlDocument();
DOM::HTMLCollection anchors = htmlDocument.anchors(); DOM::HTMLCollection anchors = htmlDocument.anchors();

@ -25,7 +25,7 @@
#include <tqstring.h> #include <tqstring.h>
#include <tdeio/jobclasses.h> #include <tdeio/jobclasses.h>
class KHTMLPart; class TDEHTMLPart;
#include "../parser/http.h" #include "../parser/http.h"
#include "linkstatus.h" #include "linkstatus.h"
@ -52,7 +52,7 @@ public:
LinkStatus const* linkStatus() const; LinkStatus const* linkStatus() const;
static bool hasAnchor(KHTMLPart* html_part, TQString const& anchor); static bool hasAnchor(TDEHTMLPart* html_part, TQString const& anchor);
signals: signals:

@ -811,7 +811,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker)
checker = 0; checker = 0;
} }
KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const TDEHTMLPart* SearchManager::htmlPart(TQString const& key_url) const
{ {
if(!html_parts_.contains(key_url)) if(!html_parts_.contains(key_url))
return 0; return 0;
@ -819,7 +819,7 @@ KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const
return html_parts_[key_url]; return html_parts_[key_url];
} }
void SearchManager::addHtmlPart(TQString const& key_url, KHTMLPart* html_part) void SearchManager::addHtmlPart(TQString const& key_url, TDEHTMLPart* html_part)
{ {
Q_ASSERT(!key_url.isEmpty()); Q_ASSERT(!key_url.isEmpty());
Q_ASSERT(html_part); Q_ASSERT(html_part);
@ -833,7 +833,7 @@ void SearchManager::addHtmlPart(TQString const& key_url, KHTMLPart* html_part)
void SearchManager::removeHtmlParts() void SearchManager::removeHtmlParts()
{ {
KHTMLPartMap::Iterator it; TDEHTMLPartMap::Iterator it;
for(it = html_parts_.begin(); it != html_parts_.end(); ++it) for(it = html_parts_.begin(); it != html_parts_.end(); ++it)
{ {
delete it.data(); delete it.data();

@ -39,7 +39,7 @@ class TQDomElement;
using namespace std; using namespace std;
typedef TQMap<TQString, KHTMLPart*> KHTMLPartMap; typedef TQMap<TQString, TDEHTMLPart*> TDEHTMLPartMap;
class SearchManager: public TQObject class SearchManager: public TQObject
{ {
@ -61,10 +61,10 @@ public:
TQString toXML() const; TQString toXML() const;
void save(TQDomElement& element) const; void save(TQDomElement& element) const;
KHTMLPartMap const& htmlParts() const { return html_parts_; } TDEHTMLPartMap const& htmlParts() const { return html_parts_; }
KHTMLPart* htmlPart(TQString const& key_url) const; TDEHTMLPart* htmlPart(TQString const& key_url) const;
void addHtmlPart(TQString const& key_url, KHTMLPart* html_part); void addHtmlPart(TQString const& key_url, TDEHTMLPart* html_part);
void removeHtmlParts(); void removeHtmlParts();
void startSearch(KURL const& root); void startSearch(KURL const& root);
@ -186,7 +186,7 @@ private:
uint number_of_level_links_; uint number_of_level_links_;
uint number_of_links_to_check_; uint number_of_links_to_check_;
vector< vector< vector <LinkStatus*> > > search_results_; vector< vector< vector <LinkStatus*> > > search_results_;
KHTMLPartMap html_parts_; TDEHTMLPartMap html_parts_;
}; };
#include "searchmanager_impl.h" #include "searchmanager_impl.h"

@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/kommander/executor -I$(top_srcdir)/kommander/factory
METASOURCES = AUTO METASOURCES = AUTO
kde_module_LTLIBRARIES = libkommander_part.la kde_module_LTLIBRARIES = libkommander_part.la
libkommander_part_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP -L../../kommander/plugin/.libs -lkommanderplugin libkommander_part_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP -L../../kommander/plugin/.libs -lkommanderplugin
libkommander_part_la_LIBADD = $(top_builddir)/kommander/executor/libinstance.la $(top_builddir)/kommander/widget/libkommanderwidget.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML) libkommander_part_la_LIBADD = $(top_builddir)/kommander/executor/libinstance.la $(top_builddir)/kommander/widget/libkommanderwidget.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEHTML)
kde_services_DATA = kommander_part.desktop kde_services_DATA = kommander_part.desktop
libkommander_part_la_SOURCES = kommander_part.cpp libkommander_part_la_SOURCES = kommander_part.cpp
noinst_HEADERS = kommander_part.h noinst_HEADERS = kommander_part.h

@ -49,7 +49,7 @@
#define KVCARD_EXPORT KDE_EXPORT #define KVCARD_EXPORT KDE_EXPORT
#define KRESOURCES_EXPORT KDE_EXPORT #define KRESOURCES_EXPORT KDE_EXPORT
#define KSTYLE_EXPORT KDE_EXPORT #define KSTYLE_EXPORT KDE_EXPORT
#define KHTML_EXPORT KDE_EXPORT #define TDEHTML_EXPORT KDE_EXPORT
#define KMDI_EXPORT KDE_EXPORT #define KMDI_EXPORT KDE_EXPORT
#define KUTILS_EXPORT KDE_EXPORT #define KUTILS_EXPORT KDE_EXPORT
#define KATEPARTINTERFACES_EXPORT KDE_EXPORT #define KATEPARTINTERFACES_EXPORT KDE_EXPORT

@ -544,7 +544,7 @@ bugfixes might not be listed here.
ShowToolTips entry; inline editing of descriptions; save and reload the tree state; improved D&D) ShowToolTips entry; inline editing of descriptions; save and reload the tree state; improved D&D)
- support for tgz site templates. Site templates are tgz files that can be extracted - support for tgz site templates. Site templates are tgz files that can be extracted
to an user defined directory. to an user defined directory.
- added possibility to configure the preview part (has effect on the whole KHTML, including - added possibility to configure the preview part (has effect on the whole TDEHTML, including
Konqueror!) Konqueror!)

@ -260,7 +260,7 @@ SpellChecker: Quanta specific spellchecker. Not a real QuantaPlugin and most pro
------------------ ------------------
- KParts used inside Quanta. - KParts used inside Quanta.
WHTMLPart: simple KHTML based class which can display HTML pages. Used in preview WHTMLPart: simple TDEHTML based class which can display HTML pages. Used in preview
and documentation. and documentation.
kafka directory: VPL related classes kafka directory: VPL related classes

@ -15,7 +15,7 @@
<p>More things should be exported to DCOP<br />* CSS selectors<br />* DTEP Groups?</p> <p>More things should be exported to DCOP<br />* CSS selectors<br />* DTEP Groups?</p>
</body></html> </body></html>
\NewEntry 1 KHTML \NewEntry 1 TDEHTML
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif"> <html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
<p>Use XSLT file indicated in (enhanced) project file to preview XML</p> <p>Use XSLT file indicated in (enhanced) project file to preview XML</p>
</body></html> </body></html>

@ -193,7 +193,7 @@ void CSSEditor::initialize(){
m_myhi = new TQMyHighlighter(display); m_myhi = new TQMyHighlighter(display);
TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight); TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight);
m_previewer=new KHTMLPart(fPreview); m_previewer=new TDEHTMLPart(fPreview);
fPreviewLayout->addWidget(m_previewer->view()); fPreviewLayout->addWidget(m_previewer->view());

@ -27,7 +27,7 @@
class propertySetter; class propertySetter;
class TDEConfig; class TDEConfig;
class KHTMLPart; class TDEHTMLPart;
class TQListViewItem; class TQListViewItem;
class TQDomNodeList; class TQDomNodeList;
class TQVariant; class TQVariant;
@ -61,7 +61,7 @@ class CSSEditor : public CSSEditorS
TQMyHighlighter *m_myhi; TQMyHighlighter *m_myhi;
propertySetter *m_ps; propertySetter *m_ps;
myCheckListItem *m_currentProp; myCheckListItem *m_currentProp;
KHTMLPart *m_previewer; TDEHTMLPart *m_previewer;
TQDomDocument m_doc; TQDomDocument m_doc;
TQMap<TQString,TQString> m_properties; TQMap<TQString,TQString> m_properties;
TQString m_selectorName, TQString m_selectorName,

@ -20,7 +20,7 @@
//#include <kdebug.h> //#include <kdebug.h>
#include "fwglobal.h" #include "fwglobal.h"
SelectableArea::SelectableArea(TQWidget *parent, const char *name ) : KHTMLPart(parent,name) { SelectableArea::SelectableArea(TQWidget *parent, const char *name ) : TDEHTMLPart(parent,name) {
view()->setFrameShape(TQFrame::NoFrame); view()->setFrameShape(TQFrame::NoFrame);
view()->setMinimumSize(TQSize(1,1)); view()->setMinimumSize(TQSize(1,1));
view()->installEventFilter(this); view()->installEventFilter(this);
@ -50,7 +50,7 @@ bool SelectableArea::eventFilter(TQObject *o, TQEvent *event){
return true; return true;
} }
break; break;
default: return KHTMLPart::eventFilter( o, event ); default: return TDEHTMLPart::eventFilter( o, event );
} }
} }

@ -27,7 +27,7 @@
*/ */
class SelectableArea : public KHTMLPart { class SelectableArea : public TDEHTMLPart {
Q_OBJECT Q_OBJECT

@ -3,42 +3,42 @@ Type=Service
Exec=tdecmshell --caption %c %i tdehtml_behavior tdehtml_java_js tdehtml_fonts cookies cache proxy kcmcss crypto useragent tdehtml_plugins Exec=tdecmshell --caption %c %i tdehtml_behavior tdehtml_java_js tdehtml_fonts cookies cache proxy kcmcss crypto useragent tdehtml_plugins
Icon=konqueror Icon=konqueror
DocPath=konqueror/index.html DocPath=konqueror/index.html
Name=Configure KHTML Browser Part Name=Configure TDEHTML Browser Part
Name[ca]=Configura la part del fullejador KHTML Name[ca]=Configura la part del fullejador TDEHTML
Name[cs]=Nastavení KHTML Part Name[cs]=Nastavení TDEHTML Part
Name[da]=Indstil KHTML browser-part Name[da]=Indstil TDEHTML browser-part
Name[de]=Einrichten der KHTML-Browserkomponente Name[de]=Einrichten der TDEHTML-Browserkomponente
Name[el]=Ρύθμιση του KHTML περιηγητή Name[el]=Ρύθμιση του TDEHTML περιηγητή
Name[es]=Configurara la parte del navegador KHTML Name[es]=Configurara la parte del navegador TDEHTML
Name[et]=KHTML brauseri komponendi seadistamine Name[et]=TDEHTML brauseri komponendi seadistamine
Name[eu]=Konfiguratu KHTML arakatzailearen partea Name[eu]=Konfiguratu TDEHTML arakatzailearen partea
Name[fa]=پیکربندی جزء مرورگر KHTML Name[fa]=پیکربندی جزء مرورگر TDEHTML
Name[fi]=KHTML selaimen komponentti Name[fi]=TDEHTML selaimen komponentti
Name[fr]=Configurer le composant de navigation KHTML Name[fr]=Configurer le composant de navigation TDEHTML
Name[gl]=Configurar a parte do navegador KHTML Name[gl]=Configurar a parte do navegador TDEHTML
Name[hu]=A KHTML böngészőobjektum beállításai Name[hu]=A TDEHTML böngészőobjektum beállításai
Name[is]=Stilla KHTML vafrahluti Name[is]=Stilla TDEHTML vafrahluti
Name[it]=Parte browser configura KHTML Name[it]=Parte browser configura TDEHTML
Name[ja]=KHTML ブラウザ部を設定 Name[ja]=TDEHTML ブラウザ部を設定
Name[ka]=KHTML ბროუზერის ნაწილის კონფიგურაცია Name[ka]=TDEHTML ბროუზერის ნაწილის კონფიგურაცია
Name[lt]=Konfigūruoti KHTML naršyklės dalį Name[lt]=Konfigūruoti TDEHTML naršyklės dalį
Name[ms]=Selaraskan Bahagian Pelayar KHTML Name[ms]=Selaraskan Bahagian Pelayar TDEHTML
Name[nds]=KHTML-Browserkomponent inrichten Name[nds]=TDEHTML-Browserkomponent inrichten
Name[ne]=केडीई एचटीएमएल ब्राउजर भाग कन्फिगर गर्नुहोस् Name[ne]=केडीई एचटीएमएल ब्राउजर भाग कन्फिगर गर्नुहोस्
Name[nl]=KHTML Browser Part configuratie Name[nl]=TDEHTML Browser Part configuratie
Name[pl]=Konfiguracja osadzalnej części przeglądarki KHTML Name[pl]=Konfiguracja osadzalnej części przeglądarki TDEHTML
Name[pt]=Configurar a Parte de Navegação HTML Name[pt]=Configurar a Parte de Navegação HTML
Name[pt_BR]=Configurar o Componente KHTML do Navegador Name[pt_BR]=Configurar o Componente TDEHTML do Navegador
Name[ru]=Настроить компонент просмтра KHTML Name[ru]=Настроить компонент просмтра TDEHTML
Name[sk]=Nastaviť KHTML prehliadač Part Name[sk]=Nastaviť TDEHTML prehliadač Part
Name[sl]=Nastavite del brskalnika KHTML Name[sl]=Nastavite del brskalnika TDEHTML
Name[sr]=Део за подешавање KHTML прегледача Name[sr]=Део за подешавање TDEHTML прегледача
Name[sr@Latn]=Deo za podešavanje KHTML pregledača Name[sr@Latn]=Deo za podešavanje TDEHTML pregledača
Name[sv]=Anpassa delprogrammet för webbläsning KHTML Name[sv]=Anpassa delprogrammet för webbläsning TDEHTML
Name[ta]=KHTML உலாவி பகுதி உள்ளமை Name[ta]=TDEHTML உலாவி பகுதி உள்ளமை
Name[tg]=Танзими қисми браузери KHTML Name[tg]=Танзими қисми браузери TDEHTML
Name[tr]=KHTML Tarayıcısı Parçasını Yapılandır Name[tr]=TDEHTML Tarayıcısı Parçasını Yapılandır
Name[uk]=Налаштувати компонент перегляду KHTML Name[uk]=Налаштувати компонент перегляду TDEHTML
Name[zh_CN]=配置 KHTML 浏览器部件 Name[zh_CN]=配置 TDEHTML 浏览器部件
Name[zh_HK]=設定 KHTML 瀏覽器元件 Name[zh_HK]=設定 TDEHTML 瀏覽器元件
Name[zh_TW]=設定 KHTML 瀏覽器 Part Name[zh_TW]=設定 TDEHTML 瀏覽器 Part

@ -5,7 +5,7 @@ This file is intented to provide some informations about the internal design of
Summary: Summary:
1- A bit of history. 1- A bit of history.
2- Some definitions. 2- Some definitions.
3- A quick overview of the Quanta/KHTML stuff interacting with VPL. 3- A quick overview of the Quanta/TDEHTML stuff interacting with VPL.
4- Basic design and interaction with Quanta. 4- Basic design and interaction with Quanta.
5- VPL Classes 5- VPL Classes
6- Synchronizations 6- Synchronizations
@ -45,7 +45,7 @@ HTML
3) A quick overview of the Quanta/KHTML stuff interacting with VPL. 3) A quick overview of the Quanta/TDEHTML stuff interacting with VPL.
First, the most important thing: the parser. Defined in the quanta/parser/ directory, it is composed of the Node class, the Tag class, the Parser class and the QTag class. The parser reads and parses (Parser::parse) or rebuilds from an already parsed document (Parser::rebuild) a Node Tree, which is basically a DOM like representation of the document, but even closing Tags and empty text are represented (as well as server side scripting elements like PHP.) In fact, everything is put in the tree so that we can get back the original SGML/XML file from the tree. From now, I call it the Node tree. For example <html><body>text<img href="boo"> </body></html> has for Node tree: First, the most important thing: the parser. Defined in the quanta/parser/ directory, it is composed of the Node class, the Tag class, the Parser class and the QTag class. The parser reads and parses (Parser::parse) or rebuilds from an already parsed document (Parser::rebuild) a Node Tree, which is basically a DOM like representation of the document, but even closing Tags and empty text are represented (as well as server side scripting elements like PHP.) In fact, everything is put in the tree so that we can get back the original SGML/XML file from the tree. From now, I call it the Node tree. For example <html><body>text<img href="boo"> </body></html> has for Node tree:
HTML HTML
*-- BODY *-- BODY
@ -57,7 +57,7 @@ HTML
The Node class handle the pointers to the parent, next, previous and first child Node. *Each* Node has a valid pointer to a Tag. The Tag takes care to remember all the information concerning the Tag itself, like the attributes, the type, etc...) The Node class handle the pointers to the parent, next, previous and first child Node. *Each* Node has a valid pointer to a Tag. The Tag takes care to remember all the information concerning the Tag itself, like the attributes, the type, etc...)
One QTag per Element is created from the .tag files when Quanta is started. Each QTag contains all the DTD information about the Tag. E.g. the "IMG" Qtag says that it is a single Tag, and what are its attributes. You can get a QTag with QuantaCommon::tagFromDTD, but don't delete the QTag! One QTag per Element is created from the .tag files when Quanta is started. Each QTag contains all the DTD information about the Tag. E.g. the "IMG" Qtag says that it is a single Tag, and what are its attributes. You can get a QTag with QuantaCommon::tagFromDTD, but don't delete the QTag!
Now to tdehtml. The class KHTMLPart is the HTML renderer widget of konqueror. It internally works with a Node Tree (another? Yep!) but these Nodes are real DOM::Nodes. (From now, I will call it the DOM::Node tree) Each of the DOM Nodes is tdehtml-internally linked to a rendering Node i.e. a change made to one DOM::Node will update the HTML rendering cf /path/to/kde/include/dom/*.h and also in the tdelibs cvs module, cf the nice tdelibs/tdehtml/DESIGN.html. WARNING about DOM::Nodes, they are just interfaces!! Now to tdehtml. The class TDEHTMLPart is the HTML renderer widget of konqueror. It internally works with a Node Tree (another? Yep!) but these Nodes are real DOM::Nodes. (From now, I will call it the DOM::Node tree) Each of the DOM Nodes is tdehtml-internally linked to a rendering Node i.e. a change made to one DOM::Node will update the HTML rendering cf /path/to/kde/include/dom/*.h and also in the tdelibs cvs module, cf the nice tdelibs/tdehtml/DESIGN.html. WARNING about DOM::Nodes, they are just interfaces!!
@ -73,7 +73,7 @@ Then when a change is made to the source file, Parser::rebuild is called and syn
5) VPL classes. 5) VPL classes.
VPL has several classes, but note sometimes it is not really object oriented, but I will clean up soon. VPL has several classes, but note sometimes it is not really object oriented, but I will clean up soon.
* KafkaWidget(kafkahtmlpart.[h|cpp]): Derived from KHTMLPart, it uses the caret mode implemented by Leo Savernik in tdehtml (that means we don't have to care about cursor navigation). It handles every keypress in order to edit the widget (backspace/delete/return/<insertion of a letter>) and modify only the DOM::Node tree (not the Node tree). * KafkaWidget(kafkahtmlpart.[h|cpp]): Derived from TDEHTMLPart, it uses the caret mode implemented by Leo Savernik in tdehtml (that means we don't have to care about cursor navigation). It handles every keypress in order to edit the widget (backspace/delete/return/<insertion of a letter>) and modify only the DOM::Node tree (not the Node tree).
* KafkaDocument(wkafkapart.[h|cpp]): It takes care to load the DOM::Node tree from the Node tree, and when a change is made to the DOM::Node tree, it apply it in the Node tree. It basically takes care of the synchronization of the trees. * KafkaDocument(wkafkapart.[h|cpp]): It takes care to load the DOM::Node tree from the Node tree, and when a change is made to the DOM::Node tree, it apply it in the Node tree. It basically takes care of the synchronization of the trees.
@ -83,7 +83,7 @@ VPL has several classes, but note sometimes it is not really object oriented, bu
* kNodeAttrs(nodeproperties.[h|cpp]): We can easily put a link to a DOM::Node from a Node in the Node class, but the opposite is impossible (we can't derive them). So we have a link DOM::Node => kNodeAttrs => Node (thanks to a QPtrDict). And we also have some informations about the way to handle this node when editing VPL. (Be careful, one Node can be linked against several Nodes. See after.) * kNodeAttrs(nodeproperties.[h|cpp]): We can easily put a link to a DOM::Node from a Node in the Node class, but the opposite is impossible (we can't derive them). So we have a link DOM::Node => kNodeAttrs => Node (thanks to a QPtrDict). And we also have some informations about the way to handle this node when editing VPL. (Be careful, one Node can be linked against several Nodes. See after.)
* NodeEnhancer(nodeenhancer.[h|cpp]): It is an interface class. Its aim it to "transform" or "enhance" DOM::Nodes when DOM::Nodes are synchronized from Nodes. Sometimes it is to add some style (e.g. adding a red dotted border to FORM elements) but sometimes it is essential (e.g. KHTML won't accept a TABLE without a TBODY even if it is DTD valid, so we had to manually add a TBODY. It explain why some Nodes can point to more than 1 Nodes.) * NodeEnhancer(nodeenhancer.[h|cpp]): It is an interface class. Its aim it to "transform" or "enhance" DOM::Nodes when DOM::Nodes are synchronized from Nodes. Sometimes it is to add some style (e.g. adding a red dotted border to FORM elements) but sometimes it is essential (e.g. TDEHTML won't accept a TABLE without a TBODY even if it is DTD valid, so we had to manually add a TBODY. It explain why some Nodes can point to more than 1 Nodes.)
* HTMLEnhancer(htmlenhancer.[h|cpp]): Derived from NodeEnhancer, it apply transformations for HTML files. * HTMLEnhancer(htmlenhancer.[h|cpp]): Derived from NodeEnhancer, it apply transformations for HTML files.

@ -10,7 +10,7 @@ libkafkalibrary_la_SOURCES = htmlenhancer.cpp domtreeview.cpp kafkacommon.cpp \
libkafkalibrary_la_METASOURCES = AUTO libkafkalibrary_la_METASOURCES = AUTO
libkafkalibrary_la_LDFLAGS = $(all_libraries) libkafkalibrary_la_LDFLAGS = $(all_libraries)
libkafkalibrary_la_LIBADD = $(LIB_KHTML) libkafkalibrary_la_LIBADD = $(LIB_TDEHTML)
kafkapartdir = $(kde_datadir)/kafkapart kafkapartdir = $(kde_datadir)/kafkapart
kafkapart_DATA = entities kafkapart_DATA = entities

@ -27,7 +27,7 @@
#include "domtreeview.moc" #include "domtreeview.moc"
DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name) DOMTreeView::DOMTreeView(TQWidget *parent, TDEHTMLPart *currentpart, const char * name) : KListView(parent, name)
{ {
setCaption(name); setCaption(name);
setRootIsDecorated(true); setRootIsDecorated(true);
@ -137,7 +137,7 @@ void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
} }
} }
KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl ) KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, TDEHTMLPart *part, const char* name, bool modal, WFlags fl )
: TQDialog(parent, name, modal, fl) : TQDialog(parent, name, modal, fl)
{ {
setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );

@ -40,7 +40,7 @@ class DOMTreeView : public KListView
Q_OBJECT Q_OBJECT
public: public:
DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0); DOMTreeView(TQWidget *parent, TDEHTMLPart *part, const char * name = 0);
~DOMTreeView(); ~DOMTreeView();
void setTitle(const TQString &str); void setTitle(const TQString &str);
void recursive(const DOM::Node &pNode, const DOM::Node &node); void recursive(const DOM::Node &pNode, const DOM::Node &node);
@ -60,7 +60,7 @@ class DOMTreeView : public KListView
TQPtrDict<TQListViewItem> m_itemdict; TQPtrDict<TQListViewItem> m_itemdict;
TQPtrDict<DOM::Node> m_nodedict; TQPtrDict<DOM::Node> m_nodedict;
DOM::Node document; DOM::Node document;
KHTMLPart *part; TDEHTMLPart *part;
}; };
@ -69,7 +69,7 @@ class KafkaDOMTreeDialog : public TQDialog
Q_OBJECT Q_OBJECT
public: public:
KafkaDOMTreeDialog(TQWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); KafkaDOMTreeDialog(TQWidget *parent = 0, TDEHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KafkaDOMTreeDialog(); ~KafkaDOMTreeDialog();
DOMTreeView *domview; DOMTreeView *domview;
TQGridLayout *DialogLayout; TQGridLayout *DialogLayout;

@ -85,7 +85,7 @@ public:
KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part, KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name) const char *name)
: KHTMLPart(widgetParent, name, TQT_TQOBJECT(parent), name), : TDEHTMLPart(widgetParent, name, TQT_TQOBJECT(parent), name),
w(part) w(part)
{ {
m_contextPopupMenu = new TQPopupMenu(); m_contextPopupMenu = new TQPopupMenu();
@ -104,7 +104,7 @@ KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument
setCaretMode(true); setCaretMode(true);
connect(this, TQT_SIGNAL(caretPositionChanged(const DOM::Node &, long)), connect(this, TQT_SIGNAL(caretPositionChanged(const DOM::Node &, long)),
this, TQT_SLOT(slotNewCursorPos(const DOM::Node &, long))); this, TQT_SLOT(slotNewCursorPos(const DOM::Node &, long)));
setCaretDisplayPolicyNonFocused(KHTMLPart::CaretVisible); setCaretDisplayPolicyNonFocused(TDEHTMLPart::CaretVisible);
connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)), connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&))); this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&)));
@ -2043,12 +2043,12 @@ void KafkaWidget::tdehtmlMouseMoveEvent(tdehtml::MouseMoveEvent *event)
else else
view()->setCursor(TQt::arrowCursor); view()->setCursor(TQt::arrowCursor);
KHTMLPart::tdehtmlMouseMoveEvent(event); TDEHTMLPart::tdehtmlMouseMoveEvent(event);
} }
void KafkaWidget::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event) void KafkaWidget::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event)
{ {
KHTMLPart::tdehtmlMouseReleaseEvent(event); TDEHTMLPart::tdehtmlMouseReleaseEvent(event);
if(m_currentNode.isNull() || m_currentNode.nodeName().string().lower() == "#document") if(m_currentNode.isNull() || m_currentNode.nodeName().string().lower() == "#document")
{ {
m_currentNode = w->body; m_currentNode = w->body;
@ -2061,7 +2061,7 @@ void KafkaWidget::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event)
void KafkaWidget::tdehtmlMousePressEvent(tdehtml::MousePressEvent *event) void KafkaWidget::tdehtmlMousePressEvent(tdehtml::MousePressEvent *event)
{ {
KHTMLPart::tdehtmlMousePressEvent(event); TDEHTMLPart::tdehtmlMousePressEvent(event);
if(d->m_cursorOffset == 0 && !m_currentNode.isNull() && if(d->m_cursorOffset == 0 && !m_currentNode.isNull() &&
m_currentNode.nodeName().string().lower() == "body") m_currentNode.nodeName().string().lower() == "body")
putCursorAtFirstAvailableLocation(); putCursorAtFirstAvailableLocation();
@ -2073,7 +2073,7 @@ void KafkaWidget::tdehtmlMousePressEvent(tdehtml::MousePressEvent *event)
void KafkaWidget::tdehtmlDrawContentsEvent(tdehtml::DrawContentsEvent *event) void KafkaWidget::tdehtmlDrawContentsEvent(tdehtml::DrawContentsEvent *event)
{ {
KHTMLPart::tdehtmlDrawContentsEvent(event); TDEHTMLPart::tdehtmlDrawContentsEvent(event);
} }
void KafkaWidget::getCurrentNode(DOM::Node &_currentNode, long &offset) void KafkaWidget::getCurrentNode(DOM::Node &_currentNode, long &offset)

@ -43,7 +43,7 @@ class TQPopupMenu;
* such as typing text. * such as typing text.
*/ */
class KafkaWidget : public KHTMLPart class KafkaWidget : public TDEHTMLPart
{ {
Q_OBJECT Q_OBJECT

@ -516,7 +516,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
Node *n, *parent; Node *n, *parent;
int i; int i;
// Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or KHTML // Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or TDEHTML
// will give us problems. // will give us problems.
bool canInsertEmptyNode = false; bool canInsertEmptyNode = false;
if(node->tag->type == Tag::Empty) if(node->tag->type == Tag::Empty)

@ -35,7 +35,7 @@
WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource, WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource,
TQObject *parent, const char *name, GUIProfile prof) TQObject *parent, const char *name, GUIProfile prof)
: KHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0) : TDEHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0)
{ {
//kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl; //kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl;
hpos = 0; hpos = 0;
@ -44,9 +44,9 @@ WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enable
konqConfig.setGroup("HTML Settings"); konqConfig.setGroup("HTML Settings");
const KHTMLSettings * set = settings(); const TDEHTMLSettings * set = settings();
const_cast<KHTMLSettings*>(set)->init( &konqConfig, false ); const_cast<TDEHTMLSettings*>(set)->init( &konqConfig, false );
view()->installEventFilter(this); view()->installEventFilter(this);
m_enableViewSource = enableViewSource; m_enableViewSource = enableViewSource;
@ -81,14 +81,14 @@ bool WHTMLPart::openURL(const KURL& url)
{ {
KURL previewURL = url; KURL previewURL = url;
previewURL.setFileName("preview-" + url.fileName()); previewURL.setFileName("preview-" + url.fileName());
return KHTMLPart::openURL(previewURL); return TDEHTMLPart::openURL(previewURL);
} else } else
return KHTMLPart::openURL(url); return TDEHTMLPart::openURL(url);
} }
void WHTMLPart::urlSelected ( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs args) void WHTMLPart::urlSelected ( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs args)
{ {
KHTMLPart::urlSelected (url, button, state, target, args); TDEHTMLPart::urlSelected (url, button, state, target, args);
KURL cURL = completeURL( url ); KURL cURL = completeURL( url );
// alternative not tested but used in tdevelop ! // alternative not tested but used in tdevelop !
// KURL cURL=KURL(baseURL(),url); // KURL cURL=KURL(baseURL(),url);

@ -27,7 +27,7 @@ class KPopupMenu;
*@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon
*/ */
class WHTMLPart : public KHTMLPart { class WHTMLPart : public TDEHTMLPart {
Q_OBJECT Q_OBJECT
public: public:

@ -30,7 +30,7 @@ quanta_LDADD = $(top_builddir)/quanta/project/libproject.la \
$(top_builddir)/quanta/utility/libutility.la \ $(top_builddir)/quanta/utility/libutility.la \
$(top_builddir)/lib/libquantamodule.la \ $(top_builddir)/lib/libquantamodule.la \
-lkatepartinterfaces $(LIB_KNEWSTUFF) $(LIB_KAFKA) $(LIB_CVSSERVICE) \ -lkatepartinterfaces $(LIB_KNEWSTUFF) $(LIB_KAFKA) $(LIB_CVSSERVICE) \
$(LIB_KMDI) $(LIBXML_LIBS) $(LIBXSLT_LIBS) $(LIB_KABC) $(LIB_KSPELL) $(LIB_KHTML) -lX11 -ltdefx $(LIB_KMDI) $(LIBXML_LIBS) $(LIBXSLT_LIBS) $(LIB_KABC) $(LIB_KSPELL) $(LIB_TDEHTML) -lX11 -ltdefx
# $(top_builddir)/lib/compatibility/libcompat.la # $(top_builddir)/lib/compatibility/libcompat.la
AM_CPPFLAGS = -I$(top_srcdir)/quanta/dialogs \ AM_CPPFLAGS = -I$(top_srcdir)/quanta/dialogs \

@ -726,7 +726,7 @@ void QuantaApp::slotRepaintPreview()
m_previewedDocument = 0L; m_previewedDocument = 0L;
previewCopyMade = false; previewCopyMade = false;
KHTMLView *html = m_htmlPart->view(); TDEHTMLView *html = m_htmlPart->view();
int xOffset = html->contentsX(), yOffset = html->contentsY(); int xOffset = html->contentsX(), yOffset = html->contentsY();
m_htmlPart->closeURL(); m_htmlPart->closeURL();
@ -1149,7 +1149,7 @@ void QuantaApp::slotOptionsConfigureActions()
void QuantaApp::slotPreviewOptions() void QuantaApp::slotPreviewOptions()
{ {
KMessageBox::information(this, i18n("Changes made in the preview configuration dialog are global and have effect on every application using the KHTML part to display web pages, including Konqueror."), i18n("Warning"), "configure_preview_warning"); KMessageBox::information(this, i18n("Changes made in the preview configuration dialog are global and have effect on every application using the TDEHTML part to display web pages, including Konqueror."), i18n("Warning"), "configure_preview_warning");
TDEApplication::startServiceByDesktopName("quanta_preview_config"); TDEApplication::startServiceByDesktopName("quanta_preview_config");
} }

@ -69,7 +69,7 @@ class TQListViewItem;
class TQPopupMenu; class TQPopupMenu;
class WHTMLPart; class WHTMLPart;
class KHTMLView; class TDEHTMLView;
class KAction; class KAction;
class KToggleAction; class KToggleAction;

@ -22,7 +22,7 @@ libtdefilereplacepart_la_SOURCES = tdefilereplacepart.cpp tdefilereplaceview.cpp
commandengine.cpp configurationclasses.cpp commandengine.cpp configurationclasses.cpp
libtdefilereplacepart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP libtdefilereplacepart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts -lDCOP
libtdefilereplacepart_la_LIBADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_KHTML) libtdefilereplacepart_la_LIBADD = $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEHTML)
messages: rc.cpp messages: rc.cpp
$(XGETTEXT) *.cpp *.h -o $(podir)/tdefilereplace.pot $(XGETTEXT) *.cpp *.h -o $(podir)/tdefilereplace.pot

Loading…
Cancel
Save