1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-10 09:57:35 +03:00
latte-dock/app/data/layoutdata.h

85 lines
2.1 KiB
C
Raw Normal View History

2020-03-10 20:37:01 +02:00
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef SETTINGSDATALAYOUT_H
#define SETTINGSDATALAYOUT_H
2020-04-23 19:35:26 +03:00
// local
#include "genericdata.h"
#include "../layout/abstractlayout.h"
2020-04-23 19:35:26 +03:00
2020-04-15 17:34:58 +03:00
//Qt
#include <QMetaType>
2020-03-10 20:37:01 +02:00
#include <QString>
#include <QStringList>
namespace Latte {
namespace Data {
class Layout : public Generic
2020-03-10 20:37:01 +02:00
{
public:
static constexpr const char* ALLACTIVITIESID = "{0}";
static constexpr const char* FREEACTIVITIESID = "{free-activities}";
static constexpr const char* CURRENTACTIVITYID = "{current-activity}";
2020-03-10 20:37:01 +02:00
Layout();
2020-03-14 16:14:28 +02:00
Layout(Layout &&o);
2020-03-10 20:37:01 +02:00
Layout(const Layout &o);
//! Layout data
2020-07-30 18:52:29 +03:00
QString icon;
2020-03-12 15:12:13 +02:00
QString color;
2020-03-10 20:37:01 +02:00
QString background;
2020-03-12 15:12:13 +02:00
QString textColor;
QString lastUsedActivity;
bool isActive{false};
bool isBroken{false};
2020-03-10 20:37:01 +02:00
bool isLocked{false};
bool isShownInMenu{false};
2020-08-09 13:53:43 +03:00
bool isTemplate{false};
2020-03-10 20:37:01 +02:00
bool hasDisabledBorders{false};
QStringList activities;
2020-04-23 19:35:26 +03:00
Latte::Layout::BackgroundStyle backgroundStyle{Latte::Layout::ColorBackgroundStyle};
2020-04-15 17:34:58 +03:00
2020-03-10 20:37:01 +02:00
//! Functionality
bool isOnAllActivities() const;
bool isForFreeActivities() const;
bool isTemporary() const;
bool isNull() const;
bool isEmpty() const;
bool isSystemTemplate() const;
2020-08-09 13:53:43 +03:00
2020-03-10 20:37:01 +02:00
//! Operators
Layout &operator=(const Layout &rhs);
2020-03-14 16:14:28 +02:00
Layout &operator=(Layout &&rhs);
2020-03-10 20:37:01 +02:00
bool operator==(const Layout &rhs) const;
bool operator!=(const Layout &rhs) const;
};
}
}
2020-08-09 18:00:01 +03:00
Q_DECLARE_METATYPE(Latte::Data::Layout)
2020-03-10 20:37:01 +02:00
#endif