src
paraview-5.12
Qt
ApplicationComponents
pqUndoRedoReaction.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3
// SPDX-License-Identifier: BSD-3-Clause
4
#ifndef pqUndoRedoReaction_h
5
#define pqUndoRedoReaction_h
6
7
#include "
pqReaction.h
"
8
9
class
pqUndoStack
;
10
15
class
PQAPPLICATIONCOMPONENTS_EXPORT
pqUndoRedoReaction
:
public
pqReaction
16
{
17
Q_OBJECT
18
typedef
pqReaction
Superclass;
19
20
public
:
25
pqUndoRedoReaction
(QAction* parent,
bool
undo);
26
30
static
void
undo();
31
35
static
void
redo();
36
40
static
void
clear();
41
42
protected
Q_SLOTS:
43
void
enable(
bool
);
44
void
setLabel(
const
QString& label);
45
void
setUndoStack(
pqUndoStack
*);
46
47
protected
:
// NOLINT(readability-redundant-access-specifiers)
51
void
onTriggered
()
override
52
{
53
if
(this->Undo)
54
{
55
pqUndoRedoReaction::undo
();
56
}
57
else
58
{
59
pqUndoRedoReaction::redo
();
60
}
61
}
62
63
private
:
64
Q_DISABLE_COPY(
pqUndoRedoReaction
)
65
66
bool
Undo;
67
};
68
69
#endif
pqUndoRedoReaction::onTriggered
void onTriggered() override
Called when the action is triggered.
Definition:
pqUndoRedoReaction.h:51
pqReaction.h
pqUndoRedoReaction
Definition:
pqUndoRedoReaction.h:15
pqUndoStack
pqUndoStack represents a vtkSMUndoStack along with a a vtkSMUndoStackBuilder.
Definition:
pqUndoStack.h:28
pqUndoRedoReaction::redo
static void redo()
redo.
pqUndoRedoReaction::undo
static void undo()
undo.
pqReaction
Definition:
pqReaction.h:25
Generated by
1.8.17 on Wed Mar 27 2024