|
ParaView
|
pqMultiViewWidget is a widget that manages layout of multiple views. More...
#include <pqMultiViewWidget.h>
Public Slots | |
| void | reload () |
| This forces the pqMultiViewWidget to reload its layout from the vtkSMViewLayoutProxy instance. | |
| void | assignToFrame (pqView *) |
| Assigns a frame to the view. | |
| void | makeFrameActive () |
| In a tabbed setup, when pqMultiViewWidget becomes active, this method should be called to ensure that the first view/frame in this widget is indeed made active, as the user would expect. | |
| void | setDecorationsVisible (bool) |
| Set the visibility for frame decorations and splitter handles. | |
| void | showDecorations () |
| void | hideDecorations () |
| void | lockViewSize (const QSize &) |
| Locks the maximum size for each view-frame to the given size. | |
| void | reset () |
| cleans up the layout. | |
| void | destroyAllViews () |
| destroys each of the views present in this layout. | |
Signals | |
| void | frameActivated () |
| fired when a frame in this widget becomes active. | |
Public Member Functions | |
| pqMultiViewWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
| virtual | ~pqMultiViewWidget () |
| void | setLayoutManager (vtkSMViewLayoutProxy *) |
| Get/Set the vtkSMViewLayoutProxy instance this widget is using as the layout manager. | |
| vtkSMViewLayoutProxy * | layoutManager () const |
| bool | isDecorationsVisible () const |
| Returns whether window decorations and splitter handles are visible. | |
| vtkImageData * | captureImage (int width, int height) |
| Captures an image for the views in the layout. | |
| int | prepareForCapture (int width, int height) |
| setups up the environment for capture. | |
| void | cleanupAfterCapture () |
| cleans up the environment after image capture. | |
| QList< vtkSMViewProxy * > | viewProxies () const |
| Returns list of views assigned to frames in this widget. | |
| bool | isViewAssigned (pqView *) const |
| Returns true if the view has been assigned to this layout. | |
Protected Slots | |
| void | standardButtonPressed (int) |
| Slots called on different signals fired by the nested frames or splitters. | |
| void | splitterMoved () |
| void | makeActive (pqViewFrame *frame) |
| Makes a frame active. | |
| void | markActive (pqView *view) |
| Marks the frame corresponding to the view, if present in the widget, as active. | |
| void | markActive (pqViewFrame *frame) |
| void | swapPositions (const QString &) |
| swap frame positions. | |
| void | proxyRemoved (pqProxy *) |
| when a view proxy is unregistered, we ensure that the frame is marked as empty. | |
| void | viewAdded (pqView *) |
| called when a new view is added. | |
Protected Member Functions | |
| virtual pqViewFrame * | newFrame (vtkSMProxy *view) |
| Called whenever a new frame needs to be created for a view. | |
| virtual bool | eventFilter (QObject *caller, QEvent *evt) |
| Event filter callback to detect when a sub-frame becomes active, so that we can mark it as such. | |
pqMultiViewWidget is a widget that manages layout of multiple views.
It works together with a vtkSMViewLayoutProxy instance to keep track of the layout for the views. It's acceptable to create multiple instances of pqMultiViewWidget in the same application.
Definition at line 51 of file pqMultiViewWidget.h.
| pqMultiViewWidget::pqMultiViewWidget | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | f = 0 |
||
| ) |
| virtual pqMultiViewWidget::~pqMultiViewWidget | ( | ) | [virtual] |
| void pqMultiViewWidget::setLayoutManager | ( | vtkSMViewLayoutProxy * | ) |
Get/Set the vtkSMViewLayoutProxy instance this widget is using as the layout manager.
| vtkSMViewLayoutProxy* pqMultiViewWidget::layoutManager | ( | ) | const |
| bool pqMultiViewWidget::isDecorationsVisible | ( | ) | const [inline] |
Returns whether window decorations and splitter handles are visible.
Definition at line 65 of file pqMultiViewWidget.h.
| vtkImageData* pqMultiViewWidget::captureImage | ( | int | width, |
| int | height | ||
| ) |
Captures an image for the views in the layout.
Note that there must be at least one valid view in the widget, otherwise returns NULL.
setups up the environment for capture.
Returns the magnification that can be used to capture the image for required size.
| void pqMultiViewWidget::cleanupAfterCapture | ( | ) |
cleans up the environment after image capture.
| QList<vtkSMViewProxy*> pqMultiViewWidget::viewProxies | ( | ) | const |
Returns list of views assigned to frames in this widget.
| bool pqMultiViewWidget::isViewAssigned | ( | pqView * | ) | const |
Returns true if the view has been assigned to this layout.
| void pqMultiViewWidget::frameActivated | ( | ) | [signal] |
fired when a frame in this widget becomes active.
| void pqMultiViewWidget::reload | ( | ) | [slot] |
This forces the pqMultiViewWidget to reload its layout from the vtkSMViewLayoutProxy instance.
One does not need to call this method explicitly, it is called automatically when the layoutManager is modified.
| void pqMultiViewWidget::assignToFrame | ( | pqView * | ) | [slot] |
Assigns a frame to the view.
This assumes that the view not already been placed in a frame. This will try to locate an empty frame, if possible. If no empty frames are available, it will split the active frame along its longest dimension and place the view in the newly created child-frame.
| void pqMultiViewWidget::makeFrameActive | ( | ) | [slot] |
In a tabbed setup, when pqMultiViewWidget becomes active, this method should be called to ensure that the first view/frame in this widget is indeed made active, as the user would expect.
| void pqMultiViewWidget::setDecorationsVisible | ( | bool | ) | [slot] |
Set the visibility for frame decorations and splitter handles.
| void pqMultiViewWidget::showDecorations | ( | ) | [inline, slot] |
Definition at line 108 of file pqMultiViewWidget.h.
| void pqMultiViewWidget::hideDecorations | ( | ) | [inline, slot] |
Definition at line 109 of file pqMultiViewWidget.h.
| void pqMultiViewWidget::lockViewSize | ( | const QSize & | ) | [slot] |
Locks the maximum size for each view-frame to the given size.
Use empty QSize() instance to indicate no limits.
| void pqMultiViewWidget::reset | ( | ) | [slot] |
cleans up the layout.
| void pqMultiViewWidget::destroyAllViews | ( | ) | [slot] |
destroys each of the views present in this layout.
Useful when user closes the frame expecting that all containing views are destroyed.
| void pqMultiViewWidget::standardButtonPressed | ( | int | ) | [protected, slot] |
Slots called on different signals fired by the nested frames or splitters.
Note that these slots use this->sender(), hence these should not be called directly. These result in updating the layoutManager.
| void pqMultiViewWidget::splitterMoved | ( | ) | [protected, slot] |
| void pqMultiViewWidget::makeActive | ( | pqViewFrame * | frame | ) | [protected, slot] |
Makes a frame active.
This also call pqActiveObjects::setActiveView() to make the corresponding view active.
| void pqMultiViewWidget::markActive | ( | pqView * | view | ) | [protected, slot] |
Marks the frame corresponding to the view, if present in the widget, as active.
Note that this method does not fire the activeChanged() signal.
| void pqMultiViewWidget::markActive | ( | pqViewFrame * | frame | ) | [protected, slot] |
| void pqMultiViewWidget::swapPositions | ( | const QString & | ) | [protected, slot] |
swap frame positions.
| void pqMultiViewWidget::proxyRemoved | ( | pqProxy * | ) | [protected, slot] |
when a view proxy is unregistered, we ensure that the frame is marked as empty.
| void pqMultiViewWidget::viewAdded | ( | pqView * | ) | [protected, slot] |
called when a new view is added.
we update the layout if the view added belongs to this layout.
| virtual pqViewFrame* pqMultiViewWidget::newFrame | ( | vtkSMProxy * | view | ) | [protected, virtual] |
Called whenever a new frame needs to be created for a view.
Note that view may be null, in which case a place-holder frame is expected. The caller takes over the ownership of the created frame and will delete/re-parent it as and when appropriate.
| virtual bool pqMultiViewWidget::eventFilter | ( | QObject * | caller, |
| QEvent * | evt | ||
| ) | [protected, virtual] |
Event filter callback to detect when a sub-frame becomes active, so that we can mark it as such.
1.7.5.1