Any new tasks. . ;)

May 16, 2012 20 comments

Hi all,

I am sri13 @ IRC. Last year, I completed GSOC under KDE and did some work in Krita. Now, I am not doing any thing in krita and I am feeling very bored as there are no challenging tasks. . 😦

Any new challegenes to do in KDE or Krita . . ?

Please tell me . . ,I wanna try different . . 😀

Categories: Uncategorized Tags: , ,

What I did in GSOC . . .

August 23, 2011 1 comment


       I am so glad that I successfully completed my gsoc project with the help of my mentor Sven Langkamp, Boudewijn Rempt, and other KDE people. During this period, I learnt a lot from them like how to get some help from other people, how to write the code, committing, testing and also sending it for review. On doing this, I got confidence that I can involve in any open source project and can contribute the best :). Especially, what I like the most in the KDE people is there constant and quick help for the new people , I will follow that . . .

      I want to blog all the things, I did under GSOC Project as a future reference for me. My work is under Krita, and in that

 Resource Management Part

1). GHNS support for the resources – This one is to download and share resources among the users and it is successfully completed. While doing this, I met some new people Frederik Gladhorn and Frank Karlitschek, I asked them how to add categories for resources in the server and did that work. I take so much time for doing this one, I did the things like setting up the downloading functionality, removing the resources and also uploading the resources.

2). Blacklisting the files – We don’t delete the files from the computer. Just we save the names of the files in the XML file and make these files not to upload into the application. At first, we add this functionality only to the readonly files. At the end, we make it available to all types of resources based on user feedback. For restoring resources, I started creating the dialog and it takes some more days to complete.

Tagging Part

1). Tagging UI and XML part: Tagging part helps the users to tag their resources and retrieve them quickly at the time of need. In this part, we added the functionality like adding tag, deleting tag and searching the resources using tags. Initially all these are implemented in XML to make it compatible with GIMP. So, all the tagging conventions used in gimp are used in krita also. But, the compatibility is not yet supported because GIMP is using a variable to store the resource directory address. We need to get that address and make it available in krita. I think, it is a little work and we need to ask that in GIMP mailing list. But at present, the tagging with XML is working fine.

2). Nepomuk backend for Tagging: We add the same tagging functionality with the nepomuk backend also, to support the exchange of tags information with other kde applications. It is also working fine in krita. While doing this, Sebastian Trüg, Vishesh Handa and swair help me a lot to add the nepomuk functionality to krita. Thanks for them .

Sketchbook Tagging

      This will help to store the status of the dockers and use them afterwards. For example, if an artist works on drawing comics, he can save the preferences of resources in the dockers and can shift his work to other type of drawing and come back to the comics drawing immediately with the help of the saved status. This one is also implemented in krita but not yet tested.

   On the whole, Resource Management part and Tagging part are merged into the git master and ready for use. But the sketchbook tagging need to have tested and it will be available to users in some days time. My todo list contains adding tagging part to the image docker and completion of restore resources dialog. I will blog again, when these are completed 🙂

Categories: Krita

Why Nepomuk in Krita . . .

August 6, 2011 3 comments

Hi KDE Folks,

      In my previous post, I mentioned about the implementation of Nepomuk and XML backends for Krita. Many asked me what’s the use of nepomuk or XML, which one is best and so on. I want to clear those doubts in this post . . .

     Coming to XML – We started implemented tagging in XML to get the opportunity of exchanging resources between Gimp and Krita. And later we moved on to nepomuk, so that with nepomuk we have the following advantages

  • Add and delete tags using kde apps containing nepomuk feature – these changes will be effected once you restart krita application.
  • Search resources by using tags in kde apps

 The following picture is adding tags for the resources in dolphin

     But the problem with nepomuk works only kde libraries, we can’t use this feature in Gnome environment. Xml can be used in both environments but not able to share tags with other kde apps.

    On the whole, both have its own advantages and disadvantages. I completed the implementation part of both backends and also sent for review to merge the code into the master. In few days, the nepomuk feature will be available to you . . . 😀

Categories: Krita

Two Backends for tagging in Krita

July 22, 2011 5 comments

Hi KDE Folks,

     Finally completed two backends support for Tagging in Krita – one is XML and another is NEPOMUK :). I am thankful for the nepomuk developers, who helped me to integrate nepomuk in my project especially Vishesh Handa, Sebastian Trüg and Swair. And also I am glad to have a quick response from KDE people to my previous post. In these two weeks, I setup nepomuk backend, added GUI to change backends and also added unit test for testing the nepomuk part.

     For choosing the backend, we need to go to settings -> configure krita -> general settings. There we can select the backend we like using radio buttons.

     For this backend support, we didn’t change the existing code but added some functions to store and retrieve tags from Nepomuk. While doing this work, I get to know two things

1). Using cmake variable in #ifdef

I struggled a lot to use #ifdef statements. I added all the stuff required but forget to add the header file “KoConfig.h” where I defined the cmake variable. What a silly mistake, I did . . 😀

2). Storing the variables for sessions

       For this, I used kconfig like this

       KConfigGroup m_config;

        m_config = KConfigGroup( KGlobal::config(), “resource tagging” );

        m_nepomukOn = m_config.readEntry(“nepomuk_usage_for_resource_tagging”, false);

  On the whole, I completed the multi-backend support for tagging and now going to Image docker section, where I need to integrate tag support for images. .

Categories: Krita

Implementing Nepomuk as another backend for tagging

July 3, 2011 9 comments

Hi KDE Folks,

     I got some nice comments on tagging review in the previous week. The most important points in the review are

1). Required a unittest for the new tagging class

     For this one I created a test named KoResourceTagging_test in libs/widgets/tests and it does all the unit test required for the tagging class. I tested all the functionalities of tagging class by taking various examples. And the testing helped me to find out two logical bugs. I solved them also. 😀

2). Interaction wise needs some improvement.

    The tooltips of the icons under the tagging lineedit are improved, so that they don’t seem to belong to the tagging process. This is the one change I corrected but still need to get reviews from users. So, that I can improve it better.;)

3). Nepomuk as another backend

    Many KDE people are asking the question ” why don’t you use nepomuk as backend ? ” For this, the only answer we have is ” we need compatibility with GIMP tagging system.” But afterwards we felt that ” why don’t we implement nepomuk as another backend along with XML ?”. Then Boudewijn Rempt suggested to go on in this direction and we started working . .

The plan for implementing this change is that

Whenever application is running, we will use tagObject (QMultiHash Object) for all adding, deleting and searching irrespective of backend. But at the time of storing or retrieving,there will be some change.

Just we will provide some option to the user, asking whether he uses nepomuk or XML ?

  • If user wants Nepomuk, we will store tags info by Nepomuk by adding two more functions : readNepomukRepo() and writeNepomukRepo() in KoResourceTagging class
  • If users wants XML , we will have the functions readXML() and writeXML already. we will use them

But I face some problems in implementing this idea ,

This is the code :

void KoResourceTagging::writeNepomukRepo()


  qDebug() << ” I am in ;”;

  QStringList resourceNames = m_tagRepo.uniqueKeys();

  qDebug() << “Resource Names List : ” << resourceNames;

  foreach(QString resourceName, resourceNames) {

     qDebug() << ” Resource name : ” << resourceName ;

     KUrl kurl(resourceName);

     qDebug() << ” Kurl : ” << kurl.url();

      Nepomuk::File resourceFile = Nepomuk::Resource(kurl).toFile();

      qDebug() << “Resource File Created : ” << resourceFile.url().url();

      QStringList tagNameList = m_tagRepo.values(resourceName);

      qDebug() << ” Tag names : ” << tagNameList;

      foreach(QString tagName, tagNameList) {

            Nepomuk::Tag tag( “ResourceTag” );


            qDebug() << “Tag Created “;

            resourceFile.addTag( tag );

            qDebug() << “Resources tagged “;




And the output for this is


# This one is the output of brush resourceServer when it called writeNepomukRepo()


I am in ;

Resource Names List : (“/home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”, “/home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”)

Resource name : “/home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”

Kurl : “file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”

Resource File Created : “file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”

Tag names : (“a”)

QObject::startTimer: QTimer can only be used with threads started with QThread

Tag Created

Resources tagged

Resource name : “/home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”

Kurl : “file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”

Resource File Created : “file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”

Tag names : (“bricks”)

Tag Created

Resources tagged


# This one is the output of pattern resourceServer. It ends with this error.


I am in ;

Resource Names List : (“/home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”, “/home/legend/krita-build/inst/share/apps/krita/patterns/java.pat”, “/home/legend/krita-build/inst/share/apps/krita/patterns/wood4.pat”)

Resource name : “/home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”

Kurl : “file:///home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”

Fatal Error: Accessed global static ‘Nepomuk::ResourceManagerHelper *instanceHelper()’ after destruction. Defined at ../../nepomuk/core/resourcemanager.cpp:310


I need help to solve this problem ? 🙂

Categories: Krita

Posted the review on Tagging in Krita

June 29, 2011 3 comments

Hi KDE Folks,

      I had finally completed the implementation part of tagging and then posted a review to merge it into the master branch. Now, I started working on the Sketchbook Tagging, which is my next part of the GSOC project :).

     Last week I did some code changes like

  • Changed the tagging Object from ItemChooser class to server class.
  • Added a function showTaggingBar(), so that the tagging bars can be individually enabled for the ItemChooser Objects.
  • Decreased some code in preset_chooser file.
  • Fixed the problem with resources that don’t have a filename, by adding some extra changes in the tagging object class.
  • Changed the comboboxes with KLineEdit instead of the Qt version. The KDE added some extra functionalities for the QlineEdit and created the class KlineEdit.
  • Fixed the problem that tags in the predefined brush chooser are not reset when a brush is set by a preset.

     After all the changes, the final GUI Look for tagging is like this . . .

     On the whole, I want all of you to test the tagging once and give me your comments :p . . .

Categories: Krita

Tagging is almost done . . !

June 21, 2011 4 comments

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