Commit 6a555575 authored by finetjul's avatar finetjul
Browse files

ENH: Replace qMRMLSlicesControllerWidget by qMRMLSlicesControllerToolBar

git-svn-id: http://svn.slicer.org/Slicer4/trunk@14430 3bd1e089-480b-0410-8dfb-8563597acbee
parent de09afdb
......@@ -168,12 +168,22 @@
<property name="text">
<string>Manipulate Slice Views</string>
</property>
<property name="contentsFrameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="qMRMLSlicesControllerWidget" name="MRMLSlicesControllerWidget"/>
<widget class="qMRMLSlicesControllerToolBar" name="MRMLSlicesControllerToolBar">
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
......@@ -831,10 +841,9 @@
<container>1</container>
</customwidget>
<customwidget>
<class>qMRMLSlicesControllerWidget</class>
<extends>qMRMLWidget</extends>
<header>qMRMLSlicesControllerWidget.h</header>
<container>1</container>
<class>qMRMLSlicesControllerToolBar</class>
<extends>QToolBar</extends>
<header>qMRMLSlicesControllerToolBar.h</header>
</customwidget>
<customwidget>
<class>qMRMLThreeDViewsControllerWidget</class>
......
......@@ -67,9 +67,8 @@ SET(qMRMLWidgets_SRCS
qMRMLSliceViewWidget.cxx
qMRMLSliceViewWidget.h
qMRMLSliceViewWidget_p.h
qMRMLSlicesControllerWidget.cxx
qMRMLSlicesControllerWidget.h
qMRMLSlicesControllerWidget_p.h
qMRMLSlicesControllerToolBar.cxx
qMRMLSlicesControllerToolBar.h
qMRMLSortFilterProxyModel.cxx
qMRMLSortFilterProxyModel.h
qMRMLThreeDView.cxx
......@@ -116,8 +115,7 @@ SET(qMRMLWidgets_MOC_SRCS
qMRMLSliceInformationWidget_p.h
qMRMLSliceViewWidget.h
qMRMLSliceViewWidget_p.h
qMRMLSlicesControllerWidget.h
qMRMLSlicesControllerWidget_p.h
qMRMLSlicesControllerToolBar.h
qMRMLSortFilterProxyModel.h
qMRMLThreeDView.h
qMRMLThreeDView_p.h
......@@ -138,7 +136,7 @@ SET(qMRMLWidgets_UI_SRCS
Resources/UI/qMRMLSliceControllerWidget.ui
Resources/UI/qMRMLSliceInformationWidget.ui
Resources/UI/qMRMLSliceViewWidget.ui
Resources/UI/qMRMLSlicesControllerWidget.ui
Resources/UI/qMRMLSlicesControllerToolBar.ui
Resources/UI/qMRMLThreeDViewsControllerWidget.ui
Resources/UI/qMRMLTransformSliders.ui
Resources/UI/qMRMLVolumeThresholdWidget.ui
......
......@@ -26,8 +26,8 @@ SET(designer_plugin_SRCS
qMRMLSliceInformationWidgetPlugin.h
qMRMLSliceViewWidgetPlugin.cxx
qMRMLSliceViewWidgetPlugin.h
qMRMLSlicesControllerWidgetPlugin.cxx
qMRMLSlicesControllerWidgetPlugin.h
qMRMLSlicesControllerToolBarPlugin.cxx
qMRMLSlicesControllerToolBarPlugin.h
qMRMLThreeDViewPlugin.cxx
qMRMLThreeDViewPlugin.h
qMRMLThreeDViewsControllerWidgetPlugin.cxx
......@@ -65,7 +65,7 @@ SET(designer_plugin_MOC_SRCS
qMRMLSliceControllerWidgetPlugin.h
qMRMLSliceInformationWidgetPlugin.h
qMRMLSliceViewWidgetPlugin.h
qMRMLSlicesControllerWidgetPlugin.h
qMRMLSlicesControllerToolBarPlugin.h
qMRMLThreeDViewPlugin.h
qMRMLThreeDViewsControllerWidgetPlugin.h
qMRMLTransformSlidersPlugin.h
......
#include "qMRMLSlicesControllerWidgetPlugin.h"
#include "qMRMLSlicesControllerWidget.h"
#include "qMRMLSlicesControllerToolBarPlugin.h"
#include "qMRMLSlicesControllerToolBar.h"
// --------------------------------------------------------------------------
qMRMLSlicesControllerWidgetPlugin::qMRMLSlicesControllerWidgetPlugin(QObject *_parent)
qMRMLSlicesControllerToolBarPlugin::qMRMLSlicesControllerToolBarPlugin(QObject *_parent)
: QObject(_parent)
{
}
// --------------------------------------------------------------------------
QWidget *qMRMLSlicesControllerWidgetPlugin::createWidget(QWidget *_parent)
QWidget *qMRMLSlicesControllerToolBarPlugin::createWidget(QWidget *_parent)
{
qMRMLSlicesControllerWidget* _widget = new qMRMLSlicesControllerWidget(_parent);
qMRMLSlicesControllerToolBar* _widget = new qMRMLSlicesControllerToolBar(_parent);
return _widget;
}
// --------------------------------------------------------------------------
QString qMRMLSlicesControllerWidgetPlugin::domXml() const
QString qMRMLSlicesControllerToolBarPlugin::domXml() const
{
return "<widget class=\"qMRMLSlicesControllerWidget\" \
name=\"MRMLSlicesControllerWidget\">\n"
return "<widget class=\"qMRMLSlicesControllerToolBar\" \
name=\"MRMLSlicesControllerToolBar\">\n"
"</widget>\n";
}
// --------------------------------------------------------------------------
QIcon qMRMLSlicesControllerWidgetPlugin::icon() const
QIcon qMRMLSlicesControllerToolBarPlugin::icon() const
{
return QIcon();
}
// --------------------------------------------------------------------------
QString qMRMLSlicesControllerWidgetPlugin::includeFile() const
QString qMRMLSlicesControllerToolBarPlugin::includeFile() const
{
return "qMRMLSlicesControllerWidget.h";
return "qMRMLSlicesControllerToolBar.h";
}
// --------------------------------------------------------------------------
bool qMRMLSlicesControllerWidgetPlugin::isContainer() const
bool qMRMLSlicesControllerToolBarPlugin::isContainer() const
{
return false;
}
// --------------------------------------------------------------------------
QString qMRMLSlicesControllerWidgetPlugin::name() const
QString qMRMLSlicesControllerToolBarPlugin::name() const
{
return "qMRMLSlicesControllerWidget";
return "qMRMLSlicesControllerToolBar";
}
#ifndef __qMRMLSlicesControllerWidgetPlugin_h
#define __qMRMLSlicesControllerWidgetPlugin_h
#ifndef __qMRMLSlicesControllerToolBarPlugin_h
#define __qMRMLSlicesControllerToolBarPlugin_h
#include "qMRMLWidgetsAbstractPlugin.h"
class QMRML_WIDGETS_PLUGIN_EXPORT qMRMLSlicesControllerWidgetPlugin : public QObject,
class QMRML_WIDGETS_PLUGIN_EXPORT qMRMLSlicesControllerToolBarPlugin : public QObject,
public qMRMLWidgetsAbstractPlugin
{
Q_OBJECT
public:
qMRMLSlicesControllerWidgetPlugin(QObject *_parent = 0);
qMRMLSlicesControllerToolBarPlugin(QObject *_parent = 0);
QWidget *createWidget(QWidget *_parent);
QString domXml() const;
......
......@@ -11,7 +11,7 @@
#include "qMRMLSliceControllerWidgetPlugin.h"
#include "qMRMLSliceInformationWidgetPlugin.h"
#include "qMRMLSliceViewWidgetPlugin.h"
#include "qMRMLSlicesControllerWidgetPlugin.h"
#include "qMRMLSlicesControllerToolBarPlugin.h"
#include "qMRMLThreeDViewPlugin.h"
#include "qMRMLThreeDViewsControllerWidgetPlugin.h"
#include "qMRMLTransformSlidersPlugin.h"
......@@ -45,7 +45,7 @@ public:
<< new qMRMLSceneFactoryWidgetPlugin
<< new qMRMLSliceControllerWidgetPlugin
<< new qMRMLSliceInformationWidgetPlugin
<< new qMRMLSlicesControllerWidgetPlugin
<< new qMRMLSlicesControllerToolBarPlugin
<< new qMRMLSliceViewWidgetPlugin
<< new qMRMLThreeDViewPlugin
<< new qMRMLThreeDViewsControllerWidgetPlugin
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>qMRMLSlicesControllerToolBar</class>
<widget class="QWidget" name="qMRMLSlicesControllerToolBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>26</height>
</rect>
</property>
<property name="windowTitle">
<string>Slices Controller</string>
</property>
<action name="actionFiducial_points">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Fiducial points</string>
</property>
</action>
<action name="actionFiducial_labels">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Fiducial labels</string>
</property>
</action>
<action name="actionForeground_grid">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Foreground grid</string>
</property>
</action>
<action name="actionBackground_grid">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Background grid</string>
</property>
</action>
<action name="actionLabel_grid">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Label grid</string>
</property>
</action>
<action name="actionFit_to_Window">
<property name="icon">
<iconset resource="../qMRMLWidgets.qrc">
<normaloff>:/Icons/SlicesFitToWindow.png</normaloff>:/Icons/SlicesFitToWindow.png</iconset>
</property>
<property name="text">
<string>Fit to Window</string>
</property>
</action>
<action name="actionAnnotationNone">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>None</string>
</property>
</action>
<action name="actionAnnotationShow_all">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show all</string>
</property>
<property name="toolTip">
<string>Show all</string>
</property>
</action>
<action name="actionAnnotationShow_label_values_only">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show label values only</string>
</property>
</action>
<action name="actionAnnotationShow_voxel_and_label_values_only">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show voxel and label values only</string>
</property>
<property name="toolTip">
<string>Show voxel and label values only</string>
</property>
</action>
<action name="actionCompositingAlpha_blend">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Alpha blend</string>
</property>
</action>
<action name="actionCompositingReverse_alpha_blend">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Reverse alpha blend</string>
</property>
</action>
<action name="actionCompositingAdd">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Add</string>
</property>
</action>
<action name="actionCompositingSubstract">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Substract</string>
</property>
</action>
<action name="actionCrosshairNavigator">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Navigator</string>
</property>
</action>
<action name="actionCrosshairNo_crosshair">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>No crosshair</string>
</property>
</action>
<action name="actionCrosshairBasic_crosshair">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Basic crosshair</string>
</property>
</action>
<action name="actionCrosshairBasic_intersection">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Basic + intersection</string>
</property>
</action>
<action name="actionCrosshairBasic_hashmarks">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Basic + hashmarks</string>
</property>
</action>
<action name="actionCrosshairBasic_hashmarks_intersection">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Basic + hashmarks + intersection</string>
</property>
</action>
<action name="actionCrosshairSmall_basic">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Small basic</string>
</property>
</action>
<action name="actionCrosshairSmall_basic_intersection">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Small basic + intersection</string>
</property>
</action>
<action name="actionCrosshairFine">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Fine</string>
</property>
</action>
<action name="actionCrosshairMedium">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Medium</string>
</property>
</action>
<action name="actionCrosshairThick">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Thick</string>
</property>
</action>
<action name="actionCrosshairSlice_intersections">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Slice intersections</string>
</property>
<property name="toolTip">
<string>Slice intersections</string>
</property>
</action>
<action name="actionSpatialUnitsXYZ">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>XYZ</string>
</property>
</action>
<action name="actionSpatialUnitsIJK">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>IJK</string>
</property>
</action>
<action name="actionSpatialUnitsRAS">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>RAS</string>
</property>
</action>
<action name="actionSpatialUnitsIJK_RAS">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>IJK + RAS</string>
</property>
</action>
<action name="actionToggleBgFg">
<property name="icon">
<iconset resource="../qMRMLWidgets.qrc">
<normaloff>:/Icons/SlicesToggleFgBg.png</normaloff>:/Icons/SlicesToggleFgBg.png</iconset>
</property>
<property name="text">
<string>Toggle background with foreground</string>
</property>
</action>
<action name="actionShowBg">
<property name="icon">
<iconset resource="../qMRMLWidgets.qrc">
<normaloff>:/Icons/SlicesFadeToBG.png</normaloff>:/Icons/SlicesFadeToBG.png</iconset>
</property>
<property name="text">
<string>Show background</string>
</property>
</action>
<action name="actionShowFg">
<property name="icon">
<iconset resource="../qMRMLWidgets.qrc">
<normaloff>:/Icons/SlicesFadeToFG.png</normaloff>:/Icons/SlicesFadeToFG.png</iconset>
</property>
<property name="text">
<string>Show foreground</string>
</property>
</action>
</widget>
<resources>
<include location="../qMRMLWidgets.qrc"/>
</resources>
<connections>
<connection>
<sender>actionFiducial_points</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setFiducialPointsVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionFiducial_labels</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setFiducialLabelsVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionForeground_grid</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setForegroundGridVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionBackground_grid</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setBackgroundGridVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionLabel_grid</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setLabelGridVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionFit_to_Window</sender>
<signal>triggered()</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>fitToWindow()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionCrosshairNavigator</sender>
<signal>toggled(bool)</signal>
<receiver>qMRMLSlicesControllerToolBar</receiver>
<slot>setNavigatorVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>193</x>
<y>12</y>
</hint>
</hints>
</connection>