Tuesday 24 December 2013

Google code in 2013 is on !



After my last summer's work in plasma ,here I am  mentoring Google code in 2013 .My tasks will be more of related to plasma though . And,I woud be glad to have a few suggestions and new ideas too! So if you are under 17 make sure to apply and contribute to KDE !
For now,I have three tasks that are related to QML,cmake and a brief knowledge of Qt would be great too .Documentation is always welcomed ! As I not only wish to have a working code but an optimised code ,so one of the tasks involves optimising a part of gsoc's work -window list which will involve making sure it follows white space indentation and the code is optimised . Other tasks too ,requires the basic knowledge of QML and cmake .And yes,students can always mail me or comment here for further queries ! 
Good luck to all the kids !

Wednesday 25 September 2013

My Projects (2011-2015): Adios Gsoc 2013 ! :-) : A brief journey

My Projects (2011-2015): Adios Gsoc 2013 ! :-) : A brief journey: I worked on porting plasmoids to plasma1 and then to plasma 2 this summer under the guidance of  +Marco Martin  (KDE). During the initial ...

Adios Gsoc 2013 ! :-) : A brief journey

I worked on porting plasmoids to plasma1 and then to plasma 2 this summer under the guidance of +Marco Martin (KDE).
During the initial weeks I worked on trashcan (plasma 1) .
It was a pretty easy one to port so it was done in a few weeks .
After porting trashcan , I successfully ported window list in plasma 1 .Porting it was fine once you are clear with the concepts of data engines and QML of course !
 So , by nearly two weeks before the mid evaluation my expected mid evaluation work was almost done . 
Then came Akademy 2013 , that I would have attended , had I got my passport ready on time .But no worries I will surely attend Akademy 2014 :) . 
During the duration of Akademy 2013 I started porting digital clock , did a few hacks and it was working out .
But it ofcourse needed improvement :p
I spent most of my final evaluation time porting digital clock (plasma 1) .It is almost done , though it needs to use KCalendarSystem and  KHolidays is not yet implemented due to shortage of time .Otherwise , it is fine .
Then comes porting of plasma 2 and well building plasma-shell successfully is one of the most crucial task ! .
I was able to do that fortunately , so I first of all ported window list in plasma 2 and also added cascade and unclutter actions in data engines .After a bit of fixing layout problems in QML 2.0 it looks fine now . 
I made a simpler calendar component that works fine with digital clock I ported in plasma 2 . 
I had to make another calendar component as akonadi is not yet ported under kf5 .
But , the basic component still has the "working" functionalities for the calendar .
Then finally comes trashcan :p , though it was a simple one , kio trash was not yet ported at that time so it took some time .Thanks to +Marco Martin for contributing to kio trash as my exams were going on at that time (Yes !I  hate exams :p )
 Finally I fixed the layout of trashcan in plasma 2 and it is fine now . 
Last but most important of all , I also improved the documentation of KDE :)
http://techbase.kde.org/Development/Tutorials/Plasma#QML_2.0
http://techbase.kde.org/Projects/Plasma/Plasmoids

Saturday 14 September 2013

Plasma 2 plasmoids this summer



      
  Window list plasmoid 










The main thing to be taken care of in this plasmoid is "data engine" .


I used tasksSouce in window list .And also to highlight the selected menu item I 





used PlasmaCore.FrameSvgItem .The text displaying the menu items become italics in case that window is minimised .

Further I have made it a PopUpApplet .

It shows the list of active windows on full view and collapses to icon on desktop panel .So,I managed to do it . 

I made new service for these actions since they require an empty source . Ofcourse ,these actions can be done by a source(by using the Ids on connectSources() also but then there is always a case when there is no window that is active at the moment) .

Therefore , empty source is required.Further , I added cascade and unclutter actions in tasks data engine by using asynch call to kwin interface using QDBusInterface .

 Also , the active window is enclosed withing PlasmaComponents.Highlight just like Actions and Desktop titles while highlight is shown by FrameSvg .






                               
     Digital Clock   




I made a basic component independent of akonadi,kdepimlibs and kdepim-runtime for now as kdepim-runtime is not yet ported to kf5 .It works fine with all the functionalities using a plugin calendar used for this purpose . 




The screenshot is self explanatory .

The bottom row toolbar shows current week and day by default with the calendar icon pointing to the current month.
 The upper toolbar helps to go to next month , previous month , next year , previous year and shows a context menu on clicking the month .
The current day is shown by a blue border .
On entering mouse event is shown by light grey color and on clicked mouse event is shown by black border .




TrashCan



This was pretty simple after I tried out calendar and window list .
But the kio trash was not yet ported fully so with the help of +Marco Martin it is working now .
It displays query dialog too just like the plasma1 plasmoid I made and the original trashcan . :)

That was a summary of my final evaluation work , and yes a digital clock in plasma 1 is too ported as in my previous blog .
I hope you will try it out !
Cheers !




Thursday 22 August 2013

Clock with calendar : Gsoc update

Well , I have been working on clock with calendar right after I ported window list and trash can .

And yes , it is "beast" of all the plasmoids .

I managed to implement one ,yes,  a basic one for now .It shows the events of the clicked date's month and those events that touches it .Further , it shows "No events founds" when the clicked date does not conatins any events .I also implemented containsTodoItems apart from other functionalities :) under +Mark Gaiser  and +Marco Martin  guidance  .

At present +Mark Gaiser  's calendar component is  used for it .The current date is shown under the blue border as in c++ plasmoid .

It is a way alike now ;) .

Also I used split function to have only a substring (event,todo or journal ) in EventList from the called string .I used ScrollArea for the EventList .

And I did a few javascript functions to implement the functionalities as well as a few functions in calendar.cpp itself .

It looks a much better after +Marco Martin suggested to have some indentation and follow white space coding .It presently uses QDate as for now .

The toolbar shows current date and week number by default .

There are two models used : setSelectedDay model : which shows the clicked date's events,todo or journal and upcomingDays model : which shows the upcoming events in case no events ,todo or journal is found .


Do check it out ;)


It is available at heenamahour/gsoc branch under kde-workspace and kdepim-runtime


That is all for now :)

And yes , window-list and trashcan are ported to plasma 2 (work is in progress ;) in parallel with calendar plasmoid :D ..)


Tuesday 16 July 2013

Window list QML : Update



Recently I tried to make window list using qml(kde-workspace/  branch : "heenamahour/gsoc")



The main thing to be taken care of in this plasmoid is "data engine" .I used tasksSource in window list .And also to highlight the selected menu item I used 
PlasmaCore.FrameSvgItem .The text displaying the menu items become italics in case that window is minimised .






Further I have made it a PopUpApplet .It shows the list of active windows on full view and collapses to icon on desktop panel . 



Further , I added cascade and unclutter actions in tasks data engine by using asynch call to kwin interface using QDBusInterface .This required more time since I was new to it ,but my mentor is awesome .



So,I managed to do it . I made new service for these actions since they require an empty source . Ofcourse ,these actions can be done by a source(by using the Ids on connectSources() also but then there is always a case when there is no window that is active at the moment) .Therefore , empty source is required.







Now , I have also used sections as suggested by my great mentor +Marco Martin and under his guidance it also displays windows under their respective desktop . If section > 0 then it displays Desktop + Desktop number else it displays on all desktop as in C++ plasmoid .



Also , the active window is enclosed withing PlasmaComponents.Highlight just like Actions and Desktop titles while highlight is shown by FrameSvg .












That's all for now .Hope you like it !



Thursday 20 June 2013

Trashcan : Development Phase

                                                           Trashcan (QML)

Recently I developed trashcan which is available at kde-workspace ,branch:heenamahour/gsoc .
(not yet merged yet).

I have implemented a pop up menu having open and empty option .Just like the c++ plasmoid it can also be opened by left click on it .To confirm to empty the trash can on  using Empty Trash from the pop   up  menu  ,I have used a  QueryDialog.


It also displays the total number of items in trash using DirModel(plasma-mobile).It is resizable .Also ,I have added form factor  in it.
On Trash can  settings , config plugin is added using X-Plasma-ConfigPlugins .I have removed the background  by set.background hints(0).

I hope you will check it out ! :) 

Thursday 6 June 2013

window-list using QML 1




 I tried to implement window-list using qml .Major functionalities are added to it using PlasmaCore ,plasma.graphicswidgets,plasma.graphicslayouts and qtextracomponents .
It involves quite a lot of javascript and qml to give a flexible ui .
Feels good to see it as it is my first plasmoid in qml . 
Looks similar ,isnt it :P


Dreams on fire :Gsoc 2013

I am selected for Gsoc 2013 for the project porting plasmoids to plasma 2 . The first person to congrats me is ofcourse my senior cum one of my most trustable friend +Puneet Goyal  .It was my dream to get into Gsoc :-) . 
Credits to my awsome mentor +Marco Martin  for selecting me as his student . Also to the  great +The KDE® Community  people like +Aleix Pol  and +Marco Calignano  because of whom I came to know more about kde , +Lydia Pintscher  for always answering my general queries :-) , +Kevin Krammer  and all the other Kde people for always helping me out . Thanks a lot ! I would like to continue contributing to Kde even after Gsoc :-)
Also ,how can I forgot about +Sharad Dixit  :P you always motivates me.Without you and +Puneet Goyal  it would have not been possible . You guys always pushed me towards Gsoc .Thanks for everything . Even thanks is a little word here .
And , +Puneet Goyal  hope you come soon :-) .
Further thanks to people like +Yash Shah and +Harsh Sharma  :-)
And yes a big thanks to +#bbg IRC Channel on Freenode  :P and the mailing list :P
Last but not the least , thanks to +Harshit Gupta :)


Thursday 3 January 2013

Zig Zag motion

On clicking the start button
Changed the ball's color to hgb

Using stop button






Using java swings ,I tried to make the zig zag motion  of a ball when it strikes the boundaries of the rectangle on clicking the "start" button It has a "stop" button and another button to change the ball's color to HGB.
The code is quite simple .First of all create a frame using JFrame as follow
JFrame a = new JFrame("Zig Zag");
After declaring its attributes ,create a class  say zigzag which inherits JPanel and another class say bounce which inherits JPanel and an interface ActionListener.Now declare an object of class bounce say bounce b;
After that declare the constructor zigzag() as follow
Before clicking the start button
b = new bounce();
JButton startButton = new JButton("Start");
JButton hgbButton = new JButton("Change color to HGB");
JButton stopButton = new JButton("Stop");
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
buttonPanel.add(startButton);
buttonPanel.add(hgbButton);
buttonPanel.add(stopButton);
 stopButton.setText("Stop now !");
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.add(buttonPanel);

this.add(b);
Now,for the start button set animation to true and for stop button set animation to false .To change the color to hgb use :
b.setBallColor(Color.getHSBColor(TOP_ALIGNMENT, TOP_ALIGNMENT, TOP_ALIGNMENT));
 Now,inside the class bounce define the radius,diameter ,velocity across Xaxis and Yaxis , paint()..