00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GLUONCREATOR_HISTORYMANAGER_H
00021 #define GLUONCREATOR_HISTORYMANAGER_H
00022
00023 #include <core/singleton.h>
00024 #include "gluoncreator_macros.h"
00025
00026 class KActionCollection;
00027 class QUndoCommand;
00028 class QVariant;
00029
00030 namespace GluonCreator
00031 {
00032 class GLUONCREATOR_EXPORT HistoryManager : public GluonCore::Singleton<HistoryManager>
00033 {
00034 Q_OBJECT
00035 public:
00036
00037 public Q_SLOTS:
00038 void addCommand( QUndoCommand* command );
00039
00040 void undo();
00041 void redo();
00042
00043 void clear();
00044 void setClean();
00045
00046 Q_SIGNALS:
00047 void historyChanged( const QUndoCommand* command );
00048
00049 void canUndoChanged( bool );
00050 void canRedoChanged( bool );
00051 void cleanChanged( bool );
00052
00053 private:
00054 friend class GluonCore::Singleton<HistoryManager>;
00055
00056 HistoryManager();
00057 ~HistoryManager();
00058 Q_DISABLE_COPY( HistoryManager )
00059
00060 class HistoryManagerPrivate;
00061 HistoryManagerPrivate* const d;
00062 };
00063 }
00064
00065 #endif // GLUONCREATOR_HISTORYMANAGER_H