Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QScrollEvent Class

The QScrollEvent class is send when scrolling. More...

 #include <QScrollEvent>

Inherits: QEvent.

This class was introduced in Qt 4.8.

Public Types

enum ScrollState { ScrollStarted, ScrollUpdated, ScrollFinished }

Public Functions

QScrollEvent(const QPointF & contentPos, const QPointF & overshootDistance, ScrollState scrollState)
~QScrollEvent()
QPointF contentPos() const
QPointF overshootDistance() const
ScrollState scrollState() const
  • 6 public functions inherited from QEvent

Additional Inherited Members

  • 1 property inherited from QEvent
  • 1 static public member inherited from QEvent

Detailed Description

The QScrollEvent class is send when scrolling.

The scroll event is send to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject.

Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however.

See also QScrollPrepareEvent and QScroller.

Member Type Documentation

enum QScrollEvent::ScrollState

This enum describes the states a scroll event can have.

ConstantValueDescription
QScrollEvent::ScrollStarted0Set for the first scroll event of a scroll activity.
QScrollEvent::ScrollUpdated1Set for all but the first and the last scroll event of a scroll activity.
QScrollEvent::ScrollFinished2Set for the last scroll event of a scroll activity.

See also QScrollEvent::scrollState().

Member Function Documentation

QScrollEvent::QScrollEvent(const QPointF & contentPos, const QPointF & overshootDistance, ScrollState scrollState)

Creates a new QScrollEvent contentPos is the new content position, overshootDistance is the new overshoot distance while scrollState indicates if this scroll event is the first one, the last one or some event in between.

QScrollEvent::~QScrollEvent()

Destroys QScrollEvent.

QPointF QScrollEvent::contentPos() const

Returns the new scroll position.

QPointF QScrollEvent::overshootDistance() const

Returns the new overshoot distance. See QScroller for an explanation of the term overshoot.

See also QScroller.

ScrollState QScrollEvent::scrollState() const

Returns the current scroll state as a combination of ScrollStateFlag values. ScrollStarted (or ScrollFinished) will be set, if this scroll event is the first (or last) event in a scrolling activity. Please note that both values can be set at the same time, if the activity consists of a single QScrollEvent. All other scroll events in between will have their state set to ScrollUpdated.

A widget could for example revert selections when scrolling is started and stopped.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web