eric6/Helpviewer/OpenSearch/OpenSearchEditDialog.py

branch
maintenance
changeset 7286
7eb04391adf7
parent 7226
babe80d84a3e
parent 7285
1ff497f33f31
child 7287
1c17f2191bdd
--- a/eric6/Helpviewer/OpenSearch/OpenSearchEditDialog.py	Mon Sep 09 18:52:08 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2009 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing a dialog to edit the data of a search engine.
-"""
-
-from __future__ import unicode_literals
-
-from PyQt5.QtWidgets import QDialog
-
-from .Ui_OpenSearchEditDialog import Ui_OpenSearchEditDialog
-
-
-class OpenSearchEditDialog(QDialog, Ui_OpenSearchEditDialog):
-    """
-    Class implementing a dialog to edit the data of a search engine.
-    """
-    def __init__(self, engine, parent=None):
-        """
-        Constructor
-        
-        @param engine reference to the search engine (OpenSearchEngine)
-        @param parent reference to the parent object (QWidget)
-        """
-        super(OpenSearchEditDialog, self).__init__(parent)
-        self.setupUi(self)
-        
-        self.__engine = engine
-        
-        self.nameEdit.setText(engine.name())
-        self.descriptionEdit.setText(engine.description())
-        self.imageEdit.setText(engine.imageUrl())
-        self.searchEdit.setText(engine.searchUrlTemplate())
-        self.suggestionsEdit.setText(engine.suggestionsUrlTemplate())
-        
-        msh = self.minimumSizeHint()
-        self.resize(max(self.width(), msh.width()), msh.height())
-    
-    def accept(self):
-        """
-        Public slot to accept the data entered.
-        """
-        self.__engine.setName(self.nameEdit.text())
-        self.__engine.setDescription(self.descriptionEdit.text())
-        self.__engine.setImageUrlAndLoad(self.imageEdit.text())
-        self.__engine.setSearchUrlTemplate(self.searchEdit.text())
-        self.__engine.setSuggestionsUrlTemplate(self.suggestionsEdit.text())
-        
-        super(OpenSearchEditDialog, self).accept()

eric ide

mercurial