File indexing completed on 2024-12-01 08:07:19

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "layoutcolordata.h"
0007 
0008 namespace Latte {
0009 namespace Data {
0010 
0011 LayoutColor::LayoutColor()
0012     : Generic()
0013 {
0014 }
0015 
0016 LayoutColor::LayoutColor(LayoutColor &&o)
0017     : Generic(o),
0018       path(o.path),
0019       textColor(o.textColor)
0020 {
0021 }
0022 
0023 LayoutColor::LayoutColor(const LayoutColor &o)
0024     : Generic(o),
0025       path(o.path),
0026       textColor(o.textColor)
0027 {
0028 }
0029 
0030 LayoutColor &LayoutColor::operator=(const LayoutColor &rhs)
0031 {
0032     id = rhs.id;
0033     name = rhs.name;
0034     path = rhs.path;
0035     textColor = rhs.textColor;
0036 
0037     return (*this);
0038 }
0039 
0040 LayoutColor &LayoutColor::operator=(LayoutColor &&rhs)
0041 {
0042     id = rhs.id;
0043     name = rhs.name;
0044     path = rhs.path;
0045     textColor = rhs.textColor;
0046 
0047     return (*this);
0048 }
0049 
0050 bool LayoutColor::operator==(const LayoutColor &rhs) const
0051 {
0052     return  (id == rhs.id)
0053             && (name == rhs.name)
0054             && (path == rhs.path)
0055             && (textColor == rhs.textColor);
0056 }
0057 
0058 bool LayoutColor::operator!=(const LayoutColor &rhs) const
0059 {
0060     return !(*this == rhs);
0061 }
0062 
0063 void LayoutColor::setData(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor)
0064 {
0065     id = newid;
0066     name = newname;
0067     path = newpath;
0068     textColor = newtextcolor;
0069 }
0070 
0071 }
0072 }