summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka/htmldocumentproperties.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/parts/kafka/htmldocumentproperties.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/kafka/htmldocumentproperties.h')
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
new file mode 100644
index 00000000..62a64659
--- /dev/null
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -0,0 +1,91 @@
+/***************************************************************************
+ htmldocumentproperties.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@kdewebdev.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef HTMLDOCUMENTPROPERTIES_H
+#define HTMLDOCUMENTPROPERTIES_H
+
+class Node;
+class NodeModifsSet;
+class AttributeItem;
+class EditableTree;
+
+#include <qptrlist.h>
+
+#include "tagattributeitems.h"
+#include "htmldocumentpropertiesui.h"
+
+class NodeLinkedViewItem : public AttributeItem
+{
+public:
+ NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2);
+ virtual ~NodeLinkedViewItem();
+
+ Node *node;
+ bool dirty, deleted;
+};
+
+/**
+ * The HTML Document properties dialog.
+ * TODO: Use KDialogBase so it looks more consistent with the rest of the dialogs
+ */
+class htmlDocumentProperties : public htmlDocumentPropertiesui
+{
+ Q_OBJECT
+public:
+ /**
+ * @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
+ * without having made any changes.
+ */
+ htmlDocumentProperties( QWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~htmlDocumentProperties();
+
+protected slots:
+ virtual void aboutToClose() {}
+
+private slots:
+ virtual void accept();
+ virtual void reject();
+ virtual void newMetaItem();
+ virtual void deleteCurrentMetaItem();
+ virtual void newCSSRule();
+ virtual void editCSSRule();
+ virtual void deleteCurrentCSSRule();
+
+ virtual void titleChanged(const QString &);
+ virtual void metaChanged(QListViewItem * );
+ virtual void CSSChanged(QListViewItem * );
+ virtual void linkChanged( const QString& );
+
+private:
+ /**
+ * If we want to add a new Node, we must first create the basics (if necessary) i.e. html, body
+ * head nodes, and moving if necessary all the existing Nodes.
+ * @param modifs The changes are logged for the undo/redo system.
+ */
+ void addBasicNodes(NodeModifsSet *modifs);
+ //must be called after addBasicnodes
+ void addBasicCssNodes(NodeModifsSet *modifs);
+ void loadMetaNode(Node *node);
+ void loadCSS(Node *node);
+
+ QPtrList<NodeLinkedViewItem> CSSList, metaList;
+ Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode;
+ bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes;
+};
+
+#endif