summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/opengl
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-01-15 22:17:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 13:10:01 +0100
commitb29f51357b4d18f33f5d522994aeff149737b358 (patch)
tree4c71185e39afc5a30b483b56cc1c96136196396f /examples/activeqt/opengl
parent6e55d96d899b78d17de022f2e1d93f210ff7a1d0 (diff)
whitespace fixes
expand tabs, fix indentation, remove trailing whitespace. Change-Id: Ibec1bbad9e8faff81671ce9d1c7bb4fb9b340bb9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'examples/activeqt/opengl')
-rw-r--r--examples/activeqt/opengl/glbox.cpp44
-rw-r--r--examples/activeqt/opengl/glbox.h16
-rw-r--r--examples/activeqt/opengl/main.cpp24
-rw-r--r--examples/activeqt/opengl/opengl.pro12
4 files changed, 48 insertions, 48 deletions
diff --git a/examples/activeqt/opengl/glbox.cpp b/examples/activeqt/opengl/glbox.cpp
index 01ac4f3..69285fa 100644
--- a/examples/activeqt/opengl/glbox.cpp
+++ b/examples/activeqt/opengl/glbox.cpp
@@ -65,8 +65,8 @@
GLBox::GLBox( QWidget* parent, const char* name )
: QGLWidget( parent )
{
- xRot = yRot = zRot = 0.0; // default object rotation
- scale = 1.25; // default object scale
+ xRot = yRot = zRot = 0.0; // default object rotation
+ scale = 1.25; // default object scale
object = 0;
}
@@ -95,8 +95,8 @@ void GLBox::paintGL()
glTranslatef( 0.0, 0.0, -10.0 );
glScalef( scale, scale, scale );
- glRotatef( xRot, 1.0, 0.0, 0.0 );
- glRotatef( yRot, 0.0, 1.0, 0.0 );
+ glRotatef( xRot, 1.0, 0.0, 0.0 );
+ glRotatef( yRot, 0.0, 1.0, 0.0 );
glRotatef( zRot, 0.0, 0.0, 1.0 );
glCallList( object );
@@ -109,8 +109,8 @@ void GLBox::paintGL()
void GLBox::initializeGL()
{
- qglClearColor(Qt::black); // Let OpenGL clear to black
- object = makeObject(); // Generate an OpenGL display list
+ qglClearColor(Qt::black); // Let OpenGL clear to black
+ object = makeObject(); // Generate an OpenGL display list
glShadeModel( GL_FLAT );
}
@@ -135,14 +135,14 @@ void GLBox::resizeGL( int w, int h )
*/
GLuint GLBox::makeObject()
-{
+{
GLuint list;
list = glGenLists( 1 );
glNewList( list, GL_COMPILE );
- qglColor(Qt::white); // Shorthand for glColor3f or glIndex
+ qglColor(Qt::white); // Shorthand for glColor3f or glIndex
glLineWidth( 2.0 );
@@ -206,8 +206,8 @@ void GLBox::setZRotation( int degrees )
}
//! [1]
-class ObjectSafetyImpl : public QAxAggregated,
- public IObjectSafety
+class ObjectSafetyImpl : public QAxAggregated,
+ public IObjectSafety
{
public:
//! [1] //! [2]
@@ -215,14 +215,14 @@ public:
long queryInterface( const QUuid &iid, void **iface )
{
- *iface = 0;
- if ( iid == IID_IObjectSafety )
- *iface = (IObjectSafety*)this;
- else
- return E_NOINTERFACE;
-
- AddRef();
- return S_OK;
+ *iface = 0;
+ if ( iid == IID_IObjectSafety )
+ *iface = (IObjectSafety*)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
}
//! [2] //! [3]
@@ -231,13 +231,13 @@ public:
//! [3] //! [4]
HRESULT WINAPI GetInterfaceSafetyOptions( REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions )
{
- *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
- *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
- return S_OK;
+ *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ return S_OK;
}
HRESULT WINAPI SetInterfaceSafetyOptions( REFIID riid, DWORD pdwSupportedOptions, DWORD pdwEnabledOptions )
{
- return S_OK;
+ return S_OK;
}
};
//! [4] //! [5]
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h
index fd62e94..b356056 100644
--- a/examples/activeqt/opengl/glbox.h
+++ b/examples/activeqt/opengl/glbox.h
@@ -52,7 +52,7 @@
#include <QAxBindable>
class GLBox : public QGLWidget,
- public QAxBindable
+ public QAxBindable
{
Q_OBJECT
//! [0] //! [1]
@@ -66,18 +66,18 @@ public:
public slots:
- void setXRotation( int degrees );
+ void setXRotation( int degrees );
//! [1]
- void setYRotation( int degrees );
- void setZRotation( int degrees );
+ void setYRotation( int degrees );
+ void setZRotation( int degrees );
protected:
- void initializeGL();
- void paintGL();
- void resizeGL( int w, int h );
+ void initializeGL();
+ void paintGL();
+ void resizeGL( int w, int h );
- virtual GLuint makeObject();
+ virtual GLuint makeObject();
private:
diff --git a/examples/activeqt/opengl/main.cpp b/examples/activeqt/opengl/main.cpp
index f834a1b..8f62d59 100644
--- a/examples/activeqt/opengl/main.cpp
+++ b/examples/activeqt/opengl/main.cpp
@@ -55,12 +55,12 @@
#include <QAxFactory>
QAXFACTORY_DEFAULT( GLBox,
- "{5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}",
- "{33b051af-bb25-47cf-a390-5cfd2987d26a}",
- "{8c996c29-eafa-46ac-a6f9-901951e765b5}",
- "{2c3c183a-eeda-41a4-896e-3d9c12c3577d}",
- "{83e16271-6480-45d5-aaf1-3f40b7661ae4}"
- )
+ "{5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}",
+ "{33b051af-bb25-47cf-a390-5cfd2987d26a}",
+ "{8c996c29-eafa-46ac-a6f9-901951e765b5}",
+ "{2c3c183a-eeda-41a4-896e-3d9c12c3577d}",
+ "{83e16271-6480-45d5-aaf1-3f40b7661ae4}"
+ )
//! [0] //! [1]
/*
@@ -73,15 +73,15 @@ int main( int argc, char **argv )
QApplication a(argc,argv);
if ( !QGLFormat::hasOpenGL() ) {
- qWarning( "This system has no OpenGL support. Exiting." );
- return -1;
+ qWarning( "This system has no OpenGL support. Exiting." );
+ return -1;
}
if ( !QAxFactory::isServer() ) {
- GLObjectWindow w;
- w.resize( 400, 350 );
- w.show();
- return a.exec();
+ GLObjectWindow w;
+ w.resize( 400, 350 );
+ w.show();
+ return a.exec();
//! [1] //! [2]
}
return a.exec();
diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro
index 1cdd707..47693f4 100644
--- a/examples/activeqt/opengl/opengl.pro
+++ b/examples/activeqt/opengl/opengl.pro
@@ -1,14 +1,14 @@
TEMPLATE = app
-TARGET = openglax
+TARGET = openglax
CONFIG += warn_off
QT += widgets axserver opengl
-HEADERS = glbox.h \
- globjwin.h
-SOURCES = glbox.cpp \
- globjwin.cpp \
- main.cpp
+HEADERS = glbox.h \
+ globjwin.h
+SOURCES = glbox.cpp \
+ globjwin.cpp \
+ main.cpp
RC_FILE = opengl.rc