Пример #1
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        # self.addMiddleWidget("逐步添加用户", StepAddWidget(self))
        # self.addMiddleWidget("线性递增添加用户", LinerAddWidget(self))
        self.addMiddleWidget("载入用户", ThreadStepAddWidget(self))
        self.classRoom = ClassRoom.singleton()

        self.flag = False
Пример #2
0
    def __init__(self, vote):
        super().__init__()

        self.classRoom = ClassRoom.singleton()
        for voteOption in vote["voteOptionList"]:
            setattr(
                self, voteOption["optionName"],
                ButtonSpinBoxField(self,
                                   voteOption["optionName"],
                                   lambda v, x=voteOption: self.vote(x)))
Пример #3
0
    def __init__(self):
        super().__init__()
        self.flag = True
        self.temp_func = None
        self.classRoom = ClassRoom.singleton()

        self.worker = None

        self.initialize()
        self.setStyle()
        self.setConfig()
        self.setLayouts()
        self.setExecut()
Пример #4
0
 def createClassRoom(self, classId=None):
     if classId == None:
         print('Enter class standard (1-10) :')
         standard = input()
         while (standard
                not in ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']):
             print('Enter valid class standard (1-10) :')
             standard = input()
         print('Enter section name (A-E) :')
         section = input()
         while (section not in ['A', 'B', 'C', 'D', 'E']):
             print('Enter valid section name (A-E) :')
             section = input()
         classId = standard + section
     if (classId not in self.classRooms.keys()):
         standard = classId[:-1]
         section = classId[-1]
         self.classRooms[classId] = ClassRoom(standard, section)
     else:
         print('Class already exists with that name')
     return True
Пример #5
0
 def __init__(self):
     super().__init__()
     self.classRoom = ClassRoom.singleton()
     self.timer = QTimer(self)
     self.timer.timeout.connect(self.update_inroom_robot_label)
     self.timer.start(2000)
Пример #6
0
 def __init__(self, parent):
     super().__init__()
     self.timer = QTimer(self)
     self.parent = parent
     self.timer.timeout.connect(self.add_user)
     self.classRoom = ClassRoom.singleton()
Пример #7
0
 def __init__(self, parent):
     super().__init__()
     self.parent = parent
     self.worker = WorkThread(self.parent)
     self.classRoom = ClassRoom.singleton()
Пример #8
0
 def __init__(self):
     super().__init__()
     self.classRoom = ClassRoom.singleton()