CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
lumiQTWidget.ApplicationWindow Class Reference
Inheritance diagram for lumiQTWidget.ApplicationWindow:

Public Member Functions

def __init__ (self, fig=None)
 
def closeEvent (self, ce)
 
def destroy (self)
 
def fileQuit (self)
 
def saveAs (self, fig)
 

Public Attributes

 main_widget
 
 qApp
 

Detailed Description

main evt loop

Definition at line 16 of file lumiQTWidget.py.

Constructor & Destructor Documentation

def lumiQTWidget.ApplicationWindow.__init__ (   self,
  fig = None 
)

Definition at line 20 of file lumiQTWidget.py.

20  def __init__(self,fig=None):
21  self.qApp=QtGui.QApplication(sys.argv)#every PyQt4 application must create an application object
22  QtGui.QMainWindow.__init__(self)
23  self.setWindowTitle('lumi plot')
24  self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
25  self.main_widget = QtGui.QWidget(self)
26  l = QtGui.QVBoxLayout(self.main_widget)
27  sc = LumiCanvas(self.main_widget,fig=fig)
28  bn = QtGui.QPushButton("Save to File",self.main_widget)
29  bn.clicked.connect(lambda:self.saveAs(fig))
30  l.addWidget(sc)
31  l.addWidget(bn)
32  self.main_widget.setFocus()
33  self.setCentralWidget(self.main_widget)
34 
def __init__(self, fig=None)
Definition: lumiQTWidget.py:20

Member Function Documentation

def lumiQTWidget.ApplicationWindow.closeEvent (   self,
  ce 
)

Definition at line 41 of file lumiQTWidget.py.

References lumiQTWidget.ApplicationWindow.fileQuit().

41  def closeEvent(self, ce):
42  self.fileQuit()
def lumiQTWidget.ApplicationWindow.destroy (   self)

Definition at line 43 of file lumiQTWidget.py.

43  def destroy(self):
44  sys.exit(self.qApp.exec_())
def lumiQTWidget.ApplicationWindow.fileQuit (   self)

Definition at line 39 of file lumiQTWidget.py.

References Vispa.Plugins.EventBrowser.EventFileAccessor.EventFileAccessor.close(), StorageAccount.close, RemoteFile.close(), csvReporter.csvReporter.close(), AlignmentCorrelationsIO.close(), AlignmentCorrelationsIORoot.close(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.close(), AlignmentParametersIO.close(), RawFile.close(), PhysicsTools::TrainerMonitoring.close(), AlignmentUserVariablesIO.close(), AlignableDataIORoot.close(), IOChannel.close(), AlignableDataIO.close(), LocalCacheFile.close(), binary_ifstream.close(), binary_ofstream.close(), HIPUserVariablesIORoot.close(), AlignmentParametersIORoot.close(), DavixFile.close(), MuonErrorMatrix.close(), LStoreFile.close(), StorageAccountProxy.close(), DCacheFile.close(), looper.Setup.close(), ALIFileIn.close(), cond::persistency::SessionImpl.close(), Storage.close(), cond::persistency::PayloadReader.close(), L1GtVhdlTemplateFile.close(), XrdFile.close(), L1GtPatternWriter.close(), File.close(), MillePedeVariablesIORoot.close(), DTTPGLutFile.close(), L1TriggerLutFile.close(), cond::persistency::Session.close(), DQM.DQMReader.close(), edm::RootOutputTree.close(), edm::FileBlock.close(), edm::RootTree.close(), edm::RootFile.close(), cond::CSScopedSession.close(), cond::persistency::TransactionScope.close(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.close(), and Vispa.Main.TabController.TabController.close().

Referenced by lumiQTWidget.ApplicationWindow.closeEvent().

39  def fileQuit(self):
40  self.close()
def lumiQTWidget.ApplicationWindow.saveAs (   self,
  fig 
)

Definition at line 35 of file lumiQTWidget.py.

35  def saveAs(self,fig):
36  filename=QtGui.QFileDialog.getSaveFileName(self,"Save plot as file","","(*.png)")
37  if filename == "": return
38  fig.savefig(filename,format="PNG")

Member Data Documentation

lumiQTWidget.ApplicationWindow.main_widget

Definition at line 25 of file lumiQTWidget.py.

lumiQTWidget.ApplicationWindow.qApp

Definition at line 21 of file lumiQTWidget.py.