CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
lumiQTWidget.ApplicationWindow Class Reference
Inheritance diagram for lumiQTWidget.ApplicationWindow:

Public Member Functions

def __init__
 
def closeEvent
 
def destroy
 
def fileQuit
 
def saveAs
 

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

Member Function Documentation

def lumiQTWidget.ApplicationWindow.closeEvent (   self,
  ce 
)

Definition at line 41 of file lumiQTWidget.py.

References lumiQTWidget.ApplicationWindow.fileQuit().

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

Definition at line 43 of file lumiQTWidget.py.

43 
44  def destroy(self):
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(), RemoteFile.close(), csvReporter.csvReporter.close(), AlignmentCorrelationsIO.close(), AlignmentCorrelationsIORoot.close(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.close(), AlignmentParametersIO.close(), ora::SharedSession.close(), AlignableDataIO.close(), AlignableDataIORoot.close(), RawFile.close(), cond::DbConnection::ConnectionImpl.close(), PhysicsTools::TrainerMonitoring.close(), AlignmentUserVariablesIO.close(), IOChannel.close(), LocalCacheFile.close(), binary_ofstream.close(), binary_ifstream.close(), AlignmentParametersIORoot.close(), StorageAccountProxy.close(), LStoreFile.close(), RFIOFile.close(), MuonErrorMatrix.close(), DCacheFile.close(), ThePEG::LesHouchesInterface.close(), HIPUserVariablesIORoot.close(), ALIFileIn.close(), XrdFile.close(), cond::DbConnection.close(), Storage.close(), File.close(), L1GtVhdlTemplateFile.close(), L1GtPatternWriter.close(), MillePedeVariablesIORoot.close(), cond::DbSession.close(), L1TriggerLutFile.close(), DTTPGLutFile.close(), edm::RootFile.close(), edm::RootTree.close(), edm::RootOutputTree.close(), cond::SessionImpl.close(), edm::FileBlock.close(), cond::CSScopedSession.close(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.close(), and Vispa.Main.TabController.TabController.close().

Referenced by lumiQTWidget.ApplicationWindow.closeEvent().

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

Definition at line 35 of file lumiQTWidget.py.

35 
36  def saveAs(self,fig):
37  filename=QtGui.QFileDialog.getSaveFileName(self,"Save plot as file","","(*.png)")
38  if filename == "": return
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.