From 42bd6b8f8a43e860ae9116087dea3438d1597760 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 6 Jun 2021 13:15:37 +0300 Subject: [PATCH] data:introduce contextmenudata class --this definition is scheduled to be shared between the application and the context menu --- app/data/CMakeLists.txt | 1 + app/data/contextmenudata.h | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/data/contextmenudata.h diff --git a/app/data/CMakeLists.txt b/app/data/CMakeLists.txt index f4ddc2df1..b8873eb9c 100644 --- a/app/data/CMakeLists.txt +++ b/app/data/CMakeLists.txt @@ -2,6 +2,7 @@ set(lattedock-app_SRCS ${lattedock-app_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/activitydata.cpp ${CMAKE_CURRENT_SOURCE_DIR}/appletdata.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/contextmenudata.h ${CMAKE_CURRENT_SOURCE_DIR}/errordata.cpp ${CMAKE_CURRENT_SOURCE_DIR}/errorinformationdata.cpp ${CMAKE_CURRENT_SOURCE_DIR}/genericbasictable.cpp diff --git a/app/data/contextmenudata.h b/app/data/contextmenudata.h new file mode 100644 index 000000000..b74f937fe --- /dev/null +++ b/app/data/contextmenudata.h @@ -0,0 +1,46 @@ +/* + SPDX-FileCopyrightText: 2021 Michail Vourlakos + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef CONTEXTMENUDATA_H +#define CONTEXTMENUDATA_H + +// Qt +#include + +namespace Latte { +namespace Data { +namespace ContextMenu { + +static const char *ADDVIEWACTION= "_add_view"; +static const char *LAYOUTSACTION[] = "_layouts"; +static const char *PREFERENCESACTION[] = "_preferences"; +static const char *QUITLATTEACTION[] = "_quit_latte"; +static const char *ADDWIDGETSACTION[] = "_add_latte_widgets"; +static const char *DUPLICATEVIEWACTION[] = "_duplicate_view"; +static const char *EDITVIEWACTION[] = "_edit_view"; +static const char *EXPORTVIEWTEMPLATEACTION[] = "_export_view"; +static const char *REMOVEVIEWACTION[] = "_remove_view"; +static const char *MOVEVIEWACTION[] = "_move_view"; +static const char *SEPARATOR1ACTION[] = "_separator1"; + +static QStringList ACTIONSALWAYSVISIBLE = {LAYOUTSACTION, + PREFERENCESACTION, + QUITLATTEACTION, + SEPARATOR1ACTION, + ADDWIDGETSACTION, + ADDVIEWACTION, + MOVEVIEWACTION, + EXPORTVIEWTEMPLATEACTION, + REMOVEVIEWACTION} + +static QStringList ACTIONSVISIBLEONLYINEDIT = {MOVEVIEWACTION, + EXPORTVIEWTEMPLATEACTION, + REMOVEVIEWACTION}; + +} +} +} + +#endif