42 #ifndef QDECLARATIVELISTVIEW_H 43 #define QDECLARATIVELISTVIEW_H 45 #include "private/qdeclarativeflickable_p.h" 46 #include "private/qdeclarativeguard_p.h" 65 void setProperty(
const QString &);
77 void propertyChanged();
78 void criteriaChanged();
79 void delegateChanged();
104 bool highlightFollowsCurrentItem;
106 int highlightMoveDuration;
108 int highlightResizeDuration;
117 bool keyNavigationWraps;
143 int currentIndex() const;
144 void setCurrentIndex(
int idx);
150 QDeclarativeComponent *highlight() const;
151 void setHighlight(QDeclarativeComponent *highlight);
153 bool highlightFollowsCurrentItem() const;
154 void setHighlightFollowsCurrentItem(
bool);
160 qreal preferredHighlightBegin()
const;
161 void setPreferredHighlightBegin(
qreal);
162 void resetPreferredHighlightBegin();
164 qreal preferredHighlightEnd()
const;
165 void setPreferredHighlightEnd(
qreal);
166 void resetPreferredHighlightEnd();
168 qreal spacing()
const;
169 void setSpacing(
qreal spacing);
179 bool isWrapEnabled()
const;
180 void setWrapEnabled(
bool);
182 int cacheBuffer()
const;
183 void setCacheBuffer(
int);
186 QString currentSection()
const;
188 qreal highlightMoveSpeed()
const;
189 void setHighlightMoveSpeed(
qreal);
191 int highlightMoveDuration()
const;
192 void setHighlightMoveDuration(
int);
194 qreal highlightResizeSpeed()
const;
195 void setHighlightResizeSpeed(
qreal);
197 int highlightResizeDuration()
const;
198 void setHighlightResizeDuration(
int);
219 Q_INVOKABLE Q_REVISION(1)
void positionViewAtBeginning();
220 Q_INVOKABLE Q_REVISION(1)
void positionViewAtEnd();
223 void incrementCurrentIndex();
224 void decrementCurrentIndex();
228 void spacingChanged();
229 void orientationChanged();
230 Q_REVISION(1)
void layoutDirectionChanged();
231 void currentIndexChanged();
232 void currentSectionChanged();
233 void highlightMoveSpeedChanged();
234 void highlightMoveDurationChanged();
235 void highlightResizeSpeedChanged();
236 void highlightResizeDurationChanged();
237 void highlightChanged();
238 void highlightItemChanged();
240 void delegateChanged();
241 void highlightFollowsCurrentItemChanged();
242 void preferredHighlightBeginChanged();
243 void preferredHighlightEndChanged();
244 void highlightRangeModeChanged();
245 void keyNavigationWrapsChanged();
246 void cacheBufferChanged();
247 void snapModeChanged();
248 void headerChanged();
249 void footerChanged();
263 void updateSections();
265 void trackedPositionChanged();
266 void itemsInserted(
int index,
int count);
267 void itemsRemoved(
int index,
int count);
268 void itemsMoved(
int from,
int to,
int count);
269 void itemsChanged(
int index,
int count);
271 void destroyRemoved();
282 :
QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
288 if (view != m_view) {
297 if (m_isCurrent != c) {
299 emit currentItemChanged();
306 if (m_prevSection != sect) {
307 m_prevSection = sect;
308 emit prevSectionChanged();
315 if (m_nextSection != sect) {
316 m_nextSection = sect;
317 emit nextSectionChanged();
324 if (m_section != sect) {
326 emit sectionChanged();
333 if (m_delayRemove != delay) {
334 m_delayRemove = delay;
335 emit delayRemoveChanged();
343 void currentItemChanged();
344 void sectionChanged();
345 void prevSectionChanged();
346 void nextSectionChanged();
347 void delayRemoveChanged();
The QVariant class acts like a union for the most common Qt data types.
QDeclarativeComponent * delegate
The QKeyEvent class describes a key event.
#define Q_CLASSINFO(name, value)
This macro associates extra information to the class, which is available using QObject::metaObject()...
#define QT_END_NAMESPACE
This macro expands to.
virtual qreal maxYExtent() const
QScopedPointer< QGraphicsItemPrivate > d_ptr
QDeclarativeListView * view
#define QML_DECLARE_TYPE(TYPE)
virtual bool event(QEvent *)
QDeclarativeListView * view()
QString prevSection() const
QDeclarativeListViewAttached(QObject *parent)
virtual void keyPressEvent(QKeyEvent *event)
The QString class provides a Unicode character string.
void setView(QDeclarativeListView *view)
QString nextSection() const
The QObject class is the base class of all Qt objects.
QDeclarativeGuard< QDeclarativeListView > m_view
virtual qreal minYExtent() const
#define QML_DECLARE_TYPEINFO(TYPE, FLAGS)
void setNextSection(const QString §)
SectionCriteria criteria() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QDeclarativeComponent class encapsulates a QML component definition.
QDeclarativeComponent * m_delegate
The QDeclarativeItem class provides the most basic of all visual items in QML.
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
virtual void viewportMoved()
static const char * data(const QByteArray &arr)
void setPrevSection(const QString §)
virtual qreal minXExtent() const
#define Q_DECLARE_PRIVATE_D(Dptr, Class)
~QDeclarativeListViewAttached()
QDeclarativeComponent * delegate() const
SectionCriteria m_criteria
void setDelayRemove(bool delay)
virtual void componentComplete()
QDeclarativeViewSection(QObject *parent=0)
#define Q_AUTOTEST_EXPORT
void setIsCurrentItem(bool c)
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry...
virtual void setContentX(qreal pos)
virtual qreal maxXExtent() const
bool isCurrentItem() const
The QEvent class is the base class of all event classes.
virtual IFMETHOD End(void)=0
void setSection(const QString §)
virtual void setContentY(qreal pos)