v2.0.0
Loading...
Searching...
No Matches
DISPLIB::Control3DView Class Reference

Tree-view control panel for the 3-D scene (visibility, colour, alpha, threshold per item). More...

#include <control3dview.h>

Public Types

typedef QSharedPointer< Control3DView > SPtr
typedef QSharedPointer< const Control3DView > ConstSPtr
Public Types inherited from DISPLIB::AbstractView
enum  StyleMode { Default , Dark }
enum  GuiMode { Clinical , Research }
enum  ProcessingMode { RealTime , Offline }
typedef QSharedPointer< AbstractView > SPtr
typedef QSharedPointer< const AbstractView > ConstSPtr

Signals

void sceneColorChanged (const QColor &color)
void showFullScreen (bool bShowFullScreen)
void rotationChanged (bool bRotationChanged)
void showCoordAxis (bool bShowCoordAxis)
void lightColorChanged (const QColor &color)
void lightIntensityChanged (double value)
void takeScreenshotChanged ()
void toggleSingleView ()
void toggleMutiview ()
Signals inherited from DISPLIB::AbstractView
void guiStyleChanged (DISPLIB::AbstractView::StyleMode style)

Public Member Functions

 Control3DView (const QString &sSettingsPath="", QWidget *parent=0, const QStringList &slFlags=QStringList()<< "Data"<< "View"<< "Light", Qt::WindowType type=Qt::Widget)
 ~Control3DView ()
void setFlags (const QStringList &slFlags)
void setDelegate (QStyledItemDelegate *pItemDelegate)
void setModel (QStandardItemModel *pDataTreeModel)
void onTreeViewHeaderHide ()
void onTreeViewRemoveItem (const QModelIndex &index)
void onTreeViewDescriptionHide ()
void saveSettings ()
void loadSettings ()
Public Member Functions inherited from DISPLIB::AbstractView
 AbstractView (QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
virtual void setGuiMode (GuiMode mode)
virtual void setProcessingMode (ProcessingMode mode)

Protected Member Functions

void updateGuiMode (GuiMode mode)
void updateProcessingMode (ProcessingMode mode)
void onOpacityChange (qint32 value)
void onSceneColorPicker ()
void onCustomContextMenuRequested (QPoint pos)
 customContextMenuRequested
void onAlwaysOnTop (bool state)
void onSceneColorChanged (const QColor &color)
void onShowFullScreen (bool checked)
void onRotationClicked (bool checked)
void onCoordAxisClicked (bool checked)
void onLightColorPicker ()
void onLightColorChanged (const QColor &color)
void onLightIntensityChanged (double value)
void clearView ()

Protected Attributes

Ui::Control3DViewWidget * m_pUi
QColor m_colCurrentSceneColor
QColor m_colCurrentLightColor
Protected Attributes inherited from DISPLIB::AbstractView
bool m_bResearchModeIsActive
bool m_bOfflineModeIsActive
QString m_sSettingsPath

Detailed Description

Tree-view control panel for the 3-D scene (visibility, colour, alpha, threshold per item).

Hosts a QTreeView bound to the Data3DTreeModel and a custom QStyledItemDelegate that paints colour swatches and slider editors inline so edits propagate directly to the renderer.

Definition at line 72 of file control3dview.h.

Inheritance diagram for DISPLIB::Control3DView:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const Control3DView> DISPLIB::Control3DView::ConstSPtr

Const shared pointer type for Control3DView.

Definition at line 78 of file control3dview.h.

◆ SPtr

Shared pointer type for Control3DView.

Definition at line 77 of file control3dview.h.

Constructor & Destructor Documentation

◆ Control3DView()

Control3DView::Control3DView ( const QString & sSettingsPath = "",
QWidget * parent = 0,
const QStringList & slFlags = QStringList() << "Data" << "View" << "Light",
Qt::WindowType type = Qt::Widget )
explicit

Default constructor.

Parameters
[in]sSettingsPathSettings path under which the widget persists its state (empty = no persistence).
[in]parentThe parent of the QObject.
[in]slFlagsThe flags indicating which tools to display. Scaling is displayed as default. Possible flags are: "Data", "View", "Light".
[in]typeQt window type passed to the QWidget constructor.

Definition at line 52 of file control3dview.cpp.

◆ ~Control3DView()

Control3DView::~Control3DView ( )

Destroys the Control3DView.

Definition at line 82 of file control3dview.cpp.

Member Function Documentation

◆ clearView()

void Control3DView::clearView ( )
protectedvirtual

Clears the view

Implements DISPLIB::AbstractView.

Definition at line 372 of file control3dview.cpp.

◆ lightColorChanged

void DISPLIB::Control3DView::lightColorChanged ( const QColor & color)
signal

Use this signal whenever the light color was changed by the user.

Parameters
[in]colorThe newly picked color.

◆ lightIntensityChanged

void DISPLIB::Control3DView::lightIntensityChanged ( double value)
signal

Use this signal whenever the light intensity was changed by the user.

Parameters
[in]valueThe newly picked intensity.

◆ loadSettings()

void Control3DView::loadSettings ( )
virtual

Loads and inits all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 203 of file control3dview.cpp.

◆ onAlwaysOnTop()

void Control3DView::onAlwaysOnTop ( bool state)
protected

Slot called when the user wants to change the always on top window flag.

Parameters
[in]stateThe newly picked on top state.

Definition at line 297 of file control3dview.cpp.

◆ onCoordAxisClicked()

void Control3DView::onCoordAxisClicked ( bool checked)
protected

Slot called when the user wants to toggle the coord axis.

Parameters
[in]checkedTrue to show the coordinate axis.

Definition at line 331 of file control3dview.cpp.

◆ onCustomContextMenuRequested()

void Control3DView::onCustomContextMenuRequested ( QPoint pos)
protected

customContextMenuRequested

Parameters
[in]posThe position, where the right-click occurred.

Definition at line 266 of file control3dview.cpp.

◆ onLightColorChanged()

void Control3DView::onLightColorChanged ( const QColor & color)
protected

Slot called when the user wants change the color of the lights.

Parameters
[in]colorThe newly picked light color.

Definition at line 358 of file control3dview.cpp.

◆ onLightColorPicker()

void Control3DView::onLightColorPicker ( )
protected

Slot called when the user wants change the color of the lights.

Definition at line 338 of file control3dview.cpp.

◆ onLightIntensityChanged()

void Control3DView::onLightIntensityChanged ( double value)
protected

Slot called when the user wants to change the light intensity.

Parameters
[in]valueThe newly picked light intensity value.

Definition at line 365 of file control3dview.cpp.

◆ onOpacityChange()

void Control3DView::onOpacityChange ( qint32 value)
protected

Slot called when opacity slider was changed.

Parameters
[in]valueopacity value.

Definition at line 239 of file control3dview.cpp.

◆ onRotationClicked()

void Control3DView::onRotationClicked ( bool checked)
protected

Slot called when the user wants to rotate the models.

Parameters
[in]checkedThe newly picked rotation state.

Definition at line 324 of file control3dview.cpp.

◆ onSceneColorChanged()

void Control3DView::onSceneColorChanged ( const QColor & color)
protected

Slot called when the user wants change the color of the scene.

Parameters
[in]colorThe newly picked scene color.

Definition at line 310 of file control3dview.cpp.

◆ onSceneColorPicker()

void Control3DView::onSceneColorPicker ( )
protected

Slot called when the scene color changed.

Definition at line 246 of file control3dview.cpp.

◆ onShowFullScreen()

void Control3DView::onShowFullScreen ( bool checked)
protected

Slot called when the user wants to show the view in full screen.

Parameters
[in]checkedThe newly picked full screen state.

Definition at line 317 of file control3dview.cpp.

◆ onTreeViewDescriptionHide()

void Control3DView::onTreeViewDescriptionHide ( )

Slot called when tree view description visibilty changed.

Definition at line 180 of file control3dview.cpp.

◆ onTreeViewHeaderHide()

void Control3DView::onTreeViewHeaderHide ( )

Slot called when tree view header visibilty changed.

Definition at line 160 of file control3dview.cpp.

◆ onTreeViewRemoveItem()

void Control3DView::onTreeViewRemoveItem ( const QModelIndex & index)

Slot called when an item should be removed.

Parameters
[in]indexModel index of the tree view row to remove; ignored if invalid.

Definition at line 171 of file control3dview.cpp.

◆ rotationChanged

void DISPLIB::Control3DView::rotationChanged ( bool bRotationChanged)
signal

Use this signal whenever the user wants to rotate the 3D model.

Parameters
[in]bRotationChangedThe rotation flag.

◆ saveSettings()

void Control3DView::saveSettings ( )
virtual

Saves all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 191 of file control3dview.cpp.

◆ sceneColorChanged

void DISPLIB::Control3DView::sceneColorChanged ( const QColor & color)
signal

Use this signal whenever the scene color was changed by the user.

Parameters
[in]colorThe newly picked color.

◆ setDelegate()

void Control3DView::setDelegate ( QStyledItemDelegate * pItemDelegate)

Set the delegate for the tree view.

Parameters
[in]pItemDelegateThe delegate.

Definition at line 139 of file control3dview.cpp.

◆ setFlags()

void Control3DView::setFlags ( const QStringList & slFlags)

Set the flags specifying which part of the GUI should be shown.

Parameters
[in]slFlagsflags.

Definition at line 90 of file control3dview.cpp.

◆ setModel()

void Control3DView::setModel ( QStandardItemModel * pDataTreeModel)

Init the control widget based on the 3D view and data model.

Parameters
[in]pDataTreeModelThe 3D data tree model.

Definition at line 149 of file control3dview.cpp.

◆ showCoordAxis

void DISPLIB::Control3DView::showCoordAxis ( bool bShowCoordAxis)
signal

Use this signal whenever the user wants to show the coordinate axis.

Parameters
[in]bShowCoordAxisThe coordinate axis flag.

◆ showFullScreen

void DISPLIB::Control3DView::showFullScreen ( bool bShowFullScreen)
signal

Use this signal whenever the user wants to use full screen mode.

Parameters
[in]bShowFullScreenThe full screen flag.

◆ takeScreenshotChanged

void DISPLIB::Control3DView::takeScreenshotChanged ( )
signal

Use this signal whenever the take screenshot button was clicked by the user.

◆ toggleMutiview

void DISPLIB::Control3DView::toggleMutiview ( )
signal

Notifies the 'Multiview' radio button has been checked.

◆ toggleSingleView

void DISPLIB::Control3DView::toggleSingleView ( )
signal

Notifies the 'Single View' radio button has been checked.

◆ updateGuiMode()

void Control3DView::updateGuiMode ( GuiMode mode)
protectedvirtual

Update the views GUI based on the set GuiMode (Clinical=0, Research=1).

Parameters
[in]modeThe new mode (Clinical=0, Research=1).

Implements DISPLIB::AbstractView.

Definition at line 215 of file control3dview.cpp.

◆ updateProcessingMode()

void Control3DView::updateProcessingMode ( ProcessingMode mode)
protectedvirtual

Update the views GUI based on the set ProcessingMode (RealTime=0, Offline=1).

Parameters
[in]modeThe new mode (RealTime=0, Offline=1).

Implements DISPLIB::AbstractView.

Definition at line 227 of file control3dview.cpp.

Member Data Documentation

◆ m_colCurrentLightColor

QColor DISPLIB::Control3DView::m_colCurrentLightColor
protected

Current color of the lights in all View3D's.

Definition at line 267 of file control3dview.h.

◆ m_colCurrentSceneColor

QColor DISPLIB::Control3DView::m_colCurrentSceneColor
protected

Current color of the scene in all View3D's.

Definition at line 266 of file control3dview.h.

◆ m_pUi

Ui::Control3DViewWidget* DISPLIB::Control3DView::m_pUi
protected

The pointer to the QtDesigner ui class.

Definition at line 264 of file control3dview.h.


The documentation for this class was generated from the following files: