From b39c35b4870a0916f9109719413d6a7f56200557 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 9 Aug 2020 17:40:11 +0300 Subject: [PATCH] update namespace/name for Data::LayoutColor --- app/data/activitydata.h | 4 ++-- app/data/colordata.cpp | 18 ++++++++---------- app/data/colordata.h | 24 +++++++++++------------- app/settings/models/colorsmodel.cpp | 2 +- app/settings/models/colorsmodel.h | 2 +- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/app/data/activitydata.h b/app/data/activitydata.h index 9aa0313dc..5e8df49e4 100644 --- a/app/data/activitydata.h +++ b/app/data/activitydata.h @@ -18,8 +18,8 @@ * */ -#ifndef SETTINGSDATAACTIVITY_H -#define SETTINGSDATAACTIVITY_H +#ifndef ACTIVITYDATA_H +#define ACTIVITYDATA_H //! Qt #include diff --git a/app/data/colordata.cpp b/app/data/colordata.cpp index 729e4ee1e..1901ba4ac 100644 --- a/app/data/colordata.cpp +++ b/app/data/colordata.cpp @@ -21,14 +21,13 @@ #include "colordata.h" namespace Latte { -namespace Settings { namespace Data { -Color::Color() +LayoutColor::LayoutColor() { } -Color::Color(Color &&o) +LayoutColor::LayoutColor(LayoutColor &&o) : id(o.id), name(o.name), path(o.path), @@ -36,7 +35,7 @@ Color::Color(Color &&o) { } -Color::Color(const Color &o) +LayoutColor::LayoutColor(const LayoutColor &o) : id(o.id), name(o.name), 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; name = rhs.name; @@ -54,7 +53,7 @@ Color &Color::operator=(const Color &rhs) return (*this); } -Color &Color::operator=(Color &&rhs) +LayoutColor &LayoutColor::operator=(LayoutColor &&rhs) { id = rhs.id; name = rhs.name; @@ -64,7 +63,7 @@ Color &Color::operator=(Color &&rhs) return (*this); } -bool Color::operator==(const Color &rhs) const +bool LayoutColor::operator==(const LayoutColor &rhs) const { return (id == rhs.id) && (name == rhs.name) @@ -72,12 +71,12 @@ bool Color::operator==(const Color &rhs) const && (textColor == rhs.textColor); } -bool Color::operator!=(const Color &rhs) const +bool LayoutColor::operator!=(const LayoutColor &rhs) const { 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; name = newname; @@ -87,4 +86,3 @@ void Color::setData(const QString &newid, const QString &newname, const QString } } -} diff --git a/app/data/colordata.h b/app/data/colordata.h index ae3d07c8a..b800b4714 100644 --- a/app/data/colordata.h +++ b/app/data/colordata.h @@ -18,23 +18,22 @@ * */ -#ifndef SETTINGSCOLORDATA_H -#define SETTINGSCOLORDATA_H +#ifndef LAYOUTCOLORDATA_H +#define LAYOUTCOLORDATA_H //Qt #include #include namespace Latte { -namespace Settings { namespace Data { -class Color +class LayoutColor { public: - Color(); - Color(Color &&o); - Color(const Color &o); + LayoutColor(); + LayoutColor(LayoutColor &&o); + LayoutColor(const LayoutColor &o); //! Color data QString id; @@ -43,18 +42,17 @@ public: QString textColor; //! Operators - Color &operator=(const Color &rhs); - Color &operator=(Color &&rhs); - bool operator==(const Color &rhs) const; - bool operator!=(const Color &rhs) const; + LayoutColor &operator=(const LayoutColor &rhs); + LayoutColor &operator=(LayoutColor &&rhs); + bool operator==(const LayoutColor &rhs) const; + bool operator!=(const LayoutColor &rhs) const; 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 diff --git a/app/settings/models/colorsmodel.cpp b/app/settings/models/colorsmodel.cpp index 25abd3763..f17e5fa20 100644 --- a/app/settings/models/colorsmodel.cpp +++ b/app/settings/models/colorsmodel.cpp @@ -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) { - Data::Color color; + Latte::Data::LayoutColor color; color.setData(newid, newname, newpath, newtextcolor); m_colorsTable << color; } diff --git a/app/settings/models/colorsmodel.h b/app/settings/models/colorsmodel.h index 37d508b16..acd94a409 100644 --- a/app/settings/models/colorsmodel.h +++ b/app/settings/models/colorsmodel.h @@ -67,7 +67,7 @@ private: private: QString m_colorsPath; - QList m_colorsTable; + QList m_colorsTable; Latte::Corona *m_corona{nullptr}; };