Frame Explorer window, display the hierachy of the frames of all the data currently opened in the application. All frames are displayed in a QListView widget and can be selected (single/multiple selection is available). More...
#include <FrameExplorer.h>
Public Member Functions | |
General | |
Q_INVOKABLE | FrameExplorer (QString) |
Construtor. More... | |
~FrameExplorer () override=default | |
Destructor. More... | |
Public Member Functions inherited from camitk::Viewer | |
QStringList | getComponents () |
get the list of Component class manages by this viewer (default is set to "Component", i.e. More... | |
QString | getDescription () const |
get the name of the viewer More... | |
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) More... | |
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) More... | |
virtual QPixmap | getIcon () |
get the viewer icon More... | |
virtual QMenu * | getMenu () |
get the viewer menu (returns nullptr by default, i.e. there are no default edit menu) More... | |
QString | getName () const |
get the name of the viewer More... | |
virtual QObject * | getPropertyObject () |
get the viewer property object (returns nullptr by default, i.e. there are no property to edit) More... | |
virtual QToolBar * | getToolBar () |
get the viewer toolbar (returns nullptr by default, i.e. there are no default toolbar) More... | |
bool | getToolBarVisibility () |
get the current value of the toolbar visibility More... | |
ViewerType | getType () |
get the viewer layout More... | |
Q_ENUM (ViewerType) Viewer(QString name | |
default constructor More... | |
virtual void | refresh (Viewer *whoIsAsking=nullptr)=0 |
refresh the view (can be interesting to know which other viewer is calling this) More... | |
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. More... | |
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) More... | |
void | setToolBarVisibility (bool) |
set the visibility of the toolbar in the main window (true by default). More... | |
void | setType (ViewerType) |
set the viewer layout (the type can be changed dynamically to fit the developer's purpose) More... | |
void | setVisible (bool) |
set the visibility of the viewer (show or hide its widget) More... | |
virtual | ~Viewer () override |
default destructor More... | |
Inherited from Viewer | |
void | refresh (Viewer *whoIsAsking=nullptr) override |
QWidget * | getWidget () override |
get the frame explorer widget (QTreeWidget) More... | |
void | frameSelectionChanged () |
slot called whenever the selection changed in the explorer More... | |
QTreeWidget and QTreeWidgetItem management | |
instantiate a new QTreeWidgetItem using names and properties from the InterfaceNode, and using parent | |
QTreeWidget * | explorerTree |
the list view More... | |
QTreeWidgetItem * | getNewItem (QTreeWidgetItem *parent, camitk::Component *) |
QTreeWidgetItem * | add (QTreeWidgetItem *, camitk::Component *) |
recursively add the Component in the tree explorer and return the QTreeWidgetItem of the InterfaceNode More... | |
void | add (camitk::Component *comp) |
Add the given Component to the explorer (at top level) and automatically create children Component items. More... | |
void | remove () |
clear the tree explorer More... | |
Additional Inherited Members | |
Public Types inherited from camitk::Viewer | |
enum | ViewerType { EMBEDDED, DOCKED } |
Signals inherited from camitk::Viewer | |
void | selectionChanged () |
this signal is emitted when the current selection was changed by the viewer More... | |
Public Attributes inherited from camitk::Viewer | |
ViewerType | type = EMBEDDED) |
this viewer's layout More... | |
Protected Member Functions inherited from camitk::Viewer | |
void | clearSelection () |
clear the selection More... | |
void | selectionChanged (Component *comp) |
the selection has changed to be just one comp More... | |
void | selectionChanged (ComponentList &compSet) |
The selection has changed to the given ComponentList. More... | |
void | setComponents (QStringList) |
set the list of component class names managed by this viewer More... | |
void | setDescription (QString) |
set the viewer's description More... | |
void | setIcon (QPixmap icon) |
set the default icon for the viewer extension More... | |
Frame Explorer window, display the hierachy of the frames of all the data currently opened in the application. All frames 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").
FrameExplorer::FrameExplorer | ( | QString | name | ) |
Construtor.
References explorerTree, camitk::Viewer::setDescription(), and camitk::Viewer::setIcon().
|
overridedefault |
Destructor.
|
private |
Add the given Component to the explorer (at top level) and automatically create children Component items.
comp | The Component to add in the tree view. |
References add(), explorerTree, camitk::Component::getFrame(), and camitk::InterfaceFrame::getParentFrame().
|
private |
recursively add the Component in the tree explorer and return the QTreeWidgetItem of the InterfaceNode
References camitk::InterfaceFrame::getChildrenFrame(), camitk::Component::getFrame(), camitk::InterfaceFrame::getFrameName(), camitk::Viewer::getName(), camitk::Component::getName(), getNewItem(), and camitk::Component::setVisibility().
Referenced by add(), and refresh().
|
privateslot |
slot called whenever the selection changed in the explorer
References refresh().
Referenced by getWidget().
|
private |
References camitk::InterfaceFrame::getChildrenFrame(), camitk::Component::getFrame(), camitk::InterfaceFrame::getFrameName(), and camitk::Component::getName().
Referenced by add().
|
overridevirtual |
get the frame explorer widget (QTreeWidget)
Implements camitk::Viewer.
References explorerTree, and frameSelectionChanged().
|
override |
refresh the frame explorer (can be interesting to know which other viewer is calling this)
References add(), explorerTree, and remove().
Referenced by frameSelectionChanged().
|
private |
clear the tree explorer
References explorerTree.
Referenced by refresh().
|
private |
the list view
Referenced by add(), FrameExplorer(), getWidget(), refresh(), and remove().