def activate(self):
     Plugin.activate(self)
     self.action_hello = QtGui.QAction(self.main_widget())
     self.action_hello.setText("Hello world")
     self.main_widget().menu_Help.addAction(self.action_hello)
     QtCore.QObject.connect(self.action_hello, QtCore.SIGNAL("activated()"),
                            self.hello_world)
Beispiel #2
0
 def activate(self):
     Plugin.activate(self)
     self.action_hello = QtGui.QAction(self.main_widget())
     self.action_hello.setText("Hello world")
     self.main_widget().menu_Help.addAction(self.action_hello)
     QtCore.QObject.connect(self.action_hello, QtCore.SIGNAL("activated()"),
                            self.hello_world)
Beispiel #3
0
 def deactivate(self):
     Plugin.deactivate(self)
     try:
         self.render_chain("web_server").\
             unregister_filter(ReverseArabic)
         self.render_chain("web_server").\
             register_filter(NonLatinFontSizeIncrease, in_front=False)
     except KeyError:  # The web server chain is not active.
         pass
Beispiel #4
0
 def deactivate(self):
     Plugin.deactivate(self)
     try:
         self.render_chain("web_server").\
             unregister_filter(ReverseArabic)
         self.render_chain("web_server").\
             register_filter(NonLatinFontSizeIncrease, in_front=False)
     except KeyError:  # The web server chain is not active.
         pass
Beispiel #5
0
 def activate(self):
     Plugin.activate(self)
     self.component = ResponsiveVoicePronouncer(\
         component_manager=self.component_manager)
     self.component_manager.register(self.component)
     # TODO: refactor this to plugin.py
     gui_module_name = "mnemosyne.pyqt_ui.pronouncer_dlg"
     gui_class_name = "PronouncerDlg"
     gui_class = getattr(\
         importlib.import_module(gui_module_name), gui_class_name)
     self.component_manager.add_gui_to_component(\
         "ResponsiveVoicePronouncer", gui_class)
 def activate(self):
     Plugin.activate(self)
     self.config()["is_last_used_tags_per_card_type"] = True
Beispiel #7
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().tool_bar.setVisible(True)
Beispiel #8
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().show_information("My value is %d" % \
                                        self.config()["my_value"]) 
 def deactivate(self):
     Plugin.deactivate(self)
     self.config()["is_last_used_tags_per_card_type"] = False
Beispiel #10
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().tool_bar.setVisible(False)
Beispiel #11
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
     self.action_hello = None
Beispiel #12
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(Pyn2D)
Beispiel #13
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(AlignImgTop)
 def activate(self):
     Plugin.activate(self)
     self.main_widget().show_information("My value is %d" % \
                                        self.config()["my_value"])
Beispiel #15
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(Pyn2D, in_front=False)
Beispiel #16
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(CatColorReplacer)
Beispiel #17
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(CatColorReplacer, in_front=True)
Beispiel #18
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
Beispiel #19
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(CustomTag)
Beispiel #20
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().menuBar().hide()
     self.main_widget().tool_bar.hide()
Beispiel #21
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(AlignImgTop, in_front=False)
Beispiel #22
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().menuBar().show()
     self.main_widget().findChild(QtGui.QToolBar).show()
     self.main_widget().tool_bar.show()
Beispiel #23
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
Beispiel #24
0
 def activate(self):
     Plugin.activate(self)
     self.action_hello = QtWidgets.QAction(self.main_widget())
     self.action_hello.setText("Hello world")
     self.main_widget().menu_Help.addAction(self.action_hello)
     self.action_hello.triggered.connect(self.hello_world)
Beispiel #25
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().tool_bar.setVisible(True)
Beispiel #26
0
 def test_1(self):
     from mnemosyne.libmnemosyne.plugin import Plugin
     p = Plugin(self.mnemosyne.component_manager)
Beispiel #27
0
 def deactivate(self):
     Plugin.deactivate(self)
     if self.action_hello:
         self.main_widget().menu_Help.removeAction(self.action_hello)
         self.actionHello = None
Beispiel #28
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().menuBar().hide()
     self.main_widget().tool_bar.hide()
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
     self.action_hello = None
 def activate(self):
     Plugin.activate(self)
     self.config()["is_last_used_tags_per_card_type"] = True
 def deactivate(self):
     Plugin.deactivate(self)
     if self.action_hello:
         self.main_widget().menu_Help.removeAction(self.action_hello)
         self.actionHello = None
Beispiel #32
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(CustomTag, in_front=False)
 def deactivate(self):
     Plugin.deactivate(self)
     self.config()["is_last_used_tags_per_card_type"] = False
Beispiel #34
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().tool_bar.setVisible(False)
Beispiel #35
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().menuBar().show()
     self.main_widget().findChild(QtGui.QToolBar).show()
     self.main_widget().tool_bar.show()
Beispiel #36
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.component_manager.unregister(self.component)