Пример #1
0
 def switchEvent(self):
     message = 'switch policy'
     self.log.info(message)
     Signal.get_signal().emit_signal_str(message)
     self.window = FramelessWindow('switch policy')
     self.dialog = QDialog()
     # tab item name
     list_str = [
         strings.ALGORITHM_COMA,
         strings.ALGORITHM_COMMNET_COMA,
         strings.ALGORITHM_QMIX,
         strings.ALGORITHM_QTRAN_ALT,
         strings.ALGORITHM_QTRAN_BASE,
         strings.ALGORITHM_VDN
     ]
     # item content
     list_item = [
         strings.CLASS_ALGORITHM_COMA,
         strings.CLASS_ALGORITHM_COMMNET_COMA,
         strings.CLASS_ALGORITHM_QMIX,
         strings.CLASS_ALGORITHM_QTRAN_ALT,
         strings.CLASS_ALGORITHM_QTRAN_BASE,
         strings.CLASS_ALGORITHM_VDN
     ]
     # title name
     self.listDialog = ListDialog(list_str, list_item, strings.OPERATIONAL_PLANNING_TITLE, strings.TYPE_POLICY)
     self.listDialog.setupUi(self.dialog, self.window)
     self.window.setWidget(self.dialog)
     self.initFrameLessWindow(
         QSize(700, 600),
         'Operational Planning',
         QIcon('../resource/drawable/logo.png')
     )
     self.window.show()
Пример #2
0
 def outputEvent(self):
     message = 'situation information: output'
     self.log.info(message)
     Signal.get_signal().emit_signal_str(message)
     self.window = FramelessWindow('output')
     self.dialog = QDialog()
     description = "a description of output"
     situation = SituationDescriptionDialog(description)
     situation.setupUi(self.dialog)
     self.window.setWidget(self.dialog)
     self.initFrameLessWindow(QSize(700, 600), 'Situation Information',
                              QIcon('../resource/drawable/logo.png'))
     self.window.show()
Пример #3
0
def main():
    app = QApplication(sys.argv)
    splash = SplashScreen()
    splash.effect()
    app.processEvents()
    main_window = FramelessWindow('title')
    main_window.setWindowTitle(strings.NAME)
    main_window.setWindowIcon(QIcon('../resource/drawable/logo.png'))
    main_window.resize(QSize(1200, 700))
    main_window.setWidget(MainWindow())
    main_window.showMaximized()
    splash.finish(main_window)
    sys.exit(app.exec_())
Пример #4
0
 def modelTrainEvent(self):
     message = 'the setting of model train'
     self.log.info(message)
     Signal.get_signal().emit_signal_str(message)
     self.window = FramelessWindow('model train')
     self.dialog = QDialog()
     description = "a description of model train"
     model = ModelTrainDescriptionDialog(description)
     model.setupUi(self.dialog)
     self.window.setWidget(self.dialog)
     self.initFrameLessWindow(QSize(700, 600), 'Model Train',
                              QIcon('../resource/drawable/logo.png'))
     self.window.show()
Пример #5
0
 def mapEvent(self):
     message = 'open the map description'
     self.log.info(message)
     Signal.get_signal().emit_signal_str(message)
     self.window = FramelessWindow('map description')
     self.dialog = QDialog()
     mapDialog = MapDescriptionDialog()
     mapDialog.setupUi(self.dialog)
     self.dialog.setModal(True)
     self.window.setWidget(self.dialog)
     self.initFrameLessWindow(
         QSize(700, 600),
         'Operational Planning',
         QIcon('../resource/drawable/logo.png')
     )
     self.window.show()
Пример #6
0
    def chooseMapEvent(self):
        message = 'choose new map'
        log = logging.getLogger('StarCraftII')
        log.info(message)
        Signal.get_signal().emit_signal_str(message)
        self.window = FramelessWindow('choose map')
        self.dialog = QDialog()
        # tab item name
        list_map = self.list_str if globalInformation.get_value(strings.TYPE_POLICY) is None \
            else globalInformation.get_value(strings.ALGORITHM_MAP)[globalInformation.get_value(strings.TYPE_POLICY)]
        # title name
        self.listDialog = ListDialog(list_map, None, strings.MAPS_TITLE,
                                     strings.TYPE_MAP)
        self.listDialog.setupUi(self.dialog, self.window)
        self.window.setWidget(self.dialog)
        self.initFrameLessWindow(QSize(700, 600), 'Maps',
                                 QIcon('../resource/drawable/logo.png'))
        self.dialog.setModal(True)

        self.window.show()