From f7b84c7752395bb12e363b344a01c52080e4043b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 6 May 2021 18:05:01 +0200 Subject: [PATCH] GUI: Adding Settings Component. --- gui/CMakeLists.txt | 1 + gui/src/Settings.cpp | 39 +++++++++++++++++++++++++++++++++++++++ gui/src/Settings.hpp | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 gui/src/Settings.cpp create mode 100644 gui/src/Settings.hpp diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 3628f7a..361dfeb 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -39,6 +39,7 @@ set( PROGRAM_SRC src/GenerateWindow.cpp src/SearchWindow.cpp src/MultiSelect.cpp + src/Settings.cpp src/helpers.cpp ) diff --git a/gui/src/Settings.cpp b/gui/src/Settings.cpp new file mode 100644 index 0000000..d49c408 --- /dev/null +++ b/gui/src/Settings.cpp @@ -0,0 +1,39 @@ +/** + * MIT License + * + * Copyright (c) 2020-2021 EOS Sw/eden + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#include "Settings.hpp" + +namespace priv { + bool fio_keys = false; + +} // namespace priv + +bool Settings::shouldGenerateFioKeys() +{ + return priv::fio_keys; +} + +void Settings::setGenerateFioKeys(bool value) +{ + priv::fio_keys = value; +} diff --git a/gui/src/Settings.hpp b/gui/src/Settings.hpp new file mode 100644 index 0000000..d47c26f --- /dev/null +++ b/gui/src/Settings.hpp @@ -0,0 +1,34 @@ +/** + * MIT License + * + * Copyright (c) 2020-2021 EOS Sw/eden + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef SETTINGS_H +#define SETTINGS_H + +namespace Settings +{ + bool shouldGenerateFioKeys(); + + void setGenerateFioKeys(bool value); +}; + +#endif /* SEARCH_WINDOW_H */