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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QAbstractState Class Reference

The QAbstractState class is the base class of states of a QStateMachine. More...

 #include <QAbstractState>

Inherits: QObject.

Inherited by: QFinalState, QHistoryState, and QState.

This class was introduced in Qt 4.6.

Public Functions

~QAbstractState ()
QStateMachine * machine () const
QState * parentState () const
  • 29 public functions inherited from QObject

Signals

void entered ()
void exited ()

Protected Functions

QAbstractState ( QState * parent = 0 )
virtual void onEntry ( QEvent * event ) = 0
virtual void onExit ( QEvent * event ) = 0

Reimplemented Protected Functions

virtual bool event ( QEvent * e )
  • 8 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 7 static public members inherited from QObject

Detailed Description

The QAbstractState class is the base class of states of a QStateMachine.

The QAbstractState class is the abstract base class of states that are part of a QStateMachine. It defines the interface that all state objects have in common. QAbstractState is part of The State Machine Framework.

The entered() signal is emitted when the state has been entered. The exited() signal is emitted when the state has been exited.

The parentState() function returns the state's parent state. The machine() function returns the state machine that the state is part of.

Subclassing

The onEntry() function is called when the state is entered; reimplement this function to perform custom processing when the state is entered.

The onExit() function is called when the state is exited; reimplement this function to perform custom processing when the state is exited.

Member Function Documentation

QAbstractState::QAbstractState ( QState * parent = 0 ) [protected]

Constructs a new state with the given parent state.

QAbstractState::~QAbstractState ()

Destroys this state.

void QAbstractState::entered () [signal]

This signal is emitted when the state has been entered (after onEntry() has been called).

bool QAbstractState::event ( QEvent * e ) [virtual protected]

Reimplemented from QObject::event().

void QAbstractState::exited () [signal]

This signal is emitted when the state has been exited (after onExit() has been called).

QStateMachine * QAbstractState::machine () const

Returns the state machine that this state is part of, or 0 if the state is not part of a state machine.

void QAbstractState::onEntry ( QEvent * event ) [pure virtual protected]

This function is called when the state is entered. The given event is what caused the state to be entered. Reimplement this function to perform custom processing when the state is entered.

void QAbstractState::onExit ( QEvent * event ) [pure virtual protected]

This function is called when the state is exited. The given event is what caused the state to be exited. Reimplement this function to perform custom processing when the state is exited.

QState * QAbstractState::parentState () const

Returns this state's parent state, or 0 if the state has no parent state.

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 4.8
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