NorMIT-nav
16.5
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... | |
void | pointSampled (Vector3D p_r) |
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 * | getInteractorStyleActionGroup () |
NavigationPtr | getNavigation (int group=0) |
QWidget * | createLayoutWidget (QWidget *parent, int index) |
QWidget * | getLayoutWidget (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... | |
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) |
void | centerToImageCenterInViewGroup (unsigned groupNr) |
void | setCameraStyle (CAMERA_STYLE_TYPE style, int groupIdx) |
void | addDefaultLayout (LayoutData layoutData) |
Static Public Member Functions | |
static ViewManagerPtr | create (VisServicesPtr backend) |
Protected Slots | |
void | settingsChangedSlot (QString key) |
void | onLayoutRepositoryChanged (QString uid) |
void | updateViews () |
void | updateCameraStyleActions () |
void | setActiveView (QString viewUid) |
Protected Member Functions | |
ViewManager (VisServicesPtr backend) | |
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) |
void | autoShowInViewGroups (DataPtr data) |
void | autoResetCameraToSuperiorView () |
void | autoCenterToImageCenter () |
QList< unsigned > | getViewGroupsToAutoShowIn () |
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 |
InteractiveCropperPtr | mInteractiveCropper |
SlicePlanesProxyPtr | mSlicePlanesProxy |
CameraStyleInteractorPtr | mCameraStyleInteractor |
VisServicesPtr | 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 135 of file cxViewManager.cpp.
|
protected |
Definition at line 88 of file cxViewManager.cpp.
|
protected |
Definition at line 485 of file cxViewManager.cpp.
|
protected |
Definition at line 471 of file cxViewManager.cpp.
|
signal |
emitted when the active layout changes
|
signal |
emitted when the active view changes
void cx::ViewManager::addDefaultLayout | ( | LayoutData | layoutData | ) |
Definition at line 686 of file cxViewManager.cpp.
void cx::ViewManager::addXml | ( | QDomNode & | parentNode | ) |
Definition at line 304 of file cxViewManager.cpp.
|
protected |
Definition at line 651 of file cxViewManager.cpp.
|
protected |
Definition at line 638 of file cxViewManager.cpp.
void cx::ViewManager::autoShowData | ( | DataPtr | data | ) |
Definition at line 605 of file cxViewManager.cpp.
|
protected |
Definition at line 615 of file cxViewManager.cpp.
void cx::ViewManager::centerToImageCenterInViewGroup | ( | unsigned | groupNr | ) |
Definition at line 662 of file cxViewManager.cpp.
void cx::ViewManager::clear | ( | ) |
Definition at line 359 of file cxViewManager.cpp.
|
static |
Definition at line 81 of file cxViewManager.cpp.
QWidget * cx::ViewManager::createLayoutWidget | ( | 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 186 of file cxViewManager.cpp.
|
protected |
Definition at line 508 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 388 of file cxViewManager.cpp.
void cx::ViewManager::enableRender | ( | bool | val | ) |
Definition at line 139 of file cxViewManager.cpp.
|
protected |
Look for the index'th 3DView in given group.
Definition at line 593 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 369 of file cxViewManager.cpp.
QString cx::ViewManager::getActiveLayout | ( | int | widgetIndex = 0 | ) | const |
returns the active layout
Definition at line 273 of file cxViewManager.cpp.
|
protected |
returns the active view
Definition at line 279 of file cxViewManager.cpp.
|
virtual |
Definition at line 289 of file cxViewManager.cpp.
|
inline |
Definition at line 172 of file cxViewManager.h.
InteractiveCropperPtr cx::ViewManager::getCropper | ( | ) |
Definition at line 268 of file cxViewManager.cpp.
QActionGroup * cx::ViewManager::getInteractorStyleActionGroup | ( | ) |
Definition at line 568 of file cxViewManager.cpp.
LayoutRepositoryPtr cx::ViewManager::getLayoutRepository | ( | ) |
Definition at line 538 of file cxViewManager.cpp.
QWidget * cx::ViewManager::getLayoutWidget | ( | int | index | ) |
Definition at line 179 of file cxViewManager.cpp.
NavigationPtr cx::ViewManager::getNavigation | ( | int | group = 0 | ) |
Definition at line 173 of file cxViewManager.cpp.
CyclicActionLoggerPtr cx::ViewManager::getRenderTimer | ( | ) |
Definition at line 667 of file cxViewManager.cpp.
|
virtual |
Definition at line 405 of file cxViewManager.cpp.
|
inlineprotected |
Definition at line 198 of file cxViewManager.h.
|
protected |
Definition at line 622 of file cxViewManager.cpp.
|
protected |
Definition at line 163 of file cxViewManager.cpp.
|
protected |
Definition at line 155 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 220 of file cxViewManager.cpp.
|
protected |
Definition at line 555 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 543 of file cxViewManager.cpp.
void cx::ViewManager::parseXml | ( | QDomNode | viewmanagerNode | ) |
Definition at line 324 of file cxViewManager.cpp.
|
signal |
|
protected |
Definition at line 437 of file cxViewManager.cpp.
|
signal |
emitted then rendering is enabled/disabled
bool cx::ViewManager::renderingIsEnabled | ( | ) | const |
Definition at line 149 of file cxViewManager.cpp.
|
protected |
Definition at line 561 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 414 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 284 of file cxViewManager.cpp.
void cx::ViewManager::setCameraStyle | ( | CAMERA_STYLE_TYPE | style, |
int | groupIdx | ||
) |
Definition at line 672 of file cxViewManager.cpp.
|
protected |
Definition at line 480 of file cxViewManager.cpp.
|
protected |
Definition at line 453 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 252 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 573 of file cxViewManager.cpp.
|
protectedslot |
Definition at line 242 of file cxViewManager.cpp.
|
inline |
Definition at line 139 of file cxViewManager.h.
|
protected |
the active layout (type)
Definition at line 218 of file cxViewManager.h.
|
protected |
Definition at line 219 of file cxViewManager.h.
|
protected |
Definition at line 231 of file cxViewManager.h.
|
protected |
Definition at line 222 of file cxViewManager.h.
|
protected |
Definition at line 230 of file cxViewManager.h.
|
protected |
Definition at line 225 of file cxViewManager.h.
|
protected |
controlling whether or not all 2d views should be oblique or orthogonal
Definition at line 224 of file cxViewManager.h.
|
protected |
Definition at line 227 of file cxViewManager.h.
|
protected |
Definition at line 216 of file cxViewManager.h.
|
protected |
Definition at line 217 of file cxViewManager.h.
|
protected |
Definition at line 220 of file cxViewManager.h.
|
protected |
Definition at line 228 of file cxViewManager.h.
|
protected |
Definition at line 221 of file cxViewManager.h.