21 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
24 Q_PROPERTY(QVariant
timers READ
timers WRITE setTimers NOTIFY timersChanged)
33 setSourceHeightRatio NOTIFY sourceHeightRatioChanged)
38 effectiveSourceRectChanged)
40 effectiveSourceClipRectChanged)
41 Q_PROPERTY(
bool sourceRegionExceedsTextureBounds READ
42 sourceRegionExceedsTextureBounds NOTIFY
43 sourceRegionExceedsTextureBoundsChanged)
49 SelectSourceClock = 2,
60 void setSkinClock(QObject* clock);
63 void setClockMode(
int mode);
65 bool isEnabled()
const;
69 void setSourceData(
const QVariant&
sourceData);
75 void setTimers(
const QVariant&
timers);
81 void setSourceTimeOffset(
int offset);
97 void setSourceHeightRatio(qreal ratio);
104 bool sourceRegionExceedsTextureBounds()
const;
107 void skinClockChanged();
108 void clockModeChanged();
109 void enabledChanged();
110 void sourceDataChanged();
111 void skinTimeChanged();
112 void timersChanged();
113 void timerFireChanged();
114 void sourceTimeOffsetChanged();
115 void frameOverrideChanged();
116 void frameGroupSizeChanged();
117 void textureWidthChanged();
118 void textureHeightChanged();
119 void textureSizeChanged();
120 void sourceHeightRatioChanged();
121 void frameIndexChanged();
122 void sourceRectChanged();
123 void sourceClipRectChanged();
124 void effectiveSourceRectChanged();
125 void effectiveSourceClipRectChanged();
126 void sourceRegionExceedsTextureBoundsChanged();
131 void rebuildSource();
132 void updateSourceRegionExceedsTextureBounds();
133 void updateEffectiveSourceRects();
134 void reconnectClock();
135 void updateSkinTimeFromClock();
136 void updateFrameIndex();
137 int clockSkinTime()
const;
138 qreal effectiveTimerFire()
const;
139 static int frameCount(
const Source&
source);
143 bool m_enabled =
true;
144 QPointer<Lr2SkinClock> m_skinClock;
145 QMetaObject::Connection m_clockConnection;
146 int m_clockMode = ManualClock;
147 QVariant m_sourceData;
151 int m_timerFire = -2147483648;
152 int m_sourceTimeOffset = 0;
153 int m_frameOverride = -1;
154 int m_frameGroupSize = 1;
155 int m_textureWidth = 0;
156 int m_textureHeight = 0;
157 qreal m_sourceHeightRatio = 1.0;
158 int m_frameIndex = 0;
159 QVector4D m_sourceRect = QVector4D(0.0f, 0.0f, 1.0f, 1.0f);
160 QRectF m_sourceClipRect = QRectF(0.0, 0.0, 0.0, 0.0);
161 QVector4D m_effectiveSourceRect = QVector4D(0.0f, 0.0f, 1.0f, 1.0f);
162 QRectF m_effectiveSourceClipRect = QRectF(0.0, 0.0, 0.0, 0.0);
163 bool m_sourceRegionExceedsTextureBounds =
false;