summaryrefslogtreecommitdiffstats
path: root/part/commands_file.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
commitd62c8c002c51fb7c36487839eeeb4ac89f044dee (patch)
treebb4d1f5c631ab1f22a3018ba39e6a806035f80fd /part/commands_file.h
downloadkxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz
kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'part/commands_file.h')
-rw-r--r--part/commands_file.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/part/commands_file.h b/part/commands_file.h
new file mode 100644
index 0000000..00dc484
--- /dev/null
+++ b/part/commands_file.h
@@ -0,0 +1,102 @@
+/***************************************************************************
+ commands_file - description
+ -------------------
+ begin : Wed Nov 26 2003
+ copyright : (C) 2003 by The KXMLEditor Team
+ email : a_charytoniuk@user.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_FILE_H
+#define COMMANDS_FILE_H
+
+#include "kxecommand.h"
+#include <klocale.h>
+
+/** @file
+ This file contains all commands taken from menu File which
+ can effect our edited document. These commans allows to have
+ undo/redo functionality.
+*/
+
+/**
+Command for setting version and encoding to XML file.
+
+@author The KXMLEditor Team
+*/
+
+class KXEDocument;
+class QString;
+
+class KXEVersionEncodingCommand : public KXECommand
+{
+ public:
+ KXEVersionEncodingCommand(KXEDocument* pDocument, const QString& oldData, const QString &newData);
+ virtual void execute();
+ virtual void unexecute();
+ virtual QString name() const { return i18n("Changing version and encoding"); }
+ ~KXEVersionEncodingCommand();
+ protected:
+ QString m_strOldData;
+ QString m_strNewData;
+};
+
+class KXEStylesheetAttachCommand : public KXECommand
+{
+ public:
+ KXEStylesheetAttachCommand(KXEDocument* pDocument,const QString& prevStylesheet,const QString& newStylesheet);
+ virtual void execute();
+ virtual void unexecute();
+ virtual QString name() const { return i18n("Attaching stylesheet ")+m_strNewStylesheet; }
+ ~KXEStylesheetAttachCommand();
+ protected:
+ QString m_strPrevStylesheet;
+ QString m_strNewStylesheet;
+};
+
+class KXEStylesheetDetachCommand : public KXECommand
+{
+ public:
+ KXEStylesheetDetachCommand(KXEDocument* pDocument,const QString& prevStylesheet);
+ virtual void execute();
+ virtual void unexecute();
+ virtual QString name() const { return i18n("Detaching stylesheet ")+m_strPrevStylesheet; }
+ ~KXEStylesheetDetachCommand();
+ protected:
+ QString m_strPrevStylesheet;
+};
+
+class KXESchemaAttachCommand : public KXECommand
+{
+ public:
+ KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema);
+ KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema, const QString& prevSchema);
+ virtual void execute();
+ virtual void unexecute();
+ virtual QString name() const { return i18n("Attaching schema ")+m_strNewSchema; }
+ ~KXESchemaAttachCommand();
+ protected:
+ QString m_strNewSchema;
+ QString m_strPrevSchema;
+};
+
+class KXESchemaDetachCommand : public KXECommand
+{
+ public:
+ KXESchemaDetachCommand(KXEDocument* pDocument, const QString& schema);
+ virtual void execute();
+ virtual void unexecute();
+ virtual QString name() const { return i18n("Detaching schema ")+m_schema; }
+ ~KXESchemaDetachCommand();
+ protected:
+ QString m_schema;
+};
+
+#endif