def editWidgetParameters(self, widgetName): if widgetName == "Text panel": dlg = TextEditorDialog(settings.widgetsParams[widgetName]["HTML content"], HTML) dlg.exec_() settings.widgetsParams[widgetName]["HTML content"] = dlg.text elif widgetName == "Links": dlg = LinksDialog(settings.widgetsParams[widgetName]["links"], self) dlg.exec_() if dlg.ok: settings.widgetsParams[widgetName]["links"] = dlg.links elif widgetName == "Bookmarks": dlg = BookmarksEditorDialog(self, settings.widgetsParams[widgetName]["bookmarks"], settings.widgetsParams[widgetName]["format"], settings.widgetsParams[widgetName]["interval"], settings.widgetsParams[widgetName]["introTitle"], settings.widgetsParams[widgetName]["introText"], settings.widgetsParams[widgetName]["showIndicators"]) dlg.exec_() if dlg.bookmarks: settings.widgetsParams[widgetName]["bookmarks"] = dlg.bookmarks settings.widgetsParams[widgetName]["format"] = dlg.format settings.widgetsParams[widgetName]["interval"] = dlg.interval settings.widgetsParams[widgetName]["introTitle"] = dlg.introTitle settings.widgetsParams[widgetName]["introText"] = dlg.introText settings.widgetsParams[widgetName]["showIndicators"] = dlg.showIndicators elif widgetName == "Chart tool": dlg = ChartToolDialog(settings.widgetsParams[widgetName]["charts"], self) dlg.exec_() settings.widgetsParams[widgetName]["charts"] = dlg.charts else: dlg = ParametersEditorDialog(settings.widgetsParams[widgetName]) dlg.exec_() settings.widgetsParams[widgetName] = dlg.params
def edit(): dlg = TextEditorDialog(unicode(value), JSON) dlg.exec_() self.newValue = dlg.text
def edit(): dlg = TextEditorDialog(unicode(self.newValue), JSON) dlg.exec_() self.newValue = dlg.text
def editWidgetParameters(self, widgetName): if widgetName == "Text panel": dlg = TextEditorDialog( settings.widgetsParams[widgetName]["HTML content"], HTML) dlg.exec_() settings.widgetsParams[widgetName]["HTML content"] = dlg.text elif widgetName == "Links": dlg = LinksDialog(settings.widgetsParams[widgetName]["links"], self) dlg.exec_() if dlg.ok: settings.widgetsParams[widgetName]["links"] = dlg.links elif widgetName == "Bookmarks": dlg = BookmarksEditorDialog( self, settings.widgetsParams[widgetName]["bookmarks"], settings.widgetsParams[widgetName]["format"], settings.widgetsParams[widgetName]["interval"], settings.widgetsParams[widgetName]["introTitle"], settings.widgetsParams[widgetName]["introText"], settings.widgetsParams[widgetName]["showIndicators"]) dlg.exec_() if dlg.bookmarks: settings.widgetsParams[widgetName]["bookmarks"] = dlg.bookmarks settings.widgetsParams[widgetName]["format"] = dlg.format settings.widgetsParams[widgetName]["interval"] = dlg.interval settings.widgetsParams[widgetName][ "introTitle"] = dlg.introTitle settings.widgetsParams[widgetName]["introText"] = dlg.introText settings.widgetsParams[widgetName][ "showIndicators"] = dlg.showIndicators elif widgetName == "Chart tool": dlg = ChartToolDialog(settings.widgetsParams[widgetName]["charts"], self) dlg.exec_() settings.widgetsParams[widgetName]["charts"] = dlg.charts else: dlg = ParametersEditorDialog(settings.widgetsParams[widgetName]) dlg.exec_() settings.widgetsParams[widgetName] = dlg.params