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;
151 return mH == rhs.mH &&
mV == rhs.mV;
154 return mH != rhs.mH ||
mV != rhs.mV;
The Alignment class.
Definition: alignment.h:115
Alignment & mirror() noexcept
Definition: alignment.cpp:141
Alignment(const HAlign &h, const VAlign &v) noexcept
Definition: alignment.h:121
Alignment & operator=(const Alignment &rhs) noexcept
Definition: alignment.h:145
Qt::Alignment toQtAlign() const noexcept
Definition: alignment.h:128
Alignment mirroredV() const noexcept
Definition: alignment.h:136
Alignment mirrored() const noexcept
Definition: alignment.h:134
const HAlign getH() const noexcept
Definition: alignment.h:124
Alignment & mirrorH() noexcept
Definition: alignment.cpp:147
const VAlign getV() const noexcept
Definition: alignment.h:125
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: alignment.cpp:157
VAlign mV
Definition: alignment.h:159
Alignment mirroredH() const noexcept
Definition: alignment.h:135
void setV(const VAlign &v) noexcept
Definition: alignment.h:127
Alignment() noexcept
Definition: alignment.h:119
HAlign mH
Definition: alignment.h:158
Alignment(const Alignment &other) noexcept
Definition: alignment.h:120
bool operator!=(const Alignment &rhs) const noexcept
Definition: alignment.h:153
Alignment & mirrorV() noexcept
Definition: alignment.cpp:152
void setH(const HAlign &h) noexcept
Definition: alignment.h:126
bool operator==(const Alignment &rhs) const noexcept
Definition: alignment.h:150
The HAlign class.
Definition: alignment.h:43
Qt::AlignmentFlag mAlign
Definition: alignment.h:69
HAlign mirrored() const noexcept
Definition: alignment.h:51
HAlign() noexcept
Definition: alignment.h:47
Qt::AlignmentFlag toQtAlignFlag() const noexcept
Definition: alignment.h:49
bool operator==(const HAlign &rhs) const noexcept
Definition: alignment.h:59
HAlign & operator=(const HAlign &rhs) noexcept
Definition: alignment.h:55
static HAlign right() noexcept
Definition: alignment.h:54
HAlign(Qt::AlignmentFlag align) noexcept
Definition: alignment.h:67
HAlign & mirror() noexcept
Definition: alignment.cpp:36
bool operator!=(const HAlign &rhs) const noexcept
Definition: alignment.h:62
static HAlign left() noexcept
Definition: alignment.h:52
HAlign(const HAlign &other) noexcept
Definition: alignment.h:48
static HAlign center() noexcept
Definition: alignment.h:53
The SExpression class.
Definition: sexpression.h:69
The VAlign class.
Definition: alignment.h:79
Qt::AlignmentFlag mAlign
Definition: alignment.h:105
bool operator!=(const VAlign &rhs) const noexcept
Definition: alignment.h:98
static VAlign bottom() noexcept
Definition: alignment.h:90
static VAlign top() noexcept
Definition: alignment.h:88
Qt::AlignmentFlag toQtAlignFlag() const noexcept
Definition: alignment.h:85
VAlign(const VAlign &other) noexcept
Definition: alignment.h:84
VAlign(Qt::AlignmentFlag align) noexcept
Definition: alignment.h:103
VAlign & operator=(const VAlign &rhs) noexcept
Definition: alignment.h:91
VAlign mirrored() const noexcept
Definition: alignment.h:87
VAlign & mirror() noexcept
Definition: alignment.cpp:86
VAlign() noexcept
Definition: alignment.h:83
static VAlign center() noexcept
Definition: alignment.h:89
bool operator==(const VAlign &rhs) const noexcept
Definition: alignment.h:95
Definition: occmodel.cpp:77