Пример #1
0
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
'''
#import sip
#sip.setapi('QString', 1)
#sip.setapi('QVariant', 1) 

from PyQt4.QtGui import QApplication, QIcon, QPixmap, QSplashScreen
from frame.MainFrame import MainWindow
from PyQt4.QtCore import QString
import sys
import os


if __name__ == "__main__":
    app = QApplication(sys.argv)
    pixmap = QPixmap("Tests/psycho.jpg")
    splashcreen = QSplashScreen(pixmap)
    splashcreen.show()
    app.setOrganizationName("Laboratoire de Simulation et de Depistage")
    app.setApplicationName("LSD Simulator Dashboard")
    app.setWindowIcon(QIcon("../img/icon.png"))
    app.window = MainWindow()
    app.window.setWindowTitle("LSD Simulator Dashboard -- version alpha")
    if sys.argv[0].rpartition("/")[0]:
        os.chdir(sys.argv[0].rpartition("/")[0])
    app.window.loadSettings()
    splashcreen.finish(app.window)
    sys.exit(app.exec_())
Пример #2
0

if __name__ == "__main__":
    # check to make sure we are using at least Qt 4.6.1, as there is a bugfix in that version that causes
    # qheaderview logicalindices to refactor when removing a column
    qtVersion = string.split(QT_VERSION_STR, ".")
    if qtVersion < ['4',  '6',  '1']:
        print "This application requires at least Qt version 4.6.1.  You are running " + QT_VERSION_STR + "."
        sys.exit()
    
    (options, args) = setupOptions()
    
    config.debugLevel = options.debug
    
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    app = QApplication(sys.argv)
    app.window = Pysciplot()
    app.window.setup()
    if options.test:
        app.window.setTestData()
        app.window.createDefaultTable()
    app.window.show()
    
    if len(args) > 0:
        # load the first arg (which should be a file) as a project
        if args[0].split('.')[-1] == "psp":
            app.window.loadProject(os.path.abspath(args[0]), False)

    sys.exit(app.exec_())