Skip to content

A few small additions to Python API

Scott Petrovic requested to merge (removed):petrovic/python-docker-api into master

Added a few things to python scripting

  1. Return the available dockers from Krita.instance(). This will make it easier to make custom UIs that can show and toggle dockers on and off
  2. Add signal so we can know when the theme changes. This can be useful when updating icons on theme change
  3. Add signal so we can know when the active view has changed. Use case is when tabbing back and forth between views. This was requested by the Shotgun developer

Test Plan

I have a python script for each one of these changes for testing. I will probably add these as examples to my scripting site later

  1. Bringing back all the available dockers - docker-python.py
  2. Theme change signal - window-theme-change.py
  3. active view change signal - window-view-change.py

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports