Review Request 110541: Synchronized tag categories and their views for resource choosers, KoResourceFiltering refactored a bit.

Sascha Suelzer s_suelzer at lavabit.com
Mon Jun 3 12:22:03 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110541/
-----------------------------------------------------------

(Updated June 3, 2013, 11:22 a.m.)


Review request for Calligra.


Changes
-------

changed Unfiltered View to All Presets and updated the tooltips accordingly. Looks nicer this way.


Description
-------

With this patch, the tag categories the user can define for various resources will update for any resource chooser of the same type.
Examples: 
Defining a new tag in the preset popup combobox will also create the respective tag entry in the preset docker one.
If both choosers would display the same tag category, and the user adds a resource to the category in one chooser, the view of the other would reflect the change as well.

Both these things are achieved with a new set of signals and slots regarding tag category creation and modification.

Other changes:
Refactored KoResourceFiltering a bit to make intent more clear and functionality a bit more fine grained, also fixed the naming for its private support class members from m_foo to foo since the fields are all public.
Tag categories are now ordered in an alphabetical manner at all times.

--------------------------------

Remarks:

I am not really sure if KoResourceModel should be the class for the signals:
signals:
    void tagBoxEntryModified();
    void tagBoxEntryAdded(QString tag);
    void tagBoxEntryRemoved(QString tag);

It seems to me that perhaps all of this tagging and filtering stuff should go into the adapter directly, perhaps? But The KoResourceItemChoosers would still require the notifications and the model is pretty much the only bridge, so maybe the place is okay after all.

I also want to refactor some of the new code I introduced to make it look nicer, but I wanted to get this review request out for now so it is know that it is being worked on, since this builds on the former shortcomings of 
https://git.reviewboard.kde.org/r/110429/


Diffs (updated)
-----

  krita/plugins/paintops/libbrush/kis_brush_server.cpp 5e4db8d 
  krita/ui/kis_palette_manager.cpp 568859a 
  krita/ui/ko_favorite_resource_manager.h fbfa86f 
  krita/ui/ko_favorite_resource_manager.cpp 2481ce1 
  krita/ui/widgets/kis_preset_chooser.h 5df3b56 
  krita/ui/widgets/kis_preset_chooser.cpp 9f07c8a 
  libs/widgets/KoResourceFiltering.h 9f8f967 
  libs/widgets/KoResourceFiltering.cpp a62a873 
  libs/widgets/KoResourceItemChooser.h d26f5a5 
  libs/widgets/KoResourceItemChooser.cpp a2750b5 
  libs/widgets/KoResourceModel.h 3ccb28b 
  libs/widgets/KoResourceModel.cpp a9cb212 
  libs/widgets/KoResourceServer.h 1ab4ad6 
  libs/widgets/KoResourceServerAdapter.h 02ab31e 
  libs/widgets/KoResourceServerAdapter.cpp f1dc50f 
  libs/widgets/KoResourceServerObserver.h 52bc7fc 
  libs/widgets/KoResourceTagging.h 0624096 
  libs/widgets/KoResourceTagging.cpp b678000 

Diff: http://git.reviewboard.kde.org/r/110541/diff/


Testing
-------

Only tested for Krita, everything seems to work as it should.


Thanks,

Sascha Suelzer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130603/4ff0259e/attachment.htm>


More information about the calligra-devel mailing list