Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VTKViewer_MarkerWidget Class Reference

Widget for specifying point marker parameters. More...

#include <VTKViewer_MarkerWidget.h>

Inheritance diagram for VTKViewer_MarkerWidget:
Inheritance graph

Public Member Functions

 VTKViewer_MarkerWidget (QWidget *)
 Constructor. More...
 
virtual ~VTKViewer_MarkerWidget ()
 Destructor. More...
 
void setCustomMarkers (const VTK::MarkerMap &)
 Set custom markers data. More...
 
VTK::MarkerMap customMarkers () const
 Get custom markers data. More...
 
void addMarker (VTK::MarkerType, const QPixmap &)
 Add standard marker The marker type specified with type must be > VTK::MT_USER. More...
 
void setMarker (VTK::MarkerType, VTK::MarkerScale=VTK::MS_NONE)
 Select specified standard marker as current one. More...
 
void setCustomMarker (int)
 Select specified custom marker as current one. More...
 
VTK::MarkerType markerType () const
 Get current marker's type. For custom marker, VTK::MT_USER is returned and markerId() function then returns its identifier. More...
 
VTK::MarkerScale markerScale () const
 Get current marker's scale size. For custom marker return value is undefined. More...
 
int markerId () const
 
QLabeltypeLabel ()
 Get access to the internal marker type label. More...
 
QLabelscaleLabel ()
 Get access to the internal marker scale label. More...
 

Private Slots

void onTypeChanged (int)
 Called when marker type is changed (by the user or programmatically) More...
 

Private Member Functions

void init ()
 Internal initialization. More...
 
QPixmap markerFromData (const VTK::MarkerData &)
 Create icon from the custom marker data (texture) More...
 

Private Attributes

QLabelmyTypeLab
 
QComboBoxmyType
 
QLabelmyScaleLab
 
QSpinBoxmyScale
 
VTK::MarkerMap myCustomMarkers
 
int myCurrentIdx
 

Detailed Description

Class : VTKViewer_MarkerWidget Description : Widget for specifying point marker parameters

Constructor & Destructor Documentation

VTKViewer_MarkerWidget::VTKViewer_MarkerWidget ( QWidget parent)
Parameters
parentparent widget

References init(), myScale, myScaleLab, myType, myTypeLab, onTypeChanged(), and SPACING.

VTKViewer_MarkerWidget::~VTKViewer_MarkerWidget ( )
virtual

Member Function Documentation

void VTKViewer_MarkerWidget::addMarker ( VTK::MarkerType  type,
const QPixmap &  icon 
)
Parameters
typemarker type
iconmarker icon

References VTK::MT_USER, myType, and TypeRole.

VTK::MarkerMap VTKViewer_MarkerWidget::customMarkers ( ) const
Returns
custom marker data

References myCustomMarkers.

QPixmap VTKViewer_MarkerWidget::markerFromData ( const VTK::MarkerData markerData)
private
Parameters
markerDatacustom marker data
Returns
icon generated from texture specified with marker data

References VTK::ConvertToQImage(), and VTK::MakeVTKImage().

int VTKViewer_MarkerWidget::markerId ( ) const

Get currently selected custom marker's identifier. For standard markers return value is VTK::MT_NONE.

References IdRole, VTK::MT_NONE, VTK::MT_USER, myType, and TypeRole.

VTK::MarkerScale VTKViewer_MarkerWidget::markerScale ( ) const
Returns
currently selected marker scale size

References myScale.

VTK::MarkerType VTKViewer_MarkerWidget::markerType ( ) const
Returns
currently selected marker type

References myType, and TypeRole.

void VTKViewer_MarkerWidget::onTypeChanged ( int  index)
privateslot
QLabel * VTKViewer_MarkerWidget::scaleLabel ( )
Returns
marker scale label widget

References myScaleLab.

void VTKViewer_MarkerWidget::setCustomMarker ( int  id)
Parameters
idcustom marker identifier

References IdRole, VTK::MT_USER, myType, and TypeRole.

void VTKViewer_MarkerWidget::setCustomMarkers ( const VTK::MarkerMap markerMap)
Parameters
markerMapcustom marker data (a map {index:texture})

References IdRole, markerFromData(), VTK::MT_USER, myCustomMarkers, myType, and TypeRole.

void VTKViewer_MarkerWidget::setMarker ( VTK::MarkerType  type,
VTK::MarkerScale  scale = VTK::MS_NONE 
)
Parameters
typemarker type
scalemarker scale (optional parameter; can be omitted for extended markers)

References VTK::MS_10, VTK::MS_70, VTK::MS_NONE, VTK::MT_USER, myScale, myType, and TypeRole.

QLabel * VTKViewer_MarkerWidget::typeLabel ( )
Returns
marker type label widget

References myTypeLab.

Member Data Documentation

int VTKViewer_MarkerWidget::myCurrentIdx
private
VTK::MarkerMap VTKViewer_MarkerWidget::myCustomMarkers
private
QSpinBox* VTKViewer_MarkerWidget::myScale
private
QLabel* VTKViewer_MarkerWidget::myScaleLab
private
QComboBox* VTKViewer_MarkerWidget::myType
private
QLabel* VTKViewer_MarkerWidget::myTypeLab
private

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