4 from PyQt4.QtGui import QFrame,QHeaderView,QToolButton,QStandardItemModel,QVBoxLayout,QSizePolicy
15 """ The BrowserTab has three views and is controlled by the BrowserControllerTab. 17 def __init__(self, parent=None, topLevelPropertyView=False):
18 logging.debug(__name__ +
": __init__")
19 SplitterTab.__init__(self, parent, topLevelPropertyView)
27 if topLevelPropertyView:
29 self.setSizes([700, 300])
34 """ Create the tree view. 40 self._treeviewArea.header().setText(
"Tree View")
41 self._treeviewArea.header().setToolTip(
"click on '>' for options of this view")
44 self._treeviewArea.addWidget(self.
_treeView)
47 """ Create the center view. 53 self._centerArea.header().setText(
"Center View")
54 self._centerArea.header().setToolTip(
"click on '>' for options of this view")
55 self._centerArea.header().createMenuButton()
62 """ Set the center view. 64 logging.debug(self.__class__.__name__ +
": setCenterView()")
67 self._scrollArea.takeWidget()
69 if isinstance(self.
centerView(), ZoomableScrollableWidgetOwner):
71 self.
centerView().setZoom(self._scrollArea.zoom())
73 self._scrollArea.show()
75 self.
centerView().resize(self._scrollArea.size())
76 self._scrollArea.hide()
77 self._centerArea.layout().addWidget(self.
centerView())
87 """ Sets controller for this tab and connects signals etc. 89 SplitterTab.setController(self, controller)
91 self.connect(self.
_scrollArea, SIGNAL(
'wheelZoom()'), controller.resetZoomButtonPressedBefore)
92 self.connect(self.
_scrollArea, SIGNAL(
"zoomChanged(float)"), controller.zoomChanged)
93 self.connect(self.
centerViewMenuButton(), SIGNAL(
"clicked(bool)"), controller.centerViewMenuButtonClicked)
94 self.connect(self.
treeViewMenuButton(), SIGNAL(
"clicked(bool)"), controller.treeViewMenuButtonClicked)
100 return self._treeviewArea.header().menuButton()
103 return self._centerArea.header().menuButton()
106 return self._treeviewArea.header()
109 return self._centerArea.header()
112 self._centerArea.header().setText(text)
115 self._treeviewArea.header().setText(text)
def createCenterView(self, parent=None)
def horizontalSplitter(self)
def setTreeViewHeader(self, text)
def treeViewMenuButton(self)
def centerViewMenuButton(self)
def createTreeView(self, parent=None)
def createPropertyView(self)
def setCenterViewHeader(self, text)
def centerViewHeader(self)
def setController(self, controller)
def setCenterView(self, view)
def __init__(self, parent=None, topLevelPropertyView=False)