Exemple #1
0
def showSplash(splashImageName):
    """
    Function which shows a nice splash screen.

    @param splashImageName: Name of the splash screen image.
    @type splashImageName: C{unicode}
    """

    screen = QApplication.desktop().screenGeometry()

    if not _haveImagesAsModule:
        addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH)
    dfPicture = QPixmap.fromMimeSource(splashImageName)

    dfSplash = QLabel(None, "splash",
                      Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\
                      Qt.WX11BypassWM | Qt.WStyle_StaysOnTop)
    dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised)
    dfSplash.setPixmap(dfPicture)
    dfSplash.setCaption("DataFinder")
    dfSplash.setAutoResize(1)
    dfSplash.move(
        QPoint(screen.center().x() - dfSplash.width() / 2,
               screen.center().y() - dfSplash.height() / 2))
    dfSplash.show()
    dfSplash.repaint(0)
    QApplication.flush()
    return dfSplash
Exemple #2
0
def showSplash(splashImageName):
    """
    Function which shows a nice splash screen.

    @param splashImageName: Name of the splash screen image.
    @type splashImageName: C{unicode}
    """

    screen = QApplication.desktop().screenGeometry()

    if not _haveImagesAsModule:
        addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH)
    dfPicture = QPixmap.fromMimeSource(splashImageName)

    dfSplash = QLabel(None, "splash",
                      Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\
                      Qt.WX11BypassWM | Qt.WStyle_StaysOnTop)
    dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised)
    dfSplash.setPixmap(dfPicture)
    dfSplash.setCaption("DataFinder")
    dfSplash.setAutoResize(1)
    dfSplash.move(QPoint(screen.center().x() - dfSplash.width() / 2,
                         screen.center().y() - dfSplash.height() / 2))
    dfSplash.show()
    dfSplash.repaint(0)
    QApplication.flush()
    return dfSplash
def main():
    """ Start function. """

    application = QApplication(sys.argv)
    splashScreen = utils.showSplash("splash_datafinder_admin.png")
    splashScreen.show()
    repositoryManager = RepositoryManager()
    repositoryManager.load()
    adminMainWindow = AdminMain(repositoryManager)
    application.connect(application, SIGNAL("lastWindowClosed()"), application, SLOT("quit()"))
    application.setMainWidget(adminMainWindow)
    screen = QApplication.desktop().screenGeometry()
    adminMainWindow.move(QPoint(screen.center().x() - adminMainWindow.width() / 2, screen.center().y() - adminMainWindow.height() / 2))
    adminMainWindow.show()
    splashScreen.close(True)
    adminMainWindow.fileConnectSlot()
    application.exec_loop()
Exemple #4
0
def main():
    """ Start function. """

    application = QApplication(sys.argv)
    splashScreen = utils.showSplash("splash_datafinder_admin.png")
    splashScreen.show()
    repositoryManager = RepositoryManager()
    repositoryManager.load()
    adminMainWindow = AdminMain(repositoryManager)
    application.connect(application, SIGNAL("lastWindowClosed()"), application,
                        SLOT("quit()"))
    application.setMainWidget(adminMainWindow)
    screen = QApplication.desktop().screenGeometry()
    adminMainWindow.move(
        QPoint(screen.center().x() - adminMainWindow.width() / 2,
               screen.center().y() - adminMainWindow.height() / 2))
    adminMainWindow.show()
    splashScreen.close(True)
    adminMainWindow.fileConnectSlot()
    application.exec_loop()