def setData(self, index, value, role): if role == Qt.EditRole: className = self.data(index.sibling(index.row(), 1)) try: hpasteoptions.setOption( 'hpasteweb.plugins.%s.speed_class' % className, value) if qt5: self.dataChanged.emit(index, index, []) else: self.dataChanged.emit(index, index) except Exception as e: print(e) return False return True return False
def togglesCallback(self, state): if self.__optionsReread: return sender = self.sender() if sender is self.ui_saveHdasToggle: hpasteoptions.setOption('hpaste.transfer_assets', state) if sender is self.ui_ignoreWhenExists: hpasteoptions.setOption( 'hpaste.ignore_hdas_if_already_defined', state) if sender is self.ui_forcePreferred: hpasteoptions.setOption('hpaste.force_prefer_hdas', state) if sender is self.ui_ignore_houversion_warning: hpasteoptions.setOption('hpaste.ignore_houversion_warning', state)
def encchangedCallback(self, newtext): if self.__optionsReread: return hpasteoptions.setOption('hpasteweb.encryption_type', newtext)