13 EventBrowserTabController.__init__(self, plugin)
18 """ Returns supported file type: root. 20 return [(
'root',
'EDM root file')]
21 staticSupportedFileTypes = staticmethod(staticSupportedFileTypes)
24 EventBrowserTabController.updateViewMenu(self)
25 self.
plugin().expandToDepthAction().setVisible(
True)
26 self.
plugin().boxContentAction().setVisible(
False)
31 logging.debug(__name__ +
": toggleCollapsed()")
40 EventBrowserTabController.onSelected(self,self.
dataAccessor().read(select))
45 EventBrowserTabController.updateCenterView(self,propertyView)
48 """ Show dialog and expand center view to depth. 50 if hasattr(QInputDialog,
"getInteger"):
52 (depth, ok) = QInputDialog.getInteger(self.
tab(),
"Expand to depth...",
"Input depth:", self.
_treeDepth, 0)
55 (depth, ok) = QInputDialog.getInt(self.
tab(),
"Expand to depth...",
"Input depth:", self.
_treeDepth, 0)
62 popup=QMenu(self.
tab().centerViewMenuButton())
63 popup.addAction(self.
plugin()._expandToDepthAction)
64 popup.addAction(self.
plugin()._saveImageAction)
65 popup.addAction(self.
plugin()._zoomAction)
66 popup.addAction(self.
plugin()._filterAction)
70 popup.addAction(action)
71 if not isinstance(point,QPoint):
72 point=self.
tab().centerViewMenuButton().mapToGlobal(QPoint(self.
tab().centerViewMenuButton().
width(),0))
82 self.
tab().propertyView().setDataObject(
None)
87 """ read options from ini """ 88 EventBrowserTabController.loadIni(self)
89 ini = self.
plugin().application().ini()
90 if ini.has_option(
"edm",
"filter branches"):
91 self.
dataAccessor().setFilterBranches(ini.get(
"edm",
"filter branches")==
"True")
92 if ini.has_option(
"edm",
"underscore properties"):
93 self.
dataAccessor().setUnderscoreProperties(ini.get(
"edm",
"underscore properties")==
"True")
94 self.
plugin().hideUnderscorePropertiesAction().setChecked(
not self.
dataAccessor().underscoreProperties())
97 """ write options to ini """ 98 EventBrowserTabController.saveIni(self)
99 ini = self.
plugin().application().ini()
100 if not ini.has_section(
"edm"):
101 ini.add_section(
"edm")
102 ini.set(
"edm",
"filter branches", self.
dataAccessor().filterBranches())
103 ini.set(
"edm",
"underscore properties", self.
dataAccessor().underscoreProperties())
104 self.
plugin().application().writeIni()
107 """ Open event content dialog """ 108 logging.debug(__name__ +
": eventContent")
109 dialog=
EventContentDialog(self.
tab(),
"This dialog let's you compare the contents of your edm root file with another dataformat / edm root file. You can compare either to a dataformat definition from a txt file (e.g. RECO_3_3_0) or any edm root file by selecting an input file.")
110 branches=[branch[0].
split(
"_")
for branch
in self.
dataAccessor().filteredBranches()]
111 name = os.path.splitext(os.path.basename(self.
_filename))[0]
112 dialog.setEventContent(name,branches)
def centerViewMenuButtonClicked(self, point=None)
def onTreeViewSelected(self, select)
roAction_t actions[nactions]
def onSelected(self, select)
def toggleUnderscoreProperties(self)
def __init__(self, plugin)
def updateCenterView(self, propertyView=True)
def staticSupportedFileTypes()
def updateCenterView(self, propertyView=True)
def onTreeViewSelected(self, select)
def toggleFilterBranches(self)
std::string toString(const std::pair< T, T > &aT)
def expandToDepthDialog(self)
def toggleCollapsed(self, object)