"Fossies" - the Fresh Open Source Software Archive

Member "veusz-3.1/veusz/dialogs/aboutdialog.py" (19 Feb 2018, 2141 Bytes) of package /linux/privat/veusz-3.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "aboutdialog.py" see the Fossies "Dox" file reference documentation.

    1 # about dialog box
    2 # aboutdialog.py
    3 
    4 #    Copyright (C) 2006 Jeremy S. Sanders
    5 #    Email: Jeremy Sanders <jeremy@jeremysanders.net>
    6 #
    7 #    This program is free software; you can redistribute it and/or modify
    8 #    it under the terms of the GNU General Public License as published by
    9 #    the Free Software Foundation; either version 2 of the License, or
   10 #    (at your option) any later version.
   11 #
   12 #    This program is distributed in the hope that it will be useful,
   13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15 #    GNU General Public License for more details.
   16 #
   17 #    You should have received a copy of the GNU General Public License along
   18 #    with this program; if not, write to the Free Software Foundation, Inc.,
   19 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   20 ##############################################################################
   21 
   22 """About dialog module."""
   23 
   24 from __future__ import division
   25 import os.path
   26 from .. import qtall as qt
   27 from .. import utils
   28 from .veuszdialog import VeuszDialog
   29 
   30 class AboutDialog(VeuszDialog):
   31     """About dialog."""
   32 
   33     def __init__(self, mainwindow):
   34         VeuszDialog.__init__(self, mainwindow, 'about.ui', modal=True)
   35 
   36         # draw logo in dialog
   37         logo = utils.SvgWidgetFixedAspect(os.path.join(utils.imagedir, 'logo.svg'))
   38         self.logolayout.addWidget(logo)
   39         self.logoframe.setBackgroundRole(qt.QPalette.Base)
   40         self.logoframe.setAutoFillBackground(True)
   41 
   42         # add version to copyright text
   43         copyrighttext = self.copyrightlabel.text()
   44         copyrighttext = copyrighttext % {'version': utils.version()}
   45         self.copyrightlabel.setText(copyrighttext)
   46 
   47         self.licenseButton.clicked.connect(self.licenseClicked)
   48 
   49     def licenseClicked(self):
   50         """Show the license."""
   51         LicenseDialog(self).exec_()
   52         
   53 class LicenseDialog(VeuszDialog):
   54     """About license dialog."""
   55 
   56     def __init__(self, parent):
   57         VeuszDialog.__init__(self, parent, 'license.ui')
   58         self.licenseEdit.setPlainText(utils.getLicense())