コード例 #1
0
def about(title):
    try:
        import pulp
    except ImportError:
        pulp_version = "(missing!)"
    else:
        pulp_version = pulp.VERSION

    QMessageBox.information(
        None, "About", """
        <h1>{}</h1>
        <h3>Version {}</h3>

        <p>&copy; 2014 Oleh Prypin &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br/>
           &copy; 2014 Stefan Walzer &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</p>

        <p>License: <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License Version 3</a></p>

        Using:
        <ul>
        <li>Python {}
        <li>Qt {}
        <li>{} {}
        <li>PuLP {}
        </ul>
    """.format(title, __version__,
               sys.version.split(' ', 1)[0], qt.version_str, qt.module,
               qt.module_version_str, pulp_version))
コード例 #2
0
ファイル: common.py プロジェクト: Oaz/sixcells
def about(title):
    try:
        import pulp
    except ImportError:
        pulp_version = "(missing!)"
    else:
        pulp_version = pulp.VERSION
    
    QMessageBox.information(None, "About", """
        <h1>{}</h1>
        <h3>Version {}</h3>

        <p>&copy; 2014 Oleh Prypin &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br/>
           &copy; 2014 Stefan Walzer &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</p>

        <p>License: <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License Version 3</a></p>

        Using:
        <ul>
        <li>Python {}
        <li>Qt {}
        <li>{} {}
        <li>PuLP {}
        </ul>
    """.format(
        title, __version__,
        sys.version.split(' ', 1)[0],
        qt.version_str,
        qt.module, qt.module_version_str,
        pulp_version
    ))
コード例 #3
0
ファイル: __init__.py プロジェクト: BlaXpirit/steam-notifier
def about():
    import lxml
    import cssselect
    
    QMessageBox.information(None, "About", u"""
        <h1>Steam Notifier</h1>
        <h3>Version {}</h3>

        <p>(C) 2014-2015 Oleh Prypin &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</p>

        <p>License: <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License Version 3</a></p>

        Using:
        <ul>
        <li>Python {}
        <li>Qt {}, {} {}
        <li>lxml {} (cssselect {})
        </ul>
    """.format(
        __version__,
        sys.version.split(' ', 1)[0],
        qt.version_str,
        qt.module, qt.module_version_str,
        lxml.etree.__version__, cssselect.__version__
    ))
コード例 #4
0
ファイル: __init__.py プロジェクト: BlaXpirit/steam-notifier
def information():
    with open('README.md') as f:
        s = f.read()
    s = s.split('\n\n\n')[2].split('\n\n', 1)[1]
    s = re.sub(r'<(.+?)>', r'<a href="\1">\1</a>', s)
    s = re.sub(r'\[(.+?)\]\((.+?)\)', r'<a href="\2">\1</a>', s)
    s = re.sub(r'\*(.+?)\*', r'<i>\1</i>', s)
    s = s.replace('\n\n', '<p>')
    QMessageBox.information(None, "Information", "<p>Welcome to <i>Steam Notifier</i>.<p>"+s)
コード例 #5
0
ファイル: webpage.py プロジェクト: Oaz/sixcells
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................</code>""".replace("\n","\r")
        self.find_levels_in_content()
      
      fill_levels_button = QPushButton("Simulate Fill Levels")
      fill_levels_button.clicked.connect(fill_levels)
      self.layout().addWidget(fill_levels_button)
      
    def fetch_ok(self):
      super(TestDialog,self).fetch_ok()
      self.plaintext_content.setPlainText(self.webpage_content)

if __name__=='__main__':
  app = QApplication(sys.argv)
  dialog = TestDialog()
  if dialog.exec_() == QDialog.Accepted:
    QMessageBox.information(None, "Selected level", dialog.selected_level_file.read())
  else:
    QMessageBox.information(None, "Selected level", "NONE")
  

コード例 #6
0
ファイル: webpage.py プロジェクト: Oaz/sixcells
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................
	..................................................................</code>""".replace(
                "\n", "\r")
            self.find_levels_in_content()

        fill_levels_button = QPushButton("Simulate Fill Levels")
        fill_levels_button.clicked.connect(fill_levels)
        self.layout().addWidget(fill_levels_button)

    def fetch_ok(self):
        super(TestDialog, self).fetch_ok()
        self.plaintext_content.setPlainText(self.webpage_content)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    dialog = TestDialog()
    if dialog.exec_() == QDialog.Accepted:
        QMessageBox.information(None, "Selected level",
                                dialog.selected_level_file.read())
    else:
        QMessageBox.information(None, "Selected level", "NONE")