CMS 3D CMS Logo

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__ (self, application)
 
def fill (self)
 
def onScreen (self)
 
def setApplication (self, app)
 

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

Member Function Documentation

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

Definition at line 24 of file AboutDialog.py.

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

Definition at line 53 of file AboutDialog.py.

References FWGUIEventFilter.show(), storeTreeInfo.TreeAnalyzer.show(), FWGUIEventDataAdder.show(), CmsShowEDI.show(), and MatrixReader.MatrixReader.show().

53  def onScreen(self):
54  self.show()
55  self.raise_()
56  self.activateWindow()
57  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  def setApplication(self, app):
22  self._application = app
23 

Member Data Documentation

Vispa.Main.AboutDialog.AboutDialog._application
private
Vispa.Main.AboutDialog.AboutDialog._logo
private

Definition at line 33 of file AboutDialog.py.