Esempio n. 1
0
 def importRooms(self):
     rooms = ioHandler.getCSVFile('rooms')
     if rooms:
         rooms.pop(0)
         rooms.pop(0)
         blankSchedule = json.dumps(Timetable.generateRawTable())
         for room in rooms:
             Room.Room.insertRoom([room[0], blankSchedule, room[1]])
         self.tabListener(1)
Esempio n. 2
0
 def importSubjects(self):
     subjects = ioHandler.getCSVFile('matieres')
     if subjects:
         subjects.pop(0)
         subjects.pop(0)
         for subject in subjects:
             Subject.Subject.insertSubject(
                 [subject[1], float(subject[3]), subject[0], '', json.dumps([]), int(subject[4]), subject[2]])
     self.tabListener(2)
Esempio n. 3
0
 def importInstructors(self):
     instructors = ioHandler.getCSVFile('enseignants')
     if instructors:
         instructors.pop(0)
         instructors.pop(0)
         blankSchedule = json.dumps(Timetable.generateRawTable())
         for instructor in instructors:
             Instructor.Instructor.insertInstructor([instructor[0], float(instructor[1]), blankSchedule])
         self.tabListener(0)
Esempio n. 4
0
 def new(self):
     ioHandler.removeTables()
     Database.setup()
     self.tabListener(0)
Esempio n. 5
0
 def load(self):
     ioHandler.load()
     self.tabWidget.setCurrentIndex(0)
     self.tabListener(0)
Esempio n. 6
0
 def saveAs(self):
     ioHandler.saveAs()