CustusX
15.3.3-beta
An IGT application
|
Creates a pool of views and offers an interface to them, also handles layouts on a centralwidget. More...
#include <cxViewManager.h>
Signals | |
void | fps (int number) |
Emits number of frames per second. More... | |
void | activeLayoutChanged () |
emitted when the active layout changes More... | |
void | activeViewChanged () |
emitted when the active view changes More... | |
void | renderingEnabledChanged () |
emitted then rendering is enabled/disabled More... | |
Public Member Functions | |
virtual | ~ViewManager () |
ViewPtr | get3DView (int group=0, int index=0) |
virtual ViewGroupDataPtr | getViewGroup (int groupIdx) const |
unsigned | viewGroupCount () const |
virtual int | getActiveViewGroup () const |
LayoutRepositoryPtr | getLayoutRepository () |
QActionGroup * | createInteractorStyleActionGroup () |
NavigationPtr | getNavigation () |
QWidget * | getLayoutWidget (QWidget *parent, int index) |
void | enableRender (bool val) |
bool | renderingIsEnabled () const |
QString | getActiveLayout (int widgetIndex=0) const |
returns the active layout More... | |
void | setActiveLayout (const QString &uid, int widgetIndex=0) |
change the layout More... | |
InteractiveClipperPtr | getClipper () |
InteractiveCropperPtr | getCropper () |
CyclicActionLoggerPtr | getRenderTimer () |
void | deactivateCurrentLayout () |
deactivate the current layout, leaving an empty layout More... | |
void | autoShowData (DataPtr data) |
CameraControlPtr | getCameraControl () |
void | clear () |
void | addXml (QDomNode &parentNode) |
void | parseXml (QDomNode viewmanagerNode) |
Static Public Member Functions | |
static VisualizationServiceOldPtr | create (CoreServicesPtr backend) |
Protected Slots | |
void | settingsChangedSlot (QString key) |
void | onLayoutRepositoryChanged (QString uid) |
void | updateViews () |
void | updateCameraStyleActions () |
void | setActiveView (QString viewUid) |
Protected Member Functions | |
ViewManager (CoreServicesPtr backend) | |
void | syncOrientationMode (SyncedValuePtr val) |
std::vector< ViewGroupPtr > | getViewGroups () |
void | activateView (ViewCollectionWidget *widget, LayoutViewData viewData) |
ViewWrapperPtr | createViewWrapper (ViewPtr view, LayoutViewData viewData) |
int | findGroupContaining3DViewGivenGuess (int preferredGroup) |
QString | getActiveView () const |
returns the active view More... | |
void | setRenderingInterval (int interval) |
void | setSlicePlanesProxyInViewsUpTo2DViewgroup () |
void | loadGlobalSettings () |
void | saveGlobalSettings () |
void | activateViews (ViewCollectionWidget *widget, LayoutData next) |
void | rebuildLayouts () |
void | initializeGlobal2DZoom () |
void | initializeActiveView () |
void | layoutWidgetDestroyed (QObject *object) |
Protected Attributes | |
LayoutRepositoryPtr | mLayoutRepository |
std::vector< QPointer < ViewCollectionWidget > > | mLayoutWidgets |
QStringList | mActiveLayout |
the active layout (type) More... | |
SyncedValuePtr | mActiveView |
RenderLoopPtr | mRenderLoop |
std::vector< ViewGroupPtr > | mViewGroups |
CameraControlPtr | mCameraControl |
bool | mGlobalObliqueOrientation |
controlling whether or not all 2d views should be oblique or orthogonal More... | |
SyncedValuePtr | mGlobal2DZoomVal |
InteractiveClipperPtr | mInteractiveClipper |
InteractiveCropperPtr | mInteractiveCropper |
SlicePlanesProxyPtr | mSlicePlanesProxy |
CameraStyleInteractorPtr | mCameraStyleInteractor |
CoreServicesPtr | mBackend |
Creates a pool of views and offers an interface to them, also handles layouts on a centralwidget.
The primitive element is the View. Various derivations of ViewWrapper controls each view and fills them with Reps. ViewWrapper2D controls a 2D slice, ViewWrapper3D controls a full 3D scene, ViewWrapperRTSource shows a video stream.
ViewManager handles the visualization of the 3D data. It composes the Views onto the QWidget using a QGridLayout. This is called a Layout in the GUI. Available layouts can be found inside ViewManager. The QWidget is the centralWidget in the MainWindow.
The views are divided into several groups. Each group, represented by a ViewGroup, has some common characteristics, such as which data to display. These data are stored in a ViewGroupData. The View/ViewWrappers connected to a group, uses the ViewGroupData to know what they should visualize. Each ViewWrapper formats the data in their own way (as slices or 3D renderings).
The right-click menu in the Views are created inside the ViewWrappers. The data they manipulate are (mostly) stored within ViewGroupData.
The Layout uses QGridLayout to organize the views. Each view belong to a group that show the same data in different ways (for example: 3D+ACS). The layout and grouping can be reconfigured in the OR.
Definition at line 129 of file cxViewManager.h.
|
virtual |
Definition at line 141 of file cxViewManager.cpp.
|
protected |
Definition at line 90 of file cxViewManager.cpp.
|
protected |
Definition at line 501 of file cxViewManager.cpp.
|
protected |
Definition at line 487 of file cxViewManager.cpp.
|
signal |
emitted when the active layout changes
|
signal |
emitted when the active view changes
void cx::ViewManager::addXml | ( | QDomNode & | parentNode | ) |
Definition at line 314 of file cxViewManager.cpp.
void cx::ViewManager::autoShowData | ( | DataPtr | data | ) |
Definition at line 621 of file cxViewManager.cpp.
void cx::ViewManager::clear | ( | ) |
Definition at line 379 of file cxViewManager.cpp.
|
static |
Definition at line 83 of file cxViewManager.cpp.
QActionGroup * cx::ViewManager::createInteractorStyleActionGroup | ( | ) |
Definition at line 583 of file cxViewManager.cpp.
|
protected |
Definition at line 524 of file cxViewManager.cpp.
void cx::ViewManager::deactivateCurrentLayout | ( | ) |
deactivate the current layout, leaving an empty layout
deactivate the current layout, leaving an empty layout
Definition at line 408 of file cxViewManager.cpp.
void cx::ViewManager::enableRender | ( | bool | val | ) |
Definition at line 145 of file cxViewManager.cpp.
|
protected |
Look for the index'th 3DView in given group.
Definition at line 608 of file cxViewManager.cpp.
|
signal |
Emits number of frames per second.
ViewPtr cx::ViewManager::get3DView | ( | int | group = 0 , |
int | index = 0 |
||
) |
Look for the index'th 3DView in given group.
Definition at line 389 of file cxViewManager.cpp.
QString cx::ViewManager::getActiveLayout | ( | int | widgetIndex = 0 | ) | const |
returns the active layout
Definition at line 275 of file cxViewManager.cpp.
|
protected |
returns the active view
Definition at line 281 of file cxViewManager.cpp.
|
virtual |
Definition at line 291 of file cxViewManager.cpp.
|
inline |
Definition at line 172 of file cxViewManager.h.
InteractiveClipperPtr cx::ViewManager::getClipper | ( | ) |
Definition at line 265 of file cxViewManager.cpp.
InteractiveCropperPtr cx::ViewManager::getCropper | ( | ) |
Definition at line 270 of file cxViewManager.cpp.
LayoutRepositoryPtr cx::ViewManager::getLayoutRepository | ( | ) |
Definition at line 553 of file cxViewManager.cpp.
QWidget * cx::ViewManager::getLayoutWidget | ( | QWidget * | parent, |
int | index | ||
) |
Initialize the widget and fill with the default view layout. Return the top widget, it should be added to the calling gui.
Definition at line 185 of file cxViewManager.cpp.
NavigationPtr cx::ViewManager::getNavigation | ( | ) |
Definition at line 180 of file cxViewManager.cpp.
CyclicActionLoggerPtr cx::ViewManager::getRenderTimer | ( | ) |
Definition at line 629 of file cxViewManager.cpp.
|
virtual |
Definition at line 425 of file cxViewManager.cpp.
|
inlineprotected |
Definition at line 197 of file cxViewManager.h.
|
protected |
Definition at line 169 of file cxViewManager.cpp.
|
protected |
Definition at line 161 of file cxViewManager.cpp.
|
protected |
When GUI deletes the layout widget, we must clear resources here. Our own destructor gets called in a secondary thread (from pluginframework->stop), which shouldnt destroy GL stuff.
Definition at line 217 of file cxViewManager.cpp.
|
protected |
Definition at line 570 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 558 of file cxViewManager.cpp.
void cx::ViewManager::parseXml | ( | QDomNode | viewmanagerNode | ) |
Definition at line 341 of file cxViewManager.cpp.
|
protected |
Definition at line 454 of file cxViewManager.cpp.
|
signal |
emitted then rendering is enabled/disabled
bool cx::ViewManager::renderingIsEnabled | ( | ) | const |
Definition at line 155 of file cxViewManager.cpp.
|
protected |
Definition at line 576 of file cxViewManager.cpp.
void cx::ViewManager::setActiveLayout | ( | const QString & | layout, |
int | widgetIndex = 0 |
||
) |
change the layout
Change layout from current to layout.
Definition at line 434 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 286 of file cxViewManager.cpp.
|
protected |
Definition at line 496 of file cxViewManager.cpp.
|
protected |
Definition at line 469 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 249 of file cxViewManager.cpp.
|
protected |
Definition at line 306 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 588 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 239 of file cxViewManager.cpp.
|
inline |
Definition at line 139 of file cxViewManager.h.
|
protected |
the active layout (type)
Definition at line 217 of file cxViewManager.h.
|
protected |
Definition at line 218 of file cxViewManager.h.
|
protected |
Definition at line 231 of file cxViewManager.h.
|
protected |
Definition at line 221 of file cxViewManager.h.
|
protected |
Definition at line 230 of file cxViewManager.h.
|
protected |
Definition at line 224 of file cxViewManager.h.
|
protected |
controlling whether or not all 2d views should be oblique or orthogonal
Definition at line 223 of file cxViewManager.h.
|
protected |
Definition at line 226 of file cxViewManager.h.
|
protected |
Definition at line 227 of file cxViewManager.h.
|
protected |
Definition at line 215 of file cxViewManager.h.
|
protected |
Definition at line 216 of file cxViewManager.h.
|
protected |
Definition at line 219 of file cxViewManager.h.
|
protected |
Definition at line 228 of file cxViewManager.h.
|
protected |
Definition at line 220 of file cxViewManager.h.