diff --git a/src/etc.cpp b/src/etc.cpp index 9161b63..9db5449 100644 --- a/src/etc.cpp +++ b/src/etc.cpp @@ -284,6 +284,30 @@ void Rect::empty() valueChanged(); } +void Rect::setX(int value) +{ + x = value; + valueChanged(); +} + +void Rect::setY(int value) +{ + y = value; + valueChanged(); +} + +void Rect::setWidth(int value) +{ + width = value; + valueChanged(); +} + +void Rect::setHeight(int value) +{ + height = value; + valueChanged(); +} + int Rect::serialSize() const { return 4 * 4; diff --git a/src/etc.h b/src/etc.h index 6f05943..19609ba 100644 --- a/src/etc.h +++ b/src/etc.h @@ -165,10 +165,15 @@ struct Rect : public Serializable return !(x || y || width || height); } - DECL_ATTR_INLINE(X, int, x) - DECL_ATTR_INLINE(Y, int, y) - DECL_ATTR_INLINE(Width, int, width) - DECL_ATTR_INLINE(Height, int, height) + void setX(int value); + void setY(int value); + void setWidth(int value); + void setHeight(int value); + + int getX() const { return x; } + int getY() const { return y; } + int getWidth() const { return width; } + int getHeight() const { return height; } int serialSize() const; void serialize(char *buffer) const;