20 #ifndef LIBREPCB_CORE_ALIGNMENT_H 21 #define LIBREPCB_CORE_ALIGNMENT_H 26 #include "../exceptions.h" 27 #include "../serialization/sexpression.h" 44 Q_DECLARE_TR_FUNCTIONS(
HAlign)
60 return mAlign == rhs.mAlign;
63 return mAlign != rhs.mAlign;
67 explicit HAlign(Qt::AlignmentFlag align) noexcept :
mAlign(align) {}
80 Q_DECLARE_TR_FUNCTIONS(
VAlign)
96 return mAlign == rhs.mAlign;
99 return mAlign != rhs.mAlign;
129 return mH.toQtAlignFlag() | mV.toQtAlignFlag();
151 return mH == rhs.
mH && mV == rhs.mV;
154 return mH != rhs.
mH || mV != rhs.mV;
Alignment & mirrorV() noexcept
Definition: alignment.cpp:152
VAlign() noexcept
Definition: alignment.h:83
Alignment & mirror() noexcept
Definition: alignment.cpp:141
HAlign mirrored() const noexcept
Definition: alignment.h:51
Alignment mirroredH() const noexcept
Definition: alignment.h:135
const VAlign getV() const noexcept
Definition: alignment.h:125
The Alignment class.
Definition: alignment.h:115
HAlign & operator=(const HAlign &rhs) noexcept
Definition: alignment.h:55
Alignment mirroredV() const noexcept
Definition: alignment.h:136
Definition: occmodel.cpp:76
bool operator!=(const HAlign &rhs) const noexcept
Definition: alignment.h:62
bool operator==(const VAlign &rhs) const noexcept
Definition: alignment.h:95
Qt::AlignmentFlag mAlign
Definition: alignment.h:69
static VAlign bottom() noexcept
Definition: alignment.h:90
void setH(const HAlign &h) noexcept
Definition: alignment.h:126
HAlign() noexcept
Definition: alignment.h:47
bool operator==(const HAlign &rhs) const noexcept
Definition: alignment.h:59
VAlign mirrored() const noexcept
Definition: alignment.h:87
Alignment & operator=(const Alignment &rhs) noexcept
Definition: alignment.h:145
HAlign(Qt::AlignmentFlag align) noexcept
Definition: alignment.h:67
static HAlign left() noexcept
Definition: alignment.h:52
const HAlign getH() const noexcept
Definition: alignment.h:124
bool operator!=(const VAlign &rhs) const noexcept
Definition: alignment.h:98
Alignment(const Alignment &other) noexcept
Definition: alignment.h:120
The VAlign class.
Definition: alignment.h:79
The HAlign class.
Definition: alignment.h:43
VAlign(const VAlign &other) noexcept
Definition: alignment.h:84
Alignment mirrored() const noexcept
Definition: alignment.h:134
HAlign & mirror() noexcept
Definition: alignment.cpp:36
static HAlign center() noexcept
Definition: alignment.h:53
VAlign & mirror() noexcept
Definition: alignment.cpp:86
bool operator!=(const Alignment &rhs) const noexcept
Definition: alignment.h:153
Qt::AlignmentFlag toQtAlignFlag() const noexcept
Definition: alignment.h:49
HAlign(const HAlign &other) noexcept
Definition: alignment.h:48
static VAlign center() noexcept
Definition: alignment.h:89
VAlign & operator=(const VAlign &rhs) noexcept
Definition: alignment.h:91
Qt::AlignmentFlag mAlign
Definition: alignment.h:105
Qt::AlignmentFlag toQtAlignFlag() const noexcept
Definition: alignment.h:85
static VAlign top() noexcept
Definition: alignment.h:88
void setV(const VAlign &v) noexcept
Definition: alignment.h:127
VAlign(Qt::AlignmentFlag align) noexcept
Definition: alignment.h:103
SExpression serialize(const AttributeKey &obj)
Definition: attributekey.h:99
static HAlign right() noexcept
Definition: alignment.h:54
VAlign mV
Definition: alignment.h:159
bool operator==(const Alignment &rhs) const noexcept
Definition: alignment.h:150
The SExpression class.
Definition: sexpression.h:66
Qt::Alignment toQtAlign() const noexcept
Definition: alignment.h:128
Alignment & mirrorH() noexcept
Definition: alignment.cpp:147
HAlign mH
Definition: alignment.h:158
Alignment() noexcept
Definition: alignment.h:119
Alignment(const HAlign &h, const VAlign &v) noexcept
Definition: alignment.h:121