Exemplo n.º 1
0
def run():
    app = QtGui.QApplication(sys.argv)
    #locale = QtCore.QLocale.system().name()
    #translator = QtCore.QTranslator()
    #translator.load("/usr/share/paso/translations/%s.qm" % locale)
    #app.installTranslator(translator)
    window = mainWindow()
    window.show()
    return( app.exec_())
Exemplo n.º 2
0
def initialize_mainwindow():
    try:
        print("entering intialize mainwindow")
        global mwindow
        data_dict = request.json
        print("data_dict is " + str(data_dict))
        mwindow = mainWindow(app, data_dict)
        mwindow.start()
        return jsonify({"success": True})
    except Exception as Ex:
        return handle_exception(Ex, "Error initializing mainwindow")
Exemplo n.º 3
0
def initialize_project_mainwindow():
    try:
        print("entering intialize project mainwindow")
        global mwindow
        data_dict = request.json
        mwindow = mainWindow(app, data_dict)
        mwindow.start()
        mwindow.post_task(data_dict["main_id"], "do_full_recreation", data_dict)
        print("leaving initialize_project_mainwindow")
        return jsonify({"success": True})
    except Exception as ex:
        return handle_exception(ex, "Error initializing project mainwindow")
Exemplo n.º 4
0
 def startMainwindow(self, Dialog):
     Dialog.reject()
     self.__musicThread.stop()
     self.__musicThread.stop()
     print("Hi 1")
     self.newWindow = main.mainWindow()
     print("Hi 2")
     self.newWindow.init_window()
     print("Hi 3")
     # self.newWindow.tab3.init_window()
     self.newWindow.tab1.add_init_box(self.img_path)
     self.newWindow.tab2.setupUi()
     self.newWindow.tab3.init_window()
     self.newWindow.tab4.init_window()
Exemplo n.º 5
0
 def link2main(self, flag):
     u'''
     进行页面之间的转换,并传递conn,用户名等参数,同时由于用户属性不同,打开不同页面
     :param flag: 如果无异常,为conn,有异常是1
     :return:
     '''
     if flag != 0:
         if flag.get_parameter_status('is_superuser') == 'off':
             self.openMainwindow = main.mainWindow()
             self.openMainwindow.show()
             self.accept()
             account = self.accountLine.text()
             self.parameterTransform(flag, account)
         else:
             self.openMainwindow = main_admin.adminWindow()
             self.openMainwindow.show()
             self.accept()
             account = self.accountLine.text()
             self.parameterTransform(flag, account)
Exemplo n.º 6
0
import sys
from PyQt5.QtWidgets import QApplication
from main import mainWindow

app = QApplication(sys.argv)
window = mainWindow()
sys.exit(app.exec_())