update namespace/name for Data::LayoutColor

pull/19/head
Michail Vourlakos 5 years ago
parent 805e37a368
commit b39c35b487

@ -18,8 +18,8 @@
* *
*/ */
#ifndef SETTINGSDATAACTIVITY_H #ifndef ACTIVITYDATA_H
#define SETTINGSDATAACTIVITY_H #define ACTIVITYDATA_H
//! Qt //! Qt
#include <QMetaType> #include <QMetaType>

@ -21,14 +21,13 @@
#include "colordata.h" #include "colordata.h"
namespace Latte { namespace Latte {
namespace Settings {
namespace Data { namespace Data {
Color::Color() LayoutColor::LayoutColor()
{ {
} }
Color::Color(Color &&o) LayoutColor::LayoutColor(LayoutColor &&o)
: id(o.id), : id(o.id),
name(o.name), name(o.name),
path(o.path), path(o.path),
@ -36,7 +35,7 @@ Color::Color(Color &&o)
{ {
} }
Color::Color(const Color &o) LayoutColor::LayoutColor(const LayoutColor &o)
: id(o.id), : id(o.id),
name(o.name), name(o.name),
path(o.path), path(o.path),
@ -44,7 +43,7 @@ Color::Color(const Color &o)
{ {
} }
Color &Color::operator=(const Color &rhs) LayoutColor &LayoutColor::operator=(const LayoutColor &rhs)
{ {
id = rhs.id; id = rhs.id;
name = rhs.name; name = rhs.name;
@ -54,7 +53,7 @@ Color &Color::operator=(const Color &rhs)
return (*this); return (*this);
} }
Color &Color::operator=(Color &&rhs) LayoutColor &LayoutColor::operator=(LayoutColor &&rhs)
{ {
id = rhs.id; id = rhs.id;
name = rhs.name; name = rhs.name;
@ -64,7 +63,7 @@ Color &Color::operator=(Color &&rhs)
return (*this); return (*this);
} }
bool Color::operator==(const Color &rhs) const bool LayoutColor::operator==(const LayoutColor &rhs) const
{ {
return (id == rhs.id) return (id == rhs.id)
&& (name == rhs.name) && (name == rhs.name)
@ -72,12 +71,12 @@ bool Color::operator==(const Color &rhs) const
&& (textColor == rhs.textColor); && (textColor == rhs.textColor);
} }
bool Color::operator!=(const Color &rhs) const bool LayoutColor::operator!=(const LayoutColor &rhs) const
{ {
return !(*this == rhs); return !(*this == rhs);
} }
void Color::setData(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor) void LayoutColor::setData(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor)
{ {
id = newid; id = newid;
name = newname; name = newname;
@ -87,4 +86,3 @@ void Color::setData(const QString &newid, const QString &newname, const QString
} }
} }
}

@ -18,23 +18,22 @@
* *
*/ */
#ifndef SETTINGSCOLORDATA_H #ifndef LAYOUTCOLORDATA_H
#define SETTINGSCOLORDATA_H #define LAYOUTCOLORDATA_H
//Qt //Qt
#include <QMetaType> #include <QMetaType>
#include <QString> #include <QString>
namespace Latte { namespace Latte {
namespace Settings {
namespace Data { namespace Data {
class Color class LayoutColor
{ {
public: public:
Color(); LayoutColor();
Color(Color &&o); LayoutColor(LayoutColor &&o);
Color(const Color &o); LayoutColor(const LayoutColor &o);
//! Color data //! Color data
QString id; QString id;
@ -43,18 +42,17 @@ public:
QString textColor; QString textColor;
//! Operators //! Operators
Color &operator=(const Color &rhs); LayoutColor &operator=(const LayoutColor &rhs);
Color &operator=(Color &&rhs); LayoutColor &operator=(LayoutColor &&rhs);
bool operator==(const Color &rhs) const; bool operator==(const LayoutColor &rhs) const;
bool operator!=(const Color &rhs) const; bool operator!=(const LayoutColor &rhs) const;
void setData(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor); void setData(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor);
}; };
}
} }
} }
Q_DECLARE_METATYPE(Latte::Settings::Data::Color) Q_DECLARE_METATYPE(Latte::Data::LayoutColor)
#endif #endif

@ -67,7 +67,7 @@ QString Colors::colorPath(const QString &color)
void Colors::add(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor) void Colors::add(const QString &newid, const QString &newname, const QString &newpath, const QString &newtextcolor)
{ {
Data::Color color; Latte::Data::LayoutColor color;
color.setData(newid, newname, newpath, newtextcolor); color.setData(newid, newname, newpath, newtextcolor);
m_colorsTable << color; m_colorsTable << color;
} }

@ -67,7 +67,7 @@ private:
private: private:
QString m_colorsPath; QString m_colorsPath;
QList<Data::Color> m_colorsTable; QList<Latte::Data::LayoutColor> m_colorsTable;
Latte::Corona *m_corona{nullptr}; Latte::Corona *m_corona{nullptr};
}; };

Loading…
Cancel
Save