Some code snippets should make things clearer.
(Colon's show where some lines of code have been skipped.)
Code:
ui.py has
from calibre_plugins.ag_normepub.main import PlugMain
:
self.qaction.triggered.connect(self.show_dialog)
:
def show_dialog(self):
:
ufig = self.interface_action_base_plugin.do_user_config
plug = PlugMain(self.gui, self.qaction.icon(), ufig)
plug.show()
main.py has:
class PlugMain(QDialog):
def __init__(self, gui, icon, ufig):
self.gui = gui
self.ufig = ufig
QDialog.__init__(self, gui)
:
self.btn_norm = QPushButton('Normalise ePub', self)
self.btn_norm.clicked.connect(self.normalise)
self.lay.addWidget(self.btn_norm)
:
def normalise(self):
:
and
normalise does all the work. So I want get rid of this QDialog but I can't delete the whole class as normalise() is defined within it.