def __addDocument(self, e): doc = Document() doc.name = str(self.__documentFileNameField.text()) doc.title = str(self.__documentTitleField.text()) doc.template = self.__templateField.getPath() self.documents.append(doc) self.__documentList.addItem(self.__documentFileNameField.text())
def __loadDocuments(self): options = self.__config.options('documents') for option in options: doc = Document() doc.name = self.__config.get(option, 'name') doc.title = self.__config.get(option, 'title') doc.template = self.__config.get(option, 'template') self.documents.append(doc) self.__documentList.addItem(doc.name) logging.debug("Loaded document:") logging.debug("name: %s", doc.name) logging.debug("title: %s", doc.title) logging.debug("template: %s", doc.template)