documenttools.py 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
'''
This script is licensed CC 0 1.0, so that you can learn from it.

------ CC 0 1.0 ---------------

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
12
import krita
13
from . import uidocumenttools
14 15 16 17 18 19 20 21


class DocumentToolsExtension(krita.Extension):

    def __init__(self, parent):
        super(DocumentToolsExtension, self).__init__(parent)

    def setup(self):
22
        pass
23

24 25
    def createActions(self, window):
        action = window.createAction("document_tools", "Document Tools")
26 27 28 29 30 31 32 33 34
        action.setToolTip("Plugin to manipulate properties of selected documents")
        action.triggered.connect(self.initialize)

    def initialize(self):
        self.uidocumenttools = uidocumenttools.UIDocumentTools()
        self.uidocumenttools.initialize()


Scripter.addExtension(DocumentToolsExtension(krita.Krita.instance()))