From d62c8c002c51fb7c36487839eeeb4ac89f044dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 26 Mar 2016 13:50:43 +0100 Subject: Initial import of kxmleditor 1.1.4 --- part/commands_insert.h | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 part/commands_insert.h (limited to 'part/commands_insert.h') diff --git a/part/commands_insert.h b/part/commands_insert.h new file mode 100644 index 0000000..4d9da8d --- /dev/null +++ b/part/commands_insert.h @@ -0,0 +1,94 @@ +/*************************************************************************** + commands_insert - description + ------------------- + begin : Wed Nov 26 2003 + copyright : (C) 2003 by The KXMLEditor Team + email : lvanek.sourceforge.net + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 COMMANDS_INSERT_H +#define COMMANDS_INSERT_H + +#include + +#include "kxecommand.h" +#include "kxechardatadialog.h" + +/** +@author The KXMLEditor Team +*/ +class KXEElementCommand : public KXECommand +{ + public: + KXEElementCommand(KXEDocument*, QDomDocument *, QString, QString, QString); + KXEElementCommand(KXEDocument*, QDomElement &, QString, QString, QString, bool); + ~KXEElementCommand(); + virtual void execute(); + virtual void unexecute(); + virtual QString name() const { return i18n("Insert element"); } + + protected: + QDomDocument * m_pDomDoc; + QDomElement m_domParentElement; + bool m_bAtTop; + QDomElement m_domElement; +}; + +class KXEAttributeCommand : public KXECommand +{ + public: + KXEAttributeCommand(KXEDocument*, QDomElement &, QString, QString, QString); + ~KXEAttributeCommand(); + virtual void execute(); + virtual void unexecute(); + virtual QString name() const { return i18n("Insert attribute"); } + + protected: + QString m_strNamespace; + QString m_strQName; + QString m_strValue; + QDomElement m_domOwnerElement; +}; + +class KXECharDataCommand : public KXECommand +{ + public: + KXECharDataCommand(KXEDocument*, QDomElement &, bool, CharDataKind, QString); + ~KXECharDataCommand(); + virtual void execute(); + virtual void unexecute(); + virtual QString name() const { return i18n("Insert char data"); } + + protected: + + bool m_bAtTop; + QDomElement m_domParentElement; + QDomCharacterData m_domCharData; +}; + +class KXEProcInstrCommand : public KXECommand +{ + public: + KXEProcInstrCommand(KXEDocument*, QDomDocument *, bool, QString, QString); + KXEProcInstrCommand(KXEDocument*, QDomElement &, bool, QString, QString); + ~KXEProcInstrCommand(); + virtual void execute(); + virtual void unexecute(); + virtual QString name() const { return i18n("Insert proc. instr."); } + + protected: + QDomDocument * m_pDomDoc; + QDomElement m_domParentElement; + bool m_bAtTop; + QDomProcessingInstruction m_domProcInstr; +}; + +#endif -- cgit v1.2.1