예제 #1
0
    def new_season(self):
        ui_newseason = gui_newseason.Ui_MainWindow()
        ui_newseason.setupUi()
        ui_newseason.show()

        while ui_newseason.finish_window == False:
            QtCore.QCoreApplication.processEvents()
            time.sleep(0.05)
        if ui_newseason.season_attributes != "":
            # print("N. seasons of project selected:{}".format(len(self.project_selected.seasons)))
            (season_name, season_description) = ui_newseason.season_attributes
            self.project_selected.add_Season(season_name, season_description)
            # print("new season created. N. seasons of project selected:{}".format(len(self.project_selected.seasons)))
            self.comboBox_seasons.addItem("")
            self.comboBox_seasons.setItemText(
                len(self.project_selected.seasons) - 1,
                self.project_selected.seasons[-1].season_name)
            self.comboBox_seasons.setCurrentIndex(
                len(self.project_selected.seasons) - 1)
            self.write_default_attrib(len(self.project_selected.seasons) - 1)
        else:
            msgbox.Message_popup(
                "Error", "Season Error",
                "Season cannot be created because neither the season name nor its description was given, please check!"
            )
예제 #2
0
    def new_season(self):
        ui_newseason = gui_newseason.Ui_MainWindow()
        ui_newseason.setupUi()
        ui_newseason.show()

        while ui_newseason.finish_window == False:
            QtCore.QCoreApplication.processEvents()
            time.sleep(0.02)
예제 #3
0
    def new_season(self):
        ui_newseason=gui_newseason.Ui_MainWindow()
        ui_newseason.setupUi()
        ui_newseason.show()

        while ui_newseason.finish_window==False:
            QtCore.QCoreApplication.processEvents()
            time.sleep(0.05) 
        if ui_newseason.season_attributes!="":
            # print("N. seasons of project selected:{}".format(len(self.project_selected.seasons)))
            (season_name,season_description)=ui_newseason.season_attributes
            self.project_selected.add_Season(season_name,season_description)
            # print("new season created. N. seasons of project selected:{}".format(len(self.project_selected.seasons)))
            item=QtWidgets.QTreeWidgetItem(self.treeWidget) #creates the high level item in the tree
            #self.treeWidget.addTopLevelItem(item)
            self.populate_tree()
            # print("tree populated!")            
            
        else:
            msgbox.Message_popup("Error","Season Error","Season cannot be created because neither the season name nor its description was given, please check!")