Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
GuiBrowsers
python
Vispa
Gui
Zoomable.py
Go to the documentation of this file.
1
class
Zoomable
(object):
2
""" Interface for zoomable objects.
3
"""
4
def
__init__
(self):
5
self.
_zoomFactor
= 1.0
# not just set self._zoomFactor
6
self.
setZoom
(100)
# call setZoom() because it might be overwritten
7
8
def
setZoom
(self, zoom):
9
"""Takes zoom factor in percent.
10
"""
11
# prevent division by zero
12
self.
_zoomFactor
= 0.01 *
max
(
abs
(zoom), 0.000001)
13
14
def
zoom
(self):
15
"""Returns zoom factor in percent.
16
"""
17
return
self.
_zoomFactor
* 100.0
18
19
def
zoomFactor
(self):
20
return
self.
_zoomFactor
21
22
def
incrementZoom
(self):
23
"""Increment zoom by 10 %
24
"""
25
self.
setZoom
(self.
_zoomFactor
* 110)
26
27
def
decrementZoom
(self):
28
"""Decrement zome by 10 %
29
"""
30
self.
setZoom
(self.
_zoomFactor
* 90)
31
Vispa.Gui.Zoomable.Zoomable.zoomFactor
def zoomFactor
Definition:
Zoomable.py:19
Vispa.Gui.Zoomable.Zoomable.setZoom
def setZoom
Definition:
Zoomable.py:8
Vispa.Gui.Zoomable.Zoomable
Definition:
Zoomable.py:1
Vispa.Gui.Zoomable.Zoomable.__init__
def __init__
Definition:
Zoomable.py:4
Vispa.Gui.Zoomable.Zoomable._zoomFactor
_zoomFactor
Definition:
Zoomable.py:5
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
Vispa.Gui.Zoomable.Zoomable.incrementZoom
def incrementZoom
Definition:
Zoomable.py:22
Vispa.Gui.Zoomable.Zoomable.zoom
def zoom
Definition:
Zoomable.py:14
bookConverter.max
max
Definition:
bookConverter.py:166
Vispa.Gui.Zoomable.Zoomable.decrementZoom
def decrementZoom
Definition:
Zoomable.py:27
Generated for CMSSW Reference Manual by
1.8.5