Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
PropertyExplorer Class Reference

The property explorer. More...

#include <PropertyExplorer.h>

Public Member Functions

General
Q_INVOKABLE PropertyExplorer (QString name)
 
 ~PropertyExplorer () override
 destructor
 
Inherited from Viewer
void refresh (camitk::Viewer *whoIsAsking=nullptr) override
 
QWidget * getWidget () override
 get the viewer widget.
 
camitk::PropertyObjectgetPropertyObject () override
 add a property to change the ObjectController representation at run-time (user choice)
 
Tab selection management
void selectWidget (QWidget *widget)
 Select the tab containing the given widget in the PropertyExplorer.
 
void selectIndex (unsigned int index)
 Select the tab of the given index in the PropertyExplorer.
 
- Public Member Functions inherited from camitk::Viewer
*get the list of Component class manages by this viewer *default is set to i e all type of Component *QStringList getComponentClassNames ()
 
QString getDescription () const
 get the name of the viewer
 
virtual QDockWidget * getDockWidget ()
 Get the QDockWidget* where this viewer is currently docked (or nullptr if it is not docked anywhere or if the viewer is of type EMBEDDED)
 
virtual QLayout * getEmbedder ()
 Get the QLayout* where this viewer is currently embedded (or nullptr if it is not embedded anywhere or if the viewer is of type DOCKED)
 
virtual QPixmap getIcon ()
 get the viewer icon
 
virtual QMenu * getMenu ()
 get the viewer menu (returns nullptr by default, i.e. there are no default edit menu)
 
QString getName () const
 get the name of the viewer
 
virtual QToolBar * getToolBar ()
 get the viewer toolbar (returns nullptr by default, i.e. there are no default toolbar)
 
virtual bool getToolBarVisibility ()
 get the current value of the toolbar visibility
 
ViewerType getType ()
 get the viewer layout
 
 Q_ENUM (ViewerType) Viewer(QString name
 default constructor
 
virtual bool setDockWidget (QDockWidget *)
 If the viewer type is DOCKED, dock the widget inside the given dock widget (do nothing if the type is EMBEDDED or if the viewer has already been docked before) Note that once set, the dock widget cannot be modified.
 
virtual bool setEmbedder (QLayout *)
 If the viewer type is EMBEDDED, embed the viewer widget in the given layout (do nothing if the type is DOCKED) Note that you can call this method any time you want to move the viewer's widget to another layout (but there is only one embedder at a time)
 
virtual void setToolBarVisibility (bool)
 set the visibility of the toolbar in the main window (true by default).
 
void setType (ViewerType)
 set the viewer layout (the type can be changed dynamically to fit the developer's purpose)
 
virtual void setVisible (bool)
 set the visibility of the viewer (show or hide its widget)
 
virtual ~Viewer () override
 default destructor
 

Additional Inherited Members

- Public Types inherited from camitk::Viewer
enum  ViewerType { EMBEDDED , DOCKED }
 describes where this viewer should appear More...
 
- Signals inherited from camitk::Viewer
void selectionChanged ()
 this signal is emitted when the current selection was changed by the viewer
 
- Public Attributes inherited from camitk::Viewer
*get the list of Component class manages by this viewer *default is set to Component
 
ViewerType type = EMBEDDED)
 this viewer's layout
 
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection
 
*set the list of component class names managed by this viewer *note Default is set to Component (all type of components) */void setComponentClassNames(QStringList)
 
void selectionChanged (Component *comp)
 the selection has changed to be just one comp
 
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList.
 
void setDescription (QString)
 set the viewer's description
 
void setIcon (QPixmap icon)
 set the default icon for the viewer extension
 

Detailed Description

The property explorer.

The property explorer is a special container, placed generally below the explorer. It has a default tab (property editor) and can include any number of other tabs (where you can, of course, have any kind of widgets you want: slider, labels, text, ...).

It manages the camitk::InterfaceProperty facet of components.

The property explorer viewer.

The property editor is a "magic" widget (aka as "poOOowerful" widget) that use QObject derived class and build a property editor UI. It is presented as a list (automatically build from your QObject derived class Q_PROPERTY or added CamiTK properties):

  • first column is the property name,
  • second column is the editing widgets (where the user can interactively change the property value).

See also ObjectController documentation for more informations and a complete example of the property editor

If this viewer extension is loaded, the default instance of this viewer can be accessed directly by Application::getViewer("Property Explorer").

See also
camitk::Property
camitk::InterfaceProperty
camitk::Viewer

Constructor & Destructor Documentation

◆ PropertyExplorer()

PropertyExplorer::PropertyExplorer ( QString  name)

◆ ~PropertyExplorer()

PropertyExplorer::~PropertyExplorer ( )
override

destructor

Member Function Documentation

◆ getPropertyObject()

PropertyObject * PropertyExplorer::getPropertyObject ( )
overridevirtual

add a property to change the ObjectController representation at run-time (user choice)

Reimplemented from camitk::Viewer.

◆ getWidget()

QWidget * PropertyExplorer::getWidget ( )
overridevirtual

get the viewer widget.

Implements camitk::Viewer.

References camitk::Property::getName(), and camitk::Application::getSettings().

◆ refresh()

◆ selectIndex()

void PropertyExplorer::selectIndex ( unsigned int  index)

Select the tab of the given index in the PropertyExplorer.

Parameters
indexthe index of the tab to display.
Note
0 <= index < currentComponent->getNumberOfPropertyWidget() else nothing is done

Referenced by refresh().

◆ selectWidget()

void PropertyExplorer::selectWidget ( QWidget *  widget)

Select the tab containing the given widget in the PropertyExplorer.

Parameters
widgetthe PropertyExplorer's widget of the tab to select.
Note
the widget must have been previously added to the PropertyExplorer.

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