Home > Krita > Tagging is almost done . . !

Tagging is almost done . . !

Hi KDE Folks,

     I am very happy to announce that Resource tagging is almost done for krita :). The basic functions like adding a tag, removing a tag, searching , storing and retrieving tags is already implemented and just in a few days, I will put the code for review. Remaining part – To verify whether I can decrease Code.

     Coming to working , This is the GUI for pattern resources

GUI for Tagging in Krita

     The upper combobox is for searching for a tag and below one is for adding and removing tags. Both are provided with autocompletion function by using Qcompleter class.

 For Adding Tag:

     First, we need click a resource, which we need to tag a resource. Then add/delete combobox is activated. If that resource already contains tags, then they are displayed, separated with ‘, ‘. Like this ” circle, round “. Then, we can type our tag name and press enter which will add tag for resource.

For Deleting tag:

      After selecting the resource, the tags will be displayed. Directly, we can edit the tag and press enter to delete the tags.

 For Searching resources :

     For searching, just enter the tag in the searchbar and press enter. It will display all the resources that are assigned with tag specified. We can refine our results by adding another tag also.

For storing and retrieving Tags:

     For storing and retrieving tags, we used XML file. The format of XML file is same as GIMP Tags.xml file, so that we can provide compatibility between these two. We will read Xml file at the startup and write them at the end.

 <?xml version=’1.0′ encoding=’UTF-8′?>

<!DOCTYPE tags>


<resource identifier=”/home/legend/krita-build/inst/share/apps/krita/paintoppresets/chalk.kpp”>




<resource identifier=”/home/legend/krita-build/inst/share/apps/krita/patterns/redcube.pat”>



<resource identifier=”/home/legend/krita-build/inst/share/apps/krita/patterns/rain.pat”>



<resource identifier=”/home/legend/krita-build/inst/share/apps/krita/patterns/bluesquares.pat”>



<resource identifier=”/home/legend/krita-build/inst/share/apps/krita/patterns/pool.pat”>




For Implementation:

     For this, we added separate file named KoResourceTagging.h and .cpp files in libs/widgets folder. These two files contains all the functions of Tagging. The GUI Part is implemented in KoResourceItemChooser.cpp file.

    We store the tags and filenames by using QmultiHash class and for autoCompletion, we used Qcompleter class and also QdomDocument class for the XML file.

 On the whole, tagging is implemented in Krita and open for further suggestions to make it more user friendly . . .

Categories: Krita
  1. Heller
    June 22, 2011 at 4:02 am

    i was wondering if tags are added by the user only or if they can be associated with ressources from GHNS (note that I’m still not very familiar with the new krita features…). In the case where tags are embedded with downloaded ressources, is there some kind of internationalization system ?(I assume there isn’t but it’s an idea 🙂 )

    Well, great work anyway, can’t wait to try the next Krita release 🙂

    • June 22, 2011 at 5:43 am

      Tags are added by the user only. But by default, Krita also provide some tags for resources. Internationalization is not provided so far, but we will think about that also.

  2. June 22, 2011 at 6:21 am

    Why don’t you use Nepomuk to store the tags?

    • June 22, 2011 at 1:56 pm

      We want to make our tag functionality compatible with GIMP Tagging system. Thats the main reason why we don’t use Nepomuk. But we are using nepomuk in Sketch book tagging, which is next part of my Gsoc Project.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: