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
2020-08-17 14:40:32 +03:00
# include "genericdata.h"
2020-08-09 14:11:06 +03:00
# include "../layout/abstractlayout.h"
2020-04-23 19:35:26 +03:00
2020-04-15 17:34:58 +03:00
//Qt
2020-03-11 15:46:25 +02:00
# include <QMetaType>
2020-03-10 20:37:01 +02:00
# include <QString>
# include <QStringList>
namespace Latte {
namespace Data {
2020-08-17 14:40:32 +03:00
class Layout : public Generic
2020-03-10 20:37:01 +02:00
{
public :
2020-08-25 14:39:00 +03:00
static constexpr const char * ALLACTIVITIESID = " {0} " ;
static constexpr const char * FREEACTIVITIESID = " {free-activities} " ;
2020-08-29 15:45:07 +03:00
static constexpr const char * CURRENTACTIVITYID = " {current-activity} " ;
2020-03-15 16:20:29 +02:00
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 ;
2020-08-30 20:32:13 +03:00
QString lastUsedActivity ;
2020-03-11 15:46:25 +02:00
bool isActive { false } ;
2020-08-29 23:37:52 +03:00
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
2020-08-25 14:39:00 +03:00
bool isOnAllActivities ( ) const ;
2020-03-15 16:20:29 +02:00
bool isForFreeActivities ( ) const ;
2020-03-21 01:46:33 +02:00
bool isTemporary ( ) const ;
2020-03-20 15:05:25 +02:00
bool isNull ( ) const ;
bool isEmpty ( ) const ;
2020-08-12 18:15:45 +03:00
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-11 15:46:25 +02:00
2020-03-10 20:37:01 +02:00
# endif