![]() |
Computer Assited Medical Intervention Tool Kit
version 3.4
|
The property explorer. More...
#include <PropertyExplorer.h>
Inheritance diagram for camitk::PropertyExplorer:Public Member Functions | |
Inherited from Viewer | |
| virtual unsigned int | numberOfViewedComponent () |
| virtual void | refresh (Viewer *whoIsAsking=NULL) |
| refresh the property editor More... | |
| virtual QWidget * | getWidget (QWidget *parent=NULL) |
| get the viewer widget. More... | |
| virtual QObject * | getPropertyObject () |
| add a property to change the ObjectController representation at run-time (user choice) More... | |
Manage View mode (user preference) | |
| const ObjectController::ViewMode | getViewMode () |
| void | setViewMode (ObjectController::ViewMode) |
| set the view mode More... | |
Tab selection management | |
| void | selectWidget (QWidget *widget) |
| Select the tab containing the given widget in the PropertyExplorer. More... | |
| void | selectIndex (unsigned int index) |
| Select the tab of the given index in the PropertyExplorer. More... | |
Public Member Functions inherited from camitk::Viewer | |
| virtual QMenu * | getMenu () |
| get the viewer menu (returns NULL by default, i.e. there are no default edit menu) More... | |
| virtual QToolBar * | getToolBar () |
| get the viewer toolbar (returns NULL by default, i.e. there are no default toolbar) More... | |
| virtual void | refreshInterfaceNode (Component *comp) |
| Update the whole tree of the representation of the Component. More... | |
| Viewer (QString name) | |
| default constructor More... | |
| virtual | ~Viewer () |
| default destructor More... | |
Properties | |
| camitk::ObjectController::ViewMode | viewMode |
Private Slots | |
| void | updateTabIndexToDisplay (int index) |
| Update the PropertyExplorer tab index to display for the currently selected component This method is used by the PropertyExplorer to tell for each component which tab has been selected for display. More... | |
Private Member Functions | |
| void | clear () |
| clear all the additional widgets, reset currentComponent (and update its visibility). More... | |
| Q_ENUMS (camitk::ObjectController::ViewMode) | |
Private Attributes | |
| QPushButton * | applyButton |
| Component * | currentComponent |
| the viewed Component More... | |
| QPushButton * | revertButton |
| QTabWidget * | tabWidget |
| ObjectController * | theController |
| the widgets More... | |
General | |
| PropertyExplorer () | |
| virtual | ~PropertyExplorer () |
| destructor More... | |
| static PropertyExplorer * | getInstance () |
| returns the unique instance of the PropertyExplorer More... | |
Additional Inherited Members | |
Signals inherited from camitk::Viewer | |
| void | selectionChanged () |
| this signal is emitted when the current selection was changed by the viewer More... | |
Protected Member Functions inherited from camitk::Viewer | |
| void | clearSelection () |
| clear the selection More... | |
| void | selectionChanged (ComponentList &compSet) |
| The selection has changed to the given ComponentList. More... | |
| void | selectionChanged (Component *comp) |
| the selection has changed to be just one comp More... | |
The property explorer.
The property explorer is a special container, placed generally bellow 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, ...).
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):
See also ObjectController documentation for more informations and a complete example.
This viewer also manages a singleton (THE CamiTK PropertyExplorer). See getInstance() for more information. You do not have to use it, but it is convienent (and sometimes preferable) to use this instance instead of creating your own one.
| camitk::PropertyExplorer::PropertyExplorer | ( | ) |
constructor
References applyButton, currentComponent, revertButton, tabWidget, and theController.
Referenced by getInstance().
|
virtual |
destructor
References clear().
|
private |
clear all the additional widgets, reset currentComponent (and update its visibility).
References currentComponent, camitk::Application::isAlive(), camitk::Component::setVisibility(), and tabWidget.
Referenced by refresh(), and ~PropertyExplorer().
|
static |
returns the unique instance of the PropertyExplorer
References PropertyExplorer().
|
virtual |
add a property to change the ObjectController representation at run-time (user choice)
Reimplemented from camitk::Viewer.
| const ObjectController::ViewMode camitk::PropertyExplorer::getViewMode | ( | ) |
get the current view mode
References camitk::ObjectController::getViewMode(), and theController.
|
virtual |
get the viewer widget.
| parent | the parent widget for the viewer widget |
Implements camitk::Viewer.
References applyButton, camitk::ObjectController::BUTTON, camitk::Application::getSettings(), revertButton, tabWidget, theController, and updateTabIndexToDisplay().
|
virtual |
returns the number of Component that are displayed by this viewer
Implements camitk::Viewer.
References currentComponent.
|
private |
|
virtual |
refresh the property editor
Implements camitk::Viewer.
References applyButton, clear(), currentComponent, camitk::InterfaceProperty::getIndexOfPropertyExplorerTab(), camitk::Component::getNumberOfPropertyWidget(), camitk::Component::getPropertyObject(), camitk::Component::getPropertyWidgetAt(), camitk::Application::getSelectedComponents(), revertButton, selectIndex(), camitk::ObjectController::setObject(), camitk::Component::setVisibility(), tabWidget, and theController.
| void camitk::PropertyExplorer::selectIndex | ( | unsigned int | index | ) |
Select the tab of the given index in the PropertyExplorer.
| index | the index of the tab to display. |
References tabWidget.
Referenced by refresh().
| void camitk::PropertyExplorer::selectWidget | ( | QWidget * | widget | ) |
Select the tab containing the given widget in the PropertyExplorer.
| widget | the PropertyExplorer's widget of the tab to select. |
References tabWidget.
| void camitk::PropertyExplorer::setViewMode | ( | ObjectController::ViewMode | mode | ) |
set the view mode
References camitk::Application::getSettings(), camitk::ObjectController::setViewMode(), and theController.
|
privateslot |
Update the PropertyExplorer tab index to display for the currently selected component This method is used by the PropertyExplorer to tell for each component which tab has been selected for display.
| index | The index of the PropertyExplorer tab to display for the currently selected component. |
References currentComponent, camitk::Application::getSelectedComponents(), and camitk::InterfaceProperty::setIndexOfPropertyExplorerTab().
Referenced by getWidget().
|
private |
Referenced by getWidget(), PropertyExplorer(), and refresh().
|
private |
the viewed Component
Referenced by clear(), numberOfViewedComponent(), PropertyExplorer(), refresh(), and updateTabIndexToDisplay().
|
private |
Referenced by getWidget(), PropertyExplorer(), and refresh().
|
private |
Referenced by clear(), getWidget(), PropertyExplorer(), refresh(), selectIndex(), and selectWidget().
|
private |
the widgets
Referenced by getViewMode(), getWidget(), PropertyExplorer(), refresh(), and setViewMode().
|
readwriteprivate |
1.8.8