Example #1
0
    parser = argparse.ArgumentParser(\
        description='Test script for tiled graphicview widget')
    parser.add_argument('--file', '-f', help='hdf file to load', default=None)
    args = parser.parse_args()

    if args.file is not None and not os.path.isfile(args.file):
        raise SystemExit("File does not exist!")

    app = QApplication(sys.argv)

    # windows always sucks!!
    if sys.platform.startswith("win"):
        sqldrivers = join(dirname(QtGui.__file__), "plugins")
        app.addLibraryPath(sqldrivers)


    splash_pix = QPixmap(':annotationtool_about.png')
    splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    splash.showMessage(version.information,
                       alignment=Qt.AnchorHorizontalCenter|
                       Qt.AnchorVerticalCenter)
    app.processEvents()
    mw = AtMainWindow(args.file)
    mw.show()
    app.thread().msleep(1000)
    splash.finish(mw)

    sys.exit(app.exec_())
Example #2
0
if __name__ == '__main__':
    parser = argparse.ArgumentParser(\
        description='Test script for tiled graphicview widget')
    parser.add_argument('--file', '-f', help='hdf file to load', default=None)
    args = parser.parse_args()

    if args.file is not None and not os.path.isfile(args.file):
        raise SystemExit("File does not exist!")

    app = QApplication(sys.argv)

    # windows always sucks!!
    if sys.platform.startswith("win"):
        sqldrivers = join(dirname(QtGui.__file__), "plugins")
        app.addLibraryPath(sqldrivers)

    splash_pix = QPixmap(':annotationtool_about.png')
    splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
    splash.setMask(splash_pix.mask())
    splash.show()
    splash.showMessage(version.information,
                       alignment=Qt.AnchorHorizontalCenter
                       | Qt.AnchorVerticalCenter)
    app.processEvents()
    mw = AtMainWindow(args.file)
    mw.show()
    app.thread().msleep(1000)
    splash.finish(mw)

    sys.exit(app.exec_())