source: sasview/src/sas/qtgui/AboutBox.py @ e540cd2

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since e540cd2 was 481ff26, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 8 years ago

Modified Data Explorer slightly

  • Property mode set to 100755
File size: 2.2 KB
Line 
1import functools
2
3import sas.sasview
4import LocalConfig
5import GuiUtils
6
7from UI.AboutUI import AboutUI
8
9class AboutBox(AboutUI):
10    def __init__(self, parent=None):
11        super(AboutBox, self).__init__(parent)
12        self.setWindowTitle("About")
13
14        self.addText()
15
16        self.addActions()
17
18    def addText(self):
19        """
20        Modify the labels so the text corresponds to the current version
21        """
22        version = sas.sasview.__version__
23
24        self.lblVersion.setText(str(version))
25        lbl_font = self.font()
26        lbl_font.setPointSize(24)
27        self.lblVersion.setFont(lbl_font)
28        about_text = r'<html><head/><body><p>'
29        about_text += '<p>Build ' + str(LocalConfig.__build__) +'</p>'
30        about_text += '<p>' + LocalConfig._copyright + '</p>'
31        about_text += r'<p><a href=http://www.sasview.org>http://www.sasview.org</a></p><br/>'
32        about_text += '<p>Comments? Bugs? Requests?<br/>'
33        about_text += r'<a href=mailto:help@sasview.org>Send us a ticket</a></p><br/>'
34        about_text += r'<a href=' + str(LocalConfig.__download_page__)\
35                   + 'Get the latest version</a></p><br/>'
36        self.lblAbout.setText(about_text)
37
38        # Enable link clicking on the label
39        self.lblAbout.setOpenExternalLinks(True)
40
41    def addActions(self):
42        """
43        Add actions to the logo push buttons
44        """
45        self.cmdLinkUT.clicked.connect(functools.partial(
46            GuiUtils.openLink, LocalConfig._inst_url))
47        self.cmdLinkUMD.clicked.connect(functools.partial(
48            GuiUtils.openLink, LocalConfig._umd_url))
49        self.cmdLinkNIST.clicked.connect(functools.partial(
50            GuiUtils.openLink, LocalConfig._nist_url))
51        self.cmdLinkSNS.clicked.connect(functools.partial(
52            GuiUtils.openLink, LocalConfig._sns_url))
53        self.cmdLinkISIS.clicked.connect(functools.partial(
54            GuiUtils.openLink, LocalConfig._isis_url))
55        self.cmdLinkESS.clicked.connect(functools.partial(
56            GuiUtils.openLink, LocalConfig._ess_url))
57        self.cmdLinkILL.clicked.connect(functools.partial(
58            GuiUtils.openLink, LocalConfig._ill_url))
59
60        self.cmdOK.clicked.connect(self.close)
Note: See TracBrowser for help on using the repository browser.