mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -07:00
Made QColor wrapper class so that Servatrice will compile without QtGui
This commit is contained in:
parent
ee0a010add
commit
b1d8c7bda0
19 changed files with 226 additions and 184 deletions
|
|
@ -6,8 +6,8 @@
|
|||
#include <QMap>
|
||||
#include <QList>
|
||||
#include <QHash>
|
||||
#include <QColor>
|
||||
#include <QDateTime>
|
||||
#include "color.h"
|
||||
|
||||
class QXmlStreamReader;
|
||||
class QXmlStreamWriter;
|
||||
|
|
@ -111,17 +111,15 @@ public:
|
|||
|
||||
class SerializableItem_Color : public SerializableItem {
|
||||
private:
|
||||
QColor data;
|
||||
int colorToInt(const QColor &color) const;
|
||||
QColor colorFromInt(int colorValue) const;
|
||||
Color data;
|
||||
protected:
|
||||
bool readElement(QXmlStreamReader *xml);
|
||||
void writeElement(QXmlStreamWriter *xml);
|
||||
public:
|
||||
SerializableItem_Color(const QString &_itemType, const QColor &_data)
|
||||
SerializableItem_Color(const QString &_itemType, const Color &_data)
|
||||
: SerializableItem(_itemType), data(_data) { }
|
||||
const QColor &getData() { return data; }
|
||||
void setData(const QColor &_data) { data = _data; }
|
||||
const Color &getData() { return data; }
|
||||
void setData(const Color &_data) { data = _data; }
|
||||
};
|
||||
|
||||
class SerializableItem_DateTime : public SerializableItem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue