Widget for specifying point marker parameters. More...
#include <VTKViewer_MarkerWidget.h>
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 |
QLabel * | typeLabel () |
Get access to the internal marker type label. More... | |
QLabel * | scaleLabel () |
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 | |
QLabel * | myTypeLab |
QComboBox * | myType |
QLabel * | myScaleLab |
QSpinBox * | myScale |
VTK::MarkerMap | myCustomMarkers |
int | myCurrentIdx |
Class : VTKViewer_MarkerWidget Description : Widget for specifying point marker parameters
VTKViewer_MarkerWidget::VTKViewer_MarkerWidget | ( | QWidget * | parent | ) |
parent | parent widget |
References init(), myScale, myScaleLab, myType, myTypeLab, onTypeChanged(), and SPACING.
|
virtual |
void VTKViewer_MarkerWidget::addMarker | ( | VTK::MarkerType | type, |
const QPixmap & | icon | ||
) |
type | marker type |
icon | marker icon |
References VTK::MT_USER, myType, and TypeRole.
VTK::MarkerMap VTKViewer_MarkerWidget::customMarkers | ( | ) | const |
References myCustomMarkers.
|
private |
|
private |
markerData | custom 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 |
References myScale.
VTK::MarkerType VTKViewer_MarkerWidget::markerType | ( | ) | const |
|
privateslot |
index | index of item being selected |
References SUIT_Session::activeApplication(), SUIT_Application::getFileName(), VTK::GetUniqueId(), IdRole, VTK::LoadTextureData(), markerFromData(), VTK::MS_NONE, VTK::MT_USER, myCurrentIdx, myCustomMarkers, myScale, myScaleLab, myType, SUIT_Session::session(), and TypeRole.
QLabel * VTKViewer_MarkerWidget::scaleLabel | ( | ) |
References myScaleLab.
void VTKViewer_MarkerWidget::setCustomMarker | ( | int | id | ) |
id | custom marker identifier |
References IdRole, VTK::MT_USER, myType, and TypeRole.
void VTKViewer_MarkerWidget::setCustomMarkers | ( | const VTK::MarkerMap & | markerMap | ) |
markerMap | custom 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 |
||
) |
type | marker type |
scale | marker 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 | ( | ) |
References myTypeLab.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |