CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def fill
 
def onScreen
 
def setApplication
 

Private Attributes

 _application
 
 _logo
 

Detailed Description

Definition at line 8 of file AboutDialog.py.

Constructor & Destructor Documentation

def Vispa.Main.AboutDialog.AboutDialog.__init__ (   self,
  application 
)

Definition at line 9 of file AboutDialog.py.

9 
10  def __init__(self, application):
11  self._application = application
12  QDialog.__init__(self, self._application.mainWindow())
13  self.setAttribute(Qt.WA_DeleteOnClose)
14  self.setFocusPolicy(Qt.StrongFocus)
15  self.setWindowFlags(Qt.Window)
16  self.setAutoFillBackground(True)
17  #self.setPalette(QPalette(Qt.white))
18  self.fill()
19  self.setWindowTitle("About "+self._application.windowTitle())
20  self.resize(220, 200)

Member Function Documentation

def Vispa.Main.AboutDialog.AboutDialog.fill (   self)

Definition at line 24 of file AboutDialog.py.

24 
25  def fill(self):
26  # Vispa
27  # icon
28  # Version
29  # Release date os.path.getmtime(filename)
30  # website url
31  # license
32  self.setLayout(QVBoxLayout())
33  if "vispa" in self._application.windowTitle().lower():
34  self._logo = QSvgWidget(":/resources/vispa_logo.svg")
35  sizeHint = self._logo.sizeHint()
36  logo_width_height_ratio = 1.0 * sizeHint.width() / sizeHint.height()
37  logo_width = 200
38  self._logo.setFixedSize(logo_width, logo_width/logo_width_height_ratio)
39  self.layout().addWidget(self._logo)
40  else:
41  label=QLabel(self._application.windowTitle())
42  self.layout().addWidget(label)
43  self.layout().addWidget(QLabel("Version "+ self._application.version()))
44  self.layout().addWidget(QLabel("More information can be found on:"))
45  websiteLink = QLabel("<a href='"+ websiteUrl +"'>"+ websiteUrl +"</a>")
46  websiteLink.setTextInteractionFlags(Qt.LinksAccessibleByMouse | Qt.TextSelectableByMouse)
47  websiteLink.setOpenExternalLinks(True)
48  self.layout().addWidget(websiteLink)
49  buttonBox=QDialogButtonBox()
50  buttonBox.addButton(QDialogButtonBox.Close)
51  self.connect(buttonBox,SIGNAL("rejected()"),self,SLOT("reject()"))
52  self.layout().addWidget(buttonBox)
def Vispa.Main.AboutDialog.AboutDialog.onScreen (   self)

Definition at line 53 of file AboutDialog.py.

References HistoProviderDQM.show(), FWGUIEventFilter.show(), CSCDCCExaminer::OStream.show(), storeTreeInfo.TreeAnalyzer.show(), FWGUIEventDataAdder.show(), CmsShowEDI.show(), and MatrixReader.MatrixReader.show().

53 
54  def onScreen(self):
55  self.show()
56  self.raise_()
57  self.activateWindow()
58  self.setFocus()
def Vispa.Main.AboutDialog.AboutDialog.setApplication (   self,
  app 
)

Definition at line 21 of file AboutDialog.py.

References Vispa.Main.AboutDialog.AboutDialog._application.

21 
22  def setApplication(self, app):
23  self._application = app

Member Data Documentation

Vispa.Main.AboutDialog.AboutDialog._application
private

Definition at line 10 of file AboutDialog.py.

Referenced by Vispa.Main.VispaPlugin.VispaPlugin.application(), Vispa.Main.MainWindow.MainWindow.application(), and Vispa.Main.AboutDialog.AboutDialog.setApplication().

Vispa.Main.AboutDialog.AboutDialog._logo
private

Definition at line 33 of file AboutDialog.py.