Hugin trunk 0.1
Loading...
Searching...
No Matches
CommandHistory.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _COMMANDHISTORY_H
25#define _COMMANDHISTORY_H
26
27#include <hugin_shared.h>
28#include "Command.h"
29#include <vector>
30
31namespace PanoCommand
32{
39 {
40 public:
41
45
48 virtual ~CommandHistory();
49
55 void clear();
56
58 void clearRedoQueue();
59
71 void addCommand(PanoCommand *command, bool execute = true);
72
76 virtual void undo();
80 virtual void redo();
81
83 bool canUndo() const;
84
86 bool canRedo() const;
87
89 std::string getLastCommandName() const;
90
92 const PanoCommand* getLastCommand() const;
93 private:
94 // our commands
95 std::vector<PanoCommand*> commands;
96 size_t nextCmd;
97
98 };
99
100
107 {
108 public:
109 static GlobalCmdHist & getInstance();
110 protected:
112 private:
114 };
115
116} // namespace
117
118#endif // _COMMANDHISTORY_H
A history for Command, provides undo/redo functionality.
std::vector< PanoCommand * > commands
Singleton CommandHistory.
static GlobalCmdHist * instance
#define WXIMPEX
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41