From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- quanta/parts/kafka/htmldocumentproperties.h | 91 +++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 quanta/parts/kafka/htmldocumentproperties.h (limited to 'quanta/parts/kafka/htmldocumentproperties.h') 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 + +#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 CSSList, metaList; + Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode; + bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes; +}; + +#endif -- cgit v1.2.3