DzViewportMgr Class Reference
[Interface Components]

Manager class for all visible and non-visible 3D view ports. More...

List of all members.

Enumerations

enum  Layout {
  NO_PANES = 0, SINGLE_PANE, LEFT_RIGHT, TOP_BOTTOM,
  LEFT2_RIGHT, LEFT3_RIGHT, LEFT_RIGHT2, LEFT_RIGHT3,
  TOP2_BOTTOM, TOP3_BOTTOM, TOP_BOTTOM2, TOP_BOTTOM3,
  FOUR_PANE, NUM_LAYOUTS
}
enum  QDMode { QDOff = 0, QDWire, QDSmooth }

Methods

void activateNextTool ()
void activatePrevTool ()
DzViewTool findTool (String className)
DzViewTool getActiveTool ()
DzViewport getActiveViewport ()
Layout getLayout ()
Number getNumTools ()
Number getNumUserDrawStyles ()
Number getNumViewCameras ()
Number getNumViewports ()
Number getNumViews ()
Number getNumVisibleViewports ()
DzViewTool getTool (Number i)
DzUserDrawStyle getUserDrawStyle (Number which)
DzView getView (Number which)
DzCamera getViewCamera (DzCamera::CameraType type)
DzCamera getViewCamera (Number which)
DzViewport getViewport (Number which)
void repaintActive3DViewport ()
void resetViewCameras ()
void setActiveTool (Number which)
void setActiveTool (DzViewTool tool)
void setActiveViewport (DzViewport activeView)
void setLayout (Layout val)
void setViewRatios (Number hSingle, Number h1, Number h2, Number vSingle, Number v1, Number v2)

Signals

void activeToolSwitched ()
 Signature: "activeToolSwitched()"
void activeViewSwitched ()
 Signature: "activeViewSwitched()"
void contextMenuAboutToShow (DzMenu menu, Dz3DViewport view, Point pos)
 Signature: "contextMenuAboutToShow(DzMenu*,Dz3DViewport*,QPoint)"
void manipFinished ()
 Signature: "quickDrawFinished()"
void manipStarted ()
 Signature: "quickDrawStarted()"
void quickDrawModeChanged (QDMode mode)
 Signature: "quickDrawModeChanged(QDMode)"
void redrawsLocked (Boolean onOff)
 Signature: "redrawsLocked(bool)"
void toolListChanged ()
 Signature: "toolListChanged()"
void viewLayoutChanged ()
 Signature: "viewLayoutChanged()"
void viewportCameraListChanged ()
 Signature: "viewportCameraListChanged()"


Detailed Description

Manager class for all visible and non-visible 3D view ports.

There is only one of these widgets in the application. This widget is created and owned by DzMainWindow, and can be accessed by requesting a pointer to it from DzMainWindow via DzMainWindow::getViewportMgr().


Member Enumeration Documentation

enum DzViewportMgr::Layout

The possible layout styles.

Enumerator:
NO_PANES  No visible view ports
SINGLE_PANE  A single visible viewport
LEFT_RIGHT  2 visible view ports split the view area into right and left
TOP_BOTTOM  2 visible view ports split the view area into top and bottom
LEFT2_RIGHT  3 visible view ports 2 on the left side and 1 on the right
LEFT3_RIGHT  4 visible view ports 3 on the left side and 1 on the right
LEFT_RIGHT2  3 visible view ports 2 on the right side and 1 on the left
LEFT_RIGHT3  4 visible view ports 3 on the right side and 1 on the left
TOP2_BOTTOM  3 visible view ports 2 on the top side and 1 on the bottom
TOP3_BOTTOM  4 visible view ports 3 on the top side and 1 on the bottom
TOP_BOTTOM2  3 visible view ports 2 on the bottom side and 1 on the top
TOP_BOTTOM3  4 visible view ports 3 on the bottom side and 1 on the top
FOUR_PANE  4 visible view ports one in each corner
NUM_LAYOUTS  Total number of layouts

enum DzViewportMgr::QDMode

The possible Quick Draw modes

Enumerator:
QDOff  No Quick draw enabled.
QDWire  Wireframe Quick draw enabled.
QDSmooth  Smooth-Shade Quick draw enabled.


Member Function Documentation

void DzViewportMgr::activateNextTool (  ) 

Sets the next tool in the list after the currently active tool to be the currently active tool.

void DzViewportMgr::activatePrevTool (  ) 

Sets the tool in the list before the currently active tool to be the currently active tool.

void DzViewportMgr::activeToolSwitched (  )  [signal]

Signature: "activeToolSwitched()"

Emitted when the active tool changes

void DzViewportMgr::activeViewSwitched (  )  [signal]

Signature: "activeViewSwitched()"

Emitted when the active view changes

DzViewportMgr::contextMenuAboutToShow ( DzMenu  menu,
Dz3DViewport  view,
Point  pos 
) [signal]

Signature: "contextMenuAboutToShow(DzMenu*,Dz3DViewport*,QPoint)"

Emitted when the active viewport is about to display a context menu. Other objects can connect to this signal to add custom items to the menu that is displayed to the user.

DzViewTool DzViewportMgr::findTool ( String  className  ) 

Returns:
The tool with the given class name - NULL if none exists.

DzViewTool DzViewportMgr::getActiveTool (  ) 

Returns:
The active view tool.

DzViewport DzViewportMgr::getActiveViewport (  ) 

Returns:
The currently active viewport

Layout DzViewportMgr::getLayout (  ) 

Returns:
Current view layout.

Number DzViewportMgr::getNumTools (  ) 

Returns:
Number of view tools.

int DzViewportMgr::getNumUserDrawStyles (  ) 

Returns:
The number of user selectable draw styles

Number DzViewportMgr::getNumViewCameras (  ) 

Returns:
Number of view cameras

Number DzViewportMgr::getNumViewports (  ) 

Returns:
The number of view ports in the application. Currently, this will always be 4, but it is safest to call this function to get the number of available view ports.

int DzViewportMgr::getNumViews (  ) 

Returns:
The number of available view classes

Number DzViewportMgr::getNumVisibleViewports (  ) 

Returns:
The number of view ports currently showing.

DzViewTool DzViewportMgr::getTool ( Number  i  ) 

Returns:
The view tool at the given index.

DzUserDrawStyle DzViewportMgr::getUserDrawStyle ( Number  which  ) 

Returns:
A new instance of the draw style at the given index

DzView DzViewportMgr::getView ( Number  which  ) 

Returns:
A new instance of the view class at the given index.

DzCamera DzViewportMgr::getViewCamera ( DzCamera::CameraType  type  ) 

Returns:
The View (non-animatable) camera of the given type.

DzCamera DzViewportMgr::getViewCamera ( Number  which  ) 

Returns:
The View (non-animatable) camera at the given index.

DzViewport DzViewportMgr::getViewport ( Number  which  ) 

Returns:
The viewport at the given index.

void DzViewportMgr::manipFinished (  )  [signal]

Signature: "quickDrawFinished()"

Emitted when a quick draw operation is finished

void DzViewportMgr::manipStarted (  )  [signal]

Signature: "quickDrawStarted()"

Emitted when a quick draw operation is started

void DzViewportMgr::quickDrawModeChanged ( DzViewportMgr::QDMode  _t1  )  [signal]

Signature: "quickDrawModeChanged(QDMode)"

Emitted when the quick draw mode changes

DzViewportMgr::redrawsLocked ( Boolean  onOff  )  [signal]

Signature: "redrawsLocked(bool)"

Emitted when the redraw lock state changes

void DzViewportMgr::repaintActive3DViewport (  ) 

A convenience method that forces a repaint of the currently active 3D viewport.

void DzViewportMgr::resetViewCameras (  ) 

Resets all the view cameras to their defaults.

void DzViewportMgr::setActiveTool ( Number  which  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void DzViewportMgr::setActiveTool ( DzViewTool  tool  ) 

Sets the currently active 3D tool.

void DzViewportMgr::setActiveViewport ( DzViewport  activeView  ) 

Set the active DzViewport. The given DzViewport must already be attached as an interface to this Scene.

void DzViewportMgr::setLayout ( Layout  val  ) 

Set the current layout. If we are in single pane mode, the new layout will take effect after single pane mode is switched off.

void DzViewportMgr::setViewRatios ( Number  hSingle,
Number  h1,
Number  h2,
Number  vSingle,
Number  v1,
Number  v2 
)

Sets the ratios that are used to layout the view ports inside the view area. Each value is a percentage of the available area that will be allocated to the given view port(s). The values passed in are clamped to valid ranges before applying them. The values should be specified in decimal notation - i.e. 0.0 is 0%, 0.5 is 50%, and 1.0 is 100%. The minimum percentage of the area allocated to any viewport on any axis is 20% (0.2). Therefore, any values that are below this value will be increased to this value, and any values that would result in a remainder less than this value will be decreased.

For example, when the view ports are laid out one right, and on left, there is one vertical division, so the vSingle value will be used. If the value of vSingle is 0.6 and the width of the view area is 1000 pixels, then the left view will be (0.6 * 1000) = 600 pixels wide, and the right view will be the remainder (1000 - 600) = 400 pixels wide.

In a more complex example, the viewports are laid out three on top, and one on bottom. There is one horizontal division, so the hSingle value is used, and two vertical divisions, so the v1 and v2 values are used. The value of hSingle is 0.35, the value of v1 is 0.3, the value of v2 is 0.5, and the view area is 1000 x 1000 pixels. Then, the top views will be (0.35 * 1000) = 350 pixels high, and the bottom view will be (1000 - 350) = 650 pixels high. The top-left view will be (0.3 * 1000) = 300 pixels wide, the top-center view will be (0.5 * 1000) = 500 pixels wide, and the top-right view will be (1000 - 300 - 500) = 200 pixels wide.

Parameters:
hSingle The percentage of the height taken by the top view port(s) when the area has a single horizontal division
h1 The percentage of the height taken by the top view port when the area has two horizontal divisions
h2 The percentage of the height taken by the center view port when the area has two horizontal divisions
vSingle The percentage of the width taken by the left view port(s) when the area has a single vertical division
v1 The percentage of the width taken by the left view port when the area has two vertical divisions
v2 The percentage of the width taken by the center view port when the area has two vertical divisions

void DzViewportMgr::toolListChanged (  )  [signal]

Signature: "toolListChanged()"

Emitted when the tool list changes

void DzViewportMgr::viewLayoutChanged (  )  [signal]

Signature: "viewLayoutChanged()"

Emitted when the layout of the view ports changes

void DzViewportMgr::viewportCameraListChanged (  )  [signal]

Signature: "viewportCameraListChanged()"

Emitted when the global list of available cameras changes


Generated on Thu Sep 24 12:21:16 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.