pqMultiViewWidget is a widget that manages layout of multiple views.
More...
#include <pqMultiViewWidget.h>
Inherits QWidget.
|
virtual pqViewFrame * | newFrame (vtkSMProxy *view) |
| Called whenever a new frame needs to be created for a view. More...
|
|
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. More...
|
|
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::pqMultiViewWidget |
( |
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
f = 0 |
|
) |
| |
§ ~pqMultiViewWidget()
virtual pqMultiViewWidget::~pqMultiViewWidget |
( |
| ) |
|
|
virtual |
§ setLayoutManager()
void pqMultiViewWidget::setLayoutManager |
( |
vtkSMViewLayoutProxy * |
| ) |
|
Get/Set the vtkSMViewLayoutProxy instance this widget is using as the layout manager.
§ layoutManager()
vtkSMViewLayoutProxy* pqMultiViewWidget::layoutManager |
( |
| ) |
const |
§ isDecorationsVisible()
bool pqMultiViewWidget::isDecorationsVisible |
( |
| ) |
const |
|
inline |
Returns whether window decorations and splitter handles are visible.
Definition at line 65 of file pqMultiViewWidget.h.
§ captureImage()
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.
§ prepareForCapture()
int pqMultiViewWidget::prepareForCapture |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
setups up the environment for capture.
Returns the magnification that can be used to capture the image for required size.
§ cleanupAfterCapture()
void pqMultiViewWidget::cleanupAfterCapture |
( |
| ) |
|
cleans up the environment after image capture.
§ writeImage()
bool pqMultiViewWidget::writeImage |
( |
const QString & |
filename, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
quality = -1 |
|
) |
| |
Capture an image and saves it out to a file.
§ viewProxies()
QList<vtkSMViewProxy*> pqMultiViewWidget::viewProxies |
( |
| ) |
const |
Returns list of views assigned to frames in this widget.
§ isViewAssigned()
bool pqMultiViewWidget::isViewAssigned |
( |
pqView * |
| ) |
const |
Returns true if the view has been assigned to this layout.
§ togglePopout()
bool pqMultiViewWidget::togglePopout |
( |
| ) |
|
pqMultiViewWidget supports popout mode i.e.
the views could be laid out in separate popup widget rather than simply placing them under this pqMultiViewWidget frame. Use this method to toggle that. Returns true if the view is popped out at the end of this call, false otherwise.
§ frameActivated
void pqMultiViewWidget::frameActivated |
( |
| ) |
|
|
signal |
fired when a frame in this widget becomes active.
§ reload
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.
§ assignToFrame
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.
§ makeFrameActive
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.
§ setDecorationsVisible
void pqMultiViewWidget::setDecorationsVisible |
( |
bool |
| ) |
|
|
slot |
Set the visibility for frame decorations and splitter handles.
§ showDecorations
void pqMultiViewWidget::showDecorations |
( |
| ) |
|
|
inlineslot |
§ hideDecorations
void pqMultiViewWidget::hideDecorations |
( |
| ) |
|
|
inlineslot |
§ lockViewSize
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.
§ reset
void pqMultiViewWidget::reset |
( |
| ) |
|
|
slot |
§ destroyAllViews
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.
§ standardButtonPressed
void pqMultiViewWidget::standardButtonPressed |
( |
int |
| ) |
|
|
protectedslot |
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.
§ splitterMoved
void pqMultiViewWidget::splitterMoved |
( |
| ) |
|
|
protectedslot |
§ makeActive
void pqMultiViewWidget::makeActive |
( |
pqViewFrame * |
frame | ) |
|
|
protectedslot |
§ markActive [1/2]
void pqMultiViewWidget::markActive |
( |
pqView * |
view | ) |
|
|
protectedslot |
Marks the frame corresponding to the view, if present in the widget, as active.
Note that this method does not fire the activeChanged() signal.
§ markActive [2/2]
void pqMultiViewWidget::markActive |
( |
pqViewFrame * |
frame | ) |
|
|
protectedslot |
§ swapPositions
void pqMultiViewWidget::swapPositions |
( |
const QString & |
| ) |
|
|
protectedslot |
§ proxyRemoved
void pqMultiViewWidget::proxyRemoved |
( |
pqProxy * |
| ) |
|
|
protectedslot |
when a view proxy is unregistered, we ensure that the frame is marked as empty.
§ viewAdded
void pqMultiViewWidget::viewAdded |
( |
pqView * |
| ) |
|
|
protectedslot |
called when a new view is added.
we update the layout if the view added belongs to this layout.
§ newFrame()
virtual pqViewFrame* pqMultiViewWidget::newFrame |
( |
vtkSMProxy * |
view | ) |
|
|
protectedvirtual |
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.
§ eventFilter()
virtual bool pqMultiViewWidget::eventFilter |
( |
QObject * |
caller, |
|
|
QEvent * |
evt |
|
) |
| |
|
protectedvirtual |
Event filter callback to detect when a sub-frame becomes active, so that we can mark it as such.
The documentation for this class was generated from the following file: