Add gradient and pallete as options for the index color filter.
Needs ReviewPublic

Authored by woltherav on Aug 21 2016, 5:15 PM.

Details

Reviewers
rempt
Group Reviewers
Krita
Summary

The index color filter currently only generates a custom palette. This patch adds the ability to have it use a kocolorset or a koabstractgradient as a palette source, potentially reducing time on the user's part configuring things.

Test Plan

It seems to work here, but my brain is shutting down on the possible errors. I mostly am storing it here till my brain works again.

Also, it adjusts a filter config file, so it might be an idea to wait with merging it until the animation config stuff is merged.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
woltherav updated this revision to Diff 6123.Aug 21 2016, 5:15 PM
woltherav retitled this revision from to Add gradient and pallete as options for the index color filter..
woltherav updated this object.
woltherav edited the test plan for this revision. (Show Details)
woltherav added reviewers: rempt, Krita.
woltherav set the repository for this revision to R37 Krita.
woltherav added a project: Krita.

The GUI looks nice. Though I cannot test the filter itself due to bug T3501 :)

Probably, it would be a good idea just to save/load the selected colors in the Custom tab to a KoColorSet? Is it too complicated?

Well, the custom tab was the original gui. It was already there and I feel hesitant changing any of it till my brain works :p

I don't know the code, so I cannot say much. Please always use QString() in favor of "".

plugins/filters/indexcolors/kiswdgindexcolors.cpp
202

Please use QString() instead of "". It uses less memory and is faster to construct since it will just be a shared null.

plugins/filters/indexcolors/kiswdgindexcolors.h
62

are these members deleted again somewhere? I'm unsure about the memory management. it's a bit hard to read since the diff seems somehow limited (context not available).