Main Page
Namespaces
Classes
Package Documentation
GIT Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
GuiBrowsers
python
Vispa
Gui
ZoomableScrollableWidgetOwner.py
Go to the documentation of this file.
1
import
logging
2
3
from
PyQt4.QtGui
import
*
4
5
from
Vispa.Gui.ZoomableWidget
import
ZoomableWidget
6
from
Vispa.Gui.ZoomableScrollArea
import
ZoomableScrollArea
7
from
Vispa.Gui.ConnectableWidgetOwner
import
ConnectableWidgetOwner
8
9
class
ZoomableScrollableWidgetOwner
(
ConnectableWidgetOwner
,
ZoomableWidget
):
10
""" Area for drawing connectable widgets.
11
"""
12
def
__init__
(self, parent=None):
13
logging.debug(__name__ +
": __init__"
)
14
ZoomableWidget.__init__(self, parent)
15
ConnectableWidgetOwner.__init__(self)
16
17
def
setZoom
(self, zoom):
18
""" Sets zoom.
19
"""
20
ZoomableWidget.setZoom(self, zoom)
21
# make sure connections are updated after widgets were moved
22
# setZoom function of ZoomableWidget does not guarantee connections are updated after widgets
23
self.
updateConnections
()
24
25
def
autosizeScrollArea
(self):
26
""" If this window is widget of a ZoomableScrollArea tell scroll area to autosize.
27
"""
28
if
self.parent()
and
isinstance(self.parent().
parent
(), ZoomableScrollArea):
29
# Why parent().parent()?
30
# parent() is QScrollArea.viewport(), basically the QScrollArea without scroll bars
31
# parent().parent() is eventually the QScrollArea
32
self.parent().
parent
().autosizeScrollWidget()
33
34
def
widgetDragged
(self, widget):
35
""" Calls autosizeScrollArea().
36
"""
37
ConnectableWidgetOwner.widgetDragged(self, widget)
38
self.
autosizeScrollArea
()
dbtoconf.parent
list parent
Definition:
dbtoconf.py:74
Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.updateConnections
def updateConnections
Definition:
ConnectableWidgetOwner.py:25
Vispa.Gui.ZoomableScrollArea
Definition:
ZoomableScrollArea.py:1
Vispa.Gui.ZoomableWidget.ZoomableWidget
Definition:
ZoomableWidget.py:10
Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.widgetDragged
def widgetDragged
Definition:
ZoomableScrollableWidgetOwner.py:34
Vispa.Gui.ConnectableWidgetOwner
Definition:
ConnectableWidgetOwner.py:1
Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner
Definition:
ZoomableScrollableWidgetOwner.py:9
Vispa.Gui.ZoomableWidget
Definition:
ZoomableWidget.py:1
Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.setZoom
def setZoom
Definition:
ZoomableScrollableWidgetOwner.py:17
Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.autosizeScrollArea
def autosizeScrollArea
Definition:
ZoomableScrollableWidgetOwner.py:25
QtGui
Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.__init__
def __init__
Definition:
ZoomableScrollableWidgetOwner.py:12
Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner
Definition:
ConnectableWidgetOwner.py:11
Generated for CMSSW Reference Manual by
1.8.5