|
QGIS API Documentation
master-3f58142
|
00001 /*************************************************************************** 00002 qgscomposermultiframecommand.h 00003 ------------------------------ 00004 begin : 2012-08-02 00005 copyright : (C) 2012 by Marco Hugentobler 00006 email : marco dot hugentobler at sourcepole dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QGSCOMPOSERMULTIFRAMECOMMAND_H 00019 #define QGSCOMPOSERMULTIFRAMECOMMAND_H 00020 00021 #include <QUndoCommand> 00022 #include <QDomDocument> 00023 00024 class QgsComposerMultiFrame; 00025 00026 class CORE_EXPORT QgsComposerMultiFrameCommand: public QUndoCommand 00027 { 00028 public: 00029 QgsComposerMultiFrameCommand( QgsComposerMultiFrame* multiFrame, const QString& text, QUndoCommand* parent = 0 ); 00030 ~QgsComposerMultiFrameCommand(); 00031 00032 void undo(); 00033 void redo(); 00034 00035 void savePreviousState(); 00036 void saveAfterState(); 00037 00039 bool containsChange() const; 00040 00041 private: 00042 QgsComposerMultiFrame* mMultiFrame; 00043 00044 QDomDocument mPreviousState; 00045 QDomDocument mAfterState; 00046 00047 bool mFirstRun; 00048 00049 QgsComposerMultiFrameCommand(); //forbidden 00050 void saveState( QDomDocument& stateDoc ); 00051 void restoreState( QDomDocument& stateDoc ); 00052 bool checkFirstRun(); 00053 }; 00054 00055 #endif // QGSCOMPOSERMULTIFRAMECOMMAND_H