Add workflow buttons docker
This adds a new docker in which users can create their own buttons according to their workflow.
The settings dialog to create custom buttons; for each button the user can easily select a tool, a brush preset and FG/BG colors, or only a subset of these settings. They can also select an additional script. Then when the button on the docker is clicked, it will select the given tool, brush preset, colors and run the script (if the corresponding setting entry is not empty).
This is somehow similar to the tens_script plugin, but for users who prefer to click on buttons than to use shortcuts. Also the settings dialog allows to make good use of it without having to touch a single line of script, and for more advanced users it allows to trigger any action or other stuff with additional scripts.
As the name suggests, it's main use is to improve workflows which involve often selecting the same tool/brush/colors combinations, or trigger a defined set of actions. It can also be useful for screen-tablet users with no keyboard to have their own set of buttons. The docker has an optimized flow layout which can work horizontally or vertically, with customizable buttons size (from 16 to 64 pixels, default 32).
For the FG/BG colors, I chose to keep-it-simple and just allow to fetch currently selected colors, as this seems to easiest way to select any ManagedColor supported by Krita from the dialog.
Test Plan
Enable the workflow buttons docker. Click on its settings button to open the dialog. In the dialog, press the "+" button to add some buttons and then enter some values for selected button... Press OK to validate the dialog, then test your buttons. You can check the Manual.html file for more details.
EDIT: I've checked the CI build passed, and tested the resulting appimage, all works good. I've not built it yet with the plugin embedded, but I've heavily tested the plugin installed separately from the pykrita folder and found no bug left.
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. -
Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository? (NOTE: I'm waiting for a confirmation that it should be OK to merge it before adding a documentation MR. Though the Manual.html is already quite complete.)
Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.