Desktop Summit recap and GSoC update

Home is where the heart is After one week being at “home” (Brazil for a while) and getting back to the normal activities (college, clean up my place, cooking for myself..), now it is time to write something about the Desktop Summit and about the last weeks of GSoC.

Desktop Summit

It was awesome because:


  • It was really nice to see new brazilian people (good friends!) attending and doing good work for KDE. You can see pictures here.
  • Really good keynotes, like the Stuart Jarvis’s about “Why are we here? (Community Keynote)“. The graphics and the quotes in the slides were very intersting (they’ll be put on the website soon).
  • I got a Tablet in the “Intel AppUp Application Lab for Meego“! Good workshop and good Tablet =)
  • I attended in the BoF of KDE-Promo were Stuart Jarvis, Carl Symons, Frank Karlitschek , Thomas Thym and others discussed about the KDE birthday (october!) , about the KDE People from Latin America that should try to publish more news from these countries in the (that’s important!) and that we need more documentation about how to get more companies “involved” with KDE. (you can follow the KDE Promo e-mail list to know more)
  • I attended in the Kolab: The Groupware for the Free Desktop BoF, where I figured out that I need to study about KDE PIM ;-)
  • I also figured out that Mai Tai is really dangerous – don’t drink more than two or you will
    try to hug and say how much you love people you never saw before!
  • I met Jonathan Riddellin person, my GSoC Mentor.

The only bad thing about Desktop Summit 2011:

  • The potatoes were awesome, but the most of the dishes were with pork! I don’t feel like eating pork meat for the rest for the year…


The difficulties:

  • The lack of knowledge in C++/Qt. I didn’t have a lot of experience with C++/Qt when I started which made me lose some time with stupid errors, but I believe I wasn’t the only one with this problem in GSoC.
  • In the beginning I was afraid about the changes that I should do in Umbrello, how to do it properly, the best way to do it.
  • I took some time to communicate properly with my mentor. I shouldn’t feel so insecure about it.
  • I didn’t enjoy too much to work from home.
  • Concluding: my difficulties weren’t so much about the code, but more personal difficulties. I think I wrote a ambitious project which would wait more dedication from me and I didn’t give all the needed dedication. So I didn’t conclude the project in time.

What I did to overcome it:

  • Looking for help! Mainly from KDE people that I already knew in person.
  • With this help, I had good ideas about how to proceed properly with the port:  keep the old canvas working with the new canvas to keep comparing the code, using preprocessor directives in the old code and developing the new Umbrello in a different folder in the same project.
  • After the midterm evaluation I started to skype with my mentor.

The project for now:

The future:

  • These months in the GSoC gave me a good knowledge base to keep working in the Umbrello Port as my conclusion work for college.
  • We had a suggestion  how to change the documentation support works in Umbrello:
  • And soonish we will have the Qt 5, so we will have another port project for Umbrello (but as I was adviced, I should keep with the work to port for QT 4 because the differences to Qt 5 won’t be so big)
  • And there is others suggestions about how to make the Umbrello interface better and with more usability.
    (you can follow it in the uml devel mail list)
  • Migrate Umbrello to git.
  • Write tests using QtestLib.

[GSoC] Umbrello: Merging soc branch and trunk.


After my last talk with my mentor, we decided that would be better to merge what I’ve doing until now in the trunk instead of to wait until the end of the project – that would be so much more work (even now, have been hard to get the new merged branch compiling and working). So for this, I made a branch from the trunk wich I am merging with the soc-umbrello-2011 branch.

The merge result (untill now) you can check here:

The idea is: if any change will be  done in the trunk, need to be done in the new branch as well.

Bye. Cya at Desktop Summit =)



Umbrello – some results [GSoC]

Hi Folk!

Here I am, after a while discovering that to work from home is not to everyone, that below your pillow you can find a engagement ring ( = and wondering why QMenu::popup needs receives like parameter type a QPoint instead of QPointF (Is it only in my silly mind that QPointF would make more sense? Am I forgetting something about Qt? Considering that QGraphicsView works with real coordinates).

I am working now in the widgets, so for now, you can see the BoxWidget and the ListPopUpMenu in the “new canvas”, bellow to the “old canvas”.

The video is not so good…so please, check out the repository:

After the evaluation time, my mentor, Jonathan Riddell, and I decided to use skype to improve our interaction :-) and my work.

And with this, my list-to-do just increases:

– make popup menu work
– implement drawing other types of widgets on class diagrams: boxwidget, class, interface..
– mouse press event
– drag and drop events

cya …

Desktop Summit

Umbrello in GSoC – just a quick update

What did I do?

I was working on the view (UMLView) and in the scene (UMLScene) and I tried to separate the methods between two classes, one only to handle the events in the scene (UMLScene) and another to handle the diagrams (Diagram). That’s what you can see in the repository now:

And untill now I am trying to reuse the code from the first try to port Umbrello.

What am I doing now?

To test the “new view” and the “new scene” I need the widgets. So I am working on the UMLWidget and the WidgetBase.

The next weeks:

I need to catch up my tentative timeline in the next two weeks. So I can finish the port, to work in new things for Umbrello ( work on better stereotypes supports and complete Undo/Redo support) and then start to write tests.

Umbrello in GSoC

My first week of work according to plan:

25 April – 08 May

* Community Bonding Period. (I talked a bit with some class mates of GSoC)
* Review Plan with Mentor. (I talked to Jonathan)
* Get instructions for the work and get started!

… and get used to work from home :)

Porting Umbrello:

I discovered that the best way to work would be to keep the old classes with the newly written ones together. Including calls for new methods in the same project so I can test the functionality of the new methods. Always comparing the new ones with the old ones.

The current result is Umbrello working with a new window showing the “new canvas”:

In this “view” with QGraphicsView I can test my new classes.

Using Squish to write tests:

To try to make the best decision regarding how to proceed to the port, which parts of code reuse, I did a few class diagrams (just a draft), with the main classes that I should work with, I thought it would be interesting to draw the diagram in Umbrello, and save some steps using Squish

I’m using the Squish Community Edition – froglogic Squish IDE 4.1.0-SNAPSHOT – available only to test KDE software – you can ask one by e-mail: The advantage was to get some practice with the Software (I also discovered and reported some bugs :/)

It is very easy to write tests with Squish, you can automate the tests or write scripts by hand. What is tiring is that when you record the tests, the system stores a table with the objects of your application. But if the the object is not in this table, the test stops and you must include the object or editing the table by hand, or run the application in Spy mode or simply write “test dummies”.

Read more here:

Some interesting links:

QObject x QGraphicsObject:

Qt GraphicsView in depth:


Next weeks:

Sprint 1: 09 May – 22 May

* UMLViewCanvas, LinePath, Circle, SubsetSymbol, SeqLineWidget, UMLView (Classes that implement the view for the diagrams, graphical representation of sequence lines and that represent diagrams)

You can see my complete workplan here: Umbrello UML Modeller QGraphicsView Port

I believe that like most students, my expectation with the GSoC is to LEARN a lot and perform a GOOD job. And even after that period CONTINUE contributing to the community:)

Umbrello no GSoC

A primeira semana de trabalho planejada:

25 April – 08 May

* Community Bonding Period. (Eu conversei um pouco com os meus colegas de grupo do GSoC )
* Review Plan with Mentor. (Conversei com o Jonathan)
* Get instructions for the work and get started!

…e se acostumar a trabalhar de casa :)

Portando o Umbrello:

A melhor maneira de trabalhar encontrada para realizar as alterações por partes foi manter as classes antigas e criar as novas classes em conjunto. Assim, incluir as chamadas para os novos métodos nos arquivos antigos mantendo o funcionamento dos dois e com isso testando o funcionamento dos novos métodos.

O resultado no momento é o Umbrello antigo funcionando com uma janela nova mostrando o “novo canvas”:

Nesse “view” já com QGraphicsView é que eu vou testar as minhas novas classes.

Usando o Squish para gravar testes:

Para tentar tomar a melhor decisão com respeito a como proceder para o port, que partes do codigo reaproveitar, eu fiz alguns diagramas de classe (apenas uns rascunhos), com as principais classes, as que eu devo trabalhar.

Com isso, eu achei que seria interessante desenhar o diagrama no Umbrello, e gravar alguns passos no Squish (eu to usando o Squish Community Edition – froglogic Squish IDE 4.1.0-SNAPSHOT – disponível apenas para testar softwares do KDE, voce pode pedir pelo e-mail: . A vantagem foi pegar alguma prática com o Software (também descobrir e reportar alguns bugs :/)

E é muito facil de gravar testes com o Squish, você pode automatizar os testes ou escrever os scripts na mão. O que é cansativo é que a medida que você grava os testes, o sistema armazena uma tabela com os objetos da tua aplicação. Mas se o o bjeto não estiver nessa tabela ainda, o teste pára e é necessário incluir o objeto ou editando a tabela no braço, ou executando a aplicação no modo Spy ou ainda simplesmente gravar testes ‘dummies’ onde você deve usar os objetos que você precisa no teste. Você pode tirar as suas próprias conclusões conferindo o link:

Alguns links interessantes:

QObject x QGraphicsObject:

Qt GraphicsView in depth:


Próximas semanas:

Sprint 1: 09 May – 22 May

* UMLViewCanvas, LinePath, Circle, SubsetSymbol, SeqLineWidget, UMLView (Classes that implement the view for the diagrams, graphical representation of sequence lines and that represent diagrams)

O meu plano de trabalho completo você pode ver aqui: Umbrello UML Modeller QGraphicsView Port

Acredito que, assim como a maioria dos estudantes, a minha expectativa com o GSoC é aprender MUITO e realizar um BOM trabalho. E mesmo depois desse período continuar contribuindo para a comunidade :)

Building a sexy Umbrello

I’m a big fan of Umbrello. It’s a Free Software graphical UML (Unified  Modeling Language) editor, one of the very few of it’s kind. Most UML tools are proprietary tools written in Java and Umbrello is written in C++/Qt and build on the powerful base of KDE  software. I realized how interesting Umbrello is when I noticed that the  most of my professors suggest proprietary tools or a generic diagramming program with few UML features to study UML at college class. Many companies use UML to help them quickly write applications and Umbrello is (as far as I know) the only Free Software tool which can do the code generation required for that!

Why UML is important?

Modeling is the designing of software applications before coding. Modeling is an Essential Part of large software projects, and helpful to medium and even small projects as well. (…) Using a model, those responsible for a software development project’s success can assure themselves that business functionality is complete and correct, end-user needs are met, and program design supports requirements for scalability(…)

Of course, It is not only my college that uses UML, there are a lot of company wich use UML tools in their development process, including  companies where I have worked and you can find some more examples here.


So having a Free Software UML editor is pretty important! And the Umbrello UML editor is really cool:

  • Automatic code generation (Ada, C++, C#, Java, perl, PHP, Python, Ruby)
  • Import classes and project (Ada, C++, IDL, Java, Pascal and Python only)

The bad news is that Umbrello does not receive a lot of love. It has been roughly ported to Qt4 and KDElibs4 but still uses a lot of Q3Canvas classes and has quite a few bugs.

Umbrello today


Working on Umbrello

Which is why I choose Umbrello for my conclusion work for the University. I would have to work on something anyway, why not pick something that matters? But as I combine my study (5 nights with each a different class) with a full-time job I don’t have a lot of time to do a proper job on Umbrello. My goal for the University is therefore pretty modest: I intend to finish the port of the canvas to QGraphicsView. I have identified about 30 classes which are related to the Q3Canvas and will have to be ported or replaced. I also intend to use tools for automated tests, write unit tests and and fix some bugs.

But there is more to do:
  • Better stereotypes supports
  • Complete Undo/Redo  support
  • Hyperlinks support
  • Reuse KDevelop analysis for code import
  • Bug fixing

GSoC 2011

So I have applied for a Google Summer of Code. Jonathan Riddel, the current maintainer of Umbrello, has said he would mentor me, which is really cool. So if I get this, I can quit my current job and finish the porting to QGraphicsView much faster. To ensure it’ll be a successful project, I’ve been quite modest in my goals for GSoC too: I only shortened my university plan to the GSoC timeline and added a few small things. If I finish the work for my conclusion work during the GSoC, I can be more ambitious for my University and add to the plan – I’m sure my professor won’t mind if I take on some feature work in Umbrello as well!

Rocs no 4.6.x

Olá a todos,

O lançamento do KDE SC 4.6 passou e nem pude comentar sobre as novas funcionalidades do Rocs (algumas implementadas no GSoC). Essa semana foi lançado a versão 4.6.1, então executem seus atualizadores de distro para uma melhor experiência :)

Primeiro queria avisar que o Rocs na versão 4.6.0 acabou sendo infectado por bugs de dentes pontudos e afiados, os quais fugiram dos nossos laboratórios de experiências, mas os mesmos já foram combatidos com granadas santas (sendo agora ex-bugs) e não estarão mais (quanta redundância cíclica) na versão 4.6.1.

Agora sim as funcionalidades:

  • Suporte a inclusão de arquivos: Imagine que você fez um algoritmo que organiza no espaço os vértices segundo algum critério. Agora imagine que, dada a organização feita pelo algoritmo anterior, você quer colorir os vértices. Antes era necessário que você coloca-se todo código em um único arquivo (o que não é nada conveniente quando você quer caçar bugs). Mas agora, você pode escrever o primeiro algoritmo, testá-lo e, durante o desenvolvimento do segundo algoritmo em um arquivo separado, incluí-lo para fazer uso das funções. Isso facilita a organização do desenvolvimento e a reusabilidades dos códigos (que é o graal que os programadores devem almejar).
  • Outra funcionalidade é a possibilidade de importar arquivos de outros formatos, como KML, GML… Vale lembrar que somente foi incluído novos formatos, mas essa funcionalidade já estava disponível desde a versão 4.5 e vocês podem escrever os plugins para importar seus próprios arquivos conforme a necessidade (eu tenho alguns formatos que utilizo nas pesquisas aqui na universidade). Eu irei escrever um página no techbase/userbase de como criar tais plugins.
  • Uma outra funcionalidade que foi implementa, e que era o carro chefe do meu GSoC, é o suporte a novas estruturas de dados através de plugins. Isso é muito legal porque agora você pode testar aquele seu algoritmo de busca em árvores AVL sem precisar implementar árvores AVL (que convenhamos tem funções de inserção/balanceamento bem chatinhas) :) (n.e. Ainda não existe um plugin para árvores AVL no Rocs, se desejar desenvolver um entre em contato comigo).

Então, atualizem, testem e comentem sobre outros bugs que possam existir (infelizmente deveríamos ter contado até 3, não até 2 nem até 4, antes de jogar a granada santa, mas no fim acabamos contando 1,2,5 e alguns bugs podem ter fugido)

Linked List of Rocs

Well, long time without post in planet ( sorry ppl :( )

So, let me make a little resumé of work in Rocs during this winter (yeah, is winter here in Brazil) :

  • Rocs now can use the existing scripts ( first step to KGHN :) );
  • Rocs now can open/write Dot (graphviz), KML and GML files;
  • Rocs support data structu plugins (for now graphs and linked list);
  • Rocs receive some minor improvements like support multiple opened documents and execute a script after load a  file (bonnus :) );

below  is a video that show Rocs starting from a graph, then converting  to a linked list, add some nodes and link then. Of course, that not only  using mouse, but also with the script (that is the final objective).

The script in this example is a simple one that walk over the list to the end and add the new node to end.

list = graphs[0]
var n = list.createNode("NewNode")
var prev = list.front();
while (prev.front()  !=  0){
   prev =prev.front();

As you can see, when we are using linked list plugin, the API of script is diferent from graph API (no make sense we have front(), for instance, when we are working with graphs). A data structure plugin use as base a graph struture to avoid extra work to create a new plugin. To create a new data structure plugin, developer write need write only 2 classes: the plugin it self and a base of data structure as show bellow (some code like constructors and code to kservice was removed to make it short):

class TreeDSPlugin : public DSPluginInterface{
  Graph* changeToDS ( Graph* graph) {
     return new TreeStructure(*graph);
  Graph* createDS ( GraphDocument* parent ){
     return new TreeStructure(parent);
class TreeStructure : public Graph{
 Edge * addEdge(Node* from, Node to){
   if (from->out_edges().count == 2){
   return Graph::addEdge(from, to);

The first class is only a class to provide a library to load at run time ( using kservice ) and build the objects using a specific data structure class. To present a small example, the data structure plugin in second class is a binary tree and the method overwrited is addEdge(), to ensure that a node has only two childs. But this example provide only this basic behavior, no providing any new methods to be used in scripts, no graphics items to be drawn nor new itens to properties windows.

The data structure system, was developed to make easy to write new plugins (few code to be write) but also it can be very powerfull, allowing the new plugins to provide extra methods to be used in scripts, own graphics item (take a look in video to edges), and extra itens in properties window. See images bellow:

All this code is allready in Rocs’ trunk and i’m working now in some details like removing not used members and some refactoring (Graph should be called as BaseDataStructure or something like this). if you want to try it and create you own data structure plugin, ask me how to begin.

Rocs – Aplicação KDE para Estudo em Grafos

Alguns de vocês já devem ter lidos alguns posts anteriores no qual citei e falei do Rocs, mas acho que uma melhor explicação de o que é o Rocs e por que ele é aplicação tão bacana.

O Rocs é um projeto do Brasileiro Tomaz Canabrava, baiano que hoje vive em algum lugar do Brasil entre SC e BH. Ele foi incorporado ao KDE SC na versão 4.4, a qual foi lançada em fevereiro de 2010, dentro do módulo KDE EDU.

Bom mas o que é o Rocs?

Para aprender algoritmos de grafos, normalmente temos um terminal e vários números impressos na tela que somente quem codificou o algoritmo sabe o que eles significam e se o programa funcionou ou não. Para alguns alunos isso é ‘traumático’, fazendo com que tais alunos fujam de grafos como metaleiro de show de pagode.

Para facilitar o entendimento de o que um algoritmo está fazendo e como pequenas alterações podem resolver problemas de implementação, é interessante visualizar o grafo que se está trablhando e ter uma forma rápida de se visualizar um pequeno algoritmo ou mesmo um procedimento.

O Rocs surge para isso, para ser uma IDE para trabalhar, estudar, desenvolver e pesquisar algoritmos aplicáveis a grafos. O Rocs possui um canvas (área de visualização) que mostra o grafo atual e permite que o usuário interaja com o mesmo, adicionando novas arestas ou novos vértices. Para desenvolver os algoritmos interpretados pelo Rocs são em Javascript, o que facilita a escrita (linguagem fácil) e também evita problemas de acesso a endereços inválidos (como em Java e C/C++ que derrubaria a aplicação) por ser interpretada.

Agora no GSoC 2010, estamos adicionando suporte a outras estruturas de dados, o que permitirá que sejá mais fácil ensinar essa que é por muitos considerada a mais difícil do curso de ciência da computação. Alêm disso o Rocs passará a ter suporte a reutilização de códigos (como o #include no C/C++) e a outros formatos de arquivos.

Mas vou falar aqui sobre as novidades do Rocs na versão 4.5, que foi lançada agora a poucos dias. No sprint do KDE EDU e Multimidia em Randa na Suíça, o Tomaz corrigiu dezenas de bugs no rocs, deixando essa segunda versão muito mais estável. Além dessa estabilidade, também foram adicionadas algumas funcionalidades novas como o suporte a plugins que o usuário pode escreve (com o corpo em C++ mas o conteudo já pode ser em JS) e o suporte a plugins de outros formatos de arquivos (mas com poucos plugins ainda).

Acima um imagem do rocs em sua primeira versão.
Se você tiver vontade de utilizar ele para ensino, mas achar que falta algo nele, entre em contato comigo ou com o Tomaz e podemos providenciar :)

%d blogueiros gostam disto: