Skip to content

Commit

Permalink
BUG: Fix issues in VR home widget and the data widget
Browse files Browse the repository at this point in the history
  • Loading branch information
cpinter committed Oct 28, 2019
1 parent c280ca7 commit 0187b78
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>530</width>
<height>263</height>
<width>413</width>
<height>256</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -18,16 +18,16 @@
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
<number>0</number>
</property>
<property name="topMargin">
<number>4</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>4</number>
<number>0</number>
</property>
<property name="bottomMargin">
<number>4</number>
<number>0</number>
</property>
<item>
<widget class="qMRMLSubjectHierarchyTreeView" name="SubjectHierarchyTreeView"/>
Expand Down Expand Up @@ -56,12 +56,12 @@
<slot>setMRMLScene(vtkMRMLScene*)</slot>
<hints>
<hint type="sourcelabel">
<x>119</x>
<y>1</y>
<x>300</x>
<y>2</y>
</hint>
<hint type="destinationlabel">
<x>152</x>
<y>37</y>
<x>301</x>
<y>26</y>
</hint>
</hints>
</connection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>532</width>
<height>262</height>
<height>263</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -48,26 +48,26 @@
</widget>
</item>
<item row="1" column="1">
<widget class="ctkSliderWidget" name="FlySpeedSliderWidget" native="true">
<property name="decimals" stdset="0">
<widget class="ctkSliderWidget" name="FlySpeedSliderWidget">
<property name="decimals">
<number>1</number>
</property>
<property name="singleStep" stdset="0">
<property name="singleStep">
<double>0.500000000000000</double>
</property>
<property name="pageStep" stdset="0">
<property name="pageStep">
<double>2.000000000000000</double>
</property>
<property name="minimum" stdset="0">
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum" stdset="0">
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="value" stdset="0">
<property name="value">
<double>1.660000000000000</double>
</property>
<property name="suffix" stdset="0">
<property name="suffix">
<string>m/s</string>
</property>
</widget>
Expand Down Expand Up @@ -145,35 +145,24 @@
</widget>
</item>
<item row="3" column="1">
<widget class="ctkSliderWidget" name="MotionSensitivitySliderWidget" native="true">
<property name="decimals" stdset="0">
<widget class="ctkSliderWidget" name="MotionSensitivitySliderWidget">
<property name="decimals">
<number>0</number>
</property>
<property name="maximum" stdset="0">
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="value" stdset="0">
<property name="value">
<double>50.000000000000000</double>
</property>
<property name="suffix" stdset="0">
<property name="suffix">
<string>%</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="ModuleWidgetFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QFormLayout" name="formLayout_3"/>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ModulesGroupBox">
<property name="title">
Expand All @@ -186,6 +175,19 @@
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="ModuleWidgetFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
Expand Down
28 changes: 3 additions & 25 deletions VirtualReality/Widgets/qMRMLVirtualRealityDataModuleWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ class qMRMLVirtualRealityDataModuleWidgetPrivate : public Ui_qMRMLVirtualReality
virtual ~qMRMLVirtualRealityDataModuleWidgetPrivate();

void init();

public:
/// Virtual reality view MRML node
vtkWeakPointer<vtkMRMLVirtualRealityViewNode> VirtualRealityViewNode;
};

//-----------------------------------------------------------------------------
Expand All @@ -64,6 +60,9 @@ void qMRMLVirtualRealityDataModuleWidgetPrivate::init()
{
Q_Q(qMRMLVirtualRealityDataModuleWidget);
this->setupUi(q);

// Customize widget contents
this->SubjectHierarchyTreeView->setColumnHidden(this->SubjectHierarchyTreeView->model()->idColumn(), true);
}

//-----------------------------------------------------------------------------
Expand All @@ -84,29 +83,8 @@ qMRMLVirtualRealityDataModuleWidget::qMRMLVirtualRealityDataModuleWidget(QWidget
qMRMLVirtualRealityDataModuleWidget::~qMRMLVirtualRealityDataModuleWidget()
= default;

//-----------------------------------------------------------------------------
vtkMRMLVirtualRealityViewNode* qMRMLVirtualRealityDataModuleWidget::virtualRealityViewNode() const
{
Q_D(const qMRMLVirtualRealityDataModuleWidget);
return d->VirtualRealityViewNode;
}

//-----------------------------------------------------------------------------
QString qMRMLVirtualRealityDataModuleWidget::virtualRealityViewNodeID()const
{
Q_D(const qMRMLVirtualRealityDataModuleWidget);
return (d->VirtualRealityViewNode.GetPointer() ? d->VirtualRealityViewNode->GetID() : QString());
}

//-----------------------------------------------------------------------------
void qMRMLVirtualRealityDataModuleWidget::updateWidgetFromMRML()
{
//Q_D(qMRMLVirtualRealityDataModuleWidget);
}

//-----------------------------------------------------------------------------
qMRMLSubjectHierarchyTreeView* qMRMLVirtualRealityDataModuleWidget::treeView()
{
Q_D(qMRMLVirtualRealityDataModuleWidget);
return d->SubjectHierarchyTreeView;
}
8 changes: 0 additions & 8 deletions VirtualReality/Widgets/qMRMLVirtualRealityDataModuleWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "qMRMLSubjectHierarchyTreeView.h"
#include "qMRMLSubjectHierarchyModel.h"

class vtkMRMLVirtualRealityViewNode;
class qMRMLVirtualRealityDataModuleWidgetPrivate;

/// \ingroup SlicerVirtualReality_Widgets
Expand All @@ -51,13 +50,6 @@ class Q_SLICER_QTMODULES_VIRTUALREALITY_WIDGETS_EXPORT qMRMLVirtualRealityDataMo
explicit qMRMLVirtualRealityDataModuleWidget(QWidget* parent = nullptr);
/// Destructor
~qMRMLVirtualRealityDataModuleWidget() override;

/// Get virtual reality view MRML node
Q_INVOKABLE vtkMRMLVirtualRealityViewNode* virtualRealityViewNode()const;
Q_INVOKABLE QString virtualRealityViewNodeID()const;

/// Get subject hierarchy tree view
Q_INVOKABLE qMRMLSubjectHierarchyTreeView* treeView();

public slots:

Expand Down
Loading

0 comments on commit 0187b78

Please sign in to comment.