예제 #1
0
 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())
예제 #2
0
 def __createProject(self, e):
     project = Project()
     project.name = self.__projectTitleField.text()
     
     masterDoc = Document()
     masterDoc.name = 'Master'
     masterDoc.template = str(self.__masterTemplateField.getPath())
     project.setMaster(masterDoc)
     
     for doc in self.__documentsEdit.documents:
         project.addDocument(doc)
     
     project.createProject(str(self.__projectFolderField.getPath()))
예제 #3
0
 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)