当前位置: 首页>>代码示例>>Python>>正文


Python QSplashScreen.show方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QSplashScreen.show方法的典型用法代码示例。如果您正苦于以下问题:Python QSplashScreen.show方法的具体用法?Python QSplashScreen.show怎么用?Python QSplashScreen.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui.QSplashScreen的用法示例。


在下文中一共展示了QSplashScreen.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def show():
    
    message = "{0}  {1} ".format(appinfo.appname, appinfo.version)
    pixmap = QPixmap(os.path.join(__path__[0], 'splash.png'))
    if QApplication.desktop().screenGeometry().height() < 640:
        fontsize = 23
        pixmap = pixmap.scaledToHeight(240, Qt.SmoothTransformation)
    else:
        fontsize = 40

    splash = QSplashScreen(pixmap, Qt.SplashScreen)

    font = splash.font()
    font.setPixelSize(fontsize)
    font.setWeight(QFont.Bold)
    splash.setFont(font)

    splash.showMessage(message, Qt.AlignRight | Qt.AlignTop, Qt.white)
    splash.show()
    splash.repaint()
    
    def hide():
        splash.deleteLater()
        app.appStarted.disconnect(hide)

    app.appStarted.connect(hide)
开发者ID:EdwardBetts,项目名称:frescobaldi,代码行数:28,代码来源:__init__.py

示例2: launchShell

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def launchShell(workflowClass, testFunc = None, windowTitle="ilastikShell", workflowKwargs=None):
    """
    Start the ilastik shell GUI with the given workflow type.
    Note: A QApplication must already exist, and you must call this function from its event loop.
    
    workflowClass - the type of workflow to instantiate for the shell.    
    """
    if workflowKwargs is None:
        workflowKwargs = dict()

    # Splash Screen
    splashImage = QPixmap("../ilastik-splash.png")
    splashScreen = QSplashScreen(splashImage)
    splashScreen.show()
    
    # Create workflow
    workflow = workflowClass(**workflowKwargs)
    
    # Create the shell and populate it
    shell = IlastikShell(workflow=workflow, sideSplitterSizePolicy=SideSplitterSizePolicy.Manual)
    shell.setWindowTitle(windowTitle)
    shell.setImageNameListSlot( workflow.imageNameListSlot )
    
    # Start the shell GUI.
    shell.show()

    # Hide the splash screen
    splashScreen.finish(shell)

    # Run a test (if given)
    if testFunc:
        QTimer.singleShot(0, functools.partial(testFunc, shell, workflow) )
开发者ID:kemaleren,项目名称:ilastik,代码行数:34,代码来源:startShellGui.py

示例3: showSplashScreen

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def showSplashScreen():
    splash_path = os.path.join(os.path.split(ilastik.__file__)[0], 'ilastik-splash.png')
    splashImage = QPixmap(splash_path)
    global splashScreen
    splashScreen = QSplashScreen(splashImage)    
    splashScreen.showMessage( ilastik.__version__, Qt.AlignBottom | Qt.AlignRight )
    splashScreen.show()
开发者ID:JaimeIvanCervantes,项目名称:ilastik,代码行数:9,代码来源:splashScreen.py

示例4: start

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def start():
    app = QApplication(sys.argv)

    # Create and display the splash screen
    splash_pix = QPixmap(resources.images['splash'])
    splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    app.processEvents()
    loader.load_syntax()

    ide = IDE()
    #Settings
    settings = QSettings('NINJA-IDE','Kunai')
    if (settings.value('Preferences/General/activate_plugins', 2)==2):
        set_plugin_access(ide)
        core.load_plugins(ide)

    ide.show()
    for projectFolder in settings.value('Open_Files/projects',[]).toStringList():
        ide.main.open_project_folder(str(projectFolder))

    for openFile in settings.value('Open_Files/tab1', []).toStringList():
        ide.main.open_document(str(openFile))

    for openFile2 in settings.value('Open_Files/tab2', []).toStringList():
        ide.main.split_tab(True)
        ide.main.open_document(str(openFile2))

    splash.finish(ide)
    sys.exit(app.exec_())
开发者ID:calpe20,项目名称:PYTHONIZANDO,代码行数:33,代码来源:ide.py

示例5: show_splash

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def show_splash():
    """Show the splash screen"""
    splashImage = QPixmap( "images/splash.png" )
    splashScreen = QSplashScreen( splashImage )
    splashScreen.showMessage( "Loading . . . " )
    splashScreen.show()
    return splashScreen
开发者ID:pedromorgan,项目名称:PyQtDb,代码行数:9,代码来源:DBMainWindow.py

示例6: __init__

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
class SplashScreen:
    def __init__(self, image_resource=":/images/splash_wait.png", text=None):
        pixmap = QPixmap(image_resource)
        self.splash = QSplashScreen(pixmap)
        self.splash.setMask(QRegion(pixmap.mask()));
        self.splash.setPixmap(pixmap);
        flags = self.splash.windowFlags()
        flags |= Qt.WindowStaysOnTopHint
        self.splash.setWindowFlags(flags)
        self._text = None
        if text is not None:
            self.setText(text)

    def show(self):
        self.splash.show()

    def hide(self):
        self.splash.hide()

    def setText(self, text):
        self._text = text
        self.splash.showMessage(text, Qt.AlignBottom | Qt.AlignHCenter);

    def getText(self):
        return self._text
开发者ID:maximerobin,项目名称:Ufwi,代码行数:27,代码来源:splash.py

示例7: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def main():
   """ Starts the Main Window Interface  """
   app = QApplication(sys.argv)
   app.setWindowIcon(QIcon(os.path.join(RESOURCE_PATH, "manager.ico"))) 

   start       = time.time()                               # Start timer for splash screen                                   
   splashImage = os.path.join(RESOURCE_PATH, "splash.jpg") # Define splash image 
   pixmap      = QPixmap(splashImage)                      # Create a pixmap object
   splash      = QSplashScreen(pixmap)                     # Create a splash screen object
   # This "splash.setMask()" is usefull if the splashscreen is not a regular 
   # ractangle. This is also the reason we created a separate object of type 
   # pixmap.
   # splash.setMask(pixmap.mask())                         # Accomodate odd shapes  
   splash.show()                                           # Show splash screen
   splash.showMessage((u'%s, Version %s Starting...' %(ME, VERSION)), Qt.AlignLeft | Qt.AlignBottom, Qt.black)
   # make sure Qt really display the splash screen 
   while time.time() - start < 3: # \
      time.sleep(0.001)           #  > Timer for splash screen.
      app.processEvents()         # /
   mainWin = MainWindow()         # Create object of type "MainWindow"
   splash.finish(mainWin)         # kill the splashscreen   

   mainWin.setGeometry(100, 100, 1000, 700) # Initial window position and size
   mainWin.setWindowTitle(ME)               # Initial Window title
   mainWin.show()                           # Abracadabra "POOF!"
   sys.exit(app.exec_())                    # Handles all clean exits 
开发者ID:madvax,项目名称:python-junk-drawer,代码行数:28,代码来源:manager1.py

示例8: launchShell

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def launchShell(workflowClass=None, *testFuncs):
    """
    Start the ilastik shell GUI with the given workflow type.
    Note: A QApplication must already exist, and you must call this function from its event loop.
    
    workflowClass - the type of workflow to instantiate for the shell.    
    """
    # Splash Screen
    splashImage = QPixmap("../ilastik-splash.png")
    splashScreen = QSplashScreen(splashImage)
    splashScreen.show()

    # Create the shell and populate it
    global shell
    shell = IlastikShell(workflowClass=workflowClass, sideSplitterSizePolicy=SideSplitterSizePolicy.Manual)

    assert QApplication.instance().thread() == shell.thread()

    # Start the shell GUI.
    shell.show()

    # Hide the splash screen
    splashScreen.finish(shell)

    # Run a test (if given)
    for testFunc in testFuncs:
        QTimer.singleShot(0, functools.partial(testFunc, shell))
开发者ID:fblumenthal,项目名称:ilastik,代码行数:29,代码来源:startShellGui.py

示例9: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def main():
    splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    app.processEvents()
    # app.setStyle('Plastique')
    frame = MainWindow()
    frame.showMaximized()
    splash.finish(frame)
    frame.init()
    app.exec_()
开发者ID:teddBroiler,项目名称:Sabel,代码行数:13,代码来源:main.py

示例10: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def main():
    app = QApplication(sys.argv)
    start = time() 
    splash = QSplashScreen(QPixmap("images/login.png"))
    splash.show()
    while time() - start < 1:
        sleep(0.001)
        app.processEvents()
    win = MainWindow()
    splash.finish(win)
    win.show()
    app.exec_()
开发者ID:iefan,项目名称:kfmental,代码行数:14,代码来源:frmSplash.py

示例11: get_splash

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def get_splash():
    """Instantiate a splash screen"""
    from PyQt4.QtGui import QSplashScreen, QPixmap
    from PyQt4.QtCore import Qt
    import os

    pth = os.path.join(os.path.dirname(__file__), 'logo.png')
    pm = QPixmap(pth)
    splash = QSplashScreen(pm, Qt.WindowStaysOnTopHint)
    splash.show()

    return splash
开发者ID:eteq,项目名称:glue,代码行数:14,代码来源:main.py

示例12: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def main():
    """
    Main runtine to run software.
    """
    workpath = os.path.dirname(os.path.join(os.getcwd(), __file__))
    # print workpath
    workpath = workpath.split("\\")
    workpath.append("icon")
    iconDir = "\\".join(workpath)
    # print iconDir
    app = QApplication(sys.argv)
    splash = QSplashScreen(QPixmap(os.path.join(iconDir, "tm.png")))
    splash.show()
    app.processEvents()
    sleep(1)
    TMWindows = TMMainWidget()
    splash.finish(TMWindows)
    sys.exit(app.exec_())
开发者ID:BloodD,项目名称:PyTopicM,代码行数:20,代码来源:pytm.py

示例13: start_eas

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def start_eas(host, client, app):
    multisite_client = MultisiteClient(host, client)

    # Add splash screen
    pixmap = QPixmap(":/images/splash_start.png")
    splash = QSplashScreen(pixmap)
    splash.setMask(QRegion(pixmap.mask()))
    splash.setPixmap(pixmap)
    splash.show()
    app.splash = splash
    splash.showMessage(tr("Loading application"), Qt.AlignBottom | Qt.AlignRight)
    app.processEvents()

    # Load the main window
    from console_edenwall import MainWindow

    window = MainWindow(app, multisite_client)
    window.show()
    splash.finish(window)
开发者ID:maximerobin,项目名称:Ufwi,代码行数:21,代码来源:start_eas.py

示例14: run_pygobstones

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
def run_pygobstones():
    app = QtGui.QApplication(sys.argv)

    #Get the locale settings
    locale = unicode(QtCore.QLocale.system().name())

    # This is to make Qt use locale configuration; i.e. Standard Buttons
    # in your system's language.
    qtTranslator=QtCore.QTranslator()
    qtTranslator.load("qt_" + locale,
                        QtCore.QLibraryInfo.location(
                        QtCore.QLibraryInfo.TranslationsPath)
                        )
    app.installTranslator(qtTranslator)

    path = os.path.join(root_path(), 'commons')

    f = QtGui.QFontDatabase.addApplicationFont(os.path.join(path, 'ubuntu.ttf'))
    font = QtGui.QFont('Ubuntu Titling')
    font.setBold(True)
    font.setPixelSize(16)
    app.setFont(font)

    start = time()
    
    if 'huayra' in platform.uname():
        img = QPixmap(os.path.join(path, 'gobstones_huayra.png'))
    else:
        img = QPixmap(os.path.join(path, 'gobstones.png'))

    splash = QSplashScreen(img)
    splash.show()

    while time() - start < 1:
        app.processEvents()
    
    w = MainWindow()
    icon = QtGui.QIcon(os.path.join(path, 'logo.png'))
    w.setWindowIcon(icon)
    splash.finish(w)
    w.showMaximized()
    sys.exit(app.exec_())
开发者ID:ncastrohub,项目名称:labo_tp_2s_2015,代码行数:44,代码来源:pygobstones.py

示例15: SplashScreen

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import show [as 别名]
class SplashScreen(object):
    """Displays a splash screen until the main window is ready"""

    def __init__(self):
        splash_pix = QPixmap(':/splash.png')
        self.splash = QSplashScreen(splash_pix,
                                    Qt.WindowStaysOnTopHint)
        self.splash.setMask(splash_pix.mask())

    def show(self):
        """Displays the splash screen"""
        self.splash.show()
        self.splash.showMessage('Loading...',
                                Qt.AlignBottom | Qt.AlignHCenter,
                                Qt.white)
        # ensure at least its visible one second
        time.sleep(1)

    def finish(self, window):
        """Hides and destroy the splash screen, ensure the """
        self.splash.finish(window)
开发者ID:arielvb,项目名称:collector,代码行数:23,代码来源:splashscreen.py


注:本文中的PyQt4.QtGui.QSplashScreen.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。