diff options
Diffstat (limited to 'core/applicationstate.h')
-rw-r--r-- | core/applicationstate.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/applicationstate.h b/core/applicationstate.h new file mode 100644 index 000000000..fbaf3e829 --- /dev/null +++ b/core/applicationstate.h @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef APPLICATIONSTATE_H +#define APPLICATIONSTATE_H + +// By using an enum class, the enum entries don't polute the global namespace. +// Moreover, they are strongly typed. This means that they are not auto-converted +// to integer types if e.g. used as array-indices. +enum class ApplicationState { + Default, + EditDive, + PlanDive, + EditPlannedDive, + EditDiveSite, + FilterDive, + Count +}; + +ApplicationState getAppState(); +void setAppState(ApplicationState state); + +#endif |