Skip to content
Snippets Groups Projects
Commit 8d85a73d authored by stefan's avatar stefan
Browse files

Added Splash as "About" to menubar

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2517 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 39b8405a
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,8 @@ import ost ...@@ -26,8 +26,8 @@ import ost
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from ost.gui import FileLoader from ost.gui import FileLoader
from ost.gui.scene.file_loader import GenericLoader from ost.gui.scene.file_loader import GenericLoader
from ost.gui.scene.loader_manager_widget import LoaderManagerWidget from ost.gui.scene.loader_manager_widget import LoaderManagerWidget
from ost.gui.init_splash import _InitSplash
class InitMenuBar(QtCore.QObject): class InitMenuBar(QtCore.QObject):
def __init__(self, menu_bar=None): def __init__(self, menu_bar=None):
...@@ -50,6 +50,12 @@ class InitMenuBar(QtCore.QObject): ...@@ -50,6 +50,12 @@ class InitMenuBar(QtCore.QObject):
webpage.setShortcut('Ctrl+D') webpage.setShortcut('Ctrl+D')
self.connect(webpage, QtCore.SIGNAL('triggered()'), self.OpenDocs) self.connect(webpage, QtCore.SIGNAL('triggered()'), self.OpenDocs)
help.addAction(webpage) help.addAction(webpage)
about = QtGui.QAction('&About', self)
about.setStatusTip('About')
about.setShortcut('Ctrl+A')
self.connect(about, QtCore.SIGNAL('triggered()'), self.About)
help.addAction(about)
window.addMenu(persp.panels.menu) window.addMenu(persp.panels.menu)
gl_win = QtGui.QAction('&GL Window', self) gl_win = QtGui.QAction('&GL Window', self)
...@@ -83,6 +89,9 @@ class InitMenuBar(QtCore.QObject): ...@@ -83,6 +89,9 @@ class InitMenuBar(QtCore.QObject):
def OpenDocs(self): def OpenDocs(self):
QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://www.openstructure.org/docs/index.html")) QtGui.QDesktopServices.openUrl(QtCore.QUrl("http://www.openstructure.org/docs/index.html"))
def About(self):
_InitSplash()
def ShowGLWin(self): def ShowGLWin(self):
gosty=gui.GostyApp.Instance() gosty=gui.GostyApp.Instance()
gl_win=gosty.GetGLWin() gl_win=gosty.GetGLWin()
......
...@@ -20,10 +20,8 @@ class SplashDialog(QtGui.QDialog): ...@@ -20,10 +20,8 @@ class SplashDialog(QtGui.QDialog):
self.label.setHtml("Welcome to <b>Openstructure</b>!<br /><br />You are running version 1.0.0a<br /><br />If you are new to OpenStructure, we invite you to run the demos from the examples directory. Scripts can be displayed by right clicking on the file and selecting 'Show source'.<br /><br />Feel free visit our website at:<br /> http://www.openstructure.org") self.label.setHtml("Welcome to <b>Openstructure</b>!<br /><br />You are running version 1.0.0a<br /><br />If you are new to OpenStructure, we invite you to run the demos from the examples directory. Scripts can be displayed by right clicking on the file and selecting 'Show source'.<br /><br />Feel free visit our website at:<br /> http://www.openstructure.org")
layout.addWidget(self.label) layout.addWidget(self.label)
def _InitSplash(app): def _InitSplash():
splash = SplashDialog(app.perspective.main_area.qobject) splash = SplashDialog(gui.GostyApp.Instance().perspective.main_area.qobject)
#print dir(splash)
splash.showNormal() splash.showNormal()
#QtCore.QTimer.singleShot(30000, splash.close); #QtCore.QTimer.singleShot(30000, splash.close);
...@@ -54,7 +54,7 @@ def _InitFrontEnd(): ...@@ -54,7 +54,7 @@ def _InitFrontEnd():
main_area=app.perspective.main_area main_area=app.perspective.main_area
_InitMenuBar(app) _InitMenuBar(app)
if not _InitPanels(app): if not _InitPanels(app):
_InitSplash(app) _InitSplash()
_InitSpaceNav(app) _InitSpaceNav(app)
_InitContextMenu(app) _InitContextMenu(app)
main_area.AddPersistentWidget("3D Scene", "gl_win" , app.gl_win, int(QtCore.Qt.WindowMaximized)) main_area.AddPersistentWidget("3D Scene", "gl_win" , app.gl_win, int(QtCore.Qt.WindowMaximized))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment