diff --git a/pulsatingscience.pro b/pulsatingscience.pro index ea96d5adbd5887d22b5a25d097cdc8d357cb082d..3f23432115c8f6a8efd49ee097ee052d7445ce03 100644 --- a/pulsatingscience.pro +++ b/pulsatingscience.pro @@ -26,17 +26,13 @@ QT += core \ webkit HEADERS += src/pulsaranimationwidget.h \ src/pulsescopewidget.h \ - src/pulsatingscience.h \ - src/pulsatingsciencehelp.h + src/pulsatingscience.h SOURCES += src/pulsaranimationwidget.cpp \ src/pulsescopewidget.cpp \ src/pulsatingscience.cpp \ - src/pulsatingsciencehelp.cpp \ src/main.cpp -FORMS += src/pulsatingscience.ui \ - src/pulsatingsciencehelp.ui -RESOURCES += src/pulsatingscience.qrc \ - src/pulsatingsciencehelp.qrc +FORMS += src/pulsatingscience.ui +RESOURCES += src/pulsatingscience.qrc TS_DIR = src/resources TRANSLATIONS = src/resources/pulsatingscience_de.ts diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index 9fed20ab43bc0ad65ed1e2a0998c256375a7486f..9ecaaa6fd71ca9ff1c1872c0e0ac707234196458 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -24,7 +24,7 @@ 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) { QString msgThis = tr("3D animation"); @@ -49,9 +49,6 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : qWarning() << msg.arg(msgThis); } - // connect primary rendering timer to local callback - connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame())); - // initialize quadric pointers m_quadricVirgoh = NULL; m_quadricVirgov = NULL; @@ -65,16 +62,8 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : m_quadricLHOh = NULL; // initialize texture pointers - m_backgroundTexture = 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!) m_LHOAngle = 180; m_LLOAngle = -100; @@ -84,22 +73,7 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : m_pulsarRadius = 3.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 - m_showOrbits = false; - m_showRotationAxes = false; - m_showPulseFlashes = true; m_cameraInteraction = false; // initial view settings @@ -128,7 +102,6 @@ PulsarAnimationWidget::~PulsarAnimationWidget() if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv); if(m_quadricLHOh) gluDeleteQuadric(m_quadricLHOh); - if(m_backgroundTexture) deleteTexture(m_backgroundTexture); if(m_beamTexture) deleteTexture(m_beamTexture); } @@ -188,34 +161,10 @@ void PulsarAnimationWidget::initializeGL() GLint 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 QImage beamTexture(":/textures/resources/World-Map-7.jpg"); // bind textures - m_backgroundTexture = bindTexture(backgroundTexture, GL_TEXTURE_2D, GL_RGBA); m_beamTexture = bindTexture(beamTexture, GL_TEXTURE_2D, GL_RGBA); // use mipmapped textures @@ -490,63 +439,6 @@ void PulsarAnimationWidget::paintGL() 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) { Q_UNUSED(event); @@ -616,11 +508,6 @@ void PulsarAnimationWidget::updateCameraPosition(const double angleH, const doub updateGL(); } -void PulsarAnimationWidget::setFramePerSecond(const unsigned int fps) -{ - m_framesPerSecond = fps; -} - void PulsarAnimationWidget::setSourceInclination(const double degrees) { m_sourceInclination = degrees; @@ -661,23 +548,6 @@ void PulsarAnimationWidget::setPulsarSpinAxisInclination(const int degrees) 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) { cameraAngleH = m_mouseAngleH; @@ -694,72 +564,10 @@ void PulsarAnimationWidget::resetCameraPosition(const double angleH, const doubl 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() { - // 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) { - // 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); + m_pulseProfile[x] = 0; } // propagate new profile diff --git a/src/pulsaranimationwidget.h b/src/pulsaranimationwidget.h index 2b68c6caec8e5c4f132feb52541725934bf8d69d..d698cc748bb0762aafe60f614e7dccfd6071a7a9 100644 --- a/src/pulsaranimationwidget.h +++ b/src/pulsaranimationwidget.h @@ -45,32 +45,16 @@ public: PulsarAnimationWidget(QWidget *parent); virtual ~PulsarAnimationWidget(); - void setFramePerSecond(const unsigned int fps); - void setCompanionMass(const double mass); void setLHOAngle(const double degrees); void setLLOAngle(const double degrees); void setVirgoAngle(const int degrees); void setPulsarSpinAxisInclination(const int degrees); void setSourceInclination(const double length); - void setPulsarBeamAngle(const int degrees); void getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom); 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: - void pulsarSemiMajorAxisUpdated(double value); void pulseProfileUpdated(const QVector<double>& data); - void pulsarAnimationStep(double position); private: void initializeGL(); @@ -82,14 +66,9 @@ private: void mouseReleaseEvent(QMouseEvent *event); void showEvent(QShowEvent *event); - void updateOrbitPeriod(); - void updateOrbitRadii(); void updateCameraPosition(const double angleH, const double angleV, const double zoom); - void resetParameters(); void updatePulseProfile(); - QTimer m_frameTimer; - GLUquadricObj *m_quadricVirgoh; GLUquadricObj *m_quadricVirgov; GLUquadricObj *m_quadricPulsarOrbitPlane; @@ -101,33 +80,15 @@ private: GLUquadricObj *m_quadricLHOv; GLUquadricObj *m_quadricLHOh; - GLuint m_backgroundTexture; 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_pulsarBeamLength; - double m_pulsarBeamAngle; - double m_pulsarBeamOuterRadius; double m_LHOAngle; double m_LLOAngle; double m_VirgoAngle; double m_pulsarSpinAxisInclination; double m_sourceInclination; - double m_companionMass; - double m_companionSemiMajorAxis; - bool m_showOrbits; - bool m_showRotationAxes; - bool m_showPulseFlashes; bool m_cameraInteraction; int m_mouseLastX; diff --git a/src/pulsatingscience.cpp b/src/pulsatingscience.cpp index 3da00d3019c0a7f481ea380b73468b31a1ca0d87..e631db6addc5f49f2c16ef30667d852a193c87b5 100644 --- a/src/pulsatingscience.cpp +++ b/src/pulsatingscience.cpp @@ -40,9 +40,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) #endif // 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_statusBarVisible = ui.actionStatus_bar->isChecked(); m_animControlVisible = true; @@ -50,18 +47,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) 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_pulseFlashesShortcut = new QShortcut(ui.actionPulseFlashes->shortcut(), this); - m_pulseFlashesShortcut->setEnabled(false); m_menuBarShortcut = new QShortcut(ui.actionMenu_bar->shortcut(), this); m_menuBarShortcut->setEnabled(false); m_fullscreenShortcut = new QShortcut(ui.actionFullscreen->shortcut(), this); @@ -73,27 +58,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) m_hiddenShortcut = new QShortcut(QKeySequence(Qt::SHIFT + Qt::ALT + Qt::Key_D), this); // 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>&)), ui.pulseScopeWidget, SLOT(drawCurve(const QVector<double>&)), Qt::DirectConnection); @@ -114,45 +78,10 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent) restoreGeometry(settings.value("windowGeometry").toByteArray()); restoreState(settings.value("windowState").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() { - 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) { m_menuBarShortcut->disconnect(); delete m_menuBarShortcut; @@ -190,11 +119,6 @@ void PulsatingScience::closeEvent(QCloseEvent *event) settings.setValue("windowState", 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(); } } @@ -229,51 +153,6 @@ void PulsatingScience::on_sliderSourceInclination_valueChanged(int value) ui.lcdSourceInclination->display(QString::number(value)); } -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); - } -} - -void PulsatingScience::on_actionPermanent_orbits_toggled(bool 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); - } -} - -void PulsatingScience::on_actionRotationAxes_toggled(bool checked) { - m_rotationAxesVisible = checked; -} - -void PulsatingScience::pulseFlashesToggled() { - if(m_pulseFlashesVisible) { - on_actionPulseFlashes_toggled(false); - ui.actionPulseFlashes->setChecked(false); - } - else { - on_actionPulseFlashes_toggled(true); - ui.actionPulseFlashes->setChecked(true); - } -} - -void PulsatingScience::on_actionPulseFlashes_toggled(bool checked) { - m_pulseFlashesVisible = checked; -} - void PulsatingScience::menuBarToggled() { if(ui.menuBar->isVisible()) { @@ -294,18 +173,6 @@ void PulsatingScience::on_actionMenu_bar_toggled(bool checked) 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_pulseFlashesShortcut->disconnect(); - m_pulseFlashesShortcut->setEnabled(false); m_fullscreenShortcut->disconnect(); m_fullscreenShortcut->setEnabled(false); m_menuBarShortcut->disconnect(); @@ -316,18 +183,6 @@ void PulsatingScience::on_actionMenu_bar_toggled(bool checked) 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_pulseFlashesShortcut->setEnabled(true); - connect(m_pulseFlashesShortcut, SIGNAL(activated()), this, SLOT(pulseFlashesToggled())); m_fullscreenShortcut->setEnabled(true); connect(m_fullscreenShortcut, SIGNAL(activated()), this, SLOT(fullscreenToggled())); m_menuBarShortcut->setEnabled(true); @@ -404,17 +259,6 @@ void PulsatingScience::on_dockAnimControl_topLevelChanged(bool topLevel) { m_animControlFloating = topLevel; } -void PulsatingScience::on_actionHelp_triggered() -{ - PulsatingScienceHelp help(this); - help.exec(); -} - -void PulsatingScience::on_actionWebsite_triggered() -{ - QDesktopServices::openUrl(QUrl("http://www.aei.mpg.de")); -} - void PulsatingScience::on_actionAbout_triggered() { QString content = "<b>%1</b><br>" diff --git a/src/pulsatingscience.h b/src/pulsatingscience.h index 1ba36964783fb18aa9fb7dd8b84322e00eb85dc7..91d1aa2e5f09ef035244bc6d49b2f5977eb12198 100644 --- a/src/pulsatingscience.h +++ b/src/pulsatingscience.h @@ -27,8 +27,6 @@ #include <QDesktopServices> #include <QUrl> -#include "pulsatingsciencehelp.h" - #include "ui_pulsatingscience.h" @@ -49,12 +47,6 @@ public slots: void on_sliderPulsarSpinAxisInclination_valueChanged(int value); void on_sliderSourceInclination_valueChanged(int value); - void permanentOrbitsToggled(); - void on_actionPermanent_orbits_toggled(bool checked); - void rotationAxesToggled(); - void on_actionRotationAxes_toggled(bool checked); - void pulseFlashesToggled(); - void on_actionPulseFlashes_toggled(bool checked); void fullscreenToggled(); void on_actionFullscreen_toggled(bool checked); void menuBarToggled(); @@ -63,8 +55,6 @@ public slots: 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 toggleHiddenDemoMode(); @@ -80,20 +70,11 @@ private: Ui::PulsatingScienceClass ui; - QShortcut *m_runShortcut; - QShortcut *m_pauseShortcut; - QShortcut *m_stopShortcut; - QShortcut *m_permanentOrbitsShortcut; - QShortcut *m_rotationAxesShortcut; - QShortcut *m_pulseFlashesShortcut; QShortcut *m_menuBarShortcut; QShortcut *m_fullscreenShortcut; QShortcut *m_fullscreenESCShortcut; QShortcut *m_hiddenShortcut; - bool m_permanentOrbits; - bool m_rotationAxesVisible; - bool m_pulseFlashesVisible; bool m_menuBarVisible; bool m_statusBarVisible; bool m_animControlVisible; diff --git a/src/pulsatingsciencehelp.cpp b/src/pulsatingsciencehelp.cpp deleted file mode 100644 index 1d4ddb3508bfb9a5da03617484677894c3a72481..0000000000000000000000000000000000000000 --- a/src/pulsatingsciencehelp.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2009 by Oliver Bock * - * oliver.bock[AT]aei.mpg.de * - * * - * This file is part of PulsatingScience. * - * * - * PulsatingScience is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published * - * by the Free Software Foundation, version 3 of the License. * - * * - * PulsatingScience is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with PulsatingScience. If not, see <http://www.gnu.org/licenses/>. * - * * - ******************************************************************************/ - -#include "pulsatingsciencehelp.h" - -PulsatingScienceHelp::PulsatingScienceHelp(QWidget *parent) : QDialog(parent), Ui::PulsatingScienceHelp() -{ - setupUi(this); - - 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 deleted file mode 100644 index eab619980f2333b2b11c3c0a4c21c32a7a060666..0000000000000000000000000000000000000000 --- a/src/pulsatingsciencehelp.h +++ /dev/null @@ -1,40 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2009 by Oliver Bock * - * oliver.bock[AT]aei.mpg.de * - * * - * This file is part of PulsatingScience. * - * * - * PulsatingScience is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published * - * by the Free Software Foundation, version 3 of the License. * - * * - * PulsatingScience is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with PulsatingScience. If not, see <http://www.gnu.org/licenses/>. * - * * - ******************************************************************************/ - -#ifndef PULSATINGSCIENCEHELP_H -#define PULSATINGSCIENCEHELP_H - -#include <QtGui/QDialog> -#include <QtCore/QLocale> -#include <QDebug> - -#include "ui_pulsatingsciencehelp.h" - - -class PulsatingScienceHelp : public QDialog, private Ui::PulsatingScienceHelp -{ - Q_OBJECT - -public: - PulsatingScienceHelp(QWidget *parent = 0); - virtual ~PulsatingScienceHelp(); -}; - -#endif /* PULSATINGSCIENCEHELP_H */ diff --git a/src/pulsatingsciencehelp.qrc b/src/pulsatingsciencehelp.qrc deleted file mode 100644 index 04c97052c6ac423e715eaebecaaaa0f17e27b79e..0000000000000000000000000000000000000000 --- a/src/pulsatingsciencehelp.qrc +++ /dev/null @@ -1,9 +0,0 @@ -<RCC> - <qresource prefix="content" > - <file>resources/help_en.html</file> - <file>resources/help_de.html</file> - </qresource> - <qresource prefix="icons" > - <file>resources/aei-icon48.png</file> - </qresource> -</RCC> diff --git a/src/pulsatingsciencehelp.ui b/src/pulsatingsciencehelp.ui deleted file mode 100644 index 73434ba3d43006246666190d1ebce4ccedfc18c4..0000000000000000000000000000000000000000 --- a/src/pulsatingsciencehelp.ui +++ /dev/null @@ -1,88 +0,0 @@ -<ui version="4.0" > - <class>PulsatingScienceHelp</class> - <widget class="QDialog" name="PulsatingScienceHelp" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>590</width> - <height>441</height> - </rect> - </property> - <property name="windowTitle" > - <string>Pulsating Science - Help</string> - </property> - <property name="windowIcon" > - <iconset resource="pulsatingsciencehelp.qrc" > - <normaloff>:/icons/resources/aei-icon48.png</normaloff>:/icons/resources/aei-icon48.png</iconset> - </property> - <layout class="QGridLayout" name="gridLayout" > - <item row="1" column="0" > - <widget class="QDialogButtonBox" name="buttonBox" > - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons" > - <set>QDialogButtonBox::Ok</set> - </property> - <property name="centerButtons" > - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QWebView" name="webView" > - <property name="url" > - <url> - <string>qrc:/content/resources/help_en.html</string> - </url> - </property> - </widget> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>QWebView</class> - <extends>QWidget</extends> - <header>QtWebKit/QWebView</header> - </customwidget> - </customwidgets> - <resources> - <include location="pulsatingsciencehelp.qrc" /> - </resources> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>PulsatingScienceHelp</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel" > - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel" > - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>PulsatingScienceHelp</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel" > - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel" > - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui>