tidy&format(all): all files formatted and relevant warnings resolved
C++ / build (pull_request) Failing after 15s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 28s
Python / lint-format (pull_request) Successful in 45s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
C++ / build (pull_request) Failing after 15s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 28s
Python / lint-format (pull_request) Successful in 45s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
This commit is contained in:
@@ -9,53 +9,49 @@ class BlobShape;
|
||||
class BlobInvertedRect;
|
||||
|
||||
class BlobGroup : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
Q_PROPERTY(qreal smoothing READ smoothing WRITE setSmoothing NOTIFY smoothingChanged)
|
||||
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
Q_PROPERTY(
|
||||
qreal smoothing READ smoothing WRITE setSmoothing NOTIFY
|
||||
smoothingChanged)
|
||||
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
|
||||
|
||||
public:
|
||||
explicit BlobGroup(QObject* parent = nullptr);
|
||||
~BlobGroup() override;
|
||||
public:
|
||||
explicit BlobGroup(QObject* parent = nullptr);
|
||||
~BlobGroup() override;
|
||||
|
||||
[[nodiscard]] qreal smoothing() const {
|
||||
return m_smoothing;
|
||||
}
|
||||
[[nodiscard]] qreal smoothing() const { return m_smoothing; }
|
||||
|
||||
void setSmoothing(qreal s);
|
||||
void setSmoothing(qreal s);
|
||||
|
||||
[[nodiscard]] QColor color() const {
|
||||
return m_color;
|
||||
}
|
||||
[[nodiscard]] QColor color() const { return m_color; }
|
||||
|
||||
void setColor(const QColor& c);
|
||||
void setColor(const QColor& c);
|
||||
|
||||
void addShape(BlobShape* shape);
|
||||
void removeShape(BlobShape* shape);
|
||||
void addShape(BlobShape* shape);
|
||||
void removeShape(BlobShape* shape);
|
||||
|
||||
void setInvertedRect(BlobInvertedRect* rect);
|
||||
void clearInvertedRect(BlobInvertedRect* rect);
|
||||
void setInvertedRect(BlobInvertedRect* rect);
|
||||
void clearInvertedRect(BlobInvertedRect* rect);
|
||||
|
||||
[[nodiscard]] const QList<BlobShape*>& shapes() const {
|
||||
return m_shapes;
|
||||
}
|
||||
[[nodiscard]] const QList<BlobShape*>& shapes() const { return m_shapes; }
|
||||
|
||||
[[nodiscard]] BlobInvertedRect* invertedRect() const {
|
||||
return m_invertedRect;
|
||||
}
|
||||
[[nodiscard]] BlobInvertedRect* invertedRect() const {
|
||||
return m_invertedRect;
|
||||
}
|
||||
|
||||
void markDirty();
|
||||
void markShapeDirty(BlobShape* source);
|
||||
void ensurePhysicsUpdated();
|
||||
void markDirty();
|
||||
void markShapeDirty(BlobShape* source);
|
||||
void ensurePhysicsUpdated();
|
||||
|
||||
signals:
|
||||
void smoothingChanged();
|
||||
void colorChanged();
|
||||
signals:
|
||||
void smoothingChanged();
|
||||
void colorChanged();
|
||||
|
||||
private:
|
||||
qreal m_smoothing = 32.0;
|
||||
QColor m_color{ 0x44, 0x88, 0xff };
|
||||
QList<BlobShape*> m_shapes;
|
||||
BlobInvertedRect* m_invertedRect = nullptr;
|
||||
bool m_physicsUpdated = false;
|
||||
private:
|
||||
qreal m_smoothing = 32.0;
|
||||
QColor m_color{0x44, 0x88, 0xff};
|
||||
QList<BlobShape*> m_shapes;
|
||||
BlobInvertedRect* m_invertedRect = nullptr;
|
||||
bool m_physicsUpdated = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user