File indexing completed on 2024-12-01 05:02:07
0001 /* 0002 SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef SETTINGSDATALAYOUT_H 0007 #define SETTINGSDATALAYOUT_H 0008 0009 // local 0010 #include "genericdata.h" 0011 #include "viewstable.h" 0012 #include "../layout/abstractlayout.h" 0013 0014 //Qt 0015 #include <QMetaType> 0016 #include <QString> 0017 #include <QStringList> 0018 0019 namespace Latte { 0020 namespace Data { 0021 0022 class Layout : public Generic 0023 { 0024 public: 0025 static constexpr const char* ALLACTIVITIESID = "{0}"; 0026 static constexpr const char* FREEACTIVITIESID = "{free-activities}"; 0027 static constexpr const char* CURRENTACTIVITYID = "{current-activity}"; 0028 static constexpr const char* DEFAULTSCHEMEFILE = "kdeglobals"; 0029 0030 Layout(); 0031 Layout(Layout &&o); 0032 Layout(const Layout &o); 0033 0034 //! Layout data 0035 QString icon; 0036 QString color; 0037 QString background; 0038 QString textColor; 0039 QString lastUsedActivity; 0040 QString schemeFile{DEFAULTSCHEMEFILE}; 0041 bool isActive{false}; 0042 bool isConsideredActive{false}; //used from settings window to indicate activeness based on selected layouts mode 0043 bool isLocked{false}; 0044 bool isShownInMenu{false}; 0045 bool isTemplate{false}; 0046 bool hasDisabledBorders{false}; 0047 int popUpMargin{-1}; 0048 QStringList activities; 0049 int errors{0}; 0050 int warnings{0}; 0051 0052 Latte::Layout::BackgroundStyle backgroundStyle{Latte::Layout::ColorBackgroundStyle}; 0053 0054 ViewsTable views; 0055 0056 //! Functionality 0057 bool isOnAllActivities() const; 0058 bool isForFreeActivities() const; 0059 bool isTemporary() const; 0060 bool isNull() const; 0061 bool isEmpty() const; 0062 bool isSystemTemplate() const; 0063 0064 bool hasErrors() const; 0065 bool hasWarnings() const; 0066 0067 //! Operators 0068 Layout &operator=(const Layout &rhs); 0069 Layout &operator=(Layout &&rhs); 0070 bool operator==(const Layout &rhs) const; 0071 bool operator!=(const Layout &rhs) const; 0072 }; 0073 0074 } 0075 } 0076 0077 Q_DECLARE_METATYPE(Latte::Data::Layout) 0078 0079 #endif