diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h index 50a94a2f9d..b733af9bb3 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h @@ -1,98 +1,98 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkMovieMaker2View_h #define QmitkMovieMaker2View_h #include class QmitkAnimationItem; class QmitkAnimationWidget; class QmitkFFmpegWriter; class QMenu; class QStandardItemModel; class QTimer; namespace Ui { class QmitkMovieMaker2View; } class QmitkMovieMaker2View : public QmitkAbstractView { Q_OBJECT public: static const std::string VIEW_ID; QmitkMovieMaker2View(); ~QmitkMovieMaker2View(); void CreateQtPartControl(QWidget* parent); void SetFocus(); private slots: void OnMoveAnimationUpButtonClicked(); void OnMoveAnimationDownButtonClicked(); void OnAddAnimationButtonClicked(); void OnRemoveAnimationButtonClicked(); void OnAnimationTreeViewRowsInserted(const QModelIndex& parent, int start, int end); void OnAnimationTreeViewRowsRemoved(const QModelIndex& parent, int start, int end); void OnAnimationTreeViewSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); void OnStartComboBoxCurrentIndexChanged(int index); void OnDurationSpinBoxValueChanged(double value); void OnDelaySpinBoxValueChanged(double value); void OnPlayButtonToggled(bool checked); void OnStopButtonClicked(); void OnRecordButtonClicked(); void OnFPSSpinBoxValueChanged(int value); void OnTimerTimeout(); private: void InitializeAnimationWidgets(); void InitializeAnimationTreeViewWidgets(); void InitializeAnimationModel(); void InitializeAddAnimationMenu(); void InitializePlaybackAndRecordWidgets(); void InitializeRecordMenu(); void InitializeTimer(QWidget* parent); void ConnectAnimationTreeViewWidgets(); void ConnectAnimationWidgets(); void ConnectPlaybackAndRecordWidgets(); void ConnectTimer(); void RenderCurrentFrame(); void UpdateWidgets(); void UpdateAnimationWidgets(); void HideCurrentAnimationWidget(); void ShowAnimationWidget(QmitkAnimationItem* animationItem); void RedrawTimeline(); void CalculateTotalDuration(); QmitkAnimationItem* GetSelectedAnimationItem() const; - QVector > QmitkMovieMaker2View::GetActiveAnimations(double t) const; + QVector > GetActiveAnimations(double t) const; QmitkFFmpegWriter* m_FFmpegWriter; Ui::QmitkMovieMaker2View* m_Ui; QStandardItemModel* m_AnimationModel; QMap m_AnimationWidgets; QMenu* m_AddAnimationMenu; QMenu* m_RecordMenu; QTimer* m_Timer; double m_TotalDuration; int m_NumFrames; int m_CurrentFrame; }; #endif diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkOrbitAnimationWidget.cpp b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkOrbitAnimationWidget.cpp index a13aa66424..0daae05426 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkOrbitAnimationWidget.cpp +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkOrbitAnimationWidget.cpp @@ -1,88 +1,89 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkOrbitAnimationItem.h" #include "QmitkOrbitAnimationWidget.h" +#include #include QmitkOrbitAnimationWidget::QmitkOrbitAnimationWidget(QWidget* parent) : QmitkAnimationWidget(parent), m_Ui(new Ui::QmitkOrbitAnimationWidget) { m_Ui->setupUi(this); m_Ui->orbitLineEdit->setValidator(new QIntValidator(0, std::numeric_limits::max(), this)); this->connect(m_Ui->startAngleSlider, SIGNAL(valueChanged(int)), m_Ui->startAngleSpinBox, SLOT(setValue(int))); this->connect(m_Ui->startAngleSpinBox, SIGNAL(valueChanged(int)), m_Ui->startAngleSlider, SLOT(setValue(int))); this->connect(m_Ui->startAngleSpinBox, SIGNAL(valueChanged(int)), this, SLOT(OnStartAngleChanged(int))); this->connect(m_Ui->orbitLineEdit, SIGNAL(editingFinished()), this, SLOT(OnOrbitEditingFinished())); this->connect(m_Ui->reverseCheckBox, SIGNAL(clicked(bool)), this, SLOT(OnReverseChanged(bool))); } QmitkOrbitAnimationWidget::~QmitkOrbitAnimationWidget() { } void QmitkOrbitAnimationWidget::SetAnimationItem(QmitkAnimationItem* orbitAnimationItem) { m_AnimationItem = dynamic_cast(orbitAnimationItem); if (m_AnimationItem == NULL) return; m_Ui->startAngleSlider->setValue(m_AnimationItem->GetStartAngle()); m_Ui->orbitLineEdit->setText(QString("%1").arg(m_AnimationItem->GetOrbit())); m_Ui->reverseCheckBox->setChecked(m_AnimationItem->GetReverse()); } void QmitkOrbitAnimationWidget::OnStartAngleChanged(int angle) { if (m_AnimationItem == NULL) return; if (m_AnimationItem->GetStartAngle() != angle) m_AnimationItem->SetStartAngle(angle); } void QmitkOrbitAnimationWidget::OnOrbitEditingFinished() { if (m_AnimationItem == NULL) return; int angle = m_Ui->orbitLineEdit->text().toInt(); if (m_AnimationItem->GetOrbit() != angle) m_AnimationItem->SetOrbit(angle); } void QmitkOrbitAnimationWidget::OnReverseChanged(bool reverse) { if (m_AnimationItem == NULL) return; if (m_AnimationItem->GetReverse() != reverse) m_AnimationItem->SetReverse(reverse); }