Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

documenttools.py 1.14 KB
Newer Older
1
# This script is licensed CC 0 1.0, so that you can learn from it.
2

3
# ------ CC 0 1.0 ---------------
4

5 6 7 8
# 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.
9

10 11 12 13
# 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
14

15
import krita
16
from . import uidocumenttools
17 18 19 20 21 22 23 24


class DocumentToolsExtension(krita.Extension):

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

    def setup(self):
25
        pass
26

27
    def createActions(self, window):
Pino Toscano's avatar
Pino Toscano committed
28
        action = window.createAction("document_tools", i18n("Document Tools"))
29 30
        action.setToolTip(
            i18n("Plugin to manipulate properties of selected documents."))
31 32 33 34 35
        action.triggered.connect(self.initialize)

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