예제 #1
0
 def print_header_box(self):
     if self.header_box == 'box':
         lft = self._left
         rt = self._right
         self._left = 275
         self._right = 540
         old_x, old_y = self.text_obj.getCursor()
         old_fnt = self.font
         old_fnt_size = self.font_size
         self.text_obj.setTextOrigin(self._left, 
                                     20 + self.spacing)
         self._x, self._y = self.text_obj.getCursor()
         self.headerflag=True
         for f in self._header_box:
             self.set_font(f[2][0], f[2][1])
             if f[3]:
                 f[1](self,f[0],f[3])
             else:
                 f[1](self,f[0])
         self.headerflag=False
         x, y = self.text_obj.getCursor()
         Form._draw_box(self, self._left - 5, 20, 
                        self._right + 5, y + self.spacing/2.0)
         self._left = lft
         self._right = rt
         self.text_obj.setTextOrigin(old_x, self._y + self.spacing)
         self._x, self._y = self.text_obj.getCursor()
         self.set_font(old_fnt, old_fnt_size)
예제 #2
0
    def form_name(self, name, font_name="Times-BoldItalic", font_size=20):
        Form.form_name(self, name, font_name, font_size)

        if self.header_box == 'form_name':
            if self.form_name_current is not None:
                self.remove_header_footer(self.form_name_current)
            self.set_header(self.fm_name, 'center',('Times-Bold', 12), True)
            self.form_name_current = self.fm_name
예제 #3
0
 def __init__(self, *args, **kwargs):
     self.header_box = args[2].lower()
     self.multiline = args[1]
     name = args[0]
     Form.__init__(self,name, **kwargs)
     self._header_box = []
     self.headerflag = False
     self.form_name_current = None
예제 #4
0
 def __init__(self):
     self.path = [MainForm.name, TeacherForm.name,self.name]
     self.items = ['Attendance', 'Absence','Real-time Detail Records','Real-time Check in list','back']
     Form.__init__(self, self.path, self.items)
예제 #5
0
 def sql_element(self, text):
     Form.text_element(self, text, 2)
     self.multiline_check() 
예제 #6
0
 def dropdown_element(self, text, choices):
     Form.radio_element(self, text, choices)
     self.multiline_check() 
예제 #7
0
 def yesno_element(self, text):
     Form.radio_element(self, text, ['Yes','No']) 
     self.multiline_check() 
예제 #8
0
 def descriptive_element(self, text):
     Form.text_element(self, text, 0)
     self.multiline_check() 
예제 #9
0
 def datetime_sec_mdy(self, question):
     Form.date_element(self, question, 'mmddyyyy')
     Form.time_element(self, '', 'hhmmss') 
     self.multiline_check() 
예제 #10
0
 def time_mm_ss(self, question):
     Form.time_element(self, question, 'mmss')
     self.multiline_check() 
예제 #11
0
 def time_mm_ss(self, question):
     Form.time_element(self, question, 'mmss')
예제 #12
0
 def time(self, question):
     Form.time_element(self, question, 'hhmm')
예제 #13
0
 def date_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
예제 #14
0
 def date_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
 def __init__(self):
     self.items = ['student login', 'teacher login', 'exit']
     Form.__init__(self, self.path, self.items)
예제 #16
0
 def __init__(self):
     self.path = [MainForm.name, self.name]
     self.items = ['start check in', 'update check in detail', 'history',  'progress','back']
     Form.__init__(self, self.path, self.items)
예제 #17
0
 def integer_element(self, question):
     Form.text_element(self, question, .5)
     self.multiline_check() 
예제 #18
0
 def __init__(self):
     self.path = [MainForm.name, TeacherForm.name, self.name]
     self.items = ['update once check in','back']
     Form.__init__(self, self.path, self.items)
예제 #19
0
 def datetime_mdy(self, question):
     Form.date_element(self, question, 'mmddyyyy')
     Form.time_element(self, '', 'hhmm')
예제 #20
0
 def datetime_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     Form.time_element(self, '', 'hhmm')
     self.multiline_check() 
예제 #21
0
 def datetime_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     Form.time_element(self, '', 'hhmm')
예제 #22
0
 def datetime_sec_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     Form.time_element(self, '', 'hhmmss') 
     self.multiline_check() 
예제 #23
0
 def datetime_sec_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     Form.time_element(self, '', 'hhmmss') 
예제 #24
0
 def truefalse_element(self, text):
     Form.radio_element(self, text, ['True','False']) 
     self.multiline_check() 
예제 #25
0
 def number_element(self, question):
     Form.text_element(self, question, 1)
     self.multiline_check() 
예제 #26
0
 def check_box_element(self, text, choices):
     Form.check_box_element(self, text, choices)
     self.multiline_check() 
예제 #27
0
 def text_element(self, question):
     Form.text_element(self, question, 2)
     self.multiline_check() 
예제 #28
0
 def note_element(self, text):
     Form.note_element(self, text, 3)
     self.multiline_check() 
예제 #29
0
 def new_page(self, break_text=False):
     if not self.is_new_page():
         if len(self._header_box):
             self.print_header_box()
         Form.new_page(self,break_text)
예제 #30
0
 def date_element(self, question):
     Form.date_element(self, question)
     self.multiline_check() 
예제 #31
0
 def __init__(self):
     self.path = [MainForm.name,TeacherForm.name,self.name]
     self.items = ['browse sum', 'browse detail file','browse once check in','back']
     Form.__init__(self, self.path, self.items)
예제 #32
0
 def date_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     self.multiline_check() 
예제 #33
0
 def date_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     self.multiline_check() 
예제 #34
0
 def render(self):
     if len(self._header_box):
         self.print_header_box()
     return Form.render(self)
예제 #35
0
 def time(self, question):
     Form.time_element(self, question, 'hhmm')
     self.multiline_check() 
 def __init__(self):
     self.path = [MainForm.name, self.name]
     self.items = ['join check in', 'back']
     Form.__init__(self, self.path, self.items)
예제 #37
0
 def __init__(self):
     self.path = [MainForm.name,TeacherForm.name,self.name]
     self.items = ['start auto check in', 'start manual check in','start random check in', 'back']
     Form.__init__(self, self.path, self.items)