def OnSettingChange(self, e): for panel in self.panelList: idx = self.panelList.index(panel) for k in panel.paramCtrls.keys(): self.pluginConfig[idx]['params'][k] = panel.paramCtrls[ k].GetValue() profile.setPluginConfig(self.pluginConfig)
def OnAdd(self, e): if self.listbox.GetSelection() < 0: return plugin = self.pluginList[self.listbox.GetSelection()] newConfig = {'filename': plugin['filename'], 'params': {}} if not self._buildPluginPanel(newConfig): return self.pluginConfig.append(newConfig) profile.setPluginConfig(self.pluginConfig)
def OnRem(self, e): panel = e.GetEventObject().GetParent() sizer = self.pluginEnabledPanel.GetSizer() idx = self.panelList.index(panel) panel.Show(False) for p in self.panelList: sizer.Detach(p) self.panelList.pop(idx) for p in self.panelList: sizer.Add(p, flag=wx.EXPAND) self.pluginEnabledPanel.Layout() self.pluginEnabledPanel.SetSize((1,1)) self.Layout() self.pluginConfig.pop(idx) profile.setPluginConfig(self.pluginConfig)
def OnRem(self, e): panel = e.GetEventObject().GetParent() sizer = self.pluginEnabledPanel.GetSizer() idx = self.panelList.index(panel) panel.Show(False) for p in self.panelList: sizer.Detach(p) self.panelList.pop(idx) for p in self.panelList: sizer.Add(p, flag=wx.EXPAND) self.pluginEnabledPanel.Layout() self.pluginEnabledPanel.SetSize((1, 1)) self.Layout() self.pluginConfig.pop(idx) profile.setPluginConfig(self.pluginConfig)
def OnSettingChange(self, e): for panel in self.panelList: idx = self.panelList.index(panel) for k in panel.paramCtrls.keys(): self.pluginConfig[idx]['params'][k] = panel.paramCtrls[k].GetValue() profile.setPluginConfig(self.pluginConfig)