Select Git revision
antenna_lib.cpp
pulsatingscience.cpp 6.45 KiB
/******************************************************************************
* Copyright (C) 2008 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 "pulsatingscience.h"
PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
QAction* animControl = ui.dockAnimControl->toggleViewAction();
animControl->setStatusTip("Toggle the animation control visibility");
animControl->setShortcut(QKeySequence::fromString("Alt+A"));
ui.menuView->addAction(animControl);
connect(ui.actionRun, SIGNAL(activated()),
ui.pulsarGlWidget, SLOT(runAnimation()));
connect(ui.actionPause, SIGNAL(activated()),
ui.pulsarGlWidget, SLOT(pauseAnimation()));
connect(ui.actionStop, SIGNAL(activated()),
ui.pulsarGlWidget, SLOT(stopAnimation()));
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(pulsarAnimationStep(float)),
ui.pulseScopeWidget, SLOT(markerStep(float)));
connect(ui.pulsarGlWidget, SIGNAL(pulsarAnimationReset()),
ui.pulseScopeWidget, SLOT(markerReset()));
connect(ui.pulsarGlWidget, SIGNAL(pulsarViewDataUpdated(const QVector<float>&)),
ui.pulseScopeWidget, SLOT(drawCurve(const QVector<float>&)));
on_sliderPulsarSemiMajorAxis_valueChanged(ui.sliderPulsarSemiMajorAxis->value());
on_radioCompanionNS_toggled(true);
on_sliderPulsarMass_valueChanged(ui.sliderPulsarMass->value());
on_sliderPulsarSpinFrequency_valueChanged(ui.sliderPulsarSpinFrequency->value());
on_sliderPulsarSpinAxisInclination_valueChanged(ui.sliderPulsarSpinAxisInclination->value());
on_sliderPulsarMagneticAxisInclination_valueChanged(ui.sliderPulsarMagneticAxisInclination->value());
}
PulsatingScience::~PulsatingScience()
{
}