QML Plasmoid for Plasma NetworkManagement
Arthur Ribeiro
Short description: Create a new shiny plasmoid for Plasma NM using QML technology. The backends will remain in C++, just the user interface will be ported to QML. This new plasmoid will make the code simpler and improve its readability and maintainability. Also, QML can support more graphical artifacts than the C++ one.
Name: Arthur de Souza Ribeiro
E-mail: arthurdesribeiro@gmail.com
Freenode IRC Nick: arthursribeiro
Location: Campina Grande, Paraíba - Brazil (GMT -3.0)
Proposal Title:
QML Plasmoid for Plasma NetworkManagement
Introduction:
Qt Markup Language is a programming language created by Nokia that describes the graphical user interface of a program. QML makes it easier for a developer to create graphical user interfaces compared to Qt/C++. In addition the source code becomes more readable and better to maintain. The current Plasma NetworkManagement user interface is totally developed using Qt/C++ with several lines of code, which leads to a code that is hard to maintain. Also, there are some graphical artifacts that cannot be properly fixed. So, creating a plasmoid using QML will improve the GUI and the maintainability of Plasma NetworkManagement's source code.
Project Goals:
The main goal of this project is to provide a new shiny plasmoid for the Plasma NM using QML. The backend will remain in C++. As mentioned earlier, using QML will improve Plasma NM's source in the matters of readability, maintainability, adding new features and fixing some bugs in QGraphicsWidget (e.g.: https://bugreports.qt-project.org//browse/QTBUG-12328). QML is now the preferred way to create GUI using Qt according to its creator (Nokia), so this project also goals to bring Plasma NM to the state of the art in the terms of GUI.
Implementation Details:
To better explain the project let's firstly compare how the current implementation is and how I intent to improve it.
The current Plasma NM's architecture is depicted below:
The kded module is responsible for the core functionalities of Plasma NM. The applet is in fact the icon on the system tray, it communicates with the kded module via dbus and by the time it is clicked, the popup shows up. Since QML and C++ are different languages, this project intents to split the popup into two sub-modules: the core, which will remain in C++, and the popup's GUI, which will be implemented using QML. Thus, the final architecture will look like this:
The main visible changes are going to be implemented in the Plasmoid's popup component. Some changes in the internal classeѕ used by the applet may be necessary to make them available to the QML popup. Each graphical element in the current popup needs to be split into GUI code and core code, that is true for the classes that handle interface types (ethernet, wireless, gsm, bluetooth, etc) and connection types (wired, wireless interface connection, wireless network, gsm, bluetooth, vpn, the special "Show More" item, etc). Qt already provides the means to glue Qt/C++ code to QML code (http://doc.qt.nokia.com/4.7-snapshot/qtbinding.html), I plan to use those facilities in this project.
Due to fact that those facilities include loading .qml files at runtime, the .qml files can also be seen as themes for the program's GUI. The only thing that the user needs to do is replace the .qml files with ones that emit the same pre-defined Qt signals and restart the program. We can even implement an option to reload the .qml files without restarting the program.
As a first step I plan to re-implement the current C++ user interface using QML. In case there are new features to be added we can redesign the current user interface to accommodate those features. The current C++ GUI was implemented following the mockup below:

I already started re-implementing the popup as a step to learn QML. This first experience with QML showed me that this project is feasible during the GSoC time. I still need to implement the communication between the QML and C++ part of the popup. For the record this is how the QML popup looks like now:

Tentative Timeline:
I plan to divide the development in two-week periods. During each period, I will implement one of the network interfaces and connection classes mentioned earlier in this document. In the end I will join them to form the new Plasma NM's popup.
- From Now until May 21st
Continue the development of GUI widgets for Plasma NM using QML to fix the knowledge that is being acquired, validating it too. I also intend to study how to integrate the C++ code with the QML one.
- From June 4th to June 19th
Start the development of the Wireless interface module of Plasma NM popup. By the end of these two weeks, I plan to have listing wireless connections working and ordered by signal strength. The hidden connection button implemented, the ability to enable and the wireless, and finally the possibility to disconnect from a network.
- From June 20th to July 4th
Create the ethernet connections view, to be shown inside the popup. It is also intended to start the development of the VPN and Shared connections tabs.
- From July 5th to July 19th
Create the GSM interface module in QML. This is going to be a tricky one, because I have never used it in my computer, so, I will have to activate my 3G plan to start using the module and then start implementing it. I want to create the settings button functionality too.
- From July 20th to August 3rd
Create the interface details window, which will show information about all supported network interface types and a traffic plotter. I will need to learn how to program the traffic plotter, which is a task I plan to do before gsoc period starts.
- From August 6th to August 13th
By this week, I intend to talk to my mentor and do usability tests in the new implemenation and document it, so that users that want to create a different QML popup for Plasma NM will only have to follow the documentation. By the end of this period, I plan to fix the remaining bugs and successfully finish the project.
- From August 14th to August 17th (Post GSoC period)
After the GSoC period I want to talk to my mentor about future work that can be done to Plasma NM. If problems appears or new features are required, I will be glad to help solving them. My intention is to start working in some core features of Plasma NM after the GSoC, I already started talking to the mentor about about other implementations I can do after the gsoc, and I think I could contribute a lot to the community.
Progress:
I intend to publish my progress in a blog, so other people can see how how the project is progressing. I also want to put some tips about the development in Plasma NM to help other people.
Do you have other obligations from late May to early August (school, work, vacation, etc.)? Please note
that we expect the Summer of Code to be a full-time, 40-hr a week occupation. It is important to be clear
and upfront about other commitments that you may have during that time.
I have some tasks to do at university but I am sure I can organize my time to successfully finish this project
About Me:
I am an undergraduate student in computer science at Federal University of Campina Grande, Brazil. I’m a software enthusiastic with experience in different programming languages, like C++, Python, Java, Actionscript and Objective-C.
I've already participated in other open source projects, like BRisa UPnP framework, that has a version written in Python and other in Qt. Besides this project, I've worked in projects that involves Python for S60 (Symbian OS nokia cell phones) and porting python applications to maemo devices, like Nokia N800.
I started to pushing code into the git repository of KDE with the initial interface of my proposal. About version control systems, I’ve already used SVN and Git, so, it is not going to be difficult my code integration with KDE one.
I use KDE as my desktop environment and really enjoy it. I’d be glad to help the community grow more, and see a little of my work inside it.