CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Vispa.Gui.Zoomable.Zoomable Class Reference
Inheritance diagram for Vispa.Gui.Zoomable.Zoomable:
Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Views.LineDecayView.DecayObject Vispa.Gui.PortConnection.PointToPointConnection Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner Vispa.Views.LineDecayView.DecayLine Vispa.Views.LineDecayView.DecayNode Vispa.Gui.PortConnection.PortConnection Vispa.Gui.ConnectableWidget.ConnectableWidget Vispa.Gui.MenuWidget.MenuWidget Vispa.Gui.PortWidget.PortWidget Vispa.Main.StartupScreen.StartupScreen Vispa.Views.LineDecayView.ParticleWidget Vispa.Views.WidgetView.WidgetView Vispa.Gui.PortConnection.LinearPortConnection Vispa.Gui.WidgetContainer.WidgetContainer Vispa.Gui.PortWidget.SinkPort Vispa.Gui.PortWidget.SourcePort Vispa.Views.BoxDecayView.BoxDecayView Vispa.Views.LineDecayView.LineDecayView Vispa.Views.BoxDecayView.BoxDecayContainer Vispa.Views.LineDecayView.LineDecayContainer Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView Vispa.Plugins.EdmBrowser.EdmBrowserBoxView.EdmBrowserBoxView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConnectionStructureView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.SequenceStructureView

Public Member Functions

def __init__
 
def decrementZoom
 
def incrementZoom
 
def setZoom
 
def zoom
 
def zoomFactor
 

Private Attributes

 _zoomFactor
 

Detailed Description

Interface for zoomable objects.

Definition at line 1 of file Zoomable.py.

Constructor & Destructor Documentation

def Vispa.Gui.Zoomable.Zoomable.__init__ (   self)

Definition at line 4 of file Zoomable.py.

4 
5  def __init__(self):
6  self._zoomFactor = 1.0 # not just set self._zoomFactor
7  self.setZoom(100) # call setZoom() because it might be overwritten

Member Function Documentation

def Vispa.Gui.Zoomable.Zoomable.decrementZoom (   self)
Decrement zome by 10 %

Definition at line 27 of file Zoomable.py.

References Vispa.Gui.Zoomable.Zoomable._zoomFactor, Vispa.Gui.Zoomable.Zoomable.setZoom(), Vispa.Gui.PortConnection.PointToPointConnection.setZoom(), Vispa.Gui.ConnectableWidget.ConnectableWidget.setZoom(), and Vispa.Gui.VispaWidget.VispaWidget.setZoom().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea.wheelEvent().

27 
28  def decrementZoom(self):
29  """Decrement zome by 10 %
30  """
31  self.setZoom(self._zoomFactor * 90)
def Vispa.Gui.Zoomable.Zoomable.incrementZoom (   self)
Increment zoom by 10 %

Definition at line 22 of file Zoomable.py.

References Vispa.Gui.Zoomable.Zoomable._zoomFactor, Vispa.Gui.Zoomable.Zoomable.setZoom(), Vispa.Gui.PortConnection.PointToPointConnection.setZoom(), Vispa.Gui.ConnectableWidget.ConnectableWidget.setZoom(), and Vispa.Gui.VispaWidget.VispaWidget.setZoom().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea.wheelEvent().

22 
23  def incrementZoom(self):
24  """Increment zoom by 10 %
25  """
26  self.setZoom(self._zoomFactor * 110)
def Vispa.Gui.Zoomable.Zoomable.setZoom (   self,
  zoom 
)
Takes zoom factor in percent.

Definition at line 8 of file Zoomable.py.

References Vispa.Gui.Zoomable.Zoomable._zoomFactor, funct.abs(), and bookConverter.max.

Referenced by Vispa.Gui.Zoomable.Zoomable.decrementZoom(), Vispa.Gui.Zoomable.Zoomable.incrementZoom(), Vispa.Main.TabController.TabController.zoomAll(), Vispa.Main.TabController.TabController.zoomDialog(), Vispa.Main.TabController.TabController.zoomHundred(), and Vispa.Main.TabController.TabController.zoomUser().

8 
9  def setZoom(self, zoom):
10  """Takes zoom factor in percent.
11  """
12  # prevent division by zero
13  self._zoomFactor = 0.01 * max(abs(zoom), 0.000001)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def Vispa.Gui.Zoomable.Zoomable.zoom (   self)
Returns zoom factor in percent.

Definition at line 14 of file Zoomable.py.

References Vispa.Gui.Zoomable.Zoomable._zoomFactor.

Referenced by Vispa.Gui.PortConnection.PointToPointConnection.draw(), Vispa.Gui.VispaWidget.VispaWidget.paintEvent(), Vispa.Gui.VispaWidget.VispaWidget.setZoom(), Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea.wheelEvent(), Vispa.Main.TabController.TabController.zoomAll(), Vispa.Main.TabController.TabController.zoomDialog(), and Vispa.Main.TabController.TabController.zoomHundred().

14 
15  def zoom(self):
16  """Returns zoom factor in percent.
17  """
18  return self._zoomFactor * 100.0
def Vispa.Gui.Zoomable.Zoomable.zoomFactor (   self)

Definition at line 19 of file Zoomable.py.

References Vispa.Gui.Zoomable.Zoomable._zoomFactor.

Referenced by Vispa.Views.LineDecayView.DecayLine.arrowBoundingRect(), Vispa.Views.LineDecayView.LineDecayView.autolayout(), Vispa.Views.LineDecayView.LineDecayContainer.autolayoutThreadFinished(), Vispa.Gui.PortConnection.PointToPointConnection.betweenTwoPoints(), Vispa.Gui.PortConnection.PointToPointConnection.bottomRight(), Vispa.Views.LineDecayView.DecayLine.boundingRect(), Vispa.Gui.PortConnection.PointToPointConnection.calculateRoute(), Vispa.Views.LineDecayView.LineDecayContainer.childrenRect(), Vispa.Views.LineDecayView.DecayObject.containsAreaSquareRect(), Vispa.Views.LineDecayView.DecayLine.containsPoint(), Vispa.Views.BoxDecayView.BoxDecayView.contentStartX(), Vispa.Views.BoxDecayView.BoxDecayView.contentStartY(), Vispa.Views.LineDecayView.LineDecayContainer.contentStartY(), Vispa.Views.LineDecayView.LineDecayContainer.createChildContainer(), Vispa.Gui.PortConnection.PointToPointConnection.drawCorner(), Vispa.Gui.PortConnection.PointToPointConnection.drawLineSection(), Vispa.Gui.MenuWidget.MenuWidget.drawMenuEntries(), Vispa.Gui.PortConnection.PointToPointConnection.drawSection(), Vispa.Gui.PortConnection.PointToPointConnection.drawStraightLine(), Vispa.Views.LineDecayView.LineDecayContainer.dropEvent(), Vispa.Gui.PortConnection.PointToPointConnection.getRectBetweenTwoPoints(), Vispa.Views.LineDecayView.DecayLine.labelBoundingRect(), Vispa.Views.LineDecayView.DecayLine.length(), Vispa.Views.LineDecayView.DecayLine.lineWidth(), Vispa.Gui.MenuWidget.MenuWidget.mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget.mousePressEvent(), Vispa.Views.LineDecayView.DecayNode.move(), Vispa.Views.LineDecayView.DecayNode.paint(), Vispa.Views.LineDecayView.DecayLine.paint(), Vispa.Views.LineDecayView.DecayNode.position(), Vispa.Views.LineDecayView.DecayNode.select(), Vispa.Views.LineDecayView.DecayLine.setLabel(), Vispa.Views.LineDecayView.DecayLine.setZoom(), Vispa.Gui.WidgetContainer.WidgetContainer.sizeHint(), Vispa.Views.LineDecayView.LineDecayContainer.sizeHint(), Vispa.Gui.PortConnection.PointToPointConnection.topLeft(), and Vispa.Views.LineDecayView.DecayLine.transform().

19 
20  def zoomFactor(self):
21  return self._zoomFactor

Member Data Documentation

Vispa.Gui.Zoomable.Zoomable._zoomFactor
private

Definition at line 5 of file Zoomable.py.

Referenced by Vispa.Gui.Zoomable.Zoomable.decrementZoom(), Vispa.Gui.Zoomable.Zoomable.incrementZoom(), Vispa.Gui.Zoomable.Zoomable.setZoom(), Vispa.Gui.Zoomable.Zoomable.zoom(), and Vispa.Gui.Zoomable.Zoomable.zoomFactor().