当前位置: 首页>>代码示例>>Python>>正文


Python plugins.PluginClass类代码示例

本文整理汇总了Python中zim.plugins.PluginClass的典型用法代码示例。如果您正苦于以下问题:Python PluginClass类的具体用法?Python PluginClass怎么用?Python PluginClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PluginClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: destroy

 def destroy(self):
     # show at least menubar again, set margins to zero & restore colors
     self.ui.uistate['MainWindow']['show_menubar_fullscreen'] = True
     self._set_margins(0, 0, 0, 0)
     if self._normal_colors:
         self._set_colors(self._normal_colors)
     PluginClass.destroy(self)
开发者ID:DarioGT,项目名称:Zim-QDA,代码行数:7,代码来源:distractionfree.py

示例2: __init__

	def __init__(self, ui):
		PluginClass.__init__(self, ui)
		if self.ui.ui_type == 'gtk':
			import gui
			self.gui = gui.GtkLinkMap(self.ui)
		else:
			self.gui = False
开发者ID:thejeshgn,项目名称:Zim,代码行数:7,代码来源:__init__.py

示例3: __init__

    def __init__(self, ui):
        PluginClass.__init__(self, ui)

        # Add menu items.
        if self.ui.ui_type == 'gtk':
            self.ui.add_actions(ui_actions, self)
            self.ui.add_ui(ui_xml, self)
开发者ID:nelas,项目名称:zim-biotools,代码行数:7,代码来源:biotools.py

示例4: __init__

	def __init__(self, config=None):
		PluginClass.__init__(self, config)

		# Construct a new class on run time
		klassname = self.object_type.title() + 'MainWindowExtension'
		insert_action = Action(
			'insert_%s' % self.object_type,
			MainWindowExtensionBase.insert_object,
			self.short_label + '...', readonly=False
		)
		generatorklass = self.lookup_subclass(ImageGeneratorClass)
		assert generatorklass.object_type == self.object_type, \
			'Object type of ImageGenerator (%s) does not match object type of plugin (%s)' \
			% (generatorklass.object_type, self.object_type)


		mainwindow_extension_base = \
			self.lookup_subclass(MainWindowExtensionBase) \
			or MainWindowExtensionBase

		klass = type(klassname, (mainwindow_extension_base,), {
			'object_type': self.object_type,
			'syntax': self.syntax,
			'uimanager_xml': uimanager_xml_template % self.object_type,
			'generator_class': generatorklass,
			'short_label': self.short_label,
			'insert_label': self.insert_label,
			'edit_label': self.edit_label,
			'insert_%s' % self.object_type: insert_action,
		})

		self.set_extension_class('MainWindow', klass)
开发者ID:gdw2,项目名称:zim,代码行数:32,代码来源:imagegenerator.py

示例5: __init__

	def __init__(self, ui):
		PluginClass.__init__(self, ui)
		self.spell = None
		self.uistate.setdefault('active', False)
		if self.ui.ui_type == 'gtk':
			self.ui.add_toggle_actions(ui_toggle_actions, self)
			self.ui.add_ui(ui_xml, self)
			self.connectto(self.ui, 'open-page', order=SIGNAL_AFTER)
开发者ID:thejeshgn,项目名称:Zim,代码行数:8,代码来源:spell.py

示例6: __init__

	def __init__(self, ui):
		PluginClass.__init__(self, ui)
		self.spell = None
		self.uistate.setdefault('active', False)
		if self.ui.ui_type == 'gtk':
			self.ui.add_toggle_actions(ui_toggle_actions, self)
			self.ui.add_ui(ui_xml, self)
			self.ui.connect_after('open-page', self.do_open_page)
开发者ID:damiansimanuk,项目名称:texslide,代码行数:8,代码来源:spell.py

示例7: disconnect

	def disconnect(self):
		self.ui.notebook.unregister_hook('suggest_link', self.suggest_link)
		if self._set_template:
			ns = self._set_template
			try:
				self.ui.notebook.namespace_properties[ns].remove('template')
			except KeyError:
				pass
		PluginClass.disconnect(self)
开发者ID:damiansimanuk,项目名称:texslide,代码行数:9,代码来源:calendar.py

示例8: __init__

	def __init__(self, ui):
		PluginClass.__init__(self, ui)
		self.sidepane_widget = None
		self.ui_id_show_dialog = None
		self._set_template = None
		if self.ui.ui_type == 'gtk':
			self.ui.add_actions(ui_actions, self)
			self.ui.add_ui(ui_xml, self)
			self.ui.connect_after('open-notebook', self.do_open_notebook)
开发者ID:damiansimanuk,项目名称:texslide,代码行数:9,代码来源:calendar.py

示例9: extend

	def extend(self, obj):
		name = obj.__class__.__name__
		if name == 'MainWindow':
			index = obj.ui.notebook.index # XXX
			i_ext = self.get_extension(IndexExtension, index=index)
			mw_ext = MainWindowExtension(self, obj, i_ext)
			self.extensions.add(mw_ext)
		else:
			PluginClass.extend(self, obj)
开发者ID:prahal,项目名称:zim-tasklist-eds,代码行数:9,代码来源:tasklist-eds.py

示例10: __init__

 def __init__(self, ui):
     PluginClass.__init__(self, ui)
     try:
         self.zeitgeist_client = ZeitgeistClient()
         self.zeitgeist_client.register_data_source('application://zim.desktop',
             'Zim', _('Zim Desktop Wiki'), []) # T: short description of zim
     except RuntimeError, e:
         logger.exception('Loading zeitgeist client failed, will not log events')
         self.zeitgeist_client = None
开发者ID:DarioGT,项目名称:Zim-QDA,代码行数:9,代码来源:zeitgeist-logger.py

示例11: destroy

	def destroy(self):
		if self._set_template:
			ns = self._set_template
			try:
				self.ui.notebook.namespace_properties[ns].remove('template')
			except KeyError:
				pass
		self.destroy_embedded_widget()
		PluginClass.destroy(self)
开发者ID:thejeshgn,项目名称:Zim,代码行数:9,代码来源:calendar.py

示例12: extend

	def extend(self, obj):
		name = obj.__class__.__name__
		if name == 'MainWindow':
			nb = obj.ui.notebook # XXX
			nb_ext = self.get_extension(NotebookExtension, notebook=nb)
			assert nb_ext, 'No notebook extension found for: %s' % nb
			mw_ext = MainWindowExtension(self, obj, nb_ext)
			self.extensions.add(mw_ext)
		else:
			PluginClass.extend(self, obj)
开发者ID:gdw2,项目名称:zim,代码行数:10,代码来源:__init__.py

示例13: __init__

 def __init__(self, ui):
     PluginClass.__init__(self, ui)
     self.task_labels = None
     self.task_label_re = None
     self.next_label = None
     self.next_label_re = None
     self.nonactionable_tags = []
     self.included_re = None
     self.excluded_re = None
     self.db_initialized = False
     self._current_preferences = None
开发者ID:DarioGT,项目名称:Zim-QDA,代码行数:11,代码来源:tasklist.py

示例14: __init__

    def __init__(self, ui):
        PluginClass.__init__(self, ui)
        self.codes_labels = None
        self.codes_label_re = None

        self.included_re = None
        self.excluded_re = None
        self.db_initialized = False
        self._current_preferences = None

        # Permite el indexamiento de la db en batch
        self.allow_index = False
开发者ID:Jam71,项目名称:Zim-QDA,代码行数:12,代码来源:__init__.py

示例15: __init__

	def __init__(self, ui):
		PluginClass.__init__(self, ui)
		self.icon = None
		self.proxyobject = None
		if self.ui.ui_type == 'gtk':
			if ui.usedaemon:
			#~ and not self.preferences['standalone']
				from zim.daemon import DaemonProxy
				self.proxyobject = DaemonProxy().get_object(
					'zim.plugins.trayicon.DaemonTrayIcon', 'TrayIcon')
				self.ui.hideonclose = True
			else:
				self.icon = StandAloneTrayIcon(self.ui)
开发者ID:damiansimanuk,项目名称:texslide,代码行数:13,代码来源:trayicon.py


注:本文中的zim.plugins.PluginClass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。