예제 #1
0
app.setOrganizationName('Chengdu University')
app.setOrganizationDomain('http://www.cdu.edu.cn')
app.setApplicationName('Krait')

#support windows 7, 10 taskbar icon
import ctypes
if os.name == 'nt':
    myappid = 'CDU.Krait.ssr.1.0'
    ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

splash_img = QPixmap(":/icons/splash.png")
splash = QSplashScreen(splash_img)
splash.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.SplashScreen
                      | Qt.FramelessWindowHint)
splash.setStyleSheet('''
	font-family:"Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
''')
splash.setEnabled(False)
splash.show()


def show_splash_msg(msg):
    splash.showMessage(msg, Qt.AlignCenter | Qt.AlignBottom, Qt.white)
    app.processEvents()


import krait_rc
show_splash_msg("Loading icon resources...")
import config
show_splash_msg("Loading configurations...")
from libs import *
예제 #2
0
                if translations_file + ".qm" in os.listdir(translations_path):
                    translator.load(
                        os.path.join(os.getenv("PINGUINO_DATA"),
                                     "multilanguage",
                                     "pinguino_%s.qm" % sys_locale))

        app = QApplication(sys.argv)

        #Splash
        pixmap = QPixmap(":/logo/art/splash.png")
        splash = QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint)

        splash.show()
        splash.setStyleSheet("""
            font-family: inherit;
            font-weight: normal;
            font-size: 11pt;
            """)

        def splash_write(msg):
            if not splash is None:
                splash.showMessage("\t" + msg + "\n",
                                   color=QtCore.Qt.white,
                                   alignment=QtCore.Qt.AlignBottom)

        splash_write(NAME + " " + VERSION)
        app.processEvents()

        app.installTranslator(qtTranslator)
        if trasnlations: app.installTranslator(translator)
예제 #3
0
    if len(sys.argv) == 1:
        from qtgui.ide import PinguinoIDE
        from PySide.QtGui import QApplication, QSplashScreen, QPixmap, QPainter

        app = QApplication(sys.argv)

        #from PySide import QtGui

        pixmap = QPixmap(":/logo/art/splash.png")
        splash = QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint)

        splash.show()
        splash.setStyleSheet("""
            font-family: inherit;
            font-weight: normal;
            font-size: 11pt;

        """)

        def splash_write(msg):
            if not splash is None:
                splash.showMessage("\t"+msg+"\n", color=QtCore.Qt.white, alignment=QtCore.Qt.AlignBottom)

        splash_write(NAME+" "+VERSION)
        app.processEvents()

        app.installTranslator(qtTranslator)
        if trasnlations: app.installTranslator(translator)

        frame = PinguinoIDE(splash_write=splash_write)
        frame.show()
예제 #4
0
                translator.load(os.path.join(os.getenv("PINGUINO_DATA"), "multilanguage", "pinguino_%s.qm" % sys_locale))

    if len(sys.argv) == 1:
        from qtgui.ide import PinguinoIDE
        from PySide.QtGui import QApplication, QSplashScreen, QPixmap, QPainter

        app = QApplication(sys.argv)

        #from PySide import QtGui

        pixmap = QPixmap(":/logo/art/splash.png")
        splash = QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint)
        splash.show()
        splash.setStyleSheet("""
            font-family: ubuntu regular;
            font-weight: normal;
            font-size: 11pt;

        """)

        def splash_write(msg):
            if not splash is None:
                splash.showMessage("\t"+msg+"\n", color=QtCore.Qt.white, alignment=QtCore.Qt.AlignBottom)

        splash_write(NAME+" "+VERSION)
        app.processEvents()

        app.installTranslator(qtTranslator)
        if trasnlations: app.installTranslator(translator)

        frame = PinguinoIDE(splash_write=splash_write)
        frame.show()
예제 #5
0
파일: main.py 프로젝트: flywind2/krait
    app.setApplicationName('Krait')

    #set font family
    QFontDatabase.addApplicationFont(":/fonts/roboto.ttf")

    #support windows 7, 10 taskbar icon
    import ctypes
    if os.name == 'nt':
        myappid = 'BIG.Krait.ssr.1.0'
        ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

    splash_img = QPixmap(":/icons/splash.png")
    splash = QSplashScreen(splash_img)
    splash.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.SplashScreen
                          | Qt.FramelessWindowHint)
    splash.setStyleSheet("font-family:roboto; font-size: 14px;")
    splash.setEnabled(False)
    splash.show()

    def show_splash_msg(msg):
        splash.showMessage(msg, Qt.AlignCenter | Qt.AlignBottom, Qt.white)
        app.processEvents()

    #show_splash_msg("Loading icon resources...")
    import config
    show_splash_msg("Loading configurations...")
    from libs import *
    show_splash_msg("Loading search engines...")
    import utils
    show_splash_msg("Loading utils library...")
    import detail
예제 #6
0
                                 "pinguino_%s.qm" % sys_locale))

    if len(sys.argv) == 1:
        from qtgui.ide import PinguinoIDE
        from PySide.QtGui import QApplication, QSplashScreen, QPixmap, QPainter

        app = QApplication(sys.argv)

        #from PySide import QtGui

        pixmap = QPixmap(":/logo/art/splash.png")
        splash = QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint)
        splash.show()
        splash.setStyleSheet("""
            font-family: ubuntu regular;
            font-weight: normal;
            font-size: 11pt;

        """)

        def splash_write(msg):
            if not splash is None:
                splash.showMessage("\t" + msg + "\n",
                                   color=QtCore.Qt.white,
                                   alignment=QtCore.Qt.AlignBottom)

        splash_write(NAME + " " + VERSION)
        app.processEvents()

        app.installTranslator(qtTranslator)
        if trasnlations: app.installTranslator(translator)