Exemplo n.º 1
0
 def buildPane(self):
     ''' '''
     minutes = ['00', '15', '30', '45']
     windows, sections, hour = 96, 3, 0
     l = pyqt.QHBoxLayout()
     for section in range(sections):
         l0 = pyqt.QVBoxLayout()
         cnt = 1
         for i in range(int(windows / sections)):
             thour = str(hour)
             if len(str(hour)) == 1:
                 thour = f'0{hour}'
             minute = minutes[i % 4]
             if log: print('TODO Action', self.config.dikt)
             l1 = pyqt.QHBoxLayout()
             l1.addWidget(annotations.NchantdLabel(f'{thour}:{minute}'))
             l1.addWidget(annotations.NchantdEntryBox(self).initWidget())
             l0.addLayout(l1)
             if cnt == 4:
                 hour += 1
                 cnt = 0
             cnt += 1
         l.addLayout(l0)
     self.setLayout(l)
     return self
Exemplo n.º 2
0
 def buildTab(self):
     ''' '''
     self.editors = {}
     self.forms = {}
     layout_b = pyqt.QVBoxLayout()
     labels = [
         'Yesterday - Monday 2022/01/30', 'Today - Tuesday 2022/01/31',
         'Tommorrow - Wednesday 2022/02/01', 'Thursday 2022/02/02',
         'Friday 2022/02/03', 'Saturday 2022/01/04', 'Sunday 2022/01/05',
         'Monday 2022/01/06 - Sunday 2022/01/13',
         'Monday 2022/01/06 - Sunday 2022/01/13',
         'Monday 2022/01/06 - Sunday 2022/01/13',
         'Monday 2022/01/06 - Sunday 2022/01/13'
     ]
     cnt = 0
     for label in labels:
         layout_b.addWidget(annotations.NchantdLabel(label))
         self.editors[cnt] = editors.NchandDocEditor(self).initWidget()
         layout_b.addWidget(self.editors[cnt])
         cnt += 1
     layout_c = pyqt.QVBoxLayout()
     self.forms[0] = NchantdTODOEntryForm(self).initWidget()
     self.editors[cnt] = editors.NchandDocEditor(self).initWidget()
     layout_c.addWidget(self.editors[cnt])
     layout_a = pyqt.QHBoxLayout()
     layout_a.addWidget(layout_b)
     layout_a.addWidget(layout_c)
     return self
Exemplo n.º 3
0
 def buildEditor(self):
     ''' '''
     self.layout = pyqt.QVBoxLayout()
     self.layout.addWidget(annotations.NchantdLabel('Date: 01/01/2022'))
     self.editor = editors.NchantdDocEditor(self).initWidget()
     if log: print(f'Editor {self.editor.__dir__()}')
     self.layout.addWidget(self.editor)
     return self
Exemplo n.º 4
0
 def buildPane(self):
     ''' '''
     layout = pyqt.QVBoxLayout()
     wdgt = annotations.NchantdLabel(self.config.dikt['label']['text'])
     layout.setAlignment(wdgt, pyqt.Qt.AlignTop)
     layout.addWidget(wdgt)
     wdgt = NchantdComboBox(self)
     layout.setAlignment(wdgt, pyqt.Qt.AlignTop)
     layout.addWidget(wdgt)
     self.setLayout(layout)
     return self
Exemplo n.º 5
0
	def createLabel(self, name):
		''' '''
		self.label = annotations.NchantdLabel(name)
		return self