def initial_fill(self): self.authorLabel.setText(self.note.info['login'] + ':') if self.note.info.get('note_html'): note_text = gf.hex_to_html(self.note.info['note_html']) self.commentLabel.setTextFormat(QtCore.Qt.RichText) else: note_text = self.note.info['note'] self.commentLabel.setTextFormat(QtCore.Qt.PlainText) self.commentLabel.setText(note_text) self.dateLabel.setText(self.note.info['timestamp'])
def readSettings(self): """ Reading Settings """ self.settings.beginGroup(self.parent_ui.relates_to) tab_name = self.parent_ui.objectName().split('/') group_path = '{0}/{1}/{2}'.format(self.parent_ui.current_namespace, self.parent_ui.current_project, tab_name[1]) self.settings.beginGroup(group_path) search_cache = gf.hex_to_html(self.settings.value('last_search_tabs')) if search_cache: search_cache = ast.literal_eval(search_cache) tab_added = 0 for tab, state, options in zip(search_cache[0], search_cache[1], search_cache[3]): self.add_tab(tab, state, options) tab_added += 1 if not tab_added: self.add_tab() self.resultsTabWidget.setCurrentIndex(int(search_cache[2])) else: self.add_tab() self.settings.endGroup() self.settings.endGroup()