PixelPaint: Add setter for the orientation of a Guide

Also add an additional value to the Orientation enum called "Unset".
This commit is contained in:
Tobias Christiansen 2021-08-31 18:28:10 +02:00 committed by Andreas Kling
commit e9595dcb79
Notes: sideshowbarker 2024-07-18 04:58:13 +09:00

View file

@ -14,6 +14,7 @@ namespace PixelPaint {
class Guide : public RefCounted<Guide> { class Guide : public RefCounted<Guide> {
public: public:
enum class Orientation { enum class Orientation {
Unset,
Vertical, Vertical,
Horizontal, Horizontal,
}; };
@ -33,6 +34,7 @@ public:
float offset() const { return m_offset; } float offset() const { return m_offset; }
void set_offset(float offset) { m_offset = offset; } void set_offset(float offset) { m_offset = offset; }
void set_orientation(Orientation orientation) { m_orientation = orientation; }
private: private:
Orientation m_orientation; Orientation m_orientation;