Example #1
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)
Example #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)
Example #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
Example #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
Example #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
Example #7
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().tool_bar.setVisible(True)
Example #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
Example #10
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().tool_bar.setVisible(False)
Example #11
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
     self.action_hello = None
Example #12
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(Pyn2D)
Example #13
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(AlignImgTop)
Example #14
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().show_information("My value is %d" % \
                                        self.config()["my_value"])
Example #15
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(Pyn2D, in_front=False)
Example #16
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(CatColorReplacer)
Example #17
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(CatColorReplacer, in_front=True)
Example #18
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
Example #19
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.render_chain("default").\
         unregister_filter(CustomTag)
Example #20
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().menuBar().hide()
     self.main_widget().tool_bar.hide()
Example #21
0
 def activate(self):
     Plugin.activate(self)
     self.render_chain("default").\
         register_filter(AlignImgTop, in_front=False)
Example #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()
Example #23
0
 def __init__(self, component_manager):
     Plugin.__init__(self, component_manager)
Example #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)
Example #25
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.main_widget().tool_bar.setVisible(True)
Example #26
0
 def test_1(self):
     from mnemosyne.libmnemosyne.plugin import Plugin
     p = Plugin(self.mnemosyne.component_manager)
Example #27
0
 def deactivate(self):
     Plugin.deactivate(self)
     if self.action_hello:
         self.main_widget().menu_Help.removeAction(self.action_hello)
         self.actionHello = None
Example #28
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().menuBar().hide()
     self.main_widget().tool_bar.hide()
Example #29
0
 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
Example #31
0
 def deactivate(self):
     Plugin.deactivate(self)
     if self.action_hello:
         self.main_widget().menu_Help.removeAction(self.action_hello)
         self.actionHello = None
Example #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
Example #34
0
 def activate(self):
     Plugin.activate(self)
     self.main_widget().tool_bar.setVisible(False)
Example #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()
Example #36
0
 def deactivate(self):
     Plugin.deactivate(self)
     self.component_manager.unregister(self.component)