def processObject(self, obj): mv = QMainWindow(obj) if not mw or not self.acosPerms_: return if not self.perm_.isEmpty(): l = QtCore.QObjectList(mw.queryList("QAction")) ito = QtCore.QObjectListIt(l) a = QtCore.QAction while not ito.current() == 0: a = ito.current() ++ito if self.acosPerm_[a.name()]: continue if self.perm_ == "-w" or self.perm_ == "--": a.setVisible(False) del l it = Qtcore.QdictIterator(self.acosPerms_) for i in range(len(it.current())): a = mw.child(if.currentKey(), "QAction") if a: perm = it if perm == "-w" || perm == "--": a.setVisible(False)
def processObject(self, obj): fm = FLForm(obj) if not fm or not self.acosPerms_: return if not self.perm_.isEmpty(): l = QtCore.QObjectList(fm.queryList("QWidget")) ito = QtCore.QObjectListIt(l) w = None while not ito.current() == 0: w = ito.current() ++ito if self.acosPerms_[w.name()]: continue if self.perm_ == "w" or self.perm_ == "--": w.setPallete(pal) w.setDisabled(True) w.hide() continue if self.perm_ == "r-": w.setDisabled(True) del l it = self.acosPerms_ for i in range(it.current()): w = QtGui.QWidget(fm.child(it.currentKey(), "QWidget")) if w: perm = QtCore.QString(it) if perm == "-w" or perm == "--": w.setPalette(pal) w.setDisabled(True) w.hide() continue if perm == "r-": w.setDisabled(True)