Пример #1
0
 def _onSaveAs(self):
     action = ConfigureFiltersDialog.indicees[self.comboBox_Action.currentIndex()]
     existingNames = self.config.getExistingUserActionFilterNames(action)
     #    Ask for the name to save as, present the existing one, offer overwrite action.
     mb = SaveFilterActionAsDialog(self, action, existingNames)
     path = os.path.join(self.resourcesPath, SaveFilterActionAsDialog.RESOURCE_NAME)
     uic.loadUi(path, mb)
     mb.setupUi()
     if mb.exec_()==QtGui.QDialog.Rejected:
         return
     name = mb.getName()
     #    Save as a custom user setting for this action
     self.config.exportAs(action, name)
Пример #2
0
 def _onLoadFrom(self):
     action = ConfigureFiltersDialog.indicees[self.comboBox_Action.currentIndex()]
     existingNames = self.config.getExistingUserActionFilterNames(action)
     #    Ask for the name to save as, present the existing one, offer overwrite action.
     desc = "Load the filter properties for action: %(A)s"%{"A":action}
     mb = SaveFilterActionAsDialog(self, action, existingNames, desc=desc)
     path = os.path.join(self.resourcesPath, SaveFilterActionAsDialog.RESOURCE_NAME)
     uic.loadUi(path, mb)
     mb.setupUi()
     if mb.exec_()==QtGui.QDialog.Rejected:
         return
     name = mb.getName()
     #    Save as a custom user setting for this action
     self.config.importFrom(action, name)
     self._render()