Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 5
0
 def sql_element(self, text):
     Form.text_element(self, text, 2)
     self.multiline_check() 
Exemplo n.º 6
0
 def dropdown_element(self, text, choices):
     Form.radio_element(self, text, choices)
     self.multiline_check() 
Exemplo n.º 7
0
 def yesno_element(self, text):
     Form.radio_element(self, text, ['Yes','No']) 
     self.multiline_check() 
Exemplo n.º 8
0
 def descriptive_element(self, text):
     Form.text_element(self, text, 0)
     self.multiline_check() 
Exemplo n.º 9
0
 def datetime_sec_mdy(self, question):
     Form.date_element(self, question, 'mmddyyyy')
     Form.time_element(self, '', 'hhmmss') 
     self.multiline_check() 
Exemplo n.º 10
0
 def time_mm_ss(self, question):
     Form.time_element(self, question, 'mmss')
     self.multiline_check() 
Exemplo n.º 11
0
 def time_mm_ss(self, question):
     Form.time_element(self, question, 'mmss')
Exemplo n.º 12
0
 def time(self, question):
     Form.time_element(self, question, 'hhmm')
Exemplo n.º 13
0
 def date_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 17
0
 def integer_element(self, question):
     Form.text_element(self, question, .5)
     self.multiline_check() 
Exemplo n.º 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)
Exemplo n.º 19
0
 def datetime_mdy(self, question):
     Form.date_element(self, question, 'mmddyyyy')
     Form.time_element(self, '', 'hhmm')
Exemplo n.º 20
0
 def datetime_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     Form.time_element(self, '', 'hhmm')
     self.multiline_check() 
Exemplo n.º 21
0
 def datetime_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     Form.time_element(self, '', 'hhmm')
Exemplo n.º 22
0
 def datetime_sec_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     Form.time_element(self, '', 'hhmmss') 
     self.multiline_check() 
Exemplo n.º 23
0
 def datetime_sec_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     Form.time_element(self, '', 'hhmmss') 
Exemplo n.º 24
0
 def truefalse_element(self, text):
     Form.radio_element(self, text, ['True','False']) 
     self.multiline_check() 
Exemplo n.º 25
0
 def number_element(self, question):
     Form.text_element(self, question, 1)
     self.multiline_check() 
Exemplo n.º 26
0
 def check_box_element(self, text, choices):
     Form.check_box_element(self, text, choices)
     self.multiline_check() 
Exemplo n.º 27
0
 def text_element(self, question):
     Form.text_element(self, question, 2)
     self.multiline_check() 
Exemplo n.º 28
0
 def note_element(self, text):
     Form.note_element(self, text, 3)
     self.multiline_check() 
Exemplo n.º 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)
Exemplo n.º 30
0
 def date_element(self, question):
     Form.date_element(self, question)
     self.multiline_check() 
Exemplo n.º 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)
Exemplo n.º 32
0
 def date_ymd(self, question):
     Form.date_element(self, question, 'yyyymmdd')
     self.multiline_check() 
Exemplo n.º 33
0
 def date_dmy(self, question):
     Form.date_element(self, question, 'ddmmyyyy')
     self.multiline_check() 
Exemplo n.º 34
0
 def render(self):
     if len(self._header_box):
         self.print_header_box()
     return Form.render(self)
Exemplo n.º 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)
Exemplo n.º 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)