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


Python QtGui.QSplashScreen类代码示例

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


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

示例1: launchShell

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,代码行数:32,代码来源:startShellGui.py

示例2: showSplashScreen

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,代码行数:7,代码来源:splashScreen.py

示例3: __init__

	def __init__(self, pixmap, waitTime=0, textColor=Qt.black, *args, **kwargs):
		"""
		Initializes the class.

		:param pixmap: Current pixmap path.
		:type pixmap: unicode
		:param waitTime: wait time.
		:type waitTime: int
		:param \*args: Arguments.
		:type \*args: \*
		:param \*\*kwargs: Keywords arguments.
		:type \*\*kwargs: \*\*
		"""

		LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))

		QSplashScreen.__init__(self, pixmap, *args, **kwargs)

		self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)

		# --- Setting class attributes. ---
		self.__waitTime = None
		self.waitTime = waitTime
		self.__textColor = None
		self.textColor = textColor
开发者ID:KelSolaar,项目名称:Umbra,代码行数:25,代码来源:delayed_QSplashScreen.py

示例4: show

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,代码行数:26,代码来源:__init__.py

示例5: __init__

 def __init__(self,qgisPrefix):
     p = qgisPrefix + "//data//icimod.png"
     pic = QPixmap(p)
     self.labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute)
     QSplashScreen.__init__(self, pic)
     self.show()
     QApplication.flush()
开发者ID:mingxuli,项目名称:datatools,代码行数:7,代码来源:default_splash_screen.py

示例6: showMessage

    def showMessage( self, msg ):
        """ Show the message in the bottom part of the splashscreen """

        QSplashScreen.showMessage( self, msg,
                                   self.labelAlignment, QColor( Qt.black ) )
        QApplication.processEvents()
        return
开发者ID:fukanchik,项目名称:codimension,代码行数:7,代码来源:splashscreen.py

示例7: __init__

    def __init__(self, parent=None):
        from radiance import __version__
        self.__version = __version__
        self.parent = parent
        
        pixmap = QPixmap(QString(':/Radiance/splashscreen.png'))
        flags = Qt.WindowStaysOnTopHint
        QSplashScreen.__init__(self, pixmap, flags)
        self.setMask(pixmap.mask())
        
        # Custom progress bar stylesheet
        progressbar_stylesheet = """
        QProgressBar:horizontal {
            border: 1px solid black;
            background: white;
            padding: 1px;
        }
        QProgressBar::chunk:horizontal {
            background-color: qlineargradient(spread: pad, x1: 1, y1: 0.5, x2: 0, y2: 0.5, stop: 0 black, stop: 1 white);
        }
        """
        
        # Place progress bar to bottom of splash screen.
        progressbar = QProgressBar(self)
        progressbar.setRange(0, 0)
        progressbar.setGeometry(10, self.height() - 20, self.width() - 20, 10)
        progressbar.setTextVisible(False)
        progressbar.setStyleSheet(progressbar_stylesheet)
        self.progressbar = progressbar

        self.show()
开发者ID:tetra5,项目名称:radiance,代码行数:31,代码来源:RSplashScreen.py

示例8: show_splash

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,代码行数:7,代码来源:DBMainWindow.py

示例9: launchShell

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,代码行数:27,代码来源:startShellGui.py

示例10: showMessage

 def showMessage(self, msg):
     """
     Public method to show a message in the bottom part of the splashscreen.
     
     @param msg message to be shown (string or QString)
     """
     QSplashScreen.showMessage(self, msg, self.labelAlignment, QColor(Qt.white))
     QApplication.processEvents()
开发者ID:matachi,项目名称:subdownloader,代码行数:8,代码来源:SplashScreen.py

示例11: __init__

    def __init__( self ):

        self.labelAlignment = \
            Qt.Alignment( Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute )

        QSplashScreen.__init__( self, PixmapCache().getPixmap( 'splash.png' ) )

        self.show()
        QApplication.flush()
        return
开发者ID:eaglexmw,项目名称:codimension,代码行数:10,代码来源:splashscreen.py

示例12: setPixmap

    def setPixmap(self, pixmap):
        self.setAttribute(Qt.WA_TranslucentBackground,
                          pixmap.hasAlpha() and \
                          is_transparency_supported())

        self.__pixmap = pixmap

        QSplashScreen.setPixmap(self, pixmap)
        if pixmap.hasAlpha() and not is_transparency_supported():
            self.setMask(pixmap.createHeuristicMask())
开发者ID:675801717,项目名称:orange3,代码行数:10,代码来源:splashscreen.py

示例13: __init__

 def __init__(self):
     """
     Constructor
     """
     img_path = os.path.join(os.getcwd(), 'gui', 'images', 'splash.png')
     pixmap = QPixmap(img_path)
     self.labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute)
     QSplashScreen.__init__(self, pixmap)
     self.show()
     QApplication.flush()
开发者ID:matachi,项目名称:subdownloader,代码行数:10,代码来源:SplashScreen.py

示例14: showMessage

 def showMessage(self, message, alignment=Qt.AlignLeft, color=Qt.black):
     """
     Show the `message` with `color` and `alignment`.
     """
     # Need to store all this arguments for drawContents (no access
     # methods)
     self.__alignment = alignment
     self.__color = color
     self.__message = message
     QSplashScreen.showMessage(self, message, alignment, color)
     QApplication.instance().processEvents()
开发者ID:675801717,项目名称:orange3,代码行数:11,代码来源:splashscreen.py

示例15: main

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,代码行数:12,代码来源:frmSplash.py


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