コード例 #1
0
 def updateData(self,evt = None):
     Debug.debug(__name__,"Data is being Updating")
     self.editor.fNeedToSave = True
     #children = self.journalTree.GetChildren(rootItem)
     parent = self.journalTree.GetRootItem()
     node, cookie = self.journalTree.GetLastChild(parent)
     #LEjournalEntries  = {}
     self.editor.journalMgr.reset()
     while node.IsOk():#for i in range(self.journalTree.GetChildrenCount(rootItem)): 
          name = self.journalTree.GetItemText(node, 0)
          tag = self.journalTree.GetItemText(node, 1)
          #print "Tag ", tag
          #filename  = self.journalTree.GetItemText(node, 4)
          journalEntry = JournalEntry(tag, name)
          #lines = self.journalTree.GetChildren(node)
          l, cookie = self.journalTree.GetFirstChild(node)
          while l.IsOk():#for j in range(self.journalTree.GetChildrenCount(node)):
                 text = self.journalTree.GetItemText(l, 0)
                 endpoint = self.journalTree.GetItemText(l, 2)
                 entryValue = self.journalTree.GetItemText(l,3)
                 journalLine = JournalLine(text,entryValue, endpoint)
                 journalEntry.addJournalLine(journalLine)
                 l = self.journalTree.GetNextSibling(l)
                 self.editor.journalMgr.addJournalEntry(journalEntry)
          #LEjournalEntries[LEjournalEntry.tag] = LEjournalEntry
          node = self.journalTree.GetPrevSibling(node)
コード例 #2
0
ファイル: JournalDialog.py プロジェクト: PlumpMath/RedPanda-1
 def updateData(self, evt=None):
     Debug.debug(__name__, "Data is being Updating")
     self.editor.fNeedToSave = True
     #children = self.journalTree.GetChildren(rootItem)
     parent = self.journalTree.GetRootItem()
     node, cookie = self.journalTree.GetLastChild(parent)
     #LEjournalEntries  = {}
     self.editor.journalMgr.reset()
     while node.IsOk(
     ):  #for i in range(self.journalTree.GetChildrenCount(rootItem)):
         name = self.journalTree.GetItemText(node, 0)
         tag = self.journalTree.GetItemText(node, 1)
         #print "Tag ", tag
         #filename  = self.journalTree.GetItemText(node, 4)
         journalEntry = JournalEntry(tag, name)
         #lines = self.journalTree.GetChildren(node)
         l, cookie = self.journalTree.GetFirstChild(node)
         while l.IsOk(
         ):  #for j in range(self.journalTree.GetChildrenCount(node)):
             text = self.journalTree.GetItemText(l, 0)
             endpoint = self.journalTree.GetItemText(l, 2)
             entryValue = self.journalTree.GetItemText(l, 3)
             journalLine = JournalLine(text, entryValue, endpoint)
             journalEntry.addJournalLine(journalLine)
             l = self.journalTree.GetNextSibling(l)
             self.editor.journalMgr.addJournalEntry(journalEntry)
         #LEjournalEntries[LEjournalEntry.tag] = LEjournalEntry
         node = self.journalTree.GetPrevSibling(node)
コード例 #3
0
 def onAddEntry(self, evt, item):
     tag = "Tag"
     copy = "Copy"
     copyNo = 1
     #journalEntry = JournalEntry(tag,"Title" )
     while(self.editor.journalMgr.journalEntryExist(tag)):#not(self.editor.journalMgr.addJournalEntry(journalEntry))):
         tag = "Tag"+"-"+copy+str(copyNo)
         copyNo +=1
     journalEntry = JournalEntry(tag,"Quest" )     
     line = JournalLine("Template Entry", 10, False)
     journalEntry.addJournalLine(line)
     self.addJournalEntry(journalEntry)
コード例 #4
0
ファイル: JournalDialog.py プロジェクト: PlumpMath/RedPanda-1
 def onAddEntry(self, evt, item):
     tag = "Tag"
     copy = "Copy"
     copyNo = 1
     #journalEntry = JournalEntry(tag,"Title" )
     while (self.editor.journalMgr.journalEntryExist(tag)
            ):  #not(self.editor.journalMgr.addJournalEntry(journalEntry))):
         tag = "Tag" + "-" + copy + str(copyNo)
         copyNo += 1
     journalEntry = JournalEntry(tag, "Quest")
     line = JournalLine("Template Entry", 10, False)
     journalEntry.addJournalLine(line)
     self.addJournalEntry(journalEntry)