diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 21:05:46 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 21:05:46 -0600 |
commit | e76ee03c0290b07481e45b0e317c911f6e4e7995 (patch) | |
tree | 9bfd9c868df8dc32779e3f09fa709af285e891e1 /quanta/parts | |
parent | 5544d5f4a61929002ff6737e1b002d41eb0a4ba3 (diff) | |
download | tdewebdev-e76ee03c0290b07481e45b0e317c911f6e4e7995.tar.gz tdewebdev-e76ee03c0290b07481e45b0e317c911f6e4e7995.zip |
Rename kiobuffer and KHTML
Diffstat (limited to 'quanta/parts')
-rw-r--r-- | quanta/parts/kafka/DESIGN | 10 | ||||
-rw-r--r-- | quanta/parts/kafka/Makefile.am | 2 | ||||
-rw-r--r-- | quanta/parts/kafka/domtreeview.cpp | 4 | ||||
-rw-r--r-- | quanta/parts/kafka/domtreeview.h | 6 | ||||
-rw-r--r-- | quanta/parts/kafka/kafkahtmlpart.cpp | 12 | ||||
-rw-r--r-- | quanta/parts/kafka/kafkahtmlpart.h | 2 | ||||
-rw-r--r-- | quanta/parts/kafka/wkafkapart.cpp | 2 | ||||
-rw-r--r-- | quanta/parts/preview/whtmlpart.cpp | 12 | ||||
-rw-r--r-- | quanta/parts/preview/whtmlpart.h | 2 |
9 files changed, 26 insertions, 26 deletions
diff --git a/quanta/parts/kafka/DESIGN b/quanta/parts/kafka/DESIGN index 2f9537a2..824ab4bb 100644 --- a/quanta/parts/kafka/DESIGN +++ b/quanta/parts/kafka/DESIGN @@ -5,7 +5,7 @@ This file is intented to provide some informations about the internal design of Summary: 1- A bit of history. 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. 5- VPL Classes 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: HTML *-- 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...) 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. 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. @@ -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.) -* 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. diff --git a/quanta/parts/kafka/Makefile.am b/quanta/parts/kafka/Makefile.am index 3b300dcb..eaf454a7 100644 --- a/quanta/parts/kafka/Makefile.am +++ b/quanta/parts/kafka/Makefile.am @@ -10,7 +10,7 @@ libkafkalibrary_la_SOURCES = htmlenhancer.cpp domtreeview.cpp kafkacommon.cpp \ libkafkalibrary_la_METASOURCES = AUTO libkafkalibrary_la_LDFLAGS = $(all_libraries) -libkafkalibrary_la_LIBADD = $(LIB_KHTML) +libkafkalibrary_la_LIBADD = $(LIB_TDEHTML) kafkapartdir = $(kde_datadir)/kafkapart kafkapart_DATA = entities diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp index 0b1951f9..1ba6e467 100644 --- a/quanta/parts/kafka/domtreeview.cpp +++ b/quanta/parts/kafka/domtreeview.cpp @@ -27,7 +27,7 @@ #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); 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) { setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) ); diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h index c6c22907..ba282d3b 100644 --- a/quanta/parts/kafka/domtreeview.h +++ b/quanta/parts/kafka/domtreeview.h @@ -40,7 +40,7 @@ class DOMTreeView : public KListView Q_OBJECT public: - DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0); + DOMTreeView(TQWidget *parent, TDEHTMLPart *part, const char * name = 0); ~DOMTreeView(); void setTitle(const TQString &str); void recursive(const DOM::Node &pNode, const DOM::Node &node); @@ -60,7 +60,7 @@ class DOMTreeView : public KListView TQPtrDict<TQListViewItem> m_itemdict; TQPtrDict<DOM::Node> m_nodedict; DOM::Node document; - KHTMLPart *part; + TDEHTMLPart *part; }; @@ -69,7 +69,7 @@ class KafkaDOMTreeDialog : public TQDialog Q_OBJECT 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(); DOMTreeView *domview; TQGridLayout *DialogLayout; diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp index ecdc1b8d..1b2ca3d2 100644 --- a/quanta/parts/kafka/kafkahtmlpart.cpp +++ b/quanta/parts/kafka/kafkahtmlpart.cpp @@ -85,7 +85,7 @@ public: KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part, const char *name) - : KHTMLPart(widgetParent, name, TQT_TQOBJECT(parent), name), + : TDEHTMLPart(widgetParent, name, TQT_TQOBJECT(parent), name), w(part) { m_contextPopupMenu = new TQPopupMenu(); @@ -104,7 +104,7 @@ KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument setCaretMode(true); connect(this, TQT_SIGNAL(caretPositionChanged(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&)), this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&))); @@ -2043,12 +2043,12 @@ void KafkaWidget::tdehtmlMouseMoveEvent(tdehtml::MouseMoveEvent *event) else view()->setCursor(TQt::arrowCursor); - KHTMLPart::tdehtmlMouseMoveEvent(event); + TDEHTMLPart::tdehtmlMouseMoveEvent(event); } void KafkaWidget::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event) { - KHTMLPart::tdehtmlMouseReleaseEvent(event); + TDEHTMLPart::tdehtmlMouseReleaseEvent(event); if(m_currentNode.isNull() || m_currentNode.nodeName().string().lower() == "#document") { m_currentNode = w->body; @@ -2061,7 +2061,7 @@ void KafkaWidget::tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent *event) void KafkaWidget::tdehtmlMousePressEvent(tdehtml::MousePressEvent *event) { - KHTMLPart::tdehtmlMousePressEvent(event); + TDEHTMLPart::tdehtmlMousePressEvent(event); if(d->m_cursorOffset == 0 && !m_currentNode.isNull() && m_currentNode.nodeName().string().lower() == "body") putCursorAtFirstAvailableLocation(); @@ -2073,7 +2073,7 @@ void KafkaWidget::tdehtmlMousePressEvent(tdehtml::MousePressEvent *event) void KafkaWidget::tdehtmlDrawContentsEvent(tdehtml::DrawContentsEvent *event) { - KHTMLPart::tdehtmlDrawContentsEvent(event); + TDEHTMLPart::tdehtmlDrawContentsEvent(event); } void KafkaWidget::getCurrentNode(DOM::Node &_currentNode, long &offset) diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h index ae7bf1e7..0fd36ff2 100644 --- a/quanta/parts/kafka/kafkahtmlpart.h +++ b/quanta/parts/kafka/kafkahtmlpart.h @@ -43,7 +43,7 @@ class TQPopupMenu; * such as typing text. */ -class KafkaWidget : public KHTMLPart +class KafkaWidget : public TDEHTMLPart { Q_OBJECT diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp index 7ef185f4..03a7a0f6 100644 --- a/quanta/parts/kafka/wkafkapart.cpp +++ b/quanta/parts/kafka/wkafkapart.cpp @@ -516,7 +516,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode) Node *n, *parent; 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. bool canInsertEmptyNode = false; if(node->tag->type == Tag::Empty) diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp index bc39e1af..51b41628 100644 --- a/quanta/parts/preview/whtmlpart.cpp +++ b/quanta/parts/preview/whtmlpart.cpp @@ -35,7 +35,7 @@ WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource, 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; hpos = 0; @@ -44,9 +44,9 @@ WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enable 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); m_enableViewSource = enableViewSource; @@ -81,14 +81,14 @@ bool WHTMLPart::openURL(const KURL& url) { KURL previewURL = url; previewURL.setFileName("preview-" + url.fileName()); - return KHTMLPart::openURL(previewURL); + return TDEHTMLPart::openURL(previewURL); } 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) { - KHTMLPart::urlSelected (url, button, state, target, args); + TDEHTMLPart::urlSelected (url, button, state, target, args); KURL cURL = completeURL( url ); // alternative not tested but used in tdevelop ! // KURL cURL=KURL(baseURL(),url); diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h index 2fbed22e..41212459 100644 --- a/quanta/parts/preview/whtmlpart.h +++ b/quanta/parts/preview/whtmlpart.h @@ -27,7 +27,7 @@ class KPopupMenu; *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon */ -class WHTMLPart : public KHTMLPart { +class WHTMLPart : public TDEHTMLPart { Q_OBJECT public: |