示例#1
0
 def parser(self):
     name = QFileDialog.getExistingDirectory(None, '选择文件夹')
     if os.path.exists(name):
         self.pars_fname = ''
         ls = parse(name)
         self.scene().clear()
         #self.from_dict(dc)
         for i in ls:
             if isinstance(i, model):
                 self.scene().addItem(ModelGram(i.app, i.name, i.code))
             elif isinstance(i, App):
                 self.scene().addItem(AppGram(i.name, i.code))
示例#2
0
 def parser(self):
     name = QFileDialog.getExistingDirectory(None,'选择文件夹')
     if os.path.exists(name):
         self.pars_fname = ''
         ls = parse(name)
         self.scene().clear()
         #self.from_dict(dc)
         for i in ls:
             if isinstance(i,model):
                 self.scene().addItem( ModelGram(i.app, i.name,i.code) )
             elif isinstance(i,App):
                 self.scene().addItem(AppGram(i.name,i.code))
示例#3
0
 def add_cst(self):
     name = QFileDialog.getExistingDirectory(None, '选择文件夹')
     if os.path.exists(name):
         self.pars_fname = ''
         ls = parse(name)
         for i in ls:
             gram = self.find_gram(i)
             if gram:
                 continue
             else:
                 if isinstance(i, model):
                     self.scene().addItem(ModelGram(i.app, i.name, i.code))
                 elif isinstance(i, App):
                     self.scene().addItem(AppGram(i.name, i.code))
示例#4
0
 def add_cst(self):
     name = QFileDialog.getExistingDirectory(None,'选择文件夹')
     if os.path.exists(name):
         self.pars_fname = ''
         ls = parse(name)
         for i in ls:
             gram = self.find_gram(i)
             if gram:
                 continue
             else:
                 if isinstance(i,model):
                     self.scene().addItem( ModelGram(i.app, i.name,i.code) )
                 elif isinstance(i,App):
                     self.scene().addItem(AppGram(i.name,i.code))