mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-24 05:33:50 +03:00
update namespace/name for Data::LayoutColor
This commit is contained in:
parent
805e37a368
commit
b39c35b487
@ -18,8 +18,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SETTINGSDATAACTIVITY_H
|
||||
#define SETTINGSDATAACTIVITY_H
|
||||
#ifndef ACTIVITYDATA_H
|
||||
#define ACTIVITYDATA_H
|
||||
|
||||
//! Qt
|
||||
#include <QMetaType>
|
||||
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,23 +18,22 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SETTINGSCOLORDATA_H
|
||||
#define SETTINGSCOLORDATA_H
|
||||
#ifndef LAYOUTCOLORDATA_H
|
||||
#define LAYOUTCOLORDATA_H
|
||||
|
||||
//Qt
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
|
||||
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ private:
|
||||
private:
|
||||
QString m_colorsPath;
|
||||
|
||||
QList<Data::Color> m_colorsTable;
|
||||
QList<Latte::Data::LayoutColor> m_colorsTable;
|
||||
|
||||
Latte::Corona *m_corona{nullptr};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user