00001 from PyQt4 import QtCore, QtGui
00002
00003 import os
00004 import ost
00005 from ost import gui
00006
00007 LOGO_PATH = os.path.join(ost.GetSharedDataPath(), "gui", "images", "logo-small.png")
00008
00009
00010 SPLASH_TEXT=""""Welcome to <b>Openstructure</b>!<br/><br/>
00011 You are running version %s<br /><br />If you are new to OpenStructure, we
00012 invite you to run the demos from the examples directory. Scripts can be
00013 displayed by right clicking on the file and selecting 'Show source'.<br/><br/>
00014 Feel free visit our website at:<br />
00015 <a href='http://www.openstructure.org'>http://www.openstructure.org</a>
00016 """ % ost.VERSION
00017
00018 class SplashDialog(QtGui.QDialog):
00019 def __init__(self, parent=None):
00020 QtGui.QDialog.__init__(self, parent)
00021 layout = QtGui.QHBoxLayout(self)
00022 self.setLayout(layout)
00023 imageLabel = QtGui.QLabel();
00024 self.pix_map = QtGui.QPixmap(LOGO_PATH);
00025 imageLabel.setPixmap(self.pix_map);
00026 layout.addWidget(imageLabel)
00027 self.label = QtGui.QTextBrowser()
00028 self.label.setReadOnly(True)
00029 self.label.setOpenExternalLinks(True)
00030 self.label.setHtml(SPLASH_TEXT)
00031 layout.addWidget(self.label)
00032
00033 def _InitSplash():
00034 splash = SplashDialog(gui.GostyApp.Instance().perspective.main_area.qobject)
00035 splash.exec_()
00036
00037
00038
00039
00040 __all__=('SplashDialog',)