def readFiles(self,parent,path): for f in oslistdir(path): if ospathisdir(ospathjoin(path,f)): d = Dir(parent,f,path) self.readFiles(d,ospathjoin(path,f)) else: if not ospathjoin(f).startswith('.'): File(parent,f,path)
def initApiMenu(self): self.action_Api = QAction(Icons.lib, 'Api', self) men = QMenu() self.apiGroup = QActionGroup(self) self.apiGroup.setExclusive(True) self.apiGroup.selected.connect(self.parent.setApi) list = oslistdir(apiDir) apis = [] if(list != None): for i in list: if i.endswith("api"): apis.append(i.replace(".api", "")) if(apis != None): for i in apis: act = self.make_action_api(i) self.apiGroup.addAction(act) if(i == "emo"): #For emo act.setChecked(True) men.addActions(self.apiGroup.actions()) self.action_Api.setMenu(men) self.addAction(self.action_Api)
def readMainFiles(self,parent,path): for f in oslistdir(path): if not ospathisdir(ospathjoin(path,f)): if not ospathjoin(f).startswith('.'): File(parent,f,path)
def readMainDir(self,parent,path): for d in oslistdir(path): if ospathisdir(ospathjoin(path,d)): if not ospathjoin(d).startswith('.'): i = Dir(parent,d,path) self.readMainFiles(i,ospathjoin(path,d))