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