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  · 

QGLSceneFormatHandler Class

The QGLSceneFormatHandler class defines the common format I/O interface for loading 3D scene formats. More...

 #include <QGLSceneFormatHandler>

Inherits: QObject.

This class was introduced in Qt 4.8.

Public Functions

QGLSceneFormatHandler()
virtual ~QGLSceneFormatHandler()
virtual void decodeOptions(const QString & options)
QIODevice * device() const
virtual QGLAbstractScene * download() = 0
void downloadScene()
void finalize()
QString format() const
virtual QGLAbstractScene * read() = 0
void setDevice(QIODevice * device)
void setFormat(const QString & format)
void setUrl(const QUrl & url)
QUrl url() const
  • 31 public functions inherited from QObject

Public Slots

virtual void downloadComplete(QByteArray * sceneData)
  • 1 public slot inherited from QObject

Protected Functions

QGLAbstractScene * getScene() const
void setScene(QGLAbstractScene * theScene)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QGLSceneFormatHandler class defines the common format I/O interface for loading 3D scene formats.

This interface will be deprecated in an upcoming release. For more details see the plug-in tutorial documentation.

Member Function Documentation

QGLSceneFormatHandler::QGLSceneFormatHandler()

Constructs a 3D scene format handler.

QGLSceneFormatHandler::~QGLSceneFormatHandler() [virtual]

Destroys this 3D scene format handler.

void QGLSceneFormatHandler::decodeOptions(const QString & options) [virtual]

Decodes and applies options to this handler. Generally this will be called by the QGLAbstractScene::loadScene() method prior to reading the model data with read() or download(). Exactly what the string value may contain and the meaning of the encoded options depends on each individual plugin.

This default implementation simply does nothing.

QIODevice * QGLSceneFormatHandler::device() const

Returns the device currently assigned to the 3D scene format handler. Returns null if no device has been assigned.

See also setDevice().

QGLAbstractScene * QGLSceneFormatHandler::download() [pure virtual]

Reads a 3D scene from a url and returns a stub to it which can be used the application, and will be updated with the full scene later.

Returns NULL if the scene could not be created.

void QGLSceneFormatHandler::downloadComplete(QByteArray * sceneData) [virtual slot]

This function should be called when the download of a remotely hosted scene is complete. The sceneData will contain the relevant data for the scene.

The user is required to reimplement this if they intend to support network loading of scenes in their plugin.

void QGLSceneFormatHandler::downloadScene()

Initiates download of the specified scene. The scene must have been previously specified with URL, options, format, and so on. This function will then create a QGLAbstractDownloadManager instance and submit the network request for the scene.

The resultant data will be handled by the downloadComplete() slot.

void QGLSceneFormatHandler::finalize()

Called at the end of the read() and download() functions, this function completes any extra cleanup required, and sets the QGLSceneFormatHandler it belongs to as being ready for deletion when the main event loop is next processed.

QString QGLSceneFormatHandler::format() const

Returns the format that is currently assigned to this 3D scene format handler. Returns an empty string if no format has been assigned.

See also setFormat().

QGLAbstractScene * QGLSceneFormatHandler::getScene() const [protected]

Get the pointer for the scene currently being processed. This is specifically used during network loading.

QGLAbstractScene * QGLSceneFormatHandler::read() [pure virtual]

Reads a 3D scene from device() and returns it. Returns null if the format of device() is invalid and a scene could not be read.

void QGLSceneFormatHandler::setDevice(QIODevice * device)

Sets the device for this 3D scene format handler to device. The handler will use this device when reading 3D scenes.

The device can only be set once and must be set before calling read(). If you need to read multiple files, construct multiple instances of the appropriate QGLSceneFormatHandler subclass.

See also device().

void QGLSceneFormatHandler::setFormat(const QString & format)

Sets the format of this 3D scene format handler to format.

See also format().

void QGLSceneFormatHandler::setScene(QGLAbstractScene * theScene) [protected]

Set the pointer for the scene theScene currently being processed. This is specifically used during network loading.

void QGLSceneFormatHandler::setUrl(const QUrl & url)

Sets the url of the data provided by device().

See also url().

QUrl QGLSceneFormatHandler::url() const

Returns the url of the data provided by device(). This is typically used when the data in device() refers to additional files that need to be located relative to the original directory.

See also setUrl().

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