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
def initView(self): self.layout = pyqt.QVBoxLayout() self.setModel(self.parent.model) self.initUI() self.initContextMenu() self.initTriggers()
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
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
def buildPane(self): ''' ''' self.layout = pyqt.QVBoxLayout() self.layout.addWidget(annotations.NchantdLabel('Thursday')) self.layout.addWidget(annotations.NchantdLabel('1/30/2022')) self.editor = editors.NchantdDocEditor(self).initWidget() self.layout.addWidget(self.editor) self.setLayout(self.layout) return self
def __init__(self, app, cfg, parent=None): '''' ''' super(NchantdImagePane, self).__init__(parent) self.config = condor.instruct(pxcfg).select('paneviews').override(cfg) self.app = app self.view = NchantdImageView(app, cfg, parent) self.layout = pyqt.QVBoxLayout() self.layout.addWidget(self.view) self.setLayout(self.layout)
def initView(self): ''' ''' self.layout = pyqt.QVBoxLayout() self.layout.addWidget(self) self.model = self.parent.model self.setModel(self.model) self.initUI() self.initContextMenu() self.initTriggers() return self
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
def __init__(self, parent=None, cfg={}): ''' ''' self.config = condor.instruct(pxcfg).override(cfg)# || if parent: self.config.override(parent.config) if log: print('Nchantd Dynamic Record Entry Form Config', self.config.dikt) super(NchantdDynamicRecordEntryForm, self).__init__() self.model = NchantdTableModel(self) self.layout = pyqt.QVBoxLayout() self.buildPane() self.setLayout(self.layout)
def buildDialog(self): '''Build the dialog from the provided parameters ''' position = 'center' self.layout = pyqt.QVBoxLayout() if log: print('Config Position', self.dtop['layout'][position]['params']) style = self.dtop['layout']['style'] cnt = 0 for pos in self.config.dikt['styles'][style]['positions']: self.pane[pos] = widgets.loadWidget(self, self.dtop['layout'][pos]) self.model.registerListener(self.pane[pos]) self.layout.addWidget(self.pane[pos], cnt) cnt += 1 self.setLayout(self.layout) return self
def initView(self): self.layout = pyqt.QVBoxLayout() # path = join(abspath(dirname(__file__)), '..') # url = self.config.dikt['url'].format(path) # load = [self.config.dikt['stylesheet'], {'url': url}] # stylesheet = subtrix.mechanism(*load).run()[0] # self.setStyleSheet(stylesheet) self.layout.addWidget(self) self.model = self.parent.model self.setModel(self.model) self.initUI() self.initContextMenu() self.initTriggers() return self
def __init__(self): ''' ''' pyqt.QWidget.__init__(self) self.view = NchantdFormView() self.model = NchantdTableModel() self.layout = pyqt.QVBoxLayout()
def initWidget(self): ''' ''' self.layout = pyqt.QVBoxLayout() self.initModel() return self