Beispiel #1
0
	def enable(self):
		""" enables the plugin and connects to the editor """
		if self._enabled: return
		self._enabled = True

		# Fifedit plugin data
		self._action_show = Action(self.getName(), checkable=True)
		scripts.gui.action.activated.connect(self.toggle, sender=self._action_show)
		self._editor._tools_menu.addAction(self._action_show)
		
		postMapShown.connect(self.update)
		onObjectSelected.connect(self.set_object)
		onObjectsImported.connect(self.update_namespaces)
		
		self.create()
		self.toggle()		

		if self.settings['docked']:
			self._editor.dockWidgetTo(self.container, self.settings['dockarea'])		
Beispiel #2
0
	def enable(self):
		""" plugin method """
		if self._enabled: return
		self._enabled = True

		self._action_show = Action(unicode(self.getName(),"utf-8"), checkable=True)
		scripts.gui.action.activated.connect(self.toggle_gui, sender=self._action_show)
		self._editor._tools_menu.addAction(self._action_show)
		
		onObjectSelected.connect(self.update)
		onInstancesSelected.connect(self.update)
		preMapClosed.connect(self.hide)
		postMapShown.connect(self.update)

		self.create_gui()
		self.update_gui()
		
		if self.settings['docked']:
			self._editor.dockWidgetTo(self.container, self.settings['dockarea'])
Beispiel #3
0
	def enable(self):
		""" plugin method """
		if self._enabled: return
		self._enabled = True

		self._action_show = Action(unicode(self.getName(),"utf-8"), checkable=True)
		scripts.gui.action.activated.connect(self.toggle_gui, sender=self._action_show)
		self._editor._tools_menu.addAction(self._action_show)
		
		onObjectSelected.connect(self.update)
		onInstancesSelected.connect(self.update)
		preMapClosed.connect(self.hide)
		postMapShown.connect(self.update)

		self.create_gui()
		self.update_gui()
		
		if self.settings['docked']:
			self._editor.dockWidgetTo(self.container, self.settings['dockarea'])
Beispiel #4
0
    def enable(self):
        """ enables the plugin and connects to the editor """
        if self._enabled: return
        self._enabled = True

        # Fifedit plugin data
        self._action_show = Action(self.getName(), checkable=True)
        scripts.gui.action.activated.connect(self.toggle,
                                             sender=self._action_show)
        self._editor._tools_menu.addAction(self._action_show)

        postMapShown.connect(self.update)
        onObjectSelected.connect(self.set_object)
        onObjectsImported.connect(self.update_namespaces)

        self.create()
        self.toggle()

        if self.settings['docked']:
            self._editor.dockWidgetTo(self.container,
                                      self.settings['dockarea'])