From 3526540ee9ee93ffc9b45120b0daa428dd1c2924 Mon Sep 17 00:00:00 2001
From: Oliver Bock <oliver.bock@aei.mpg.de>
Date: Fri, 9 Sep 2011 19:01:49 +0200
Subject: [PATCH] Cleansed source (tabs->spaces, indentation, trailing
 whitespaces)

---
 pulsatingscience.pro          |  30 +-
 src/main.cpp                  |   2 +-
 src/pulsaranimationwidget.cpp | 884 +++++++++++++++++-----------------
 src/pulsaranimationwidget.h   | 128 ++---
 src/pulsatingscience.cpp      | 616 +++++++++++------------
 src/pulsatingscience.h        |  70 +--
 src/pulsatingsciencehelp.cpp  |   8 +-
 src/pulsatingsciencehelp.h    |   4 +-
 src/pulsescopewidget.cpp      |  98 ++--
 src/pulsescopewidget.h        |  24 +-
 10 files changed, 931 insertions(+), 933 deletions(-)

diff --git a/pulsatingscience.pro b/pulsatingscience.pro
index 24937b4..ea96d5a 100644
--- a/pulsatingscience.pro
+++ b/pulsatingscience.pro
@@ -41,11 +41,11 @@ TS_DIR = src/resources
 TRANSLATIONS = src/resources/pulsatingscience_de.ts
 
 win32 {
-	RC_FILE = src/resources/pulsatingscience.rc
+    RC_FILE = src/resources/pulsatingscience.rc
 }
 macx {
-	QMAKE_LFLAGS += -bind_at_load
-	ICON = src/resources/pulsatingscience.icns
+    QMAKE_LFLAGS += -bind_at_load
+    ICON = src/resources/pulsatingscience.icns
 }
 
 INCLUDEPATH += ./
@@ -55,18 +55,18 @@ MOC_DIR = src/.moc
 OBJECTS_DIR = src/.obj
 
 !isEmpty(TRANSLATIONS) {
-	isEmpty(QMAKE_LRELEASE) {
-		win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
-		else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
-	}
+    isEmpty(QMAKE_LRELEASE) {
+        win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
+        else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
+    }
 
-	isEmpty(TS_DIR):TS_DIR = translations
+    isEmpty(TS_DIR):TS_DIR = translations
 
-	linguist.name = lrelease ${QMAKE_FILE_IN}
-	linguist.input = TRANSLATIONS
-	linguist.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
-	linguist.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
-	linguist.CONFIG = no_link
-	QMAKE_EXTRA_COMPILERS += linguist
-	PRE_TARGETDEPS += compiler_linguist_make_all
+    linguist.name = lrelease ${QMAKE_FILE_IN}
+    linguist.input = TRANSLATIONS
+    linguist.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
+    linguist.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
+    linguist.CONFIG = no_link
+    QMAKE_EXTRA_COMPILERS += linguist
+    PRE_TARGETDEPS += compiler_linguist_make_all
 }
diff --git a/src/main.cpp b/src/main.cpp
index 0aa8db0..b85bd62 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
 
     PulsatingScience window;
     if(argc == 2 && QString(argv[1]) == "--demo") {
-    	window.toggleHiddenDemoMode();
+        window.toggleHiddenDemoMode();
     }
     window.show();
 
diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp
index 8601211..4a070e2 100644
--- a/src/pulsaranimationwidget.cpp
+++ b/src/pulsaranimationwidget.cpp
@@ -23,33 +23,33 @@
 const double PulsarAnimationWidget::deg2rad = PI/180.0;
 
 PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
-	QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent),
-	m_frameTimer(),
-	m_pulseProfile(360, 0.0)
+    QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent),
+    m_frameTimer(),
+    m_pulseProfile(360, 0.0)
 {
-	QString msgThis = tr("3D animation");
-	if(!format().directRendering()) {
-		QString msg = tr("Sorry, no direct rendering support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!format().doubleBuffer()) {
-		QString msg = tr("Sorry, no double buffering support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!format().rgba()) {
-		QString msg = tr("Sorry, no RGBA support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!format().alpha()) {
-		QString msg = tr("Sorry, no alpha channel support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!format().sampleBuffers()) {
-		QString msg = tr("Sorry, no multisampling support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-
-	// connect primary rendering timer to local callback
+    QString msgThis = tr("3D animation");
+    if(!format().directRendering()) {
+        QString msg = tr("Sorry, no direct rendering support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!format().doubleBuffer()) {
+        QString msg = tr("Sorry, no double buffering support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!format().rgba()) {
+        QString msg = tr("Sorry, no RGBA support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!format().alpha()) {
+        QString msg = tr("Sorry, no alpha channel support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!format().sampleBuffers()) {
+        QString msg = tr("Sorry, no multisampling support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+
+    // connect primary rendering timer to local callback
     connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame()));
 
     // initialize quadric pointers
@@ -57,103 +57,103 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
     m_quadricCompanion = NULL;
     m_quadricPulsarOrbitPlane = NULL;
     m_quadricPulsar = NULL;
-	m_quadricPulsarCone1 = NULL;
-	m_quadricPulsarCone2 = NULL;
-	m_quadricPulsarSpinAxis = NULL;
-	m_quadricPulsarMagneticAxis = NULL;
-
-	// initialize texture pointers
-	m_pulsarTexture = 0;
-	m_backgroundTexture = 0;
-
-	// initial render timing settings
-	m_framesPerSecond = 25;
-	m_pulsarRotationDelta = 0.0;
-	m_orbitRotationDelta = 0.0;
-	m_pulsarRotationAngle = 0.0;
-	m_orbitRotationAngle = 0.0;
-
-	// initial binary system parameters (have to match GUI!)
-	m_pulsarMass = 1.4;
-	// initial companion is "Neutron Star"
-	m_companionMass = 1.4;
-	m_pulsarSpinAxisInclination = 0.0;
-	m_pulsarMagneticAxisInclination = 60.0;
-	m_pulsarSemiMajorAxis = 5.0;
-	m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
-	// initial spin frequency of 0.5 Hz
-	m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond;
-	// update orbital period (based on settings above)
-	updateOrbitPeriod();
-
-	// initial view features
-	m_showOrbits = false;
-	m_showRotationAxes = false;
-	m_cameraInteraction = false;
-
-	// initial view settings
-	m_mouseAngleH = 90.0;
-	m_mouseAngleV = 30.0;
-	m_cameraZoom = 150.0;
-	m_cameraZoomLBound = 10.0;
-	m_cameraZoomUBound = 4500.0;
-	m_mouseLastX = 0;
-	m_mouseLastY = 0;
-
-	// update camera based on settings above
-	updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom);
+    m_quadricPulsarCone1 = NULL;
+    m_quadricPulsarCone2 = NULL;
+    m_quadricPulsarSpinAxis = NULL;
+    m_quadricPulsarMagneticAxis = NULL;
+
+    // initialize texture pointers
+    m_pulsarTexture = 0;
+    m_backgroundTexture = 0;
+
+    // initial render timing settings
+    m_framesPerSecond = 25;
+    m_pulsarRotationDelta = 0.0;
+    m_orbitRotationDelta = 0.0;
+    m_pulsarRotationAngle = 0.0;
+    m_orbitRotationAngle = 0.0;
+
+    // initial binary system parameters (have to match GUI!)
+    m_pulsarMass = 1.4;
+    // initial companion is "Neutron Star"
+    m_companionMass = 1.4;
+    m_pulsarSpinAxisInclination = 0.0;
+    m_pulsarMagneticAxisInclination = 60.0;
+    m_pulsarSemiMajorAxis = 5.0;
+    m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
+    // initial spin frequency of 0.5 Hz
+    m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond;
+    // update orbital period (based on settings above)
+    updateOrbitPeriod();
+
+    // initial view features
+    m_showOrbits = false;
+    m_showRotationAxes = false;
+    m_cameraInteraction = false;
+
+    // initial view settings
+    m_mouseAngleH = 90.0;
+    m_mouseAngleV = 30.0;
+    m_cameraZoom = 150.0;
+    m_cameraZoomLBound = 10.0;
+    m_cameraZoomUBound = 4500.0;
+    m_mouseLastX = 0;
+    m_mouseLastY = 0;
+
+    // update camera based on settings above
+    updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom);
 }
 
 PulsarAnimationWidget::~PulsarAnimationWidget()
 {
-	if(m_quadricCompanionOrbitPlane) gluDeleteQuadric(m_quadricCompanionOrbitPlane);
-	if(m_quadricCompanion) gluDeleteQuadric(m_quadricCompanion);
-	if(m_quadricPulsarOrbitPlane) gluDeleteQuadric(m_quadricPulsarOrbitPlane);
-	if(m_quadricPulsar) gluDeleteQuadric(m_quadricPulsar);
-	if(m_quadricPulsarCone1) gluDeleteQuadric(m_quadricPulsarCone1);
-	if(m_quadricPulsarCone2) gluDeleteQuadric(m_quadricPulsarCone2);
-	if(m_quadricPulsarSpinAxis) gluDeleteQuadric(m_quadricPulsarSpinAxis);
-	if(m_quadricPulsarMagneticAxis) gluDeleteQuadric(m_quadricPulsarMagneticAxis);
-
-	if(m_pulsarTexture) deleteTexture(m_pulsarTexture);
-	if(m_backgroundTexture) deleteTexture(m_backgroundTexture);
+    if(m_quadricCompanionOrbitPlane) gluDeleteQuadric(m_quadricCompanionOrbitPlane);
+    if(m_quadricCompanion) gluDeleteQuadric(m_quadricCompanion);
+    if(m_quadricPulsarOrbitPlane) gluDeleteQuadric(m_quadricPulsarOrbitPlane);
+    if(m_quadricPulsar) gluDeleteQuadric(m_quadricPulsar);
+    if(m_quadricPulsarCone1) gluDeleteQuadric(m_quadricPulsarCone1);
+    if(m_quadricPulsarCone2) gluDeleteQuadric(m_quadricPulsarCone2);
+    if(m_quadricPulsarSpinAxis) gluDeleteQuadric(m_quadricPulsarSpinAxis);
+    if(m_quadricPulsarMagneticAxis) gluDeleteQuadric(m_quadricPulsarMagneticAxis);
+
+    if(m_pulsarTexture) deleteTexture(m_pulsarTexture);
+    if(m_backgroundTexture) deleteTexture(m_backgroundTexture);
 }
 
 void PulsarAnimationWidget::initializeGL()
 {
-	glClearColor(0.0, 0.0, 0.0, 0.0);
-	glClearDepth(1.0);
-	glDepthFunc(GL_LEQUAL);
-	glEnable(GL_DEPTH_TEST);
-
-	glShadeModel(GL_SMOOTH);
-	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-
-	GLfloat LightAmbient[] = {0.3, 0.3, 0.3, 1.0};
-	GLfloat LightDiffuse[] = {1.0, 1.0, 1.0, 1.0};
-	GLfloat LightSpecular[] = {1.0, 1.0, 1.0, 1.0};
-	GLfloat LightPosition[] = {0.0, 0.0, 3.0, 1.0};
-	GLfloat spot_direction[] = {0.0, 0.0, -1.0};
-
-	glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
-	glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
-	glLightfv(GL_LIGHT0, GL_SPECULAR, LightSpecular);
-	glLightfv(GL_LIGHT0, GL_POSITION, LightPosition);
-	glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 50.0);
-	glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spot_direction);
-	glLightf(GL_LIGHT0, GL_SPOT_EXPONENT, 10.0);
-
-	glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
-	glEnable(GL_LIGHT0);
-	glEnable(GL_LIGHTING);
-
-	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-	glEnable(GL_BLEND);
-
-	m_quadricCompanionOrbitPlane = gluNewQuadric();
-	m_quadricCompanion = gluNewQuadric();
-	m_quadricPulsarOrbitPlane = gluNewQuadric();
-	m_quadricPulsar = gluNewQuadric();
+    glClearColor(0.0, 0.0, 0.0, 0.0);
+    glClearDepth(1.0);
+    glDepthFunc(GL_LEQUAL);
+    glEnable(GL_DEPTH_TEST);
+
+    glShadeModel(GL_SMOOTH);
+    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+
+    GLfloat LightAmbient[] = {0.3, 0.3, 0.3, 1.0};
+    GLfloat LightDiffuse[] = {1.0, 1.0, 1.0, 1.0};
+    GLfloat LightSpecular[] = {1.0, 1.0, 1.0, 1.0};
+    GLfloat LightPosition[] = {0.0, 0.0, 3.0, 1.0};
+    GLfloat spot_direction[] = {0.0, 0.0, -1.0};
+
+    glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
+    glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
+    glLightfv(GL_LIGHT0, GL_SPECULAR, LightSpecular);
+    glLightfv(GL_LIGHT0, GL_POSITION, LightPosition);
+    glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 50.0);
+    glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spot_direction);
+    glLightf(GL_LIGHT0, GL_SPOT_EXPONENT, 10.0);
+
+    glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
+    glEnable(GL_LIGHT0);
+    glEnable(GL_LIGHTING);
+
+    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    glEnable(GL_BLEND);
+
+    m_quadricCompanionOrbitPlane = gluNewQuadric();
+    m_quadricCompanion = gluNewQuadric();
+    m_quadricPulsarOrbitPlane = gluNewQuadric();
+    m_quadricPulsar = gluNewQuadric();
     m_quadricPulsarCone1 = gluNewQuadric();
     m_quadricPulsarCone2 = gluNewQuadric();
     m_quadricPulsarSpinAxis = gluNewQuadric();
@@ -180,37 +180,37 @@ void PulsarAnimationWidget::initializeGL()
     // prepare and check pulsar texture
     QImage pulsarTexture(":/textures/resources/texture_pulsar.png");
     if(pulsarTexture.width() != pulsarTexture.height()) {
-    	qWarning() << msgShape.arg(tr("Pulsar"));
+        qWarning() << msgShape.arg(tr("Pulsar"));
     }
     else {
-    	double integer = 0.0;
-    	double fraction = 0.0;
-    	fraction = modf(log(pulsarTexture.width()) / log(2.0), &integer);
-    	if(fraction > 0.0) {
-    		qWarning() << msgPower.arg(tr("Pulsar"));
-    	}
+        double integer = 0.0;
+        double fraction = 0.0;
+        fraction = modf(log(pulsarTexture.width()) / log(2.0), &integer);
+        if(fraction > 0.0) {
+            qWarning() << msgPower.arg(tr("Pulsar"));
+        }
     }
     if(pulsarTexture.width() > maxTextureSize) {
-    	qWarning() << msgSize.arg(tr("pulsar").arg(maxTextureSize).arg(maxTextureSize));
-    	pulsarTexture = pulsarTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+        qWarning() << msgSize.arg(tr("pulsar").arg(maxTextureSize).arg(maxTextureSize));
+        pulsarTexture = pulsarTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
     }
 
     // prepare and check background texture
     QImage backgroundTexture(":/textures/resources/texture_background_carina.png");
     if(backgroundTexture.width() != backgroundTexture.height()) {
-    	qWarning() << msgShape.arg(tr("Background"));
+        qWarning() << msgShape.arg(tr("Background"));
     }
     else {
-    	double integer = 0.0;
-    	double fraction = 0.0;
-    	fraction = modf(log(backgroundTexture.width()) / log(2.0), &integer);
-    	if(fraction > 0.0) {
-    		qWarning() << msgPower.arg(tr("Background"));
-    	}
+        double integer = 0.0;
+        double fraction = 0.0;
+        fraction = modf(log(backgroundTexture.width()) / log(2.0), &integer);
+        if(fraction > 0.0) {
+            qWarning() << msgPower.arg(tr("Background"));
+        }
     }
     if(backgroundTexture.width() > maxTextureSize) {
-    	qWarning() << msgSize.arg(tr("background").arg(maxTextureSize).arg(maxTextureSize));
-    	backgroundTexture = backgroundTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+        qWarning() << msgSize.arg(tr("background").arg(maxTextureSize).arg(maxTextureSize));
+        backgroundTexture = backgroundTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
     }
 
     // bind textures
@@ -228,428 +228,426 @@ void PulsarAnimationWidget::initializeGL()
 
 void PulsarAnimationWidget::resizeGL(int w, int h)
 {
-	glViewport(0, 0, w, h);
+    glViewport(0, 0, w, h);
 
-	glMatrixMode(GL_PROJECTION);
-	glLoadIdentity();
+    glMatrixMode(GL_PROJECTION);
+    glLoadIdentity();
 
-	gluPerspective(4.5, (GLfloat)w / (GLfloat)h, 0.1, 5000.0);
+    gluPerspective(4.5, (GLfloat)w / (GLfloat)h, 0.1, 5000.0);
 
-	glMatrixMode(GL_MODELVIEW);
-	glLoadIdentity();
+    glMatrixMode(GL_MODELVIEW);
+    glLoadIdentity();
 }
 
 void PulsarAnimationWidget::paintGL()
 {
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-	glMatrixMode(GL_MODELVIEW);
-	glLoadIdentity();
-
-	gluLookAt(m_cameraPosX, m_cameraPosY, m_cameraPosZ,
-			  0.0, 0.0, 0.0,
-			  0.0, 1.0, 0.0);
-
-	// TODO: should be located elsewhere
-	static GLfloat no_mat[] = {0.0, 0.0, 0.0, 1.0};
-	static GLfloat mat_diffuse[] = {0.5, 0.5, 0.5, 1.0};
-	static GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
-	static GLfloat low_shininess[] = {2.5};
-	static GLfloat translucent[] = {1.0, 1.0, 1.0, 0.33};
-
-	glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
-	glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
-	glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
-	glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess);
-	glMaterialfv(GL_FRONT, GL_EMISSION, no_mat);
-
-	// draw companion
-	glPushMatrix();
-		glTranslatef(sin((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis,
-					 0.0,
-					 cos((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis);
-		gluSphere(m_quadricCompanion, 1.0, 32, 32);
-	glPopMatrix();
-
-	// draw pulsar
-	glPushMatrix();
-		glTranslatef(sin(m_orbitRotationAngle * deg2rad) * m_pulsarSemiMajorAxis,
-					 0.0,
-					 cos(m_orbitRotationAngle * deg2rad) * m_pulsarSemiMajorAxis);
-
-		glPushMatrix();
-			glRotatef(m_pulsarSpinAxisInclination, 0.0, 0.0, 1.0);
-			glRotatef(m_pulsarRotationAngle, 0.0, 1.0, 0.0);
-
-			// draw spin axis
-			if(m_showRotationAxes) {
-				glPushMatrix();
-					glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
-					glRotatef(90.0, 1.0, 0.0, 0.0);
-					glTranslatef(0.0, 0.0, -5.0);
-					gluCylinder(m_quadricPulsarSpinAxis, 0.05, 0.05, 10.0, 32, 1);
-				glPopMatrix();
-			}
-
-			// create texture coordinates and enable texturing
-	        glEnable(GL_TEXTURE_GEN_S);
-	        glEnable(GL_TEXTURE_GEN_T);
-	        glBindTexture(GL_TEXTURE_2D, m_pulsarTexture);
-	        glEnable(GL_TEXTURE_2D);
-
-			glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
-			glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
-			gluSphere(m_quadricPulsar, 1.0, 32, 32);
-
-			// disable texturing
-	        glDisable(GL_TEXTURE_GEN_S);
-	        glDisable(GL_TEXTURE_GEN_T);
-	        glDisable(GL_TEXTURE_2D);
-		glPopMatrix();
-
-		// TODO: should be located elsewhere
-		static GLfloat coneAmbient[] = {1.0, 1.0, 0.0, 1.0};
-		static GLfloat coneDiffuse[] = {1.0, 1.0, 0.0, 1.0};
-		static GLfloat coneSpecular[] = {1.0, 1.0, 0.5, 1.0};
-
-		glMaterialfv(GL_FRONT, GL_SPECULAR, coneSpecular);
-
-		// first cone
-		glPushMatrix();
-			glRotatef(90.0, 1.0, 0.0, 0.0);
-			glRotatef(m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
-
-			glRotatef(-m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
-			glRotatef(-m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
-
-			// draw magnetic axis (for both cones)
-			if(m_showRotationAxes) {
-				glPushMatrix();
-					glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
-					glTranslatef(0.0, 0.0, -5.0);
-					gluCylinder(m_quadricPulsarMagneticAxis, 0.05, 0.05, 10.0, 32, 1);
-				glPopMatrix();
-			}
-
-			glTranslatef(0.0, 0.0, -4.0);
-
-			glMaterialfv(GL_FRONT, GL_AMBIENT, coneAmbient);
-			glMaterialfv(GL_FRONT, GL_DIFFUSE, coneDiffuse);
-			gluCylinder(m_quadricPulsarCone1, 0.475, 0.0, 3.0, 32, 32);
-		glPopMatrix();
-
-		// second cone
-		glPushMatrix();
-			glRotatef(-90.0, 1.0, 0.0, 0.0);
-			glRotatef(-m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
-
-			glRotatef(m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
-			glRotatef(m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
-
-			glTranslatef(0.0, 0.0, -4.0);
-
-			glMaterialfv(GL_FRONT, GL_AMBIENT, coneAmbient);
-			glMaterialfv(GL_FRONT, GL_DIFFUSE, coneDiffuse);
-			gluCylinder(m_quadricPulsarCone2, 0.475, 0.0, 3.0, 32, 32);
-		glPopMatrix();
-	glPopMatrix();
-
-	// save current state
-	glMatrixMode(GL_PROJECTION);
-	glPushMatrix();
-	glLoadIdentity();
-	glOrtho(0, width(), 0, height(), 0.1, 501.0);
-	glMatrixMode(GL_MODELVIEW);
-	glPushMatrix();
-	glLoadIdentity();
-
-	// draw backdrop (independent parallel projection)
-	glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_specular);
-	glTranslatef(0.0, 0.0, -501.0);
-	drawTexture(QPointF(0.0, 0.0), m_backgroundTexture);
-
-	// restore original state
-	glMatrixMode(GL_PROJECTION);
-	glPopMatrix();
-	glMatrixMode(GL_MODELVIEW);
-	glPopMatrix();
-
-	// draw orbital planes
-	if(m_cameraInteraction || m_showOrbits) {
-		glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
-
-		static double sizeOffset = 0.25;
-
-		// companion's plane (only if not identical with pulsar's)
-		if(m_companionSemiMajorAxis != m_pulsarSemiMajorAxis) {
-			glPushMatrix();
-				glRotatef(90.0, 1.0, 0.0, 0.0);
-
-				// separate them slightly in case of overlap
-				// based on ugly mass diff check (no collision detection)
-				// single known problematic pair: (m_c=1.4, m_p=1.5)
-				if((int)(10*(m_pulsarMass-m_companionMass)+0.5) == 1){
-					glTranslatef(0.0, 0.0, 0.01);
-				}
-
-				gluDisk(m_quadricCompanionOrbitPlane,
-						m_companionSemiMajorAxis - sizeOffset,
-						m_companionSemiMajorAxis + sizeOffset,
-						64, 1);
-			glPopMatrix();
-		}
-
-		// pulsar's plane
-		glPushMatrix();
-			glRotatef(90.0, 1.0, 0.0, 0.0);
-			gluDisk(m_quadricPulsarOrbitPlane,
-					m_pulsarSemiMajorAxis - sizeOffset,
-					m_pulsarSemiMajorAxis + sizeOffset,
-					64, 1);
-		glPopMatrix();
-	}
+    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+    glMatrixMode(GL_MODELVIEW);
+    glLoadIdentity();
+
+    gluLookAt(m_cameraPosX, m_cameraPosY, m_cameraPosZ,
+              0.0, 0.0, 0.0,
+              0.0, 1.0, 0.0);
+
+    // TODO: should be located elsewhere
+    static GLfloat no_mat[] = {0.0, 0.0, 0.0, 1.0};
+    static GLfloat mat_diffuse[] = {0.5, 0.5, 0.5, 1.0};
+    static GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
+    static GLfloat low_shininess[] = {2.5};
+    static GLfloat translucent[] = {1.0, 1.0, 1.0, 0.33};
+
+    glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
+    glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
+    glMaterialfv(GL_FRONT, GL_SHININESS, low_shininess);
+    glMaterialfv(GL_FRONT, GL_EMISSION, no_mat);
+
+    // draw companion
+    glPushMatrix();
+    glTranslatef(sin((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis,
+                 0.0,
+                 cos((m_orbitRotationAngle + 180.0) * deg2rad) * m_companionSemiMajorAxis);
+    gluSphere(m_quadricCompanion, 1.0, 32, 32);
+    glPopMatrix();
+
+    // draw pulsar
+    glPushMatrix();
+    glTranslatef(sin(m_orbitRotationAngle * deg2rad) * m_pulsarSemiMajorAxis,
+                 0.0,
+                 cos(m_orbitRotationAngle * deg2rad) * m_pulsarSemiMajorAxis);
+
+    glPushMatrix();
+    glRotatef(m_pulsarSpinAxisInclination, 0.0, 0.0, 1.0);
+    glRotatef(m_pulsarRotationAngle, 0.0, 1.0, 0.0);
+
+    // draw spin axis
+    if(m_showRotationAxes) {
+        glPushMatrix();
+        glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
+        glRotatef(90.0, 1.0, 0.0, 0.0);
+        glTranslatef(0.0, 0.0, -5.0);
+        gluCylinder(m_quadricPulsarSpinAxis, 0.05, 0.05, 10.0, 32, 1);
+        glPopMatrix();
+    }
+
+    // create texture coordinates and enable texturing
+    glEnable(GL_TEXTURE_GEN_S);
+    glEnable(GL_TEXTURE_GEN_T);
+    glBindTexture(GL_TEXTURE_2D, m_pulsarTexture);
+    glEnable(GL_TEXTURE_2D);
+
+    glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
+    gluSphere(m_quadricPulsar, 1.0, 32, 32);
+
+    // disable texturing
+    glDisable(GL_TEXTURE_GEN_S);
+    glDisable(GL_TEXTURE_GEN_T);
+    glDisable(GL_TEXTURE_2D);
+    glPopMatrix();
+
+    // TODO: should be located elsewhere
+    static GLfloat coneAmbient[] = {1.0, 1.0, 0.0, 1.0};
+    static GLfloat coneDiffuse[] = {1.0, 1.0, 0.0, 1.0};
+    static GLfloat coneSpecular[] = {1.0, 1.0, 0.5, 1.0};
+
+    glMaterialfv(GL_FRONT, GL_SPECULAR, coneSpecular);
+
+    // first cone
+    glPushMatrix();
+    glRotatef(90.0, 1.0, 0.0, 0.0);
+    glRotatef(m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
+
+    glRotatef(-m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
+    glRotatef(-m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
+
+    // draw magnetic axis (for both cones)
+    if(m_showRotationAxes) {
+        glPushMatrix();
+        glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
+        glTranslatef(0.0, 0.0, -5.0);
+        gluCylinder(m_quadricPulsarMagneticAxis, 0.05, 0.05, 10.0, 32, 1);
+        glPopMatrix();
+    }
+
+    glTranslatef(0.0, 0.0, -4.0);
+
+    glMaterialfv(GL_FRONT, GL_AMBIENT, coneAmbient);
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, coneDiffuse);
+    gluCylinder(m_quadricPulsarCone1, 0.475, 0.0, 3.0, 32, 32);
+    glPopMatrix();
+
+    // second cone
+    glPushMatrix();
+    glRotatef(-90.0, 1.0, 0.0, 0.0);
+    glRotatef(-m_pulsarSpinAxisInclination, 0.0, 1.0, 0.0);
+
+    glRotatef(m_pulsarRotationAngle - 90.0, 0.0, 0.0, 1.0);
+    glRotatef(m_pulsarMagneticAxisInclination, 1.0, 0.0, 0.0);
+
+    glTranslatef(0.0, 0.0, -4.0);
+
+    glMaterialfv(GL_FRONT, GL_AMBIENT, coneAmbient);
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, coneDiffuse);
+    gluCylinder(m_quadricPulsarCone2, 0.475, 0.0, 3.0, 32, 32);
+    glPopMatrix();
+    glPopMatrix();
+
+    // save current state
+    glMatrixMode(GL_PROJECTION);
+    glPushMatrix();
+    glLoadIdentity();
+    glOrtho(0, width(), 0, height(), 0.1, 501.0);
+    glMatrixMode(GL_MODELVIEW);
+    glPushMatrix();
+    glLoadIdentity();
+
+    // draw backdrop (independent parallel projection)
+    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_specular);
+    glTranslatef(0.0, 0.0, -501.0);
+    drawTexture(QPointF(0.0, 0.0), m_backgroundTexture);
+
+    // restore original state
+    glMatrixMode(GL_PROJECTION);
+    glPopMatrix();
+    glMatrixMode(GL_MODELVIEW);
+    glPopMatrix();
+
+    // draw orbital planes
+    if(m_cameraInteraction || m_showOrbits) {
+        glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, translucent);
+
+        static double sizeOffset = 0.25;
+
+        // companion's plane (only if not identical with pulsar's)
+        if(m_companionSemiMajorAxis != m_pulsarSemiMajorAxis) {
+            glPushMatrix();
+            glRotatef(90.0, 1.0, 0.0, 0.0);
+
+            // separate them slightly in case of overlap
+            // based on ugly mass diff check (no collision detection)
+            // single known problematic pair: (m_c=1.4, m_p=1.5)
+            if((int)(10*(m_pulsarMass-m_companionMass)+0.5) == 1){
+                glTranslatef(0.0, 0.0, 0.01);
+            }
+
+            gluDisk(m_quadricCompanionOrbitPlane,
+                    m_companionSemiMajorAxis - sizeOffset,
+                    m_companionSemiMajorAxis + sizeOffset,
+                    64, 1);
+            glPopMatrix();
+        }
+
+        // pulsar's plane
+        glPushMatrix();
+        glRotatef(90.0, 1.0, 0.0, 0.0);
+        gluDisk(m_quadricPulsarOrbitPlane,
+                m_pulsarSemiMajorAxis - sizeOffset,
+                m_pulsarSemiMajorAxis + sizeOffset,
+                64, 1);
+        glPopMatrix();
+    }
 }
 
 void PulsarAnimationWidget::runAnimation()
 {
-	m_frameTimer.start(qRound(1000.0 / m_framesPerSecond));
+    m_frameTimer.start(qRound(1000.0 / m_framesPerSecond));
 }
 
 void PulsarAnimationWidget::pauseAnimation()
 {
-	m_frameTimer.stop();
+    m_frameTimer.stop();
 }
 
 void PulsarAnimationWidget::stopAnimation()
 {
-	m_frameTimer.stop();
-	resetParameters();
+    m_frameTimer.stop();
+    resetParameters();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::updateFrame()
 {
-	m_pulsarRotationAngle += m_pulsarRotationDelta;
-	if(m_pulsarRotationAngle > 360.0) {
-		m_pulsarRotationAngle -= 360.0;
-		updatePulseProfile();
-	}
-	m_orbitRotationAngle += m_orbitRotationDelta;
-	if(m_orbitRotationAngle > 360.0) {
-		m_orbitRotationAngle -= 360.0;
-	}
-
-	updateGL();
-
-	emit pulsarAnimationStep(m_pulsarRotationAngle);
+    m_pulsarRotationAngle += m_pulsarRotationDelta;
+    if(m_pulsarRotationAngle >   360.0) {
+        m_pulsarRotationAngle -= 360.0;
+        updatePulseProfile();
+    }
+    m_orbitRotationAngle += m_orbitRotationDelta;
+    if(m_orbitRotationAngle >   360.0) {
+        m_orbitRotationAngle -= 360.0;
+    }
+
+    updateGL();
+
+    emit pulsarAnimationStep(m_pulsarRotationAngle);
 }
 
 void PulsarAnimationWidget::showOrbits(bool enabled)
 {
-	m_showOrbits = enabled;
+    m_showOrbits = enabled;
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::showRotationAxes(bool enabled)
 {
-	m_showRotationAxes = enabled;
+    m_showRotationAxes = enabled;
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::mousePressEvent(QMouseEvent *event)
 {
-	Q_UNUSED(event);
+    Q_UNUSED(event);
 
-	m_cameraInteraction = true;
-	updateGL();
+    m_cameraInteraction = true;
+    updateGL();
 }
 
 void PulsarAnimationWidget::mouseMoveEvent(QMouseEvent *event)
 {
-	Qt::MouseButtons buttons = event->buttons();
-	if((buttons & Qt::LeftButton) == Qt::LeftButton) {
-		if(m_mouseLastX != 0) {
-			m_mouseAngleH += (m_mouseLastX - event->x());
-			m_mouseAngleH = m_mouseAngleH < 360 ? m_mouseAngleH : 0;
-			m_mouseAngleH = m_mouseAngleH >= 0 ? m_mouseAngleH : 359;
-		}
-		if(m_mouseLastY != 0) {
-			m_mouseAngleV -= (m_mouseLastY - event->y());
-			m_mouseAngleV = m_mouseAngleV < 90 ? m_mouseAngleV : 90;
-			m_mouseAngleV = m_mouseAngleV > -90 ? m_mouseAngleV : -90;
-		}
-
-		m_mouseLastX = event->x();
-		m_mouseLastY = event->y();
-	}
-	else if((buttons & Qt::RightButton) == Qt::RightButton) {
-		if(m_mouseLastY != 0) {
-			m_cameraZoom -= (m_mouseLastY - event->y());
-			m_cameraZoom = m_cameraZoom >= m_cameraZoomLBound ? m_cameraZoom : m_cameraZoomLBound;
-			m_cameraZoom = m_cameraZoom >= m_cameraZoomUBound ? m_cameraZoomUBound : m_cameraZoom;
-		}
-
-		m_mouseLastY = event->y();
-	}
-
-	updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom);
+    Qt::MouseButtons buttons = event->buttons();
+    if((buttons & Qt::LeftButton) == Qt::LeftButton) {
+        if(m_mouseLastX != 0) {
+            m_mouseAngleH += (m_mouseLastX - event->x());
+            m_mouseAngleH = m_mouseAngleH < 360 ? m_mouseAngleH : 0;
+            m_mouseAngleH = m_mouseAngleH >=  0 ? m_mouseAngleH : 359;
+        }
+        if(m_mouseLastY != 0) {
+            m_mouseAngleV -= (m_mouseLastY - event->y());
+            m_mouseAngleV = m_mouseAngleV <  90 ? m_mouseAngleV : 90;
+            m_mouseAngleV = m_mouseAngleV > -90 ? m_mouseAngleV : -90;
+        }
+
+        m_mouseLastX = event->x();
+        m_mouseLastY = event->y();
+    }
+    else if((buttons & Qt::RightButton) == Qt::RightButton) {
+        if(m_mouseLastY != 0) {
+            m_cameraZoom -= (m_mouseLastY - event->y());
+            m_cameraZoom = m_cameraZoom >= m_cameraZoomLBound ? m_cameraZoom : m_cameraZoomLBound;
+            m_cameraZoom = m_cameraZoom >= m_cameraZoomUBound ? m_cameraZoomUBound : m_cameraZoom;
+        }
+
+        m_mouseLastY = event->y();
+    }
+
+    updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom);
 }
 
 void PulsarAnimationWidget::mouseReleaseEvent(QMouseEvent *event)
 {
-	Q_UNUSED(event);
+    Q_UNUSED(event);
 
-	m_mouseLastX = 0;
-	m_mouseLastY = 0;
-	m_cameraInteraction = false;
+    m_mouseLastX = 0;
+    m_mouseLastY = 0;
+    m_cameraInteraction = false;
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::showEvent(QShowEvent *event)
 {
-	Q_UNUSED(event);
+    Q_UNUSED(event);
 
-	// update and propagate pulse profile
-	updatePulseProfile();
+    // update and propagate pulse profile
+    updatePulseProfile();
 }
 
 void PulsarAnimationWidget::updateCameraPosition(const double angleH, const double angleV, const double zoom)
 {
-	m_cameraPosX = sin(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
-	m_cameraPosY = sin(angleV * deg2rad) * zoom;
-	m_cameraPosZ = cos(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
+    m_cameraPosX = sin(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
+    m_cameraPosY = sin(angleV * deg2rad) * zoom;
+    m_cameraPosZ = cos(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
 
-	updatePulseProfile();
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::setFramePerSecond(const unsigned int fps)
 {
-	m_framesPerSecond = fps;
+    m_framesPerSecond = fps;
 }
 
 void PulsarAnimationWidget::setPulsarSemiMajorAxis(const double length)
 {
-	m_pulsarSemiMajorAxis = length;
-	m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
-	updateOrbitPeriod();
-	updatePulseProfile();
+    m_pulsarSemiMajorAxis = length;
+    m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
+    updateOrbitPeriod();
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::setCompanionMass(const double mass)
 {
-	m_companionMass = mass;
-	updateOrbitRadii();
-	updatePulseProfile();
+    m_companionMass = mass;
+    updateOrbitRadii();
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::setPulsarMass(const double mass)
 {
-	m_pulsarMass = mass;
-	updateOrbitRadii();
-	updatePulseProfile();
+    m_pulsarMass = mass;
+    updateOrbitRadii();
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::setPulsarSpinFrequency(const double frequency)
 {
-	m_pulsarRotationDelta = (360.0 * frequency) / m_framesPerSecond;
-	updatePulseProfile();
+    m_pulsarRotationDelta = (360.0 * frequency) / m_framesPerSecond;
+    updatePulseProfile();
 }
 
 void PulsarAnimationWidget::setPulsarSpinAxisInclination(const int degrees)
 {
-	m_pulsarSpinAxisInclination = degrees;
-	updatePulseProfile();
+    m_pulsarSpinAxisInclination = degrees;
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::setPulsarMagneticAxisInclination(const int degrees)
 {
-	m_pulsarMagneticAxisInclination = degrees;
-	updatePulseProfile();
+    m_pulsarMagneticAxisInclination = degrees;
+    updatePulseProfile();
 
-	updateGL();
+    updateGL();
 }
 
 void PulsarAnimationWidget::updateOrbitPeriod()
 {
-	m_orbitalPeriod = 3.1553e7 * sqrt(
-						(pow(m_pulsarSemiMajorAxis, 3.0) * pow(m_pulsarMass+m_companionMass, 2.0)) /
-						 pow(m_companionMass, 3.0)
-					  );
+    m_orbitalPeriod = 3.1553e7 * sqrt(
+                                    (pow(m_pulsarSemiMajorAxis, 3.0) * pow(m_pulsarMass+m_companionMass, 2.0)) / pow(m_companionMass, 3.0)
+                                 );
 
-	// visual correction factor (increase orbital momentum)
-	double visualCorrection = 1e-8;
+    // visual correction factor (increase orbital momentum)
+    double visualCorrection = 1e-8;
 
-	m_orbitRotationDelta  = (360.0 / (m_orbitalPeriod*visualCorrection)) / m_framesPerSecond;
+    m_orbitRotationDelta  = (360.0 / (m_orbitalPeriod*visualCorrection)) / m_framesPerSecond;
 }
 
 void PulsarAnimationWidget::updateOrbitRadii()
 {
-	m_pulsarSemiMajorAxis = 1.0015e-5 * pow(
-								(pow(m_orbitalPeriod, 2.0) * pow(m_companionMass, 3.0)) /
-								 pow(m_pulsarMass+m_companionMass, 2.0),
-								 1.0/3.0
-							);
+    m_pulsarSemiMajorAxis = 1.0015e-5 * pow(
+                                            (pow(m_orbitalPeriod, 2.0) * pow(m_companionMass, 3.0)) / pow(m_pulsarMass+m_companionMass, 2.0),
+                                            1.0/3.0
+                                        );
 
-	m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
+    m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
 
-	emit pulsarSemiMajorAxisUpdated(m_pulsarSemiMajorAxis);
+    emit pulsarSemiMajorAxisUpdated(m_pulsarSemiMajorAxis);
 }
 
 void PulsarAnimationWidget::resetParameters()
 {
-	m_pulsarRotationAngle = 0.0;
-	m_orbitRotationAngle = 0.0;
-	updatePulseProfile();
+    m_pulsarRotationAngle = 0.0;
+    m_orbitRotationAngle = 0.0;
+    updatePulseProfile();
 
-	emit pulsarAnimationStep(m_pulsarRotationAngle);
+    emit pulsarAnimationStep(m_pulsarRotationAngle);
 }
 
 void PulsarAnimationWidget::updatePulseProfile()
 {
-	// prepare parameters (e.g. convert to radians where necessary)
-	const double	i				= deg2rad * m_pulsarSpinAxisInclination;
-	const double	y				= deg2rad * m_pulsarMagneticAxisInclination;
-	double			phiOrb			= deg2rad * (m_orbitRotationAngle + 90.0);
-	const double	deltaPhiRot		= deg2rad * 1.0;
-	const double	deltaPhiOrb		= deg2rad * deltaPhiRot * m_orbitRotationDelta / m_pulsarRotationDelta;
-	const double	rp				= m_pulsarSemiMajorAxis;
-	const double	xk				= -m_cameraPosZ;
-	const double	yk				= -m_cameraPosX;
-	const double	zk				= m_cameraPosY;
-	const double	cam				= pow(xk, 2.0) + pow(yk, 2.0) + pow(zk, 2.0);
-	const double	alpha			= deg2rad * (90.0 - m_mouseAngleH);
-	const double	delta			= deg2rad * m_mouseAngleV;
-	const double	gaussProfile	= 0.012337;
-
-	for(int x = 0; x < 360; ++x) {
-		// determine angle between pulsar's magnetic axis and line of sight
-		phiOrb += deltaPhiOrb;
-		const double phiRot = x * deltaPhiRot;
-
-		double a = -sin(y) * sin(phiRot) * (xk + rp * cos(phiOrb)) \
-				 + (cos(i) * sin(y) * cos(phiRot) + sin(i) * cos(y)) * (yk + rp * sin(phiOrb)) \
-				 - (sin(i) * sin(y) * cos(phiRot) - cos(i) * cos(y)) * zk;
-
-		double b = sqrt(pow(rp,2.0) + cam - (2.0 * sqrt(cam) * rp * cos(delta) * sin(alpha + phiOrb)));
-
-		// determine and store pulse amplitude
-		m_pulseProfile[x] = exp(-2.0 * (1.0 - fabs(a/b)) / gaussProfile);
-	}
-
-	// propagate new profile
-	emit pulseProfileUpdated(m_pulseProfile);
+    // prepare parameters (e.g. convert to radians where necessary)
+    const double    i               = deg2rad * m_pulsarSpinAxisInclination;
+    const double    y               = deg2rad * m_pulsarMagneticAxisInclination;
+    double          phiOrb          = deg2rad * (m_orbitRotationAngle + 90.0);
+    const double    deltaPhiRot     = deg2rad * 1.0;
+    const double    deltaPhiOrb     = deg2rad * deltaPhiRot * m_orbitRotationDelta / m_pulsarRotationDelta;
+    const double    rp              = m_pulsarSemiMajorAxis;
+    const double    xk              = -m_cameraPosZ;
+    const double    yk              = -m_cameraPosX;
+    const double    zk              = m_cameraPosY;
+    const double    cam             = pow(xk, 2.0) + pow(yk, 2.0) + pow(zk, 2.0);
+    const double    alpha           = deg2rad * (90.0 - m_mouseAngleH);
+    const double    delta           = deg2rad * m_mouseAngleV;
+    const double    gaussProfile    = 0.012337;
+
+    for(int x = 0; x < 360; ++x) {
+        // determine angle between pulsar's magnetic axis and line of sight
+        phiOrb += deltaPhiOrb;
+        const double phiRot = x * deltaPhiRot;
+
+        double a = -sin(y) * sin(phiRot) * (xk + rp * cos(phiOrb)) \
+                   + (cos(i) * sin(y) * cos(phiRot) + sin(i) * cos(y)) * (yk + rp * sin(phiOrb)) \
+                   - (sin(i) * sin(y) * cos(phiRot) - cos(i) * cos(y)) * zk;
+
+        double b = sqrt(pow(rp,2.0) + cam - (2.0 * sqrt(cam) * rp * cos(delta) * sin(alpha + phiOrb)));
+
+        // determine and store pulse amplitude
+        m_pulseProfile[x] = exp(-2.0 * (1.0 - fabs(a/b)) / gaussProfile);
+    }
+
+    // propagate new profile
+    emit pulseProfileUpdated(m_pulseProfile);
 }
diff --git a/src/pulsaranimationwidget.h b/src/pulsaranimationwidget.h
index 5ff2bb7..7a6a65e 100644
--- a/src/pulsaranimationwidget.h
+++ b/src/pulsaranimationwidget.h
@@ -33,34 +33,34 @@
 
 class PulsarAnimationWidget : public QGLWidget
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	PulsarAnimationWidget(QWidget *parent);
-	virtual ~PulsarAnimationWidget();
+    PulsarAnimationWidget(QWidget *parent);
+    virtual ~PulsarAnimationWidget();
 
-	void setFramePerSecond(const unsigned int fps);
-	void setCompanionMass(const double mass);
-	void setPulsarMass(const double mass);
-	void setPulsarSpinFrequency(const double frequency);
-	void setPulsarSpinAxisInclination(const int degrees);
-	void setPulsarMagneticAxisInclination(const int degrees);
-	void setPulsarSemiMajorAxis(const double length);
+    void setFramePerSecond(const unsigned int fps);
+    void setCompanionMass(const double mass);
+    void setPulsarMass(const double mass);
+    void setPulsarSpinFrequency(const double frequency);
+    void setPulsarSpinAxisInclination(const int degrees);
+    void setPulsarMagneticAxisInclination(const int degrees);
+    void setPulsarSemiMajorAxis(const double length);
 
 public slots:
-	void runAnimation();
-	void pauseAnimation();
-	void stopAnimation();
+    void runAnimation();
+    void pauseAnimation();
+    void stopAnimation();
 
-	void updateFrame();
+    void updateFrame();
 
-	void showOrbits(bool enabled);
-	void showRotationAxes(bool enabled);
+    void showOrbits(bool enabled);
+    void showRotationAxes(bool enabled);
 
 signals:
-	void pulsarSemiMajorAxisUpdated(double value);
-	void pulseProfileUpdated(const QVector<double>& data);
-	void pulsarAnimationStep(double position);
+    void pulsarSemiMajorAxisUpdated(double value);
+    void pulseProfileUpdated(const QVector<double>& data);
+    void pulsarAnimationStep(double position);
 
 private:
     void initializeGL();
@@ -72,7 +72,7 @@ private:
     void mouseReleaseEvent(QMouseEvent *event);
     void showEvent(QShowEvent *event);
 
-	void updateOrbitPeriod();
+    void updateOrbitPeriod();
     void updateOrbitRadii();
     void updateCameraPosition(const double angleH, const double angleV, const double zoom);
     void resetParameters();
@@ -83,50 +83,50 @@ private:
     GLUquadricObj *m_quadricCompanionOrbitPlane;
     GLUquadricObj *m_quadricCompanion;
     GLUquadricObj *m_quadricPulsarOrbitPlane;
-	GLUquadricObj *m_quadricPulsar;
-	GLUquadricObj *m_quadricPulsarCone1;
-	GLUquadricObj *m_quadricPulsarCone2;
-	GLUquadricObj *m_quadricPulsarSpinAxis;
-	GLUquadricObj *m_quadricPulsarMagneticAxis;
-
-	GLuint m_pulsarTexture;
-	GLuint m_backgroundTexture;
-
-	int m_framesPerSecond;
-
-	double m_pulsarRotationAngle;
-	double m_pulsarRotationDelta;
-
-	double m_orbitalPeriod;
-	double m_orbitRotationAngle;
-	double m_orbitRotationDelta;
-
-	double m_pulsarMass;
-	double m_pulsarSemiMajorAxis;
-	double m_companionMass;
-	double m_companionSemiMajorAxis;
-
-	double m_pulsarSpinAxisInclination;
-	double m_pulsarMagneticAxisInclination;
-
-	bool m_showOrbits;
-	bool m_showRotationAxes;
-	bool m_cameraInteraction;
-
-	int m_mouseLastX;
-	int m_mouseLastY;
-	double m_mouseAngleH;
-	double m_mouseAngleV;
-	double m_cameraZoom;
-	double m_cameraZoomLBound;
-	double m_cameraZoomUBound;
-	double m_cameraPosX;
-	double m_cameraPosY;
-	double m_cameraPosZ;
-
-	QVector<double> m_pulseProfile;
-
-	static const double deg2rad;
+    GLUquadricObj *m_quadricPulsar;
+    GLUquadricObj *m_quadricPulsarCone1;
+    GLUquadricObj *m_quadricPulsarCone2;
+    GLUquadricObj *m_quadricPulsarSpinAxis;
+    GLUquadricObj *m_quadricPulsarMagneticAxis;
+
+    GLuint m_pulsarTexture;
+    GLuint m_backgroundTexture;
+
+    int m_framesPerSecond;
+
+    double m_pulsarRotationAngle;
+    double m_pulsarRotationDelta;
+
+    double m_orbitalPeriod;
+    double m_orbitRotationAngle;
+    double m_orbitRotationDelta;
+
+    double m_pulsarMass;
+    double m_pulsarSemiMajorAxis;
+    double m_companionMass;
+    double m_companionSemiMajorAxis;
+
+    double m_pulsarSpinAxisInclination;
+    double m_pulsarMagneticAxisInclination;
+
+    bool m_showOrbits;
+    bool m_showRotationAxes;
+    bool m_cameraInteraction;
+
+    int m_mouseLastX;
+    int m_mouseLastY;
+    double m_mouseAngleH;
+    double m_mouseAngleV;
+    double m_cameraZoom;
+    double m_cameraZoomLBound;
+    double m_cameraZoomUBound;
+    double m_cameraPosX;
+    double m_cameraPosY;
+    double m_cameraPosZ;
+
+    QVector<double> m_pulseProfile;
+
+    static const double deg2rad;
 };
 
 #endif /* PULSARANIMATIONWIDGET_H_ */
diff --git a/src/pulsatingscience.cpp b/src/pulsatingscience.cpp
index 209c5c5..54eefab 100644
--- a/src/pulsatingscience.cpp
+++ b/src/pulsatingscience.cpp
@@ -26,139 +26,139 @@
 
 PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
 {
-	ui.setupUi(this);
+    ui.setupUi(this);
 
-	QAction* animControl = ui.dockAnimControl->toggleViewAction();
-	animControl->setStatusTip(tr("Toggle the animation control visibility"));
-	animControl->setShortcut(QKeySequence(tr("Alt+A")));
-	ui.menuView->addAction(animControl);
+    QAction* animControl = ui.dockAnimControl->toggleViewAction();
+    animControl->setStatusTip(tr("Toggle the animation control visibility"));
+    animControl->setShortcut(QKeySequence(tr("Alt+A")));
+    ui.menuView->addAction(animControl);
 
 #ifdef __APPLE__
     ui.actionMenu_bar->setEnabled(false);
 #endif
 
-	// inital status (based on GUI)
-	m_permanentOrbits = ui.actionPermanent_orbits->isChecked();
-	m_rotationAxesVisible = ui.actionRotationAxes->isChecked();
-	m_menuBarVisible = ui.actionMenu_bar->isChecked();
-	m_statusBarVisible = ui.actionStatus_bar->isChecked();
-	m_animControlVisible = true;
-	m_animControlFloating = ui.dockAnimControl->isFloating();
-	m_hiddenDemoModeActivated = false;
+    // inital status (based on GUI)
+    m_permanentOrbits = ui.actionPermanent_orbits->isChecked();
+    m_rotationAxesVisible = ui.actionRotationAxes->isChecked();
+    m_menuBarVisible = ui.actionMenu_bar->isChecked();
+    m_statusBarVisible = ui.actionStatus_bar->isChecked();
+    m_animControlVisible = true;
+    m_animControlFloating = ui.dockAnimControl->isFloating();
+    m_hiddenDemoModeActivated = false;
 
-	// register alternate shortcuts (will be enabled when menu is hidden)
-	m_runShortcut = new QShortcut(ui.actionRun->shortcut(), this);
-	m_runShortcut->setEnabled(false);
-	m_pauseShortcut = new QShortcut(ui.actionPause->shortcut(), this);
-	m_pauseShortcut->setEnabled(false);
-	m_stopShortcut = new QShortcut(ui.actionStop->shortcut(), this);
-	m_stopShortcut->setEnabled(false);
-	m_permanentOrbitsShortcut = new QShortcut(ui.actionPermanent_orbits->shortcut(), this);
-	m_permanentOrbitsShortcut->setEnabled(false);
-	m_rotationAxesShortcut = new QShortcut(ui.actionRotationAxes->shortcut(), this);
-	m_rotationAxesShortcut->setEnabled(false);
-	m_menuBarShortcut = new QShortcut(ui.actionMenu_bar->shortcut(), this);
-	m_menuBarShortcut->setEnabled(false);
-	m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this);
-	m_fullscreenShortcut->setEnabled(false);
+    // register alternate shortcuts (will be enabled when menu is hidden)
+    m_runShortcut = new QShortcut(ui.actionRun->shortcut(), this);
+    m_runShortcut->setEnabled(false);
+    m_pauseShortcut = new QShortcut(ui.actionPause->shortcut(), this);
+    m_pauseShortcut->setEnabled(false);
+    m_stopShortcut = new QShortcut(ui.actionStop->shortcut(), this);
+    m_stopShortcut->setEnabled(false);
+    m_permanentOrbitsShortcut = new QShortcut(ui.actionPermanent_orbits->shortcut(), this);
+    m_permanentOrbitsShortcut->setEnabled(false);
+    m_rotationAxesShortcut = new QShortcut(ui.actionRotationAxes->shortcut(), this);
+    m_rotationAxesShortcut->setEnabled(false);
+    m_menuBarShortcut = new QShortcut(ui.actionMenu_bar->shortcut(), this);
+    m_menuBarShortcut->setEnabled(false);
+    m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this);
+    m_fullscreenShortcut->setEnabled(false);
 
-	// register "hidden" demo mode shortcut for IYA2009 exhibition
-	m_hiddenShortcut = new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::ALT + Qt::Key_D, this);
+    // register "hidden" demo mode shortcut for IYA2009 exhibition
+    m_hiddenShortcut = new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::ALT + Qt::Key_D, this);
 
-	// establish object communications
-	connect(ui.pushRun, SIGNAL(clicked()),
-			ui.pulsarGlWidget, SLOT(runAnimation()));
+    // establish object communications
+    connect(ui.pushRun, SIGNAL(clicked()),
+            ui.pulsarGlWidget, SLOT(runAnimation()));
 
-	connect(ui.actionRun, SIGNAL(triggered()),
-			ui.pulsarGlWidget, SLOT(runAnimation()));
+    connect(ui.actionRun, SIGNAL(triggered()),
+            ui.pulsarGlWidget, SLOT(runAnimation()));
 
-	connect(ui.actionRun, SIGNAL(triggered()),
-				this, SLOT(on_pushRun_clicked()));
+    connect(ui.actionRun, SIGNAL(triggered()),
+            this, SLOT(on_pushRun_clicked()));
 
-	connect(ui.pushPause, SIGNAL(clicked()),
-			ui.pulsarGlWidget, SLOT(pauseAnimation()));
+    connect(ui.pushPause, SIGNAL(clicked()),
+            ui.pulsarGlWidget, SLOT(pauseAnimation()));
 
-	connect(ui.actionPause, SIGNAL(triggered()),
-				ui.pulsarGlWidget, SLOT(pauseAnimation()));
+    connect(ui.actionPause, SIGNAL(triggered()),
+            ui.pulsarGlWidget, SLOT(pauseAnimation()));
 
-	connect(ui.actionPause, SIGNAL(triggered()),
-				this, SLOT(on_pushPause_clicked()));
+    connect(ui.actionPause, SIGNAL(triggered()),
+            this, SLOT(on_pushPause_clicked()));
 
-	connect(ui.pushStop, SIGNAL(clicked()),
-			ui.pulsarGlWidget, SLOT(stopAnimation()));
+    connect(ui.pushStop, SIGNAL(clicked()),
+            ui.pulsarGlWidget, SLOT(stopAnimation()));
 
-	connect(ui.actionStop, SIGNAL(triggered()),
-				ui.pulsarGlWidget, SLOT(stopAnimation()));
+    connect(ui.actionStop, SIGNAL(triggered()),
+            ui.pulsarGlWidget, SLOT(stopAnimation()));
 
-	connect(ui.actionStop, SIGNAL(triggered()),
-				this, SLOT(on_pushStop_clicked()));
+    connect(ui.actionStop, SIGNAL(triggered()),
+            this, SLOT(on_pushStop_clicked()));
 
-	connect(ui.actionPermanent_orbits, SIGNAL(toggled(bool)),
-				ui.pulsarGlWidget, SLOT(showOrbits(bool)));
+    connect(ui.actionPermanent_orbits, SIGNAL(toggled(bool)),
+            ui.pulsarGlWidget, SLOT(showOrbits(bool)));
 
-	connect(ui.actionRotationAxes, SIGNAL(toggled(bool)),
-				ui.pulsarGlWidget, SLOT(showRotationAxes(bool)));
+    connect(ui.actionRotationAxes, SIGNAL(toggled(bool)),
+            ui.pulsarGlWidget, SLOT(showRotationAxes(bool)));
 
-	connect(ui.pulsarGlWidget, SIGNAL(pulsarSemiMajorAxisUpdated(double)),
-				this, SLOT(updatePulsarSemiMajorAxisValue(double)));
+    connect(ui.pulsarGlWidget, SIGNAL(pulsarSemiMajorAxisUpdated(double)),
+            this, SLOT(updatePulsarSemiMajorAxisValue(double)));
 
-	connect(ui.pulsarGlWidget, SIGNAL(pulsarAnimationStep(double)),
-				ui.pulseScopeWidget, SLOT(setMarker(double)), Qt::DirectConnection);
+    connect(ui.pulsarGlWidget, SIGNAL(pulsarAnimationStep(double)),
+            ui.pulseScopeWidget, SLOT(setMarker(double)), Qt::DirectConnection);
 
-	connect(ui.pulsarGlWidget, SIGNAL(pulseProfileUpdated(const QVector<double>&)),
-				ui.pulseScopeWidget, SLOT(drawCurve(const QVector<double>&)), Qt::DirectConnection);
+    connect(ui.pulsarGlWidget, SIGNAL(pulseProfileUpdated(const QVector<double>&)),
+            ui.pulseScopeWidget, SLOT(drawCurve(const QVector<double>&)), Qt::DirectConnection);
 
-	connect(m_hiddenShortcut, SIGNAL(activated()),
-				this, SLOT(toggleHiddenDemoMode()));
+    connect(m_hiddenShortcut, SIGNAL(activated()),
+            this, SLOT(toggleHiddenDemoMode()));
 }
 
 PulsatingScience::~PulsatingScience()
 {
-	if(m_runShortcut) {
-		m_runShortcut->disconnect();
-		delete m_runShortcut;
-	}
-
-	if(m_pauseShortcut) {
-		m_pauseShortcut->disconnect();
-		delete m_pauseShortcut;
-	}
-
-	if(m_stopShortcut) {
-		m_stopShortcut->disconnect();
-		delete m_stopShortcut;
-	}
-
-	if(m_permanentOrbitsShortcut) {
-		m_permanentOrbitsShortcut->disconnect();
-		delete m_permanentOrbitsShortcut;
-	}
-
-	if(m_rotationAxesShortcut) {
-		m_rotationAxesShortcut->disconnect();
-		delete m_rotationAxesShortcut;
-	}
-
-	if(m_menuBarShortcut) {
-		m_menuBarShortcut->disconnect();
-		delete m_menuBarShortcut;
-	}
-
-	if(m_fullscreenShortcut) {
-		m_fullscreenShortcut->disconnect();
-		delete m_fullscreenShortcut;
-	}
-
-	if(m_hiddenShortcut) {
-		m_hiddenShortcut->disconnect();
-		delete m_hiddenShortcut;
-	}
+    if(m_runShortcut) {
+        m_runShortcut->disconnect();
+        delete m_runShortcut;
+    }
+
+    if(m_pauseShortcut) {
+        m_pauseShortcut->disconnect();
+        delete m_pauseShortcut;
+    }
+
+    if(m_stopShortcut) {
+        m_stopShortcut->disconnect();
+        delete m_stopShortcut;
+    }
+
+    if(m_permanentOrbitsShortcut) {
+        m_permanentOrbitsShortcut->disconnect();
+        delete m_permanentOrbitsShortcut;
+    }
+
+    if(m_rotationAxesShortcut) {
+        m_rotationAxesShortcut->disconnect();
+        delete m_rotationAxesShortcut;
+    }
+
+    if(m_menuBarShortcut) {
+        m_menuBarShortcut->disconnect();
+        delete m_menuBarShortcut;
+    }
+
+    if(m_fullscreenShortcut) {
+        m_fullscreenShortcut->disconnect();
+        delete m_fullscreenShortcut;
+    }
+
+    if(m_hiddenShortcut) {
+        m_hiddenShortcut->disconnect();
+        delete m_hiddenShortcut;
+    }
 }
 
 void PulsatingScience::closeEvent(QCloseEvent *event)
 {
     if(m_hiddenDemoModeActivated) {
-    	event->ignore();
+        event->ignore();
     }
     else {
         event->accept();
@@ -167,319 +167,319 @@ void PulsatingScience::closeEvent(QCloseEvent *event)
 
 void PulsatingScience::on_pushRun_clicked()
 {
-	if(ui.pushRun->isEnabled()) {
-		ui.pushRun->setEnabled(false);
-		ui.pushPause->setEnabled(true);
-		ui.pushStop->setEnabled(true);
-	}
-	else {
-		ui.pushRun->setEnabled(true);
-		ui.pushPause->setEnabled(false);
-		ui.pushStop->setEnabled(false);
-	}
+    if(ui.pushRun->isEnabled()) {
+        ui.pushRun->setEnabled(false);
+        ui.pushPause->setEnabled(true);
+        ui.pushStop->setEnabled(true);
+    }
+    else {
+        ui.pushRun->setEnabled(true);
+        ui.pushPause->setEnabled(false);
+        ui.pushStop->setEnabled(false);
+    }
 }
 
 void PulsatingScience::on_pushPause_clicked()
 {
-	ui.pushRun->setEnabled(true);
-	ui.pushPause->setEnabled(false);
-	ui.pushStop->setEnabled(true);
+    ui.pushRun->setEnabled(true);
+    ui.pushPause->setEnabled(false);
+    ui.pushStop->setEnabled(true);
 }
 
 void PulsatingScience::on_pushStop_clicked()
 {
-	ui.pushRun->setEnabled(true);
-	ui.pushPause->setEnabled(false);
-	ui.pushStop->setEnabled(false);
+    ui.pushRun->setEnabled(true);
+    ui.pushPause->setEnabled(false);
+    ui.pushStop->setEnabled(false);
 }
 
 void PulsatingScience::on_radioCompanionWD_toggled(bool checked)
 {
-	if(checked) {
-		ui.pulsarGlWidget->setCompanionMass(0.6);
-		ui.lcdCompanionMass->display(QString::number(0.6, 'f', 1));
-	}
+    if(checked) {
+        ui.pulsarGlWidget->setCompanionMass(0.6);
+        ui.lcdCompanionMass->display(QString::number(0.6, 'f', 1));
+    }
 }
 
 void PulsatingScience::on_radioCompanionSun_toggled(bool checked)
 {
-	if(checked) {
-		ui.pulsarGlWidget->setCompanionMass(1.0);
-		ui.lcdCompanionMass->display(QString::number(1.0, 'f', 1));
-	}
+    if(checked) {
+        ui.pulsarGlWidget->setCompanionMass(1.0);
+        ui.lcdCompanionMass->display(QString::number(1.0, 'f', 1));
+    }
 }
 
 void PulsatingScience::on_radioCompanionNS_toggled(bool checked)
 {
-	if(checked) {
-		ui.pulsarGlWidget->setCompanionMass(1.4);
-		ui.lcdCompanionMass->display(QString::number(1.4, 'f', 1));
-	}
+    if(checked) {
+        ui.pulsarGlWidget->setCompanionMass(1.4);
+        ui.lcdCompanionMass->display(QString::number(1.4, 'f', 1));
+    }
 }
 
 void PulsatingScience::on_sliderPulsarMass_valueChanged(int value)
 {
-	ui.pulsarGlWidget->setPulsarMass(value * 0.1);
-	ui.lcdPulsarMass->display(QString::number(value * 0.1, 'f', 1));
+    ui.pulsarGlWidget->setPulsarMass(value * 0.1);
+    ui.lcdPulsarMass->display(QString::number(value * 0.1, 'f', 1));
 }
 
 void PulsatingScience::on_sliderPulsarSpinFrequency_valueChanged(int value)
 {
-	ui.pulsarGlWidget->setPulsarSpinFrequency(value * 0.1);
-	ui.lcdPulsarSpinFrequency->display(QString::number(value * 0.1, 'f', 1));
+    ui.pulsarGlWidget->setPulsarSpinFrequency(value * 0.1);
+    ui.lcdPulsarSpinFrequency->display(QString::number(value * 0.1, 'f', 1));
 }
 
 void PulsatingScience::on_sliderPulsarSpinAxisInclination_valueChanged(int value)
 {
-	ui.pulsarGlWidget->setPulsarSpinAxisInclination(value);
-	ui.lcdPulsarSpinAxisInclination->display(QString::number(value));
+    ui.pulsarGlWidget->setPulsarSpinAxisInclination(value);
+    ui.lcdPulsarSpinAxisInclination->display(QString::number(value));
 }
 
 void PulsatingScience::on_sliderPulsarMagneticAxisInclination_valueChanged(int value)
 {
-	ui.pulsarGlWidget->setPulsarMagneticAxisInclination(value);
-	ui.lcdPulsarMagneticAxisInclination->display(QString::number(value));
+    ui.pulsarGlWidget->setPulsarMagneticAxisInclination(value);
+    ui.lcdPulsarMagneticAxisInclination->display(QString::number(value));
 }
 
 void PulsatingScience::on_sliderPulsarSemiMajorAxis_valueChanged(int value)
 {
-	ui.pulsarGlWidget->setPulsarSemiMajorAxis(value * 0.001);
-	ui.lcdPulsarSemiMajorAxis->display(QString::number(value * 0.001, 'f', 1));
-	ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: black");
+    ui.pulsarGlWidget->setPulsarSemiMajorAxis(value * 0.001);
+    ui.lcdPulsarSemiMajorAxis->display(QString::number(value * 0.001, 'f', 1));
+    ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: black");
 }
 
 void PulsatingScience::permanentOrbitsToggled() {
-	if(m_permanentOrbits) {
-		on_actionPermanent_orbits_toggled(false);
-		ui.actionPermanent_orbits->setChecked(false);
-	}
-	else {
-		on_actionPermanent_orbits_toggled(true);
-		ui.actionPermanent_orbits->setChecked(true);
-	}
+    if(m_permanentOrbits) {
+        on_actionPermanent_orbits_toggled(false);
+        ui.actionPermanent_orbits->setChecked(false);
+    }
+    else {
+        on_actionPermanent_orbits_toggled(true);
+        ui.actionPermanent_orbits->setChecked(true);
+    }
 }
 
 void PulsatingScience::on_actionPermanent_orbits_toggled(bool checked) {
-	m_permanentOrbits = checked;
+    m_permanentOrbits = checked;
 }
 
 void PulsatingScience::rotationAxesToggled() {
-	if(m_rotationAxesVisible) {
-		on_actionRotationAxes_toggled(false);
-		ui.actionRotationAxes->setChecked(false);
-	}
-	else {
-		on_actionRotationAxes_toggled(true);
-		ui.actionRotationAxes->setChecked(true);
-	}
+    if(m_rotationAxesVisible) {
+        on_actionRotationAxes_toggled(false);
+        ui.actionRotationAxes->setChecked(false);
+    }
+    else {
+        on_actionRotationAxes_toggled(true);
+        ui.actionRotationAxes->setChecked(true);
+    }
 }
 
 void PulsatingScience::on_actionRotationAxes_toggled(bool checked) {
-	m_rotationAxesVisible = checked;
+    m_rotationAxesVisible = checked;
 }
 
 void PulsatingScience::menuBarToggled()
 {
-	if(ui.menuBar->isVisible()) {
-		on_actionMenu_bar_toggled(false);
-		ui.actionMenu_bar->setChecked(false);
-	}
-	else if(!ui.actionFullscreen->isChecked()) {
-		// allow menu bar only when NOT in fullscreen mode
-		on_actionMenu_bar_toggled(true);
-		ui.actionMenu_bar->setChecked(true);
-	}
+    if(ui.menuBar->isVisible()) {
+        on_actionMenu_bar_toggled(false);
+        ui.actionMenu_bar->setChecked(false);
+    }
+    else if(!ui.actionFullscreen->isChecked()) {
+        // allow menu bar only when NOT in fullscreen mode
+        on_actionMenu_bar_toggled(true);
+        ui.actionMenu_bar->setChecked(true);
+    }
 }
 
 void PulsatingScience::on_actionMenu_bar_toggled(bool checked)
 {
-	if(checked) {
-		ui.menuBar->show();
-		m_menuBarVisible = true;
-
-		// deactivate alternate shortcuts
-		m_runShortcut->disconnect();
-		m_runShortcut->setEnabled(false);
-		m_pauseShortcut->disconnect();
-		m_pauseShortcut->setEnabled(false);
-		m_stopShortcut->disconnect();
-		m_stopShortcut->setEnabled(false);
-		m_permanentOrbitsShortcut->disconnect();
-		m_permanentOrbitsShortcut->setEnabled(false);
-		m_rotationAxesShortcut->disconnect();
-		m_rotationAxesShortcut->setEnabled(false);
-		m_fullscreenShortcut->disconnect();
-		m_fullscreenShortcut->setEnabled(false);
-		m_menuBarShortcut->disconnect();
-		m_menuBarShortcut->setEnabled(false);
-	}
-	else {
-		ui.menuBar->hide();
-		m_menuBarVisible = false;
-
-		// activate alternate shortcuts
-		m_runShortcut->setEnabled(true);
-		connect(m_runShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(runAnimation()));
-		m_pauseShortcut->setEnabled(true);
-		connect(m_pauseShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(pauseAnimation()));
-		m_stopShortcut->setEnabled(true);
-		connect(m_stopShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(stopAnimation()));
-		m_permanentOrbitsShortcut->setEnabled(true);
-		connect(m_permanentOrbitsShortcut, SIGNAL(activated()), this, SLOT(permanentOrbitsToggled()));
-		m_rotationAxesShortcut->setEnabled(true);
-		connect(m_rotationAxesShortcut, SIGNAL(activated()), this, SLOT(rotationAxesToggled()));
-		m_fullscreenShortcut->setEnabled(true);
-		connect(m_fullscreenShortcut, SIGNAL(activated()), this, SLOT(fullscreenToggled()));
-		m_menuBarShortcut->setEnabled(true);
-		connect(m_menuBarShortcut, SIGNAL(activated()), this, SLOT(menuBarToggled()));
-	}
+    if(checked) {
+        ui.menuBar->show();
+        m_menuBarVisible = true;
+
+        // deactivate alternate shortcuts
+        m_runShortcut->disconnect();
+        m_runShortcut->setEnabled(false);
+        m_pauseShortcut->disconnect();
+        m_pauseShortcut->setEnabled(false);
+        m_stopShortcut->disconnect();
+        m_stopShortcut->setEnabled(false);
+        m_permanentOrbitsShortcut->disconnect();
+        m_permanentOrbitsShortcut->setEnabled(false);
+        m_rotationAxesShortcut->disconnect();
+        m_rotationAxesShortcut->setEnabled(false);
+        m_fullscreenShortcut->disconnect();
+        m_fullscreenShortcut->setEnabled(false);
+        m_menuBarShortcut->disconnect();
+        m_menuBarShortcut->setEnabled(false);
+    }
+    else {
+        ui.menuBar->hide();
+        m_menuBarVisible = false;
+
+        // activate alternate shortcuts
+        m_runShortcut->setEnabled(true);
+        connect(m_runShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(runAnimation()));
+        m_pauseShortcut->setEnabled(true);
+        connect(m_pauseShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(pauseAnimation()));
+        m_stopShortcut->setEnabled(true);
+        connect(m_stopShortcut, SIGNAL(activated()), ui.pulsarGlWidget, SLOT(stopAnimation()));
+        m_permanentOrbitsShortcut->setEnabled(true);
+        connect(m_permanentOrbitsShortcut, SIGNAL(activated()), this, SLOT(permanentOrbitsToggled()));
+        m_rotationAxesShortcut->setEnabled(true);
+        connect(m_rotationAxesShortcut, SIGNAL(activated()), this, SLOT(rotationAxesToggled()));
+        m_fullscreenShortcut->setEnabled(true);
+        connect(m_fullscreenShortcut, SIGNAL(activated()), this, SLOT(fullscreenToggled()));
+        m_menuBarShortcut->setEnabled(true);
+        connect(m_menuBarShortcut, SIGNAL(activated()), this, SLOT(menuBarToggled()));
+    }
 }
 
 void PulsatingScience::fullscreenToggled()
 {
-	if((windowState() & Qt::WindowFullScreen) > 0) {
-		on_actionFullscreen_toggled(false);
-		ui.actionFullscreen->setChecked(false);
-	}
-	else {
-		on_actionFullscreen_toggled(true);
-		ui.actionFullscreen->setChecked(true);
-	}
+    if((windowState() & Qt::WindowFullScreen) > 0) {
+        on_actionFullscreen_toggled(false);
+        ui.actionFullscreen->setChecked(false);
+    }
+    else {
+        on_actionFullscreen_toggled(true);
+        ui.actionFullscreen->setChecked(true);
+    }
 }
 
 void PulsatingScience::on_actionFullscreen_toggled(bool checked)
 {
-	if(checked) {
-		window()->setWindowState(windowState() | Qt::WindowFullScreen);
-		// assuming text being black
-		setBackgroundRole(QPalette::Text);
+    if(checked) {
+        window()->setWindowState(windowState() | Qt::WindowFullScreen);
+        // assuming text being black
+        setBackgroundRole(QPalette::Text);
 #ifndef __APPLE__
-		if(m_menuBarVisible) {
-			on_actionMenu_bar_toggled(false);
-			// keep visibility setting
-			m_menuBarVisible = true;
-		}
+        if(m_menuBarVisible) {
+            on_actionMenu_bar_toggled(false);
+            // keep visibility setting
+            m_menuBarVisible = true;
+        }
 #endif
-		if(m_statusBarVisible) ui.statusbar->hide();
-		if(m_animControlVisible && !m_animControlFloating) {
-			ui.dockAnimControl->hide();
-			// keep visibility setting
-			m_animControlVisible = true;
-		}
-	}
-	else {
-		window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
-		setBackgroundRole(QPalette::Window);
+        if(m_statusBarVisible) ui.statusbar->hide();
+        if(m_animControlVisible && !m_animControlFloating) {
+            ui.dockAnimControl->hide();
+            // keep visibility setting
+            m_animControlVisible = true;
+        }
+    }
+    else {
+        window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
+        setBackgroundRole(QPalette::Window);
 #ifndef __APPLE__
-		if(m_menuBarVisible) on_actionMenu_bar_toggled(true);
+        if(m_menuBarVisible) on_actionMenu_bar_toggled(true);
 #endif
         if(m_statusBarVisible) ui.statusbar->show();
-		if(m_animControlVisible && !m_animControlFloating) ui.dockAnimControl->show();
-	}
+        if(m_animControlVisible && !m_animControlFloating) ui.dockAnimControl->show();
+    }
 }
 
 void PulsatingScience::on_actionStatus_bar_toggled(bool checked)
 {
-	if(checked) {
-		ui.statusbar->show();
-		m_statusBarVisible = true;
-	}
-	else {
-		ui.statusbar->hide();
-		m_statusBarVisible = false;
-	}
+    if(checked) {
+        ui.statusbar->show();
+        m_statusBarVisible = true;
+    }
+    else {
+        ui.statusbar->hide();
+        m_statusBarVisible = false;
+    }
 }
 
 void PulsatingScience::on_dockAnimControl_visibilityChanged(bool visible) {
-	m_animControlVisible = visible;
+    m_animControlVisible = visible;
 }
 
 void PulsatingScience::on_dockAnimControl_topLevelChanged(bool topLevel) {
-	m_animControlFloating = topLevel;
+    m_animControlFloating = topLevel;
 }
 
 void PulsatingScience::on_actionHelp_triggered()
 {
-	PulsatingScienceHelp help(this);
-	help.exec();
+    PulsatingScienceHelp help(this);
+    help.exec();
 }
 
 void PulsatingScience::on_actionWebsite_triggered()
 {
-	QDesktopServices::openUrl(QUrl("http://www.aei.mpg.de"));
+    QDesktopServices::openUrl(QUrl("http://www.aei.mpg.de"));
 }
 
 void PulsatingScience::on_actionAbout_triggered()
 {
-	QString content = "<b>%1</b><br>"
-		"%2<br><br>"
-		"%3: Oliver Bock, Benjamin Knispel<br><br>"
-		"%4<br>"
-		"(%5 ESO/IDA/Danish 1.5 m/R.Gendler, J-E. Ovaldsen, C. Th&ouml;ne, C. Feron)<br><br>"
-		"%6: GNU General Public License (Version 3)<br><br>"
-		"Copyright &copy; 2009 Max-Planck-Institut f&uuml;r Gravitationsphysik";
-
-	content = content.arg(
-		tr("Pulsating Science"),
-		tr("International Year of Astronomy 2009"),
-		tr("Authors"),
-		tr("Background image: The Carina Nebula"),
-		tr("Courtesy of"),
-		tr("License"));
-
-	QMessageBox::about(this, tr("About \"Pulsating Science\""), content);
+    QString content = "<b>%1</b><br>"
+            "%2<br><br>"
+            "%3: Oliver Bock, Benjamin Knispel<br><br>"
+            "%4<br>"
+            "(%5 ESO/IDA/Danish 1.5 m/R.Gendler, J-E. Ovaldsen, C. Th&ouml;ne, C. Feron)<br><br>"
+            "%6: GNU General Public License (Version 3)<br><br>"
+            "Copyright &copy; 2009 Max-Planck-Institut f&uuml;r Gravitationsphysik";
+
+    content = content.arg(
+                tr("Pulsating Science"),
+                tr("International Year of Astronomy 2009"),
+                tr("Authors"),
+                tr("Background image: The Carina Nebula"),
+                tr("Courtesy of"),
+                tr("License"));
+
+    QMessageBox::about(this, tr("About \"Pulsating Science\""), content);
 }
 
 void PulsatingScience::updatePulsarSemiMajorAxisValue(double value)
 {
-	ui.sliderPulsarSemiMajorAxis->setValue(qRound(value * 1000.0));
-
-	if((int)value <= 1 || (int)value >= 20) {
-		if((int)value < 1 || (int)value > 20) {
-			ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: red");
-		}
-		else {
-			ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: black");
-		}
-		ui.lcdPulsarSemiMajorAxis->display(QString::number(value, 'f', 1));
-	}
+    ui.sliderPulsarSemiMajorAxis->setValue(qRound(value * 1000.0));
+
+    if((int)value <= 1 || (int)value >= 20) {
+        if((int)value < 1 || (int)value > 20) {
+            ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: red");
+        }
+        else {
+            ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: black");
+        }
+        ui.lcdPulsarSemiMajorAxis->display(QString::number(value, 'f', 1));
+    }
 }
 
 void PulsatingScience::toggleHiddenDemoMode()
 {
-	if(m_hiddenDemoModeActivated) {
+    if(m_hiddenDemoModeActivated) {
 #ifdef __APPLE__
-		// show Menubar & Dock
-		// unavailable in Qt 4.6: SetSystemUIMode(kUIModeNormal, 0);
-		window()->setWindowFlags(windowFlags()
-							   & ~Qt::FramelessWindowHint
-							   & ~Qt::WindowStaysOnTopHint);
-		window()->showNormal();
+        // show Menubar & Dock
+        // unavailable in Qt 4.6: SetSystemUIMode(kUIModeNormal, 0);
+        window()->setWindowFlags(windowFlags()
+                                 & ~Qt::FramelessWindowHint
+                                 & ~Qt::WindowStaysOnTopHint);
+        window()->showNormal();
 #endif
-		on_actionMenu_bar_toggled(true);
-		ui.actionMenu_bar->setChecked(true);
-		window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
-		ui.dockAnimControl->setFeatures(QDockWidget::DockWidgetClosable
-									  | QDockWidget::DockWidgetMovable
-									  | QDockWidget::DockWidgetFloatable);
-		m_hiddenDemoModeActivated = false;
-	}
-	else {
+        on_actionMenu_bar_toggled(true);
+        ui.actionMenu_bar->setChecked(true);
+        window()->setWindowState(windowState() & ~Qt::WindowFullScreen);
+        ui.dockAnimControl->setFeatures(QDockWidget::DockWidgetClosable
+                                        | QDockWidget::DockWidgetMovable
+                                        | QDockWidget::DockWidgetFloatable);
+        m_hiddenDemoModeActivated = false;
+    }
+    else {
 #ifdef __APPLE__
-		// hide Menubar & Dock
+        // hide Menubar & Dock
         // unavailable in Qt 4.6: SetSystemUIMode(kUIModeAllHidden, 0);
-		// don't ever ask me why this works _only_ in exactly this order on the Mac
-		window()->setWindowFlags(windowFlags()
-					 | Qt::FramelessWindowHint
-					 | Qt::WindowStaysOnTopHint);
-		window()->showMaximized();
-		// might be needed to remove the resize handle on some systems
-		// window()->setFixedSize(width(), height());
+        // don't ever ask me why this works _only_ in exactly this order on the Mac
+        window()->setWindowFlags(windowFlags()
+                                 | Qt::FramelessWindowHint
+                                 | Qt::WindowStaysOnTopHint);
+        window()->showMaximized();
+        // might be needed to remove the resize handle on some systems
+        // window()->setFixedSize(width(), height());
 #endif
-		on_actionMenu_bar_toggled(false);
-		ui.actionMenu_bar->setChecked(false);
-		window()->setWindowState(windowState() | Qt::WindowFullScreen);
-		ui.dockAnimControl->setFeatures(QDockWidget::NoDockWidgetFeatures);
-		m_hiddenDemoModeActivated = true;
-	}
+        on_actionMenu_bar_toggled(false);
+        ui.actionMenu_bar->setChecked(false);
+        window()->setWindowState(windowState() | Qt::WindowFullScreen);
+        ui.dockAnimControl->setFeatures(QDockWidget::NoDockWidgetFeatures);
+        m_hiddenDemoModeActivated = true;
+    }
 }
diff --git a/src/pulsatingscience.h b/src/pulsatingscience.h
index b4f436c..3a8fc39 100644
--- a/src/pulsatingscience.h
+++ b/src/pulsatingscience.h
@@ -43,37 +43,37 @@ public:
     void closeEvent(QCloseEvent *event);
 
 public slots:
-	void on_pushRun_clicked();
-	void on_pushPause_clicked();
-	void on_pushStop_clicked();
-
-	void on_radioCompanionWD_toggled(bool checked);
-	void on_radioCompanionSun_toggled(bool checked);
-	void on_radioCompanionNS_toggled(bool checked);
-	void on_sliderPulsarMass_valueChanged(int value);
-	void on_sliderPulsarSpinFrequency_valueChanged(int value);
-	void on_sliderPulsarSpinAxisInclination_valueChanged(int value);
-	void on_sliderPulsarMagneticAxisInclination_valueChanged(int value);
-	void on_sliderPulsarSemiMajorAxis_valueChanged(int value);
-
-	void permanentOrbitsToggled();
-	void on_actionPermanent_orbits_toggled(bool checked);
-	void rotationAxesToggled();
-	void on_actionRotationAxes_toggled(bool checked);
-	void fullscreenToggled();
-	void on_actionFullscreen_toggled(bool checked);
-	void menuBarToggled();
-	void on_actionMenu_bar_toggled(bool checked);
-	void on_actionStatus_bar_toggled(bool checked);
-	void on_dockAnimControl_visibilityChanged(bool visible);
-	void on_dockAnimControl_topLevelChanged(bool topLevel);
-
-	void on_actionHelp_triggered();
-	void on_actionWebsite_triggered();
-	void on_actionAbout_triggered();
-
-	void updatePulsarSemiMajorAxisValue(double value);
-	void toggleHiddenDemoMode();
+    void on_pushRun_clicked();
+    void on_pushPause_clicked();
+    void on_pushStop_clicked();
+
+    void on_radioCompanionWD_toggled(bool checked);
+    void on_radioCompanionSun_toggled(bool checked);
+    void on_radioCompanionNS_toggled(bool checked);
+    void on_sliderPulsarMass_valueChanged(int value);
+    void on_sliderPulsarSpinFrequency_valueChanged(int value);
+    void on_sliderPulsarSpinAxisInclination_valueChanged(int value);
+    void on_sliderPulsarMagneticAxisInclination_valueChanged(int value);
+    void on_sliderPulsarSemiMajorAxis_valueChanged(int value);
+
+    void permanentOrbitsToggled();
+    void on_actionPermanent_orbits_toggled(bool checked);
+    void rotationAxesToggled();
+    void on_actionRotationAxes_toggled(bool checked);
+    void fullscreenToggled();
+    void on_actionFullscreen_toggled(bool checked);
+    void menuBarToggled();
+    void on_actionMenu_bar_toggled(bool checked);
+    void on_actionStatus_bar_toggled(bool checked);
+    void on_dockAnimControl_visibilityChanged(bool visible);
+    void on_dockAnimControl_topLevelChanged(bool topLevel);
+
+    void on_actionHelp_triggered();
+    void on_actionWebsite_triggered();
+    void on_actionAbout_triggered();
+
+    void updatePulsarSemiMajorAxisValue(double value);
+    void toggleHiddenDemoMode();
 
 private:
     Ui::PulsatingScienceClass ui;
@@ -90,10 +90,10 @@ private:
     bool m_permanentOrbits;
     bool m_rotationAxesVisible;
     bool m_menuBarVisible;
-	bool m_statusBarVisible;
-	bool m_animControlVisible;
-	bool m_animControlFloating;
-	bool m_hiddenDemoModeActivated;
+    bool m_statusBarVisible;
+    bool m_animControlVisible;
+    bool m_animControlFloating;
+    bool m_hiddenDemoModeActivated;
 };
 
 #endif // PULSATINGSCIENCE_H
diff --git a/src/pulsatingsciencehelp.cpp b/src/pulsatingsciencehelp.cpp
index c38f3bb..1d4ddb3 100644
--- a/src/pulsatingsciencehelp.cpp
+++ b/src/pulsatingsciencehelp.cpp
@@ -22,11 +22,11 @@
 
 PulsatingScienceHelp::PulsatingScienceHelp(QWidget *parent) : QDialog(parent), Ui::PulsatingScienceHelp()
 {
-	setupUi(this);
+    setupUi(this);
 
-	if(QLocale::system().language() == QLocale::German) {
-		webView->setUrl(QUrl("qrc:/content/resources/help_de.html"));
-	}
+    if(QLocale::system().language() == QLocale::German) {
+        webView->setUrl(QUrl("qrc:/content/resources/help_de.html"));
+    }
 }
 
 PulsatingScienceHelp::~PulsatingScienceHelp()
diff --git a/src/pulsatingsciencehelp.h b/src/pulsatingsciencehelp.h
index 5072d37..eab6199 100644
--- a/src/pulsatingsciencehelp.h
+++ b/src/pulsatingsciencehelp.h
@@ -33,8 +33,8 @@ class PulsatingScienceHelp : public QDialog, private Ui::PulsatingScienceHelp
     Q_OBJECT
 
 public:
-	PulsatingScienceHelp(QWidget *parent = 0);
-	virtual ~PulsatingScienceHelp();
+    PulsatingScienceHelp(QWidget *parent = 0);
+    virtual ~PulsatingScienceHelp();
 };
 
 #endif /* PULSATINGSCIENCEHELP_H */
diff --git a/src/pulsescopewidget.cpp b/src/pulsescopewidget.cpp
index e049b73..7783a59 100644
--- a/src/pulsescopewidget.cpp
+++ b/src/pulsescopewidget.cpp
@@ -21,77 +21,77 @@
 #include "pulsescopewidget.h"
 
 PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent),
-	m_scene(),
-	m_data()
+    m_scene(),
+    m_data()
 {
-	setViewport(new QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers)));
-	QGLWidget *glScope = (QGLWidget*) viewport();
+    setViewport(new QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers)));
+    QGLWidget *glScope = (QGLWidget*) viewport();
 
-	QString msgThis = tr("pulse profile");
-	if(!glScope->format().directRendering()) {
-		QString msg = tr("Sorry, no direct rendering support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!glScope->format().doubleBuffer()) {
-		QString msg = tr("Sorry, no double buffering support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!glScope->format().rgba()) {
-		QString msg = tr("Sorry, no RGBA support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!glScope->format().alpha()) {
-		QString msg = tr("Sorry, no alpha channel support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
-	if(!glScope->format().sampleBuffers()) {
-		QString msg = tr("Sorry, no multisampling support for %1...");
-		qWarning() << msg.arg(msgThis);
-	}
+    QString msgThis = tr("pulse profile");
+    if(!glScope->format().directRendering()) {
+        QString msg = tr("Sorry, no direct rendering support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!glScope->format().doubleBuffer()) {
+        QString msg = tr("Sorry, no double buffering support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!glScope->format().rgba()) {
+        QString msg = tr("Sorry, no RGBA support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!glScope->format().alpha()) {
+        QString msg = tr("Sorry, no alpha channel support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
+    if(!glScope->format().sampleBuffers()) {
+        QString msg = tr("Sorry, no multisampling support for %1...");
+        qWarning() << msg.arg(msgThis);
+    }
 
-	m_scopeSizeH = 360.0;
-	m_scopeSizeV = 1.0;
+    m_scopeSizeH = 360.0;
+    m_scopeSizeV = 1.0;
 
-	m_path = NULL;
-	m_marker = m_scene.addLine(0.0, 0.0, 0.0, m_scopeSizeV, QPen(Qt::red));
-	m_marker->setZValue(1);
+    m_path = NULL;
+    m_marker = m_scene.addLine(0.0, 0.0, 0.0, m_scopeSizeV, QPen(Qt::red));
+    m_marker->setZValue(1);
 
-	setScene(&m_scene);
+    setScene(&m_scene);
 
-	m_data.fill(0.0, qRound(m_scopeSizeH));
-	drawCurve(m_data);
+    m_data.fill(0.0, qRound(m_scopeSizeH));
+    drawCurve(m_data);
 }
 
 PulseScopeWidget::~PulseScopeWidget()
 {
-	m_scene.clear();
+    m_scene.clear();
 }
 
 void PulseScopeWidget::resizeEvent(QResizeEvent *event)
 {
-	Q_UNUSED(event);
+    Q_UNUSED(event);
 
-	fitInView(m_scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
+    fitInView(m_scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
 }
 
 void PulseScopeWidget::drawCurve(const QVector<double>& vector)
 {
-	m_data = vector;
+    m_data = vector;
 
-	QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - m_data.at(0)));
-	for(int i = 1; i < m_scopeSizeH; ++i) {
-		pulsePath.lineTo(i, m_scopeSizeV - m_data.at(i));
-	}
-	if(m_path == NULL) {
-		m_path = m_scene.addPath(pulsePath, QPen(Qt::yellow));
-	}
-	else {
-		m_path->setPath(pulsePath);
-	}
+    QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - m_data.at(0)));
+    for(int i = 1; i < m_scopeSizeH; ++i) {
+        pulsePath.lineTo(i, m_scopeSizeV - m_data.at(i));
+    }
+    if(m_path == NULL) {
+        m_path = m_scene.addPath(pulsePath, QPen(Qt::yellow));
+    }
+    else {
+        m_path->setPath(pulsePath);
+    }
 
-	fitInView(m_scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
+    fitInView(m_scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
 }
 
 void PulseScopeWidget::setMarker(double position) {
-	m_marker->setLine(position, 0.0, position, m_scopeSizeV);
+    m_marker->setLine(position, 0.0, position, m_scopeSizeV);
 }
diff --git a/src/pulsescopewidget.h b/src/pulsescopewidget.h
index 88fc891..efd679f 100644
--- a/src/pulsescopewidget.h
+++ b/src/pulsescopewidget.h
@@ -33,26 +33,26 @@
 
 class PulseScopeWidget : public QGraphicsView
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	PulseScopeWidget(QWidget *parent = 0);
-	virtual ~PulseScopeWidget();
+    PulseScopeWidget(QWidget *parent = 0);
+    virtual ~PulseScopeWidget();
 
-	void resizeEvent(QResizeEvent *event);
+    void resizeEvent(QResizeEvent *event);
 
 public slots:
-	void drawCurve(const QVector<double>& vector);
-	void setMarker(double position);
+    void drawCurve(const QVector<double>& vector);
+    void setMarker(double position);
 
 private:
-	QGraphicsScene m_scene;
-	QVector<double> m_data;
-	QGraphicsPathItem *m_path;
-	QGraphicsLineItem *m_marker;
+    QGraphicsScene m_scene;
+    QVector<double> m_data;
+    QGraphicsPathItem *m_path;
+    QGraphicsLineItem *m_marker;
 
-	double m_scopeSizeH;
-	double m_scopeSizeV;
+    double m_scopeSizeH;
+    double m_scopeSizeV;
 };
 
 #endif /* PULSESCOPEWIDGET_H_ */
-- 
GitLab