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:
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <qeasingcurve.h>
|
||||
#include <qobject.h>
|
||||
#include <qqmlintegration.h>
|
||||
@@ -8,66 +7,71 @@
|
||||
namespace ZShell::internal {
|
||||
|
||||
class CircularIndicatorManager : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
||||
Q_PROPERTY(qreal startFraction READ startFraction NOTIFY startFractionChanged)
|
||||
Q_PROPERTY(qreal endFraction READ endFraction NOTIFY endFractionChanged)
|
||||
Q_PROPERTY(qreal rotation READ rotation NOTIFY rotationChanged)
|
||||
Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
|
||||
Q_PROPERTY(qreal completeEndProgress READ completeEndProgress WRITE setCompleteEndProgress NOTIFY
|
||||
completeEndProgressChanged)
|
||||
Q_PROPERTY(qreal duration READ duration NOTIFY indeterminateAnimationTypeChanged)
|
||||
Q_PROPERTY(qreal completeEndDuration READ completeEndDuration NOTIFY indeterminateAnimationTypeChanged)
|
||||
Q_PROPERTY(IndeterminateAnimationType indeterminateAnimationType READ indeterminateAnimationType WRITE
|
||||
setIndeterminateAnimationType NOTIFY indeterminateAnimationTypeChanged)
|
||||
Q_PROPERTY(
|
||||
qreal startFraction READ startFraction NOTIFY startFractionChanged)
|
||||
Q_PROPERTY(qreal endFraction READ endFraction NOTIFY endFractionChanged)
|
||||
Q_PROPERTY(qreal rotation READ rotation NOTIFY rotationChanged)
|
||||
Q_PROPERTY(
|
||||
qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
|
||||
Q_PROPERTY(
|
||||
qreal completeEndProgress READ completeEndProgress WRITE
|
||||
setCompleteEndProgress NOTIFY completeEndProgressChanged)
|
||||
Q_PROPERTY(
|
||||
qreal duration READ duration NOTIFY indeterminateAnimationTypeChanged)
|
||||
Q_PROPERTY(
|
||||
qreal completeEndDuration READ completeEndDuration NOTIFY
|
||||
indeterminateAnimationTypeChanged)
|
||||
Q_PROPERTY(
|
||||
IndeterminateAnimationType indeterminateAnimationType READ
|
||||
indeterminateAnimationType WRITE setIndeterminateAnimationType
|
||||
NOTIFY indeterminateAnimationTypeChanged)
|
||||
|
||||
public:
|
||||
explicit CircularIndicatorManager(QObject* parent = nullptr);
|
||||
public:
|
||||
explicit CircularIndicatorManager(QObject* parent = nullptr);
|
||||
|
||||
enum IndeterminateAnimationType {
|
||||
Advance = 0,
|
||||
Retreat
|
||||
};
|
||||
Q_ENUM(IndeterminateAnimationType)
|
||||
enum IndeterminateAnimationType { Advance = 0, Retreat };
|
||||
Q_ENUM(IndeterminateAnimationType)
|
||||
|
||||
[[nodiscard]] qreal startFraction() const;
|
||||
[[nodiscard]] qreal endFraction() const;
|
||||
[[nodiscard]] qreal rotation() const;
|
||||
[[nodiscard]] qreal startFraction() const;
|
||||
[[nodiscard]] qreal endFraction() const;
|
||||
[[nodiscard]] qreal rotation() const;
|
||||
|
||||
[[nodiscard]] qreal progress() const;
|
||||
void setProgress(qreal progress);
|
||||
[[nodiscard]] qreal progress() const;
|
||||
void setProgress(qreal progress);
|
||||
|
||||
[[nodiscard]] qreal completeEndProgress() const;
|
||||
void setCompleteEndProgress(qreal progress);
|
||||
[[nodiscard]] qreal completeEndProgress() const;
|
||||
void setCompleteEndProgress(qreal progress);
|
||||
|
||||
[[nodiscard]] qreal duration() const;
|
||||
[[nodiscard]] qreal completeEndDuration() const;
|
||||
[[nodiscard]] qreal duration() const;
|
||||
[[nodiscard]] qreal completeEndDuration() const;
|
||||
|
||||
[[nodiscard]] IndeterminateAnimationType indeterminateAnimationType() const;
|
||||
void setIndeterminateAnimationType(IndeterminateAnimationType t);
|
||||
[[nodiscard]] IndeterminateAnimationType indeterminateAnimationType() const;
|
||||
void setIndeterminateAnimationType(IndeterminateAnimationType t);
|
||||
|
||||
signals:
|
||||
void startFractionChanged();
|
||||
void endFractionChanged();
|
||||
void rotationChanged();
|
||||
void progressChanged();
|
||||
void completeEndProgressChanged();
|
||||
void indeterminateAnimationTypeChanged();
|
||||
signals:
|
||||
void startFractionChanged();
|
||||
void endFractionChanged();
|
||||
void rotationChanged();
|
||||
void progressChanged();
|
||||
void completeEndProgressChanged();
|
||||
void indeterminateAnimationTypeChanged();
|
||||
|
||||
private:
|
||||
IndeterminateAnimationType m_type;
|
||||
QEasingCurve m_curve;
|
||||
private:
|
||||
IndeterminateAnimationType m_type;
|
||||
QEasingCurve m_curve;
|
||||
|
||||
qreal m_progress;
|
||||
qreal m_startFraction;
|
||||
qreal m_endFraction;
|
||||
qreal m_rotation;
|
||||
qreal m_completeEndProgress;
|
||||
qreal m_progress;
|
||||
qreal m_startFraction;
|
||||
qreal m_endFraction;
|
||||
qreal m_rotation;
|
||||
qreal m_completeEndProgress;
|
||||
|
||||
void update(qreal progress);
|
||||
void updateAdvance(qreal progress);
|
||||
void updateRetreat(qreal progress);
|
||||
void update(qreal progress);
|
||||
void updateAdvance(qreal progress);
|
||||
void updateRetreat(qreal progress);
|
||||
};
|
||||
|
||||
} // namespace ZShell::internal
|
||||
|
||||
Reference in New Issue
Block a user