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  · 

QGLMockView Class

The QGLMockView class exists purely for unit testing. More...

 #include <QGLMockView>

Inherits: QWindow.

This class was introduced in Qt 4.8.

Public Types

enum SurfaceClass { Window }
enum SurfaceType { RasterSurface, OpenGLSurface }

Public Functions

QGLMockView(QWindow * parent = 0)
~QGLMockView()
virtual ~QSurface()
QOpenGLContext * context()
virtual QSurfaceFormat format() const = 0
bool isValid() const
virtual QSize size() const = 0
SurfaceClass surfaceClass() const
virtual QPlatformSurface * surfaceHandle() const = 0
virtual SurfaceType surfaceType() const = 0
  • 69 public functions inherited from QWindow
  • 31 public functions inherited from QObject

Protected Functions

QSurface(SurfaceClass type)
  • 17 protected functions inherited from QWindow
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 10 properties inherited from QWindow
  • 1 property inherited from QObject
  • 15 public slots inherited from QWindow
  • 1 public slot inherited from QObject
  • 9 signal inherited from QWindow
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QGLMockView class exists purely for unit testing.

The QGLMockView class exists purely for unit test writing and should never be used for creating actual applications. QGLMockView is for advanced, mostly internal use and is not supported as part of the Qt3D functional API.

Member Function Documentation

QGLMockView::QGLMockView(QWindow * parent = 0)

Create a new QGLMockView object. Internally this sets up the underlying QWindow with some typical values useful for unit-testing, and then tries to create the window. If this fails the instance is invalid and it can be assumed the unit test environment does not support GL.

QGLMockView::~QGLMockView()

Destroys this QGLMockView object, recovering any resources.

QOpenGLContext * QGLMockView::context()

Returns the QOpenGLContext for this mock view, if one exists.

By default this value is null, but the constructor will attempt to set it to a non-null and valid context, and then make that context current on this window.

 QGLMockView view;
 QCOMPARE(view.context(), QOpenGLContext::currentContext());

bool QGLMockView::isValid() const

Returns true if this QGLMockView object can be used for testing.

 QGLMockView view;
 if (!view.isValid())
     QSKIP("GL not supported on this test platform");

The isValid() function will be false typically if the underlying GL context could not be created for this window.

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