Commit 21633ac3 authored by Oliver Bock's avatar Oliver Bock
Browse files

Removed obsolete stuff

parent 7aaa6ebf
...@@ -26,17 +26,13 @@ QT += core \ ...@@ -26,17 +26,13 @@ QT += core \
webkit webkit
HEADERS += src/pulsaranimationwidget.h \ HEADERS += src/pulsaranimationwidget.h \
src/pulsescopewidget.h \ src/pulsescopewidget.h \
src/pulsatingscience.h \ src/pulsatingscience.h
src/pulsatingsciencehelp.h
SOURCES += src/pulsaranimationwidget.cpp \ SOURCES += src/pulsaranimationwidget.cpp \
src/pulsescopewidget.cpp \ src/pulsescopewidget.cpp \
src/pulsatingscience.cpp \ src/pulsatingscience.cpp \
src/pulsatingsciencehelp.cpp \
src/main.cpp src/main.cpp
FORMS += src/pulsatingscience.ui \ FORMS += src/pulsatingscience.ui
src/pulsatingsciencehelp.ui RESOURCES += src/pulsatingscience.qrc
RESOURCES += src/pulsatingscience.qrc \
src/pulsatingsciencehelp.qrc
TS_DIR = src/resources TS_DIR = src/resources
TRANSLATIONS = src/resources/pulsatingscience_de.ts TRANSLATIONS = src/resources/pulsatingscience_de.ts
......
...@@ -24,7 +24,7 @@ const double PulsarAnimationWidget::deg2rad = PI/180.0; ...@@ -24,7 +24,7 @@ const double PulsarAnimationWidget::deg2rad = PI/180.0;
PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent), QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent),
m_frameTimer(),
m_pulseProfile(360, 0.0) m_pulseProfile(360, 0.0)
{ {
QString msgThis = tr("3D animation"); QString msgThis = tr("3D animation");
...@@ -49,9 +49,6 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : ...@@ -49,9 +49,6 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
qWarning() << msg.arg(msgThis); qWarning() << msg.arg(msgThis);
} }
// connect primary rendering timer to local callback
connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame()));
// initialize quadric pointers // initialize quadric pointers
m_quadricVirgoh = NULL; m_quadricVirgoh = NULL;
m_quadricVirgov = NULL; m_quadricVirgov = NULL;
...@@ -65,16 +62,8 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : ...@@ -65,16 +62,8 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
m_quadricLHOh = NULL; m_quadricLHOh = NULL;
// initialize texture pointers // initialize texture pointers
m_backgroundTexture = 0;
m_beamTexture = 0; m_beamTexture = 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 parameters (have to match GUI!) // initial parameters (have to match GUI!)
m_LHOAngle = 180; m_LHOAngle = 180;
m_LLOAngle = -100; m_LLOAngle = -100;
...@@ -84,22 +73,7 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : ...@@ -84,22 +73,7 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
m_pulsarRadius = 3.0; m_pulsarRadius = 3.0;
m_pulsarSpinAxisInclination = 0.0; m_pulsarSpinAxisInclination = 0.0;
// initial spin frequency of 0.5 Hz
m_pulsarRotationDelta = (360.0 * 0.5) / m_framesPerSecond;
// beam properties (keep this order!)
m_pulsarBeamLength = 3.0f;
setPulsarBeamAngle(30);
// initial companion is "Neutron Star"
m_companionMass = 1.4;
m_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
// update orbital period (based on settings above)
updateOrbitPeriod();
// initial view features // initial view features
m_showOrbits = false;
m_showRotationAxes = false;
m_showPulseFlashes = true;
m_cameraInteraction = false; m_cameraInteraction = false;
// initial view settings // initial view settings
...@@ -128,7 +102,6 @@ PulsarAnimationWidget::~PulsarAnimationWidget() ...@@ -128,7 +102,6 @@ PulsarAnimationWidget::~PulsarAnimationWidget()
if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv); if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv);
if(m_quadricLHOh) gluDeleteQuadric(m_quadricLHOh); if(m_quadricLHOh) gluDeleteQuadric(m_quadricLHOh);
if(m_backgroundTexture) deleteTexture(m_backgroundTexture);
if(m_beamTexture) deleteTexture(m_beamTexture); if(m_beamTexture) deleteTexture(m_beamTexture);
} }
...@@ -188,34 +161,10 @@ void PulsarAnimationWidget::initializeGL() ...@@ -188,34 +161,10 @@ void PulsarAnimationWidget::initializeGL()
GLint maxTextureSize; GLint maxTextureSize;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
// prepare local messages
QString msgShape = tr("%1 texture shape not quadratic!");
QString msgPower = tr("%1 texture dimensions not a power of 2!");
QString msgSize = tr("Maximum texture size exceeded! Scaling down %1 texture to %2x%3...");
// prepare and check background texture
QImage backgroundTexture(":/textures/resources/texture_background_carina.png");
if(backgroundTexture.width() != backgroundTexture.height()) {
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"));
}
}
if(backgroundTexture.width() > maxTextureSize) {
qWarning() << msgSize.arg(tr("background").arg(maxTextureSize).arg(maxTextureSize));
backgroundTexture = backgroundTexture.scaled(maxTextureSize, maxTextureSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
// prepare and check beam texture // prepare and check beam texture
QImage beamTexture(":/textures/resources/World-Map-7.jpg"); QImage beamTexture(":/textures/resources/World-Map-7.jpg");
// bind textures // bind textures
m_backgroundTexture = bindTexture(backgroundTexture, GL_TEXTURE_2D, GL_RGBA);
m_beamTexture = bindTexture(beamTexture, GL_TEXTURE_2D, GL_RGBA); m_beamTexture = bindTexture(beamTexture, GL_TEXTURE_2D, GL_RGBA);
// use mipmapped textures // use mipmapped textures
...@@ -490,63 +439,6 @@ void PulsarAnimationWidget::paintGL() ...@@ -490,63 +439,6 @@ void PulsarAnimationWidget::paintGL()
glPopMatrix(); glPopMatrix();
} }
void PulsarAnimationWidget::runAnimation()
{
m_frameTimer.start(qRound(1000.0 / m_framesPerSecond));
}
void PulsarAnimationWidget::pauseAnimation()
{
m_frameTimer.stop();
}
void PulsarAnimationWidget::stopAnimation()
{
m_frameTimer.stop();
resetParameters();
updateGL();
}
void PulsarAnimationWidget::updateFrame()
{
m_pulsarRotationAngle += m_pulsarRotationDelta;
if(m_pulsarRotationAngle > 360.0) {
m_pulsarRotationAngle -= 360.0;
}
m_orbitRotationAngle += m_orbitRotationDelta;
if(m_orbitRotationAngle > 360.0) {
m_orbitRotationAngle -= 360.0;
}
updatePulseProfile();
updateGL();
emit pulsarAnimationStep(m_pulsarRotationAngle);
}
void PulsarAnimationWidget::showOrbits(bool enabled)
{
m_showOrbits = enabled;
updateGL();
}
void PulsarAnimationWidget::showRotationAxes(bool enabled)
{
m_showRotationAxes = enabled;
updateGL();
}
void PulsarAnimationWidget::showPulseFlashes(bool enabled)
{
m_showPulseFlashes = enabled;
updateGL();
}
void PulsarAnimationWidget::mousePressEvent(QMouseEvent *event) void PulsarAnimationWidget::mousePressEvent(QMouseEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
...@@ -616,11 +508,6 @@ void PulsarAnimationWidget::updateCameraPosition(const double angleH, const doub ...@@ -616,11 +508,6 @@ void PulsarAnimationWidget::updateCameraPosition(const double angleH, const doub
updateGL(); updateGL();
} }
void PulsarAnimationWidget::setFramePerSecond(const unsigned int fps)
{
m_framesPerSecond = fps;
}
void PulsarAnimationWidget::setSourceInclination(const double degrees) void PulsarAnimationWidget::setSourceInclination(const double degrees)
{ {
m_sourceInclination = degrees; m_sourceInclination = degrees;
...@@ -661,23 +548,6 @@ void PulsarAnimationWidget::setPulsarSpinAxisInclination(const int degrees) ...@@ -661,23 +548,6 @@ void PulsarAnimationWidget::setPulsarSpinAxisInclination(const int degrees)
updateGL(); updateGL();
} }
void PulsarAnimationWidget::setPulsarBeamAngle(const int degrees)
{
double beamTexturePeakCorrectionFactor = 0.83;
double correctedOuterRadius;
// compute visual radius
m_pulsarBeamOuterRadius = tan(deg2rad * degrees * 0.5f) * m_pulsarBeamLength;
// compute corrected angle for pulse profile
correctedOuterRadius = m_pulsarBeamOuterRadius * beamTexturePeakCorrectionFactor;
m_pulsarBeamAngle = 2 * atan(correctedOuterRadius / m_pulsarBeamLength) * 180.0/PI;
updatePulseProfile();
updateGL();
}
void PulsarAnimationWidget::getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom) void PulsarAnimationWidget::getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom)
{ {
cameraAngleH = m_mouseAngleH; cameraAngleH = m_mouseAngleH;
...@@ -694,72 +564,10 @@ void PulsarAnimationWidget::resetCameraPosition(const double angleH, const doubl ...@@ -694,72 +564,10 @@ void PulsarAnimationWidget::resetCameraPosition(const double angleH, const doubl
updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom); updateCameraPosition(m_mouseAngleH, m_mouseAngleV, m_cameraZoom);
} }
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)
);
// visual correction factor (increase orbital momentum)
double visualCorrection = 1e-8;
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_companionSemiMajorAxis = (m_pulsarMass/m_companionMass) * m_pulsarSemiMajorAxis;
emit pulsarSemiMajorAxisUpdated(m_pulsarSemiMajorAxis);
}
void PulsarAnimationWidget::resetParameters()
{
m_pulsarRotationAngle = 0.0;
m_orbitRotationAngle = 0.0;
updatePulseProfile();
emit pulsarAnimationStep(m_pulsarRotationAngle);
}
void PulsarAnimationWidget::updatePulseProfile() void PulsarAnimationWidget::updatePulseProfile()
{ {
// avoid division by zero (keep profile visible if pulsar doesn't spin)
double pulsarRotationDelta = m_pulsarRotationDelta == 0.0 ? 0.01 : m_pulsarRotationDelta;
// 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 / 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) { for(int x = 0; x < 360; ++x) {
// determine angle between pulsar's magnetic axis and line of sight m_pulseProfile[x] = 0;
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 // propagate new profile
......
...@@ -45,32 +45,16 @@ public: ...@@ -45,32 +45,16 @@ public:
PulsarAnimationWidget(QWidget *parent); PulsarAnimationWidget(QWidget *parent);
virtual ~PulsarAnimationWidget(); virtual ~PulsarAnimationWidget();
void setFramePerSecond(const unsigned int fps);
void setCompanionMass(const double mass);
void setLHOAngle(const double degrees); void setLHOAngle(const double degrees);
void setLLOAngle(const double degrees); void setLLOAngle(const double degrees);
void setVirgoAngle(const int degrees); void setVirgoAngle(const int degrees);
void setPulsarSpinAxisInclination(const int degrees); void setPulsarSpinAxisInclination(const int degrees);
void setSourceInclination(const double length); void setSourceInclination(const double length);
void setPulsarBeamAngle(const int degrees);
void getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom); void getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom);
void resetCameraPosition(const double angleH, const double angleV, const double zoom); void resetCameraPosition(const double angleH, const double angleV, const double zoom);
public slots:
void runAnimation();
void pauseAnimation();
void stopAnimation();
void updateFrame();
void showOrbits(bool enabled);
void showRotationAxes(bool enabled);
void showPulseFlashes(bool enabled);
signals: signals:
void pulsarSemiMajorAxisUpdated(double value);
void pulseProfileUpdated(const QVector<double>& data); void pulseProfileUpdated(const QVector<double>& data);
void pulsarAnimationStep(double position);
private: private:
void initializeGL(); void initializeGL();
...@@ -82,14 +66,9 @@ private: ...@@ -82,14 +66,9 @@ private:
void mouseReleaseEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event);
void showEvent(QShowEvent *event); void showEvent(QShowEvent *event);
void updateOrbitPeriod();
void updateOrbitRadii();
void updateCameraPosition(const double angleH, const double angleV, const double zoom); void updateCameraPosition(const double angleH, const double angleV, const double zoom);
void resetParameters();
void updatePulseProfile(); void updatePulseProfile();
QTimer m_frameTimer;
GLUquadricObj *m_quadricVirgoh; GLUquadricObj *m_quadricVirgoh;
GLUquadricObj *m_quadricVirgov; GLUquadricObj *m_quadricVirgov;
GLUquadricObj *m_quadricPulsarOrbitPlane; GLUquadricObj *m_quadricPulsarOrbitPlane;
...@@ -101,33 +80,15 @@ private: ...@@ -101,33 +80,15 @@ private:
GLUquadricObj *m_quadricLHOv; GLUquadricObj *m_quadricLHOv;
GLUquadricObj *m_quadricLHOh; GLUquadricObj *m_quadricLHOh;
GLuint m_backgroundTexture;
GLuint m_beamTexture; GLuint m_beamTexture;
int m_framesPerSecond;
double m_pulsarRotationAngle;
double m_pulsarRotationDelta;
double m_orbitalPeriod;
double m_orbitRotationAngle;
double m_orbitRotationDelta;
double m_pulsarRadius; double m_pulsarRadius;
double m_pulsarBeamLength;
double m_pulsarBeamAngle;
double m_pulsarBeamOuterRadius;
double m_LHOAngle; double m_LHOAngle;
double m_LLOAngle; double m_LLOAngle;
double m_VirgoAngle; double m_VirgoAngle;
double m_pulsarSpinAxisInclination; double m_pulsarSpinAxisInclination;
double m_sourceInclination; double m_sourceInclination;
double m_companionMass;
double m_companionSemiMajorAxis;
bool m_showOrbits;
bool m_showRotationAxes;
bool m_showPulseFlashes;
bool m_cameraInteraction; bool m_cameraInteraction;
int m_mouseLastX; int m_mouseLastX;
......
...@@ -40,9 +40,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) ...@@ -40,9 +40,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
#endif #endif
// inital status (based on GUI) // inital status (based on GUI)
m_permanentOrbits = ui.actionPermanent_orbits->isChecked();
m_rotationAxesVisible = ui.actionRotationAxes->isChecked();
m_pulseFlashesVisible = ui.actionPulseFlashes->isChecked();
m_menuBarVisible = ui.actionMenu_bar->isChecked(); m_menuBarVisible = ui.actionMenu_bar->isChecked();
m_statusBarVisible = ui.actionStatus_bar->isChecked(); m_statusBarVisible = ui.actionStatus_bar->isChecked();
m_animControlVisible = true; m_animControlVisible = true;
...@@ -50,18 +47,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) ...@@ -50,18 +47,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
m_hiddenDemoModeActivated = false; m_hiddenDemoModeActivated = false;
// register alternate shortcuts (will be enabled when menu is hidden) // 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_pulseFlashesShortcut = new QShortcut(ui.actionPulseFlashes->shortcut(), this);
m_pulseFlashesShortcut->setEnabled(false);
m_menuBarShortcut = new QShortcut(ui.actionMenu_bar->shortcut(), this); m_menuBarShortcut = new QShortcut(ui.actionMenu_bar->shortcut(), this);
m_menuBarShortcut->setEnabled(false); m_menuBarShortcut->setEnabled(false);
m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this); m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this);
...@@ -73,27 +58,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) ...@@ -73,27 +58,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
m_hiddenShortcut = new QShortcut(QKeySequence(Qt::SHIFT + Qt::ALT + Qt::Key_D), this); m_hiddenShortcut = new QShortcut(QKeySequence(Qt::SHIFT + Qt::ALT + Qt::Key_D), this);
// establish object communications // establish object communications
connect(ui.actionRun, SIGNAL(triggered()),
ui.pulsarGlWidget, SLOT(runAnimation()));
connect(ui.actionPause, SIGNAL(triggered()),
ui.pulsarGlWidget, SLOT(pauseAnimation()));
connect(ui.actionStop, SIGNAL(triggered()),
ui.pulsarGlWidget, SLOT(stopAnimation()));
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.actionPulseFlashes, SIGNAL(toggled(bool)),
ui.pulsarGlWidget, SLOT(showPulseFlashes(bool)));
connect(ui.pulsarGlWidget, SIGNAL(pulsarAnimationStep(double)),
ui.pulseScopeWidget, SLOT(setMarker(double)), Qt::DirectConnection);
connect(ui.pulsarGlWidget, SIGNAL(pulseProfileUpdated(const QVector<double>&)), connect(ui.pulsarGlWidget, SIGNAL(pulseProfileUpdated(const QVector<double>&)),
ui.pulseScopeWidget, SLOT(drawCurve(const QVector<double>&)), Qt::DirectConnection); ui.pulseScopeWidget, SLOT(drawCurve(const QVector<double>&)), Qt::DirectConnection);
...@@ -114,45 +78,10 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) ...@@ -114,45 +78,10 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
restoreGeometry(settings.value("windowGeometry").toByteArray()); restoreGeometry(settings.value("windowGeometry").toByteArray());
restoreState(settings.value("windowState").toByteArray()); restoreState(settings.value("windowState").toByteArray());
ui.splitter->restoreState(settings.value("splitterSizes").toByteArray()); ui.splitter->restoreState(settings.value("splitterSizes").toByteArray());
// restore view features
ui.actionPermanent_orbits->setChecked(settings.value("viewOrbitalPlanes", m_permanentOrbits).toBool());
ui.actionRotationAxes->setChecked(settings.value("viewRotationAxes", m_rotationAxesVisible).toBool());
ui.actionPulseFlashes->setChecked(settings.value("viewPulseFlashes", m_pulseFlashesVisible).toBool());
} }
PulsatingScience::~PulsatingScience() 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_pulseFlashesShortcut) {
m_pulseFlashesShortcut->disconnect();
delete m_pulseFlashesShortcut;
}
if(m_menuBarShortcut) { if(m_menuBarShortcut) {
m_menuBarShortcut->disconnect(); m_menuBarShortcut->disconnect();
delete m_menuBarShortcut; delete m_menuBarShortcut;
...@@ -190,11 +119,6 @@ void PulsatingScience::closeEvent(QCloseEvent *event) ...@@ -190,11 +119,6 @@ void PulsatingScience::closeEvent(QCloseEvent *event)
settings.setValue("windowState", saveState()); settings.setValue("windowState", saveState());
settings.setValue("splitterSizes", ui.splitter->saveState()); settings.setValue("splitterSizes", ui.splitter->saveState());
// save view features
settings.setValue("viewOrbitalPlanes", m_permanentOrbits);
settings.setValue("viewRotationAxes", m_rotationAxesVisible);
settings.setValue("viewPulseFlashes", m_pulseFlashesVisible);
event->accept(); event->accept();
} }
} }
...@@ -229,51 +153,6 @@ void PulsatingScience::on_sliderSourceInclination_valueChanged(int value) ...@@ -229,51 +153,6 @@ void PulsatingScience::on_sliderSourceInclination_valueChanged(int value)
ui.lcdSourceInclination->display(QString::number(value)); ui.lcdSourceInclination->display(QString::number(value));
} }