mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add a structure to hold undo commands
Add the undocommands.cpp / undocommands.h files, which will hold a collection of classes that will hold undo commands. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ef14798d6d
commit
6d996a7874
3 changed files with 37 additions and 2 deletions
16
qt-ui/undocommands.cpp
Normal file
16
qt-ui/undocommands.cpp
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#include "undocommands.h"
|
||||||
|
|
||||||
|
UndoDeleteDive::UndoDeleteDive(QList<dive *> diveList)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void UndoDeleteDive::undo()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void UndoDeleteDive::redo()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
17
qt-ui/undocommands.h
Normal file
17
qt-ui/undocommands.h
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#ifndef UNDOCOMMANDS_H
|
||||||
|
#define UNDOCOMMANDS_H
|
||||||
|
|
||||||
|
#include <QUndoCommand>
|
||||||
|
#include "dive.h"
|
||||||
|
|
||||||
|
class UndoDeleteDive : public QUndoCommand {
|
||||||
|
public:
|
||||||
|
UndoDeleteDive(QList<struct dive*> diveList);
|
||||||
|
virtual void undo();
|
||||||
|
virtual void redo();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QList<struct dive*> dives;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // UNDOCOMMANDS_H
|
|
@ -104,7 +104,8 @@ HEADERS = \
|
||||||
qt-ui/statistics/statisticsbar.h \
|
qt-ui/statistics/statisticsbar.h \
|
||||||
qt-ui/statistics/yearstatistics.h \
|
qt-ui/statistics/yearstatistics.h \
|
||||||
qt-ui/diveshareexportdialog.h \
|
qt-ui/diveshareexportdialog.h \
|
||||||
qt-ui/filtermodels.h
|
qt-ui/filtermodels.h \
|
||||||
|
qt-ui/undocommands.h
|
||||||
|
|
||||||
android: HEADERS -= \
|
android: HEADERS -= \
|
||||||
qt-ui/usermanual.h \
|
qt-ui/usermanual.h \
|
||||||
|
@ -198,7 +199,8 @@ SOURCES = \
|
||||||
qt-ui/statistics/statisticsbar.cpp \
|
qt-ui/statistics/statisticsbar.cpp \
|
||||||
qt-ui/statistics/monthstatistics.cpp \
|
qt-ui/statistics/monthstatistics.cpp \
|
||||||
qt-ui/diveshareexportdialog.cpp \
|
qt-ui/diveshareexportdialog.cpp \
|
||||||
qt-ui/filtermodels.cpp
|
qt-ui/filtermodels.cpp \
|
||||||
|
qt-ui/undocommands.cpp
|
||||||
|
|
||||||
android: SOURCES += android.cpp
|
android: SOURCES += android.cpp
|
||||||
else: win32: SOURCES += windows.c
|
else: win32: SOURCES += windows.c
|
||||||
|
|
Loading…
Add table
Reference in a new issue