Main Page
Namespaces
Classes
Package Documentation
src
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
Definition:
Zoomable.py:1
Vispa.Gui.Zoomable.Zoomable._zoomFactor
_zoomFactor
Definition:
Zoomable.py:5
Vispa.Gui.Zoomable.Zoomable.__init__
def __init__(self)
Definition:
Zoomable.py:4
Vispa.Gui.Zoomable.Zoomable.incrementZoom
def incrementZoom(self)
Definition:
Zoomable.py:22
Vispa.Gui.Zoomable.Zoomable.setZoom
def setZoom(self, zoom)
Definition:
Zoomable.py:8
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
Vispa.Gui.Zoomable.Zoomable.zoom
def zoom(self)
Definition:
Zoomable.py:14
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:17
Vispa.Gui.Zoomable.Zoomable.decrementZoom
def decrementZoom(self)
Definition:
Zoomable.py:27
Vispa.Gui.Zoomable.Zoomable.zoomFactor
def zoomFactor(self)
Definition:
Zoomable.py:19
resolutioncreator_cfi.object
object
Definition:
resolutioncreator_cfi.py:4
Generated for CMSSW Reference Manual by
1.8.11