GSoC’17-Week #4

Hello Folks,

This is the week after the first review phase and let me tell you, the coding process hasn’t gone smoother than this before. As my older blog posts suggest and as I have told, I was thinking of fixing the UI glitches in the content downloader GUI for this week. Since I was facing an issue in making the list view of the contents that could be downloaded, I discussed it with my mentor and he suggested that we could make the UI cleanups and other small fixes at the end. He added that these kinda fixes are only done after implementing the major features into the project. So I followed as he suggested and started to work on the main features that were required to be added into the project.

I have added a progress bar feature which will help, the user to get notified what the content downloader is doing at the moment. And implemented a details section which will give the user the large description of the content that they are going to download.

I will write done a detail description on what I did and learned from doing both of these feature implementation.

From the earlier posts, you might have seen what has happened to the UI after changing it to the mock-up design that we plan to implement. It became much worse that the test UI we created 😛 Literally, It was an epic fail when we started to re-arrange things because it wasn’t getting much space to fit in and it was getting cranky for space.

boom-week4
This happened in my mind after re-compilation of the content downloader’s UI. 😛

Depicting the progress using Progressbar

At first, I thought of creating a progress indicator widget as that KNewStuff actually used. But my mind, again and again, asked me that, is it the right way to implement it? Won’t there be a better way to do that? Well, in that dilemma I asked Leinir about it and he told that the progress indicator in the KnewStuff was just an old hacky way to print out the progress to the user. And hence suggested me to use the QProgressBar.

As usual :P, I started to over think that we could get the real-time information about the progress of the content through the progress bar using the SIGNAL’s emitted by KNSCore::Engine which is busy(), idle() and error(). I thought of depicting the real time progress into the progress bar using this, but I went wrong and again Leinir to the rescue, telling me that it isn’t possible at the moment, we have to revise a new method to get the real time progress of the object.

Before getting to know this, I was like stuck at it, not getting why it wasn’t showing the result. Damn! I was stuck at there and University classes also started and were in a tough state that I had to spend time in doing college works too in between while doing the GSoC project as well. Also, for the progress bar thinking it will be showing real-time progress, I tried all possible possibilities to get it running.

 

jim_carrey-week4
Me throughout the whole week. 😛

But at last, after getting to know we cannot show the real-time progress but we can only show the instance of what it is happening, then the rest was smooth. Created some functions to make the QProgressbar visible and set the range from (0, 0) and made them slots and connected to the signals emitted from KNSCore::Engine which gives the busy. idle and error signals.

q->connect(engine, SIGNAL(signalBusy(QString)), this, SLOT(progressBarBusy(QString)));
q->connect(engine, SIGNAL(signalIdle(QString)), this, SLOT(progressBarIdle(QString)));
q->connect(engine, SIGNAL(signalError(QString)), this, SLOT(progressBarError(QString)));

And voila!! There it is, working as expected.

 

Screenshot_20170714_152926
Loading bar alone.

 

Screenshot_20170714_152834

Since the SIGNAL’s emitted by the KNSCore::Engine does not only sends the progress instance of the data item getting downloaded but also sends a QString message telling the user after implementation that what the downloader is doing. Hence, that was shown in the dialog just using a QLabel to print out the QString message from the SIGNAL.

Summary Description for the data item.

Actually, in the list view, where the content’s which could be downloaded are listed, there exists a short description about what the data item is. But we decided to create a details area mostly details grid viewer to show the description. It will be visible to the user only when the user clicks the details button, then it pops up at the right of the content list. Implemented using MVC architecture as always 😛

Here are some of the screenshots of the content downloader with the summary description added into it, There is a visual glitch to the GUI but will re-touch it after the whole implementation of features and bugs are fixed.

We just used QLabel to represent the description summary of the data into the GUI.

Work planned for the next week.

  • Still, some documentation is left – complete it.
  • Start the second part of the project, ie, making the UI of Bundle manager/Resource manager much more appealing and user-friendly.
  • Start identifying some of its bugs and fix it.
  • Try to get the UI of content downloader fixed, even though these are only needed to be done at the last.

Will discuss with my Krita team and my mentors and also some artists to look at it and give some inputs if there needs something more else and I could see if that could be done.

Here is my branch were all the work I am done is going to.

https://cgit.kde.org/krita.git/?h=Aniketh%2FT6108-Integrate-with-share.krita.org

Will be back with more updates later next week.

Cheers 🙂

Advertisements

6 thoughts on “GSoC’17-Week #4

  1. Thanks, sebasje!

    Actually, I was using the newer version of Qt signal/slot mechanism to do the project, but the mentor/maintainer of Krita, Boudewijn Rempt asked me to the older version as that is used in the Krita code base through out. So that wasn’t an option to continue with. 🙂

    Like

  2. That is a weird call to make, the new syntax makes it easier to be correct and is faster at runtime.

    What we’ve been doing in other projects is to use the new syntax for new code and slowly convert old code as we go. That went without any problems that I’m aware of (compile-testing vs. runtime testing is much easier).

    Like

  3. Well, we in Krita, would also eventually change it. At the moment, it’s currently using, the old syntax throughout the whole project, so if somebody shows up with the newer syntax and is interested in changing the whole to the new syntax, then they are most welcome to do so and we could change that 🙂

    Like

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