The Explorer viewer displays the list of all data currently opened in the application. More...
#include <Explorer.h>
Public Slots | |
void | renameItem () |
slot called by the explorer menu when the user wants to rename the currently selected Component | |
Public Member Functions | |
General | |
Q_INVOKABLE | Explorer (QString) |
Construtor. | |
~Explorer () override | |
Destructor. | |
Inherited from Viewer | |
void | refresh (camitk::Viewer *whoIsAsking=nullptr) override |
QWidget * | getWidget () override |
get the explorer widget (QTreeWidget) | |
QMenu * | getMenu () override |
get the explorer menu | |
![]() | |
*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 | |
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) | |
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 | |
QString | getName () const |
get the name of the viewer | |
virtual QObject * | getPropertyObject () |
get the viewer property object (returns nullptr by default, i.e. there are no property to edit) | |
virtual QToolBar * | getToolBar () |
get the viewer toolbar (returns nullptr by default, i.e. there are no default toolbar) | |
bool | getToolBarVisibility () |
get the current value of the toolbar visibility | |
ViewerType | getType () |
get the viewer layout | |
Q_ENUM (ViewerType) Viewer(QString name | |
default constructor | |
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. | |
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) | |
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) | |
void | setVisible (bool) |
set the visibility of the viewer (show or hide its widget) | |
virtual | ~Viewer () override |
default destructor | |
Additional Inherited Members | |
![]() | |
enum | ViewerType { EMBEDDED , DOCKED } |
describes where this viewer should appear More... | |
![]() | |
void | selectionChanged () |
this signal is emitted when the current selection was changed by the viewer | |
![]() | |
*get the list of Component class manages by this viewer *default is set to | Component |
ViewerType | type = EMBEDDED) |
this viewer's layout | |
![]() | |
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 | |
The Explorer viewer displays the list of all data currently opened in the application.
All objects are displayed in a QListView widget and can be selected (single/multiple selection is available).
It manages the camitk::InterfaceNode facet of components.
If this viewer extension is loaded, the default instance of this viewer can be accessed directly by Application::getViewer("Frame Explorer").
Explorer::Explorer | ( | QString | name | ) |
Construtor.
References camitk::Viewer::setDescription(), and camitk::Viewer::setIcon().
|
override |
Destructor.
|
overridevirtual |
get the explorer menu
Reimplemented from camitk::Viewer.
References camitk::Application::getSelectedComponents(), and renameItem().
|
overridevirtual |
get the explorer widget (QTreeWidget)
Implements camitk::Viewer.
References camitk::rightButtonPressed().
|
overridevirtual |
refresh the explorer (can be interesting to know which other viewer is calling this)
Implements camitk::Viewer.
References camitk::Application::getAllComponents(), camitk::Application::getSelectedComponents(), camitk::Application::getTopLevelComponents(), and camitk::Component::isSelected().
|
slot |
slot called by the explorer menu when the user wants to rename the currently selected Component
References CAMITK_INFO, camitk::Component::getName(), camitk::Component::refresh(), and camitk::Component::setName().
Referenced by getMenu().