0.4.1
Loading...
Searching...
No Matches
GlobalActions.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9/// @file GlobalActions.hpp
10/// @brief Global Gui Actions
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2020-12-19
13
14#pragma once
15
16#include <cstdint>
17
18/// @brief Possible Global Actions to perform in the GUI
19enum GlobalActions : uint8_t
20{
21 None, ///< None
22 Quit, ///< Quit the program
23 QuitUnsaved, ///< Quit the program without saving
24 SaveAs, ///< Save the flow as filename
25 Clear, ///< Clear the flow
26 Load, ///< Load a flow
27 RunFlow, ///< Run the flow
28};
29
30namespace NAV::gui
31{
32/// @brief Checks if elements can be cutted/copied
34
35/// @brief Checks if elements can be pasted
37
38/// @brief Cuts the currently selected elements
39void cutFlowElements();
40
41/// @brief Copies the currently selected elements
42void copyFlowElements();
43
44/// @brief Pastes the copied/cutted elements
46
47/// @brief Checks if an action can be undone
49
50/// @brief Checks if an action can be redone
52
53/// @brief Clears the list of last actions
55
56/// @brief Undo the last action
57void undoLastAction();
58
59/// @brief Redo the last action
60void redoLastAction();
61
62/// @brief Saves the last action to the action list
63void saveLastAction();
64
65} // namespace NAV::gui
GlobalActions
Possible Global Actions to perform in the GUI.
@ RunFlow
Run the flow.
@ Clear
Clear the flow.
@ QuitUnsaved
Quit the program without saving.
@ Quit
Quit the program.
@ Load
Load a flow.
@ None
None.
@ SaveAs
Save the flow as filename.
bool canPasteFlowElements()
Checks if elements can be pasted.
void copyFlowElements()
Copies the currently selected elements.
bool canUndoLastAction()
Checks if an action can be undone.
bool canCutOrCopyFlowElements()
Checks if elements can be cutted/copied.
bool canRedoLastAction()
Checks if an action can be redone.
void pasteFlowElements()
Pastes the copied/cutted elements.
void clearLastActionList()
Clears the list of last actions.
void cutFlowElements()
Cuts the currently selected elements.
void redoLastAction()
Redo the last action.
void undoLastAction()
Undo the last action.
void saveLastAction()
Saves the last action to the action list.