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


Python QSplashScreen.finish方法代码示例

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


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

示例1: start

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

示例2: launchShell

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

示例3: launchShell

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

示例4: main

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

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

示例6: main

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

示例7: main

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

示例8: start_eas

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

示例9: run_pygobstones

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

示例10: SplashScreen

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

示例11: main

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

示例12: resource_path

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import finish [as 别名]
from PyQt4.QtCore import Qt
import sys
import os.path
"""
This script imports the minimum modules necessary to display a splash
screen before importing and displaying the downloader application.
"""


def resource_path(relative):
    local = getattr(sys, '_MEIPASS', '.')
    return os.path.join(local, relative)


# Create and display the splash screen
app = QApplication([])
splash_pix = QPixmap(resource_path('icons\splash_loading.png'))
splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
splash.setMask(splash_pix.mask())
splash.show()
app.processEvents()

# Import and display the application
from mileage_gui import mileageGui
myapp = mileageGui()
myapp.show()

# Close the splash screen
splash.finish(myapp)
app.exec_()
开发者ID:lcmcninch,项目名称:MileageTracker,代码行数:32,代码来源:main.py

示例13: len

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import finish [as 别名]
import sys,os
import globalvalue 
from pychmfile import PyChmFile
from PyQt4 import QtCore, QtGui
from pychmmainwindow import PyChmMainWindow
from PyQt4.QtGui import QPixmap,QSplashScreen

ok=False
app = QtGui.QApplication(sys.argv)
if len(sys.argv)>=2:
    globalvalue.chmpath=os.path.abspath(sys.argv[1].decode(sys.getfilesystemencoding()))
    globalvalue.chmFile=PyChmFile()
    ok=globalvalue.chmFile.loadFile(globalvalue.chmpath)
if not ok:
    if globalvalue.chmpath!=None:
        print 'open chm file',globalvalue.chmpath,'failed'
    file=QtGui.QFileDialog.getOpenFileName(None, u'choose file',globalvalue.globalcfg.lastdir,
            u'CHM files (*.chm *.CHM)')
    globalvalue.chmpath=os.path.abspath(unicode(file))
    globalvalue.chmFile=PyChmFile()
    ok=globalvalue.chmFile.loadFile(globalvalue.chmpath)
    if not ok:
        sys.exit(0)
pixmap=QPixmap(os.path.join(sys.path[0],'splash.png'))
splash=QSplashScreen(pixmap)
splash.show()
mw=PyChmMainWindow()
mw.show()
splash.finish(mw)
sys.exit(app.exec_())
开发者ID:adaptee,项目名称:pychmviewer,代码行数:32,代码来源:pychmviewer.py

示例14: main

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import finish [as 别名]
def main(argv):
    app = QApplication(argv) #Early so that QT is initialized before other imports
    app.setWindowIcon(util.resourceIcon("application/window_icon_cutout"))

    splash = QSplashScreen(resourceImage("newsplash"), Qt.WindowStaysOnTopHint)
    splash.show()
    splash.showMessage("Starting up...", Qt.AlignLeft, Qt.white)
    app.processEvents()

    help_center = HelpCenter("ERT")
    help_center.setHelpLinkPrefix(os.getenv("ERT_SHARE_PATH") + "/gui/help/")
    help_center.setHelpMessageLink("welcome_to_ert")

    splash.showMessage("Bootstrapping...", Qt.AlignLeft, Qt.white)
    app.processEvents()

    strict = True
    site_config = os.getenv("ERT_SITE_CONFIG")
    if len(argv) == 1:
        print("-----------------------------------------------------------------")
        print("-- You must supply the name of configuration file as the first --")
        print("-- commandline argument:                                       --")
        print("--                                                             --")
        print("-- bash%  gert <config_file>                                   --")
        print("--                                                             --")
        print("-- If the configuration file does not exist, gert will create  --")
        print("-- create a new configuration file.                            --")
        print("-----------------------------------------------------------------")
    else:
        enkf_config = argv[1]
        if not os.path.exists(enkf_config):
            print("Trying to start new config")
            new_configuration_dialog = NewConfigurationDialog(enkf_config)
            success = new_configuration_dialog.exec_()
            if not success:
                print("Can not run without a configuration file.")
                sys.exit(1)
            else:
                enkf_config = new_configuration_dialog.getConfigurationPath()
                first_case_name = new_configuration_dialog.getCaseName()
                dbase_type = new_configuration_dialog.getDBaseType()
                num_realizations = new_configuration_dialog.getNumberOfRealizations()
                storage_path = new_configuration_dialog.getStoragePath()

                EnKFMain.createNewConfig(enkf_config, storage_path, first_case_name, dbase_type, num_realizations)
                strict = False

        ert = Ert(EnKFMain(enkf_config, site_config=site_config, strict=strict))
        ErtConnector.setErt(ert.ert())


        splash.showMessage("Creating GUI...", Qt.AlignLeft, Qt.white)
        app.processEvents()


        window = GertMainWindow()
        window.setWidget(SimulationPanel())

        help_tool = HelpTool("ERT", window)

        window.addDock("Configuration Summary", SummaryPanel(), area=Qt.BottomDockWidgetArea)
        window.addTool(IdeTool(os.path.basename(enkf_config), ert.reloadERT, help_tool))
        window.addTool(PlotTool())
        window.addTool(ExportTool())
        window.addTool(WorkflowsTool())
        window.addTool(ManageCasesTool())
        window.addTool(help_tool)


        splash.showMessage("Communicating with ERT...", Qt.AlignLeft, Qt.white)
        app.processEvents()

        window.show()
        splash.finish(window)

        sys.exit(app.exec_())
开发者ID:shulNN,项目名称:ert,代码行数:78,代码来源:gert_main.py

示例15: start_ide

# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import finish [as 别名]

#.........这里部分代码省略.........
    # 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()

    # Loading Session Files
    splash.showMessage("Loading Files and Projects", Qt.AlignRight | Qt.AlignTop, Qt.black)

    # First check if we need to load last session files
    if qsettings.value("preferences/general/loadFiles", True, type=bool):
        # Files in Main Tab
        main_files = qsettings.value("openFiles/mainTab", [])
        tempFiles = []
        if main_files:
            for file_ in main_files:
                fileData = list(file_)
                if fileData:
                    lineno = fileData[1]
                    tempFiles.append((fileData[0], lineno))
        main_files = tempFiles
        # Files in Secondary Tab
        sec_files = qsettings.value("openFiles/secondaryTab", [])
        tempFiles = []
        if sec_files:
            for file_ in sec_files:
                fileData = list(file_)
                if fileData:
                    lineno = fileData[1]
                    tempFiles.append((fileData[0], lineno))
        sec_files = tempFiles

        # Recent Files
        recent_files = qsettings.value("openFiles/recentFiles", [])
        # Current File
        current_file = qsettings.value("openFiles/currentFile", "", type="QString")
        # Projects
        projects = qsettings.value("openFiles/projects", [])
    else:
        main_files = []
        sec_files = []
        recent_files = []
        current_file = ""
        projects = []

    # Include files received from console args
    file_with_nro = list([(f[0], f[1] - 1) for f in zip(filenames, linenos)])
    file_without_nro = list([(f, 0) for f in filenames[len(linenos) :]])
    main_files += file_with_nro + file_without_nro
    # Include projects received from console args
    if projects_path:
        projects += projects_path
    # FIXME: IMPROVE THIS WITH THE NEW WAY OF DO IT
    # ninjaide.load_session_files_projects(main_files, sec_files,
    # projects, current_file, recent_files)
    # Load external plugins
    # if extra_plugins:
    # ninjaide.load_external_plugins(extra_plugins)

    splash.finish(ninjaide)
    ninjaide.notify_plugin_errors()
    ninjaide.show_python_detection()
开发者ID:rolandgeider,项目名称:ninja-ide,代码行数:104,代码来源:__init__.py


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