fix currentItem property and signals
C++ / fmt (pull_request) Successful in 4s
JS/TS / lint (pull_request) Successful in 16s
JS/TS / fmt (pull_request) Successful in 18s
Python / static (pull_request) Successful in 58s
Rust / fmt (pull_request) Successful in 59s
C++ / build (pull_request) Successful in 2m16s
Rust / build (pull_request) Successful in 2m5s
Rust / clippy (pull_request) Successful in 1m30s
Python / verify (pull_request) Successful in 2m43s
C++ / clang-tidy (pull_request) Successful in 3m58s
C++ / fmt (pull_request) Successful in 4s
JS/TS / lint (pull_request) Successful in 16s
JS/TS / fmt (pull_request) Successful in 18s
Python / static (pull_request) Successful in 58s
Rust / fmt (pull_request) Successful in 59s
C++ / build (pull_request) Successful in 2m16s
Rust / build (pull_request) Successful in 2m5s
Rust / clippy (pull_request) Successful in 1m30s
Python / verify (pull_request) Successful in 2m43s
C++ / clang-tidy (pull_request) Successful in 3m58s
This commit is contained in:
@@ -40,6 +40,10 @@ class CarouselView : public QQuickItem {
|
||||
Q_PROPERTY(
|
||||
int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY
|
||||
currentIndexChanged)
|
||||
|
||||
Q_PROPERTY(
|
||||
QQuickItem* currentItem READ currentItem NOTIFY currentItemChanged)
|
||||
|
||||
Q_PROPERTY(
|
||||
int glideDuration READ glideDuration WRITE setGlideDuration NOTIFY
|
||||
glideDurationChanged)
|
||||
@@ -79,6 +83,8 @@ class CarouselView : public QQuickItem {
|
||||
int currentIndex() const { return m_currentRealIndex; }
|
||||
void setCurrentIndex(int idx);
|
||||
|
||||
QQuickItem* currentItem() const { return m_currentItem; }
|
||||
|
||||
int glideDuration() const { return m_glideDuration; }
|
||||
void setGlideDuration(int v);
|
||||
|
||||
@@ -103,6 +109,7 @@ class CarouselView : public QQuickItem {
|
||||
void tileHeightChanged();
|
||||
void maxWidthChanged();
|
||||
void currentIndexChanged();
|
||||
void currentItemChanged();
|
||||
void glideDurationChanged();
|
||||
void glideEasingTypeChanged();
|
||||
void delegatePropertiesChanged();
|
||||
@@ -173,6 +180,8 @@ class CarouselView : public QQuickItem {
|
||||
|
||||
void updateCurrentIndexFromContentX(bool emitPreview);
|
||||
|
||||
void updateCurrentItem();
|
||||
|
||||
void wrapContentIfNeeded();
|
||||
void centerInstantlyOnReal(int realIndex);
|
||||
|
||||
@@ -198,6 +207,8 @@ class CarouselView : public QQuickItem {
|
||||
int m_currentRealIndex = -1;
|
||||
int m_previewRealIndex = -1;
|
||||
|
||||
QQuickItem* m_currentItem = nullptr;
|
||||
|
||||
int m_centerBlockStart = 0;
|
||||
|
||||
QList<Slot> m_slots;
|
||||
|
||||
Reference in New Issue
Block a user