diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/files.cmake b/Plugins/org.mitk.gui.qt.moviemaker2/files.cmake index 12ac313e3a..231bea96db 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/files.cmake +++ b/Plugins/org.mitk.gui.qt.moviemaker2/files.cmake @@ -1,36 +1,40 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES org_mitk_gui_qt_moviemaker2_Activator.cpp + QmitkAnimationItem.cpp QmitkMovieMaker2View.cpp + QmitkSliceAnimationWidget.cpp ) set(UI_FILES - src/internal/QmitkMovieMaker2ViewControls.ui + src/internal/QmitkMovieMaker2View.ui + src/internal/QmitkSliceAnimationWidget.ui ) set(MOC_H_FILES src/internal/org_mitk_gui_qt_moviemaker2_Activator.h src/internal/QmitkMovieMaker2View.h + src/internal/QmitkSliceAnimationWidget.h ) set(CACHED_RESOURCE_FILES resources/camera-video.png plugin.xml ) set(QRC_FILES resources/org_mitk_gui_qt_moviemaker2.qrc ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach() foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach() diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.cpp b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.cpp new file mode 100644 index 0000000000..94655f46ae --- /dev/null +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.cpp @@ -0,0 +1,60 @@ +/*=================================================================== + +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 "QmitkAnimationItem.h" + +QmitkAnimationItem::QmitkAnimationItem(double duration, double delay, bool startWithPrevious) +{ + this->SetDuration(duration); + this->SetDelay(delay); + this->SetStartWithPrevious(startWithPrevious); + + this->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); +} + +QmitkAnimationItem::~QmitkAnimationItem() +{ +} + +double QmitkAnimationItem::GetDuration() const +{ + return this->data(DurationRole).toDouble(); +} + +void QmitkAnimationItem::SetDuration(double duration) +{ + this->setData(duration, DurationRole); +} + +double QmitkAnimationItem::GetDelay() const +{ + return this->data(DelayRole).toDouble(); +} + +void QmitkAnimationItem::SetDelay(double delay) +{ + this->setData(delay, DelayRole); +} + +bool QmitkAnimationItem::GetStartWithPrevious() const +{ + return this->data(StartWithPreviousRole).toBool(); +} + +void QmitkAnimationItem::SetStartWithPrevious(bool startWithPrevious) +{ + this->setData(startWithPrevious, StartWithPreviousRole); +} diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.h b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.h new file mode 100644 index 0000000000..0d3b2b0769 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkAnimationItem.h @@ -0,0 +1,45 @@ +/*=================================================================== + +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 QmitkAnimationItem_h +#define QmitkAnimationItem_h + +#include + +class QmitkAnimationItem : public QStandardItem +{ +public: + enum AnimationItemDataRole + { + DurationRole = Qt::UserRole + 2, + DelayRole, + StartWithPreviousRole + }; + + explicit QmitkAnimationItem(double duration, double delay = 0.0, bool startWithPrevious = false); + ~QmitkAnimationItem(); + + double GetDuration() const; + void SetDuration(double duration); + + double GetDelay() const; + void SetDelay(double delay); + + bool GetStartWithPrevious() const; + void SetStartWithPrevious(bool startWithPrevious); +}; + +#endif diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp index 96646b6eb4..1300f7b806 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp @@ -1,36 +1,302 @@ /*=================================================================== 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 "QmitkAnimationItem.h" #include "QmitkMovieMaker2View.h" +#include "QmitkSliceAnimationWidget.h" +#include +#include +#include const std::string QmitkMovieMaker2View::VIEW_ID = "org.mitk.views.moviemaker2"; QmitkMovieMaker2View::QmitkMovieMaker2View() + : m_Ui(new Ui::QmitkMovieMaker2View), + m_AnimationModel(NULL), + m_AddAnimationMenu(NULL) { } QmitkMovieMaker2View::~QmitkMovieMaker2View() { } void QmitkMovieMaker2View::CreateQtPartControl(QWidget* parent) { - m_Controls.setupUi(parent); + m_Ui->setupUi(parent); + + this->InitializeAnimationWidgets(); + this->InitializeAnimationTreeViewWidgets(); + + m_Ui->animationWidgetGroupBox->setVisible(false); +} + +void QmitkMovieMaker2View::InitializeAnimationWidgets() +{ + m_AnimationWidgets["Orbit"] = NULL; + m_AnimationWidgets["Slice"] = new QmitkSliceAnimationWidget; + + Q_FOREACH(QWidget* widget, m_AnimationWidgets.values()) + { + if (widget != NULL) + { + widget->setVisible(false); + m_Ui->animationWidgetGroupBoxLayout->addWidget(widget); + } + } + + this->ConnectAnimationWidgets(); +} + +void QmitkMovieMaker2View::InitializeAnimationTreeViewWidgets() +{ + this->InitializeAnimationModel(); + this->InitializeAddAnimationMenu(); + this->ConnectAnimationTreeViewWidgets(); +} + +void QmitkMovieMaker2View::InitializeAnimationModel() +{ + m_AnimationModel = new QStandardItemModel(m_Ui->animationTreeView); + m_AnimationModel->setHorizontalHeaderLabels(QStringList() << "Animation" << "Timeline"); + m_Ui->animationTreeView->setModel(m_AnimationModel); + + // TODO: Either make first column not editable or derive according animation widget from second column +} + +void QmitkMovieMaker2View::InitializeAddAnimationMenu() +{ + m_AddAnimationMenu = new QMenu(m_Ui->addAnimationButton); + + Q_FOREACH(const QString& key, m_AnimationWidgets.keys()) + { + m_AddAnimationMenu->addAction(key); + } +} + +void QmitkMovieMaker2View::ConnectAnimationTreeViewWidgets() +{ + this->connect(m_AnimationModel, SIGNAL(rowsInserted(const QModelIndex&, int, int)), + this, SLOT(OnAnimationTreeViewRowsInserted(const QModelIndex&, int, int))); + + this->connect(m_AnimationModel, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), + this, SLOT(OnAnimationTreeViewRowsRemoved(const QModelIndex&, int, int))); + + this->connect(m_Ui->animationTreeView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), + this, SLOT(OnAnimationTreeViewSelectionChanged(const QItemSelection&, const QItemSelection&))); + + this->connect(m_Ui->moveAnimationUpButton, SIGNAL(clicked()), + this, SLOT(OnMoveAnimationUpButtonClicked())); + + this->connect(m_Ui->moveAnimationDownButton, SIGNAL(clicked()), + this, SLOT(OnMoveAnimationDownButtonClicked())); + + this->connect(m_Ui->addAnimationButton, SIGNAL(clicked()), + this, SLOT(OnAddAnimationButtonClicked())); + + this->connect(m_Ui->removeAnimationButton, SIGNAL(clicked()), + this, SLOT(OnRemoveAnimationButtonClicked())); +} + +void QmitkMovieMaker2View::ConnectAnimationWidgets() +{ + this->connect(m_Ui->startComboBox, SIGNAL(currentIndexChanged(int)), + this, SLOT(OnStartComboBoxCurrentIndexChanged(int))); + + this->connect(m_Ui->durationSpinBox, SIGNAL(valueChanged(double)), + this, SLOT(OnDurationSpinBoxValueChanged(double))); + + this->connect(m_Ui->delaySpinBox, SIGNAL(valueChanged(double)), + this, SLOT(OnDelaySpinBoxValueChanged(double))); } void QmitkMovieMaker2View::SetFocus() { + m_Ui->addAnimationButton->setFocus(); +} + +void QmitkMovieMaker2View::OnMoveAnimationUpButtonClicked() +{ + const QItemSelection selection = m_Ui->animationTreeView->selectionModel()->selection(); + + if (!selection.isEmpty()) + { + const int selectedRow = selection[0].top(); + + if (selectedRow > 0) + m_AnimationModel->insertRow(selectedRow - 1, m_AnimationModel->takeRow(selectedRow)); + } +} + +void QmitkMovieMaker2View::OnMoveAnimationDownButtonClicked() +{ + const QItemSelection selection = m_Ui->animationTreeView->selectionModel()->selection(); + + if (!selection.isEmpty()) + { + const int rowCount = m_AnimationModel->rowCount(); + const int selectedRow = selection[0].top(); + + if (selectedRow < rowCount - 1) + m_AnimationModel->insertRow(selectedRow + 1, m_AnimationModel->takeRow(selectedRow)); + } +} + +void QmitkMovieMaker2View::OnAddAnimationButtonClicked() +{ + QAction* action = m_AddAnimationMenu->exec(QCursor::pos()); + + if (action != NULL) + m_AnimationModel->appendRow(QList() << new QStandardItem(action->text()) << new QmitkAnimationItem(2.0)); +} + +void QmitkMovieMaker2View::OnRemoveAnimationButtonClicked() +{ + const QItemSelection selection = m_Ui->animationTreeView->selectionModel()->selection(); + + if (!selection.isEmpty()) + m_AnimationModel->removeRow(selection[0].top()); +} + +void QmitkMovieMaker2View::OnAnimationTreeViewRowsInserted(const QModelIndex& parent, int start, int) +{ + m_Ui->animationTreeView->selectionModel()->select( + m_AnimationModel->index(start, 0, parent), + QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows); +} + +void QmitkMovieMaker2View::OnAnimationTreeViewRowsRemoved(const QModelIndex&, int, int) +{ + this->UpdateWidgets(); +} + +void QmitkMovieMaker2View::OnAnimationTreeViewSelectionChanged(const QItemSelection&, const QItemSelection&) +{ + this->UpdateWidgets(); +} + +void QmitkMovieMaker2View::OnStartComboBoxCurrentIndexChanged(int index) +{ + QmitkAnimationItem* item = this->GetSelectedAnimationItem(); + + if (item != NULL) + item->SetStartWithPrevious(index); +} + +void QmitkMovieMaker2View::OnDurationSpinBoxValueChanged(double value) +{ + QmitkAnimationItem* item = this->GetSelectedAnimationItem(); + + if (item != NULL) + item->SetDuration(value); +} + +void QmitkMovieMaker2View::OnDelaySpinBoxValueChanged(double value) +{ + QmitkAnimationItem* item = this->GetSelectedAnimationItem(); + + if (item != NULL) + item->SetDelay(value); +} + +void QmitkMovieMaker2View::UpdateWidgets() +{ + const QItemSelection selection = m_Ui->animationTreeView->selectionModel()->selection(); + + if (selection.isEmpty()) + { + m_Ui->moveAnimationUpButton->setEnabled(false); + m_Ui->moveAnimationDownButton->setEnabled(false); + m_Ui->removeAnimationButton->setEnabled(false); + + this->HideCurrentAnimationWidget(); + } + else + { + const int rowCount = m_AnimationModel->rowCount(); + const int selectedRow = selection[0].top(); + + m_Ui->moveAnimationUpButton->setEnabled(rowCount > 1 && selectedRow != 0); + m_Ui->moveAnimationDownButton->setEnabled(rowCount > 1 && selectedRow < rowCount - 1); + m_Ui->removeAnimationButton->setEnabled(true); + + this->ShowAnimationWidget(m_AnimationModel->item(selectedRow)->text()); + } + + this->UpdateAnimationWidgets(); +} + +void QmitkMovieMaker2View::UpdateAnimationWidgets() +{ + QmitkAnimationItem* item = this->GetSelectedAnimationItem(); + + if (item != NULL) + { + m_Ui->startComboBox->setCurrentIndex(item->GetStartWithPrevious()); + m_Ui->durationSpinBox->setValue(item->GetDuration()); + m_Ui->delaySpinBox->setValue(item->GetDelay()); + + m_Ui->animationGroupBox->setEnabled(true); + } + else + { + m_Ui->animationGroupBox->setEnabled(false); + } +} + +void QmitkMovieMaker2View::HideCurrentAnimationWidget() +{ + if (m_Ui->animationWidgetGroupBox->isVisible()) + { + m_Ui->animationWidgetGroupBox->setVisible(false); + + if (m_Ui->animationWidgetGroupBoxLayout->count() > 0) + m_Ui->animationWidgetGroupBoxLayout->itemAt(0)->widget()->setVisible(false); + } +} + +void QmitkMovieMaker2View::ShowAnimationWidget(const QString& key) +{ + if (m_Ui->animationWidgetGroupBox->isVisible()) + { + if (m_Ui->animationWidgetGroupBoxLayout->count() > 0) + m_Ui->animationWidgetGroupBoxLayout->itemAt(0)->widget()->setVisible(false); + } + + QWidget* widget = NULL; + + if (m_AnimationWidgets.contains(key)) + { + widget = m_AnimationWidgets[key]; + + if (widget != NULL) + { + m_Ui->animationWidgetGroupBox->setTitle(key); + widget->setVisible(true); + } + } + + m_Ui->animationWidgetGroupBox->setVisible(widget != NULL); +} + +QmitkAnimationItem* QmitkMovieMaker2View::GetSelectedAnimationItem() const +{ + const QItemSelection selection = m_Ui->animationTreeView->selectionModel()->selection(); + + return !selection.isEmpty() + ? dynamic_cast(m_AnimationModel->item(selection[0].top(), 1)) + : NULL; } 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 1bc17b85e7..c5ef10e196 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.h @@ -1,40 +1,75 @@ /*=================================================================== 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 -#include + +class QmitkAnimationItem; +class QMenu; +class QStandardItemModel; + +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); + private: - Ui::QmitkMovieMaker2ViewControls m_Controls; + void InitializeAnimationWidgets(); + void InitializeAnimationTreeViewWidgets(); + void InitializeAnimationModel(); + void InitializeAddAnimationMenu(); + void ConnectAnimationTreeViewWidgets(); + void ConnectAnimationWidgets(); + void UpdateWidgets(); + void UpdateAnimationWidgets(); + void HideCurrentAnimationWidget(); + void ShowAnimationWidget(const QString& key); + QmitkAnimationItem* GetSelectedAnimationItem() const; + + Ui::QmitkMovieMaker2View* m_Ui; + QStandardItemModel* m_AnimationModel; + QMap m_AnimationWidgets; + QMenu* m_AddAnimationMenu; }; #endif diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2ViewControls.ui b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.ui similarity index 92% rename from Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2ViewControls.ui rename to Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.ui index 6f72fd1e2b..07f61421aa 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2ViewControls.ui +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.ui @@ -1,470 +1,495 @@ - QmitkMovieMaker2ViewControls - + QmitkMovieMaker2View + true 0 0 320 - 480 + 640 Movie Maker 2 - + - - - Animations - - - - - - - - - - 0 - 0 - - - - - 0 - 100 - - - - - 16777215 - 100 - - - - + + + false + Move animation up :/org_mitk_icons/icons/tango/scalable/actions/go-up.svg:/org_mitk_icons/icons/tango/scalable/actions/go-up.svg 24 24 true + + false + Move animation down :/org_mitk_icons/icons/tango/scalable/actions/go-down.svg:/org_mitk_icons/icons/tango/scalable/actions/go-down.svg 24 24 true Add animation :/org_mitk_icons/icons/tango/scalable/actions/list-add.svg:/org_mitk_icons/icons/tango/scalable/actions/list-add.svg 24 24 true + + false + Remove animation :/org_mitk_icons/icons/tango/scalable/actions/list-remove.svg:/org_mitk_icons/icons/tango/scalable/actions/list-remove.svg 24 24 true + + + + + 0 + 0 + + + + + 0 + 100 + + + + + 16777215 + 100 + + + + false + + + true + + + 80 + + + + + false + Animation - + 0 0 24 24 24 24 :/org_mitk_icons/icons/tango/scalable/actions/media-playback-start.svg true 0 0 Start: startComboBox 0 0 - With previous + After previous - After previous + With previous 0 0 24 24 24 24 :/org_gui_qt_moviemaker2/duration.svg true 0 0 Duration: durationSpinBox 0 0 s 2.000000000000000 0 0 24 24 24 24 :/org_gui_qt_moviemaker2/delay.svg true 0 0 Delay: delaySpinBox 0 0 s + + + + + + + false + Playback && Recording Play :/org_mitk_icons/icons/tango/scalable/actions/media-playback-start.svg:/org_mitk_icons/icons/tango/scalable/actions/media-playback-start.svg 24 24 true true + + false + Stop :/org_mitk_icons/icons/tango/scalable/actions/media-playback-stop.svg:/org_mitk_icons/icons/tango/scalable/actions/media-playback-stop.svg 24 24 true Qt::Horizontal 40 20 Record :/org_mitk_icons/icons/tango/scalable/actions/media-record.svg:/org_mitk_icons/icons/tango/scalable/actions/media-record.svg 24 24 true Frames per second FPS 1 120 30 Qt::Vertical 20 227 - animationListView + animationTreeView moveAnimationUpButton moveAnimationDownButton addAnimationButton removeAnimationButton startComboBox durationSpinBox delaySpinBox playButton stopButton recordButton fpsSpinBox diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.cpp similarity index 59% copy from Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp copy to Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.cpp index 96646b6eb4..664713ffbe 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.cpp @@ -1,36 +1,29 @@ /*=================================================================== 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 "QmitkMovieMaker2View.h" +#include "QmitkSliceAnimationWidget.h" +#include -const std::string QmitkMovieMaker2View::VIEW_ID = "org.mitk.views.moviemaker2"; - -QmitkMovieMaker2View::QmitkMovieMaker2View() -{ -} - -QmitkMovieMaker2View::~QmitkMovieMaker2View() -{ -} - -void QmitkMovieMaker2View::CreateQtPartControl(QWidget* parent) +QmitkSliceAnimationWidget::QmitkSliceAnimationWidget(QWidget* parent) + : QWidget(parent), + m_Ui(new Ui::QmitkSliceAnimationWidget) { - m_Controls.setupUi(parent); + m_Ui->setupUi(this); } -void QmitkMovieMaker2View::SetFocus() +QmitkSliceAnimationWidget::~QmitkSliceAnimationWidget() { } diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.h similarity index 58% copy from Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp copy to Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.h index 96646b6eb4..d67fa41373 100644 --- a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkMovieMaker2View.cpp +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.h @@ -1,36 +1,39 @@ /*=================================================================== 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 "QmitkMovieMaker2View.h" +#ifndef QmitkSliceAnimationWidget_h +#define QmitkSliceAnimationWidget_h -const std::string QmitkMovieMaker2View::VIEW_ID = "org.mitk.views.moviemaker2"; +#include -QmitkMovieMaker2View::QmitkMovieMaker2View() +namespace Ui { + class QmitkSliceAnimationWidget; } -QmitkMovieMaker2View::~QmitkMovieMaker2View() +class QmitkSliceAnimationWidget : public QWidget { -} + Q_OBJECT -void QmitkMovieMaker2View::CreateQtPartControl(QWidget* parent) -{ - m_Controls.setupUi(parent); -} +public: + explicit QmitkSliceAnimationWidget(QWidget* parent = NULL); + ~QmitkSliceAnimationWidget(); -void QmitkMovieMaker2View::SetFocus() -{ -} +private: + Ui::QmitkSliceAnimationWidget* m_Ui; +}; + +#endif diff --git a/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.ui b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.ui new file mode 100644 index 0000000000..bd349299ef --- /dev/null +++ b/Plugins/org.mitk.gui.qt.moviemaker2/src/internal/QmitkSliceAnimationWidget.ui @@ -0,0 +1,97 @@ + + + QmitkSliceAnimationWidget + + + + 0 + 0 + 304 + 96 + + + + Form + + + + + + + 0 + 0 + + + + Window: + + + comboBox + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Slice range: + + + + + + + 0 + + + 999.000000000000000 + + + 999.000000000000000 + + + + + + + + 0 + 0 + + + + Reverse + + + + + + + + ctkRangeWidget + QWidget +
ctkRangeWidget.h
+
+
+ + comboBox + reverseCheckBox + + + +