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


Python QSplashScreen.showMessage方法代码示例

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


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

示例1: show

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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: showMessage

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
    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,代码行数:9,代码来源:splashscreen.py

示例3: __init__

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例4: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例5: showSplashScreen

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例6: show_splash

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例7: showMessage

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
 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,代码行数:10,代码来源:SplashScreen.py

示例8: showMessage

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
 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,代码行数:13,代码来源:splashscreen.py

示例9: start_eas

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例10: showMessage

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
	def showMessage(self, message, textAlignement=Qt.AlignLeft, textColor=None, waitTime=None):
		"""
		Reimplements the :meth:`QSplashScreen.showMessage` method.

		:param message: Message to display on the splashscreen.
		:type message: unicode
		:param textAlignement: Text message alignment.
		:type textAlignement: object
		:param textColor: Text message color.
		:type textColor: object
		:param waitTime: Wait time.
		:type waitTime: int
		"""

		QSplashScreen.showMessage(self, message, textAlignement, self.__textColor if textColor is None else textColor)

		# Force QSplashscreen refresh.
		QApplication.processEvents()

		foundations.core.wait(self.__waitTime if waitTime is None else waitTime)
开发者ID:KelSolaar,项目名称:Umbra,代码行数:22,代码来源:delayed_QSplashScreen.py

示例11: SplashScreen

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [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

示例12: show

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
def show():
    
    message = "{0}  {1} ".format(info.appname, info.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 | Qt.WindowStaysOnTopHint)

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

    splash.showMessage(message, Qt.AlignRight | Qt.AlignTop, Qt.white)
    splash.show()

    app.qApp.processEvents()
    splash.deleteLater()
开发者ID:mbsrz1972,项目名称:frescobaldi,代码行数:24,代码来源:__init__.py

示例13: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
def main(argv):
    """The main function."""

    wavy = QApplication(argv)
    wavy.setStyle('Cleanlooks')
    wavy.setApplicationVersion(__version__)
    wavy.setApplicationName(__app_name__)
    wavy.setOrganizationName("Sao Carlos Institute of Physics - University of Sao Paulo")
    wavy.setOrganizationDomain("www.ifsc.usp.br")

    pixmap = QPixmap("images/symbol.png")
    splash = QSplashScreen(pixmap)
    splash.show()
    splash.repaint()
    splash.showMessage("Loading...")
    wavy.processEvents()
    splash.showMessage("Starting...")
    wavy.processEvents()
    window = MainWindow()
    window.showMaximized()
    time.sleep(0)
    splash.finish(window)
    return wavy.exec_()
开发者ID:MatheusLuccas,项目名称:wavy,代码行数:25,代码来源:gui_wavy.py

示例14: showSplash

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
def showSplash(app):

    # splash pixmap
    logo = QPixmap(RES + ICONS + SPLASH)
    splash = QSplashScreen(logo, Qt.WindowStaysOnTopHint)
    splash.setWindowFlags(Qt.WindowStaysOnTopHint)

    # alpha mask
    splash.show()
    splash.setMask(logo.mask())

    # status message
    labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignCenter | Qt.AlignAbsolute)
    newline = '<br/>'
    family = FONTS_DICT['splash'][0]
    size = str(FONTS_DICT['splash'][2])
    font = "<font style='font-family: " + family + "; font-size: " + size + "pt; color: white;'>"
    info = newline * 10 + font + 'Loading...<br/>' + __name__ + ' ' + __version__ + '</font'
    splash.showMessage(info, labelAlignment)        #NB: html tags completely break alignment and color settings

    # checking for mouse click
    app.processEvents()

    return splash
开发者ID:Xifax,项目名称:muscale,代码行数:26,代码来源:guiSplash.py

示例15: start_ide

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import showMessage [as 别名]
def start_ide(app, filenames, projects_path, extra_plugins, linenos):
    """Load all the settings necessary before loading the UI, and start IDE."""
    QCoreApplication.setOrganizationName('NINJA-IDE')
    QCoreApplication.setOrganizationDomain('NINJA-IDE')
    QCoreApplication.setApplicationName('NINJA-IDE')
    app.setWindowIcon(QIcon(":img/icon"))

    # Check if there is another session of ninja-ide opened
    # and in that case send the filenames and projects to that session
    running = ipc.is_running()
    start_server = not running[0]
    if running[0] and (filenames or projects_path):
        sended = ipc.send_data(running[1], filenames, projects_path, linenos)
        running[1].close()
        if sended:
            sys.exit()
    else:
        running[1].close()

    # Create and display the splash screen
    splash_pix = QPixmap(":img/splash")
    splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    app.processEvents()

    # Set the cursor to unblinking
    if not settings.IS_WINDOWS:
        app.setCursorFlashTime(0)

    #Set the codec for strings (QString)
    QTextCodec.setCodecForCStrings(QTextCodec.codecForName('utf-8'))

    #Translator
    qsettings = ide.IDE.ninja_settings()
    data_qsettings = ide.IDE.data_settings()
    language = QLocale.system().name()
    lang = qsettings.value('preferences/interface/language',
        defaultValue=language, type='QString') + '.qm'
    lang_path = file_manager.create_path(resources.LANGS, lang)
    if file_manager.file_exists(lang_path):
        settings.LANGUAGE = lang_path
    translator = QTranslator()
    if settings.LANGUAGE:
        translator.load(settings.LANGUAGE)
        app.installTranslator(translator)

        qtTranslator = QTranslator()
        qtTranslator.load("qt_" + language,
            QLibraryInfo.location(QLibraryInfo.TranslationsPath))
        app.installTranslator(qtTranslator)

    #Loading Syntax
    splash.showMessage("Loading Syntax", Qt.AlignRight | Qt.AlignTop, Qt.black)
    json_manager.load_syntax()

    #Read Settings
    splash.showMessage("Loading Settings", Qt.AlignRight | Qt.AlignTop,
        Qt.black)
    settings.load_settings()

    #Set Stylesheet
    style_applied = False
    if settings.NINJA_SKIN not in ('Default', 'Classic Theme'):
        file_name = ("%s.qss" % settings.NINJA_SKIN)
        qss_file = file_manager.create_path(resources.NINJA_THEME_DOWNLOAD,
            file_name)
        if file_manager.file_exists(qss_file):
            with open(qss_file) as f:
                qss = f.read()
                app.setStyleSheet(qss)
                style_applied = True
    if not style_applied:
        if settings.NINJA_SKIN == 'Default':
            with open(resources.NINJA_THEME) as f:
                qss = f.read()
        else:
            with open(resources.NINJA_THEME_CLASSIC) as f:
                qss = f.read()
        app.setStyleSheet(qss)

    #Loading Schemes
    splash.showMessage("Loading Schemes",
        Qt.AlignRight | Qt.AlignTop, Qt.black)
    scheme = qsettings.value('preferences/editor/scheme', "default",
        type='QString')
    if scheme != 'default':
        scheme = file_manager.create_path(resources.EDITOR_SKINS,
            scheme + '.color')
        if file_manager.file_exists(scheme):
            resources.CUSTOM_SCHEME = json_manager.parse(open(scheme))

    #Loading Shortcuts
    resources.load_shortcuts()
    #Loading GUI
    splash.showMessage("Loading GUI", Qt.AlignRight | Qt.AlignTop, Qt.black)
    ninjaide = ide.IDE(start_server)

    #Showing GUI
    ninjaide.show()
#.........这里部分代码省略.........
开发者ID:Hmaal,项目名称:ninja-ide,代码行数:103,代码来源:__init__.py


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