May 25, 2016

Me complace presentaros un artículo que no es mío sino que lo ha creado una de mis alumnas para la revista de mi colegio. Se trata de “SuperTuxKart, un gran juego de Karts para GNU/Linux” que ha elaborado Nuria Rubio, una de mis alumnas más voluntariosas de primero de ESO. Originalmente estaba escrito en valenciano/catalán pero dado que el blog lo suelo escribir en castellano he decidido poner la traducción, que no cuesta casi nada. Espero que os guste.

 

SuperTuxKart, un gran juego de KartsSuperTuxKart, un gran jocs de Karts per a GNU/Linux

HOLA!!!

Avui vos vaig a parlar del joc d’ordenador que és molt conegut al món GNU/Linux.
Es tracta d’un joc de karts que condueixen mascotes de linux com poden ser, entre altres:

  • Geeko, la mascota d’openSUSE
  • Konqi, la mascota de KDE
  • Tux (protagonista), la mascota de Linux
  • Gnu, La mascota de GNU.

Super Tux Kart és un joc lliure i gratuït de carreres de cotxes tipus arcade en 3D, el protagonista de la qual és Tux, la mascota del kernel Linux. L’idea de la seva creació va sorgir com una millora alternativa del joc TuxKart, de part del grup Game of the Month. No obstant això, al final es va optar per realitzar un joc totalment nou.

El que té bo el joc és que té molts circuits per jugar segons com vulga el jugador . El joc té molts bons gràfics i, a més, jo no trobe molt de lag.

Per jugar es pot triar entre un jugador, amb finestra completa, dues, tres i quatre jugadors amb pantalla partida. Hi ha dues opcions de joc: carrera simple i Gran Premi. En el primer cas, es tria un circuit dels múltiples disponibles i guanya el que completi abans el nombre de voltes. En el segon, es fa un recorregut per 4 circuits i guanya el que més punts obtinga.

Al llarg del recorregut es troben nitres i caixes sorpresa, que inclouen des d’elements d’ajuda fins a paranys.

En conclusió jo crec que és un joc molt entretengut per quan es trobes avorrit i t’has cansat d’altres jocs divertits de KDE com poden ser Kbounce o Kollision.

Fins aviat

Nuria Rubio, 1r ESO

 

Y ahora, la versión en castellano:

SuperTuxKart, un gran juego de Karts para GNU/Linux

HOLA!!!SuperTuxKart, un gran juego de Karts

Hoy os voy a hablar del juego de ordenador que es muy conocido al mundo GNU/Linux.
Se trata de un juego de karts que conducen mascotas de linux como pueden ser, entre otras:

  • Geeko, la mascota de openSUSE
  • Konqi, la mascota de KDE
  • Tux (protagonista), la mascota de Linux
  • Gnu, La mascota de GNU.

Super Tux Kart es un juego libre y gratuito de carreras de coches tipos arcade en 3D, el protagonista de la cual es Tux, la mascota del kernel Linux. La idea de su creación surgió como una mejora alternativa del juego TuxKart, de parte del grupo Game of the Month. Sin embargo, al final se optó para realizar un juego totalmente nuevo.

El que tiene bono el juego es que tiene muchos circuitos para jugar según cómo quiera el jugador . El juego tiene muchos bonos gráficos y, además, yo no encuentro mucho lag.

Para jugar se puede elegir entre un jugador, con ventana completa, dos, tres y cuatro jugadores con pantalla partida. Hay dos opciones de juego: carrera simple y Gran Premio. En el primer caso, se elige un circuito de los múltiplos disponibles y gana el que complete antes el número de vueltas. En el segundo, se hace un recorrido por 4 circuitos y gana el que más puntos obtenga.

A lo largo del recorrido se encuentran nitros y cajas sorprendida, que incluyen desde elementos de ayuda hasta trampas.

En conclusión yo creo que es un juego muy entretengut por cuando se encuentras aburrido y te has cansado otros juegos divertidos de KDE como pueden ser Kbounce o Kollision.

Hasta pronto

Nuria Rubio, 1r ESO

I hate do re-work. You don’t have any idea how much I hate redo something. But when I wrote my GSoC project, I did in the week of the submission and the mentor that I needed was on vacation. So you can see the *drama* that I had.

I reached the creator at the IRC channel of KDE to see if he could help me, and Jonathan Riddel gives me the help that I need it, at the selection of bugs that I could work and others things that I was thinking about Umbrello. After two days, one before the end of submission time, I submitted my project to the KDE Community.

I planned my GSoC work in the way that I think that was better. But in this couple days, I need it stop and think for one sec. I was trying to do 3 things at the same time and don’t understand everything deep enough to do the best work.

The timeline that I did on my project went to garbage. And now I’m doing this new one, so I can achieve the goal of my project. I realize that was better divide my project in tasks to be accomplished, instead follow the timeline, because sometimes I could have some trouble with something, and wait for feedback from my mentor, so I guess that I will be effective doing in this way. So now I will write the tasks that I need to do, based on my GSoC project. Are you ready? GO!

Tasks

  • Remove deprecated code
    • That’s a lot of code in Umbrello that still works with KDE Frameworks 4 and Qt4, and since Qt4 is officially deprecated, so is KF4. I want to remove this code, update for Qt5.6(New Long Time Support) where is need it, and the same applies for KF5.
  • Update CmakeLists
    • With the elimination of the deprecated code at the source of Umbrello, the CmakeLists will need to have an update to remove the code that handles the build of KF4 and Qt4 libraries.
  • Fix inconsistencies when they appear
  • Work on Bug 60452 ­ (In progress)
    • This bug is related to missing keywords to declare attributes and operations of C++ classes. I’m studying and remembering how Software Engineer works, and how these missing keywords can help the engineer to create better classes in Umbrello.
  • Bug 123633
    • ­ This bug is related to the creation of a new diagram type, the Object Diagram, where the UML notation defines the Object Diagram like:
      • An object diagram is a graph of instances, including objects and data values. A static object diagram is an instance of a class diagram; it shows a snapshot of the detailed state of a system at a point in time. The use of object diagrams is fairly limited, namely to show examples of data structure.”

  • Fix build of Umbrello with KF5 at Microsoft Windows(In progress)
    • This was the task that I planned to do at the end of GSoC, because in my mind I could remove the deprecated code and after solve the problem of the build in Windows environment. But my mentor wants me to do this task first and after remove the deprecated. You could ask how I can fix a problem if Umbrello doesn’t have the KF5 code… Actually, at 2014 Umbrello started to have some KF5 and Qt5 code inside, where it would work with KF4 OR KF5 build. I’m having some headache on the setup of the machine, Riddell released to me a Cloud Machine with Windows Server 2012, and after I struggled to install the Directx SDK so the build of Qt works, I started this night the build of KF5 and others KDE frameworks. I abandoned MSWindows at the beginning of 2015, and since them, I traveled around Linux distros until I installed ArchLinux last month. And I get used to working on terminal, write an apt-get/dnf/pacman and find what I want, install or compile, and I’m good to go. Now back to Windows, I don’t know how I didn’t leave Windows sooner. =S

Well, those are the tasks that I set in this new view of my project, for sure new tasks will appear since I’m trying to use the Divide and Conquer logic, so some of this tasks will be smashed apart, and if I end the tasks, my mentor and I will define new tasks for keeping me busy =) .

I’m calmer now, after right this and define things again. I can complain about have re-work, but sometimes is need it to think better and set things in black and white.

I hope that works hahahaha

That’s all for today! Bye =*


I've been a bit quiet online lately. A few weeks back, my father had a stroke, from which he seemed to at least partly recover. However, last week we found that he could not recover, and was in fact dying.

He died 12 May 2016. I wrote about that a bit here: http://genweblog.blogspot.com/2016/05/rest-in-peace-ted-cowan-1926-2016.html . I was holding his hand as he passed, as was my sister. We're both happy that he is free of his pain, but are both grieving that both our parents are now dead.

Grieving is strange. Sometimes life seems normal, but sometimes not. So I will help out when I have the energy and interest, and at other times, withdraw and recharge. Talking about this is fine in open channels or privately, if you want. This is not a sensitive subject; we'll all die in the end after all.

May 24, 2016

Rio de Janeiro, the “Cidade Maravilhosa”, land of the eternal Summer. The sunlight here is always clear and hot, the sea is refreshing, the sand is comfortable. The people is happy, Rio de Janeiro has good music, food, the craziest parties of the world, and beautiful bodies having fun with beach games (do you know futevolei?).

But while Rio de Janeiro is boiling, some Gearheads based in Latin America will be working together in a cold and dark room in the city, attending to our “multi-area” sprint named Latin America Akademy – LaKademy 2016.

In my plans I have a lot of work to do in Cantor, including a strong triage in bugs and several tests with some IPC technologies. I would like to choose one to be the “official” technology to implement backends for Cantor. Cantor needs a IPC technology with good multiplatform support for the main desktop operating systems. I am think about DBus… do you have other suggestions or tips?

Other contributors also want to work in Cantor. Wagner wants to build and test the application in Windows and begin an implementation of a backend for a new programming language. Fernando, my SoK 2015 student, wants to fix the R backend. I will be very happy seeing these developers dirtying their hands in Cantor source code, so I will help them in those tasks.

During LaKademy I intent to present for the attendees some ideas and prototypes of two new software I am working. I expect to get some feedback and I will think about the next steps for them. Maybe I can submit them for new KDE projects… Well, let’s see. 🙂

Wait for more news from the cold and dark room of our LaKademy event in Rio de Janeiro. 🙂

To get you started on this, we’ll be using KDAB’s Android utils with the humble Toast.
Toasts are small popups which are used to show the user some feedback. Check Google’s API guide for more info about toasts.

The easiest way to show a toast is to use Toast.makeText(Context context, CharSequence text, int duration) static method.
This method needs 3 params:

  • the context (we’ll use the activity)
  • the text to show
  • and the duration: one of LENGTH_SHORT (0) and LENGTH_LONG (1).

Then we just need to call the show method.

Of course all the calls MUST happen on the Android UI thread.

As usual we’re going to make use (abuse) of QtAndroidExtras and KDAB’s Android utils (check this article to see how to add them to your project).

Let’s create a simple function to show the toast:

enum Duration {
    SHORT = 0,
    LONG = 1
};

void showToast(const QString &message, Duration duration = LONG) {
    // all the magic must happen on Android UI thread
    KDAB::Android::runOnAndroidThread([message, duration] {
        QAndroidJniObject javaString = QAndroidJniObject::fromString(message);
        QAndroidJniObject toast = QAndroidJniObject::callStaticObjectMethod("android/widget/Toast", "makeText",
                                                                            "(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;",
                                                                            QtAndroid::androidActivity().object(),
                                                                            javaString.object(),
                                                                            jint(duration));
        toast.callMethod<void>("show");
    });
}

Yep, it’s that simple!

Now let’s take a closer look at the code:

  • We’re using KDAB::Android::runOnAndroidThread to run everything on the Android UI thread.
  • We’re capturing message and duration params as values not as references, because as we’ve seen in a previous article KDAB::Android::runOnAndroidThread is (most of the time) asynchronous.
  • We’re using QAndroidJniObject::fromString to convert a QString to a QAndroidJniObject string object.
  • We’re using QAndroidJniObject::callStaticObjectMethod to call the makeText static method that returns a Toast java object. We need to pass the following parameters:
    • “android/widget/Toast” is the fully qualified class name.
    • “makeText” is the static method name
    • “(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;” – is the method signature. The method returns Landroid/widget/Toast; object and expects 3 arguments:
      • Landroid/content/Context; – a Content object
      • Ljava/lang/CharSequence; – a CharSequence object
      • I – an int
    • QtAndroid::androidActivity().object(), javaString.object(), jint(duration) are the makeText arguments.
  • after we get the toast object, we call show method and we’re done.

Enjoy!

showToast(QLatin1String("Hello from Qt"));

The post Qt on Android: How to use Android Toast appeared first on KDAB.

Here's a brief call for help.

Is there anyone out there who uses a recent kmail (I'm running 16.04.1 since yesterday, before that it was the latest KDE4 release) with a Novell Groupwise IMAP server?

I'm trying hard, I really like kmail and would like to keep using it, but for me right now it's extremely unstable (to the point of being unusable) - and I suspect by now that the server IMAP implementation is at least partially to blame. In the past I've seen definitive broken server behaviour (like negative IMAP uids), the feared "Multiple merge candidates" keeps popping up again and again, and the IMAP resource becomes unresponsive every few minutes...

So any datapoints of other kmail plus Groupwise imap users would be very much appreciated.

For reference, the server here is Novell Groupwise 2014 R2, version 14.2.0 11.3.2016, build number 123013.

Thanks!!!


While the first stable Krita version with animation is just around the corner, I am already rolling up my sleeves with plans to take the feature to the next level. It's Google Summer of Code time again.

A lot has happened since last year. Import for image sequences was added, the timeline docker was reworked and a large number of smaller changes and fixes were implemented to make the animation tools ready for inclusion in Krita 3.0. For a nice overview, check out GDQuest's video tutorial.

More will be coming this summer as I work on my second GSoC project. Firstly, animation capabilities will extend to cover most layer types. I have already started implementing it for masks and filter layers. Keyframing will become available for the filter parameters and layer opacity. However, vector layers will have to wait for now as they are facing major changes in the near future thanks to Krita's Kickstarter campaign this year, which promises to bring much needed updates to the text and vector tools.

Mockup of interpolation curve editor
Secondly, many properties, such as layer opacity, will get options for interpolation between keyframes. These could be used, for example, to animate a smooth fade-out or even do basic cut-out style animation with a transform mask. To control the interpolation, a new curve editor will complement the existing timeline.

There's a lot of work ahead, but I am already looking forward to seeing these features myself.

Hoy me complace traer un vídeo de cómo instalar KDE Neon 5.6, este nuevo proyecto de la Comunidad KDE que tiene como objetivo ofrecer la versión más pura de su escritorio y aplicaciones. Poco a poco, van a pareciendo las primeras creaciones que nacen alrededor de él.

Cómo instalar KDE Neon 5.6

De la mano de Riba Linux nos llega un vídeo que demuestra lo sencillo que es instalar KDE Neon 5.6 la nueva apuesta de la Comunidad KDE por ofrecer la mejor versión posible del escritorio Plasma 5.

De esta forma en unos minutos nos muestra una instalación típica, basada en Ubuntu 16.04, de KDE Neon en su estado actual, la cual os podéis descargar en la página oficial del proyecto.

Personalmente, creo que proyecto va viento en popa aunque yo esperaría un poco más de tiempo para instalarlo en un equipo donde se busque estabilidad sobre tener lo más novedoso de la Comunidad.

¿Qué es KDE Neon?

El proyecto KDE Neon es uno de los más ambiciosos de la Comunidad KDE ya que quiere ofrecer a todos los usuaurios En realidad se parece mucho a Kubuntu o a KaOS, pero en esta iniciativa proviene desde dentro la Comunidad KDE, con la finalidad de simplificar el proceso de creación y distribución de Plasma y el software de KDE en general.

Cómo instalar KDE Neon 5.6
Mirando un poco más allá, aunque parezca ser un simple repositorio, podría convertirse en una nueva forma de distribuir el software de KDE, con Plasma en mente y para cualquier dispositivo, de modo que la Comunidad KDE tenga la posibilidad de estrechar un poco la distancia con el usuario final.
Pero por lo que sabemos, esto aun está por llegar. Lo que encontramos hoy día es un repositorio con software KDE y Qt, de modo que se pueda asegurar que el usuario encuentre las dependencias (y versiones) que los desarrolladores recomienden.

May 23, 2016

Monni

Could you tell us something about yourself?

I’m Neotheta, 23-year-old from Finland and draw colourful pictures with animals, furries and alike. Drawing has been my passion since I was little, I was also interested in digital art early on but had a love&hate relationship with that because computers were not for kids, unstable and tools were pretty awkward back in those days. So I learned drawing mostly with traditional tools first.

Do you paint professionally, as a hobby artist, or both?

Both, I work full-time as an artist right now and hope to continue so!

What genre(s) do you work in?

Is furry a genre? I practice my own styles to draw animals and furries – luckily this is where the most demand for my work is as well. But I’ve also drawn more cartoony & simplified styles for children’s books.

SupernovaWhose work inspires you most — who are your role models as an artist?

My mom draws really well, she got me drawing! After that it’s been a blender of many inspirations, they tend to change pretty frequently – except I’ve always loved cats! I’m more of a role-maker than a taker, so I often do things differently on purpose – it’s not always a good thing but probably the reason why I’m currently drawing for a living.

How and when did you get to try digital painting for the first time?

6-years-old, I drew a colourful bunny with MS paint at my mom’s workplace (a school) and told her students that this is the future! After that my parents also gave me a drawing tablet but I was somewhat disappointed at the programs intended for digital art at the time – they were all kind of awkward to use. So I gave up digital art for many years and went back to traditional tools. I think I was 15 when I decided to try again seriously.

What makes you choose digital over traditional painting?

I enjoy bright colours, many of those are difficult to produce with traditional colours. Also the ability to print the finished drawing on desired material, such as fabrics – or test what it looks best on and what size. I can also share the same drawing with many people if the outcome is
awesome.

How did you find out about Krita?

I was actually on a sort of mental breakdown because my computer had kicked the bucket and my new setup simply didn’t function together. I had recently experienced how stable and awesome Debian was for PC and I really wanted to give it a try instead of windows. In the middle of the mess and new things someone told me I should try Krita because it sounded like it’d fit my needs – a drawing program for Linux.

What was your first impression?

I was in total awe because first I was ready to sacrifice not using my old favorite programs just so I could work stable. But then Krita turned out to be better than my previous combination of using Paint tool Sai + Photoshop CS2, it had all the same features I needed in one. Krita on Linux was also SO STABLE and FAST and there was autosaving just in case. I learned to use Krita really quickly (also thanks to the helpful community!) and kept finding new useful tools like a constant stream. It was like a dream come true (still is).

What do you love about Krita?

It’s so stable and fast, I have it on my powerful desktop and old laptop and it functions so nicely on both of them! The community is wonderful. The brush engine is so diverse, interface is customizable, g’mic plugin, line smoothing, perspective assistants… to name a few!

What do you think needs improvement in Krita? Is there anything that really annoys you?

Better text tools and multipage pdf saving would make Krita perfect for comics.

What sets Krita apart from the other tools that you use?

Stability, fast performance, for Linux, well designed for drawing and painting, and lots of features!

If you had to pick one favourite of all your work done in Krita so far, what would it be, and why?

Everything I’ve drawn in the recent years have been on Krita so it’s a difficult pick. My current favorite is a personal drawing of my dragon character in a mystical crystal cavern.

Crystal_Cavern

What techniques and brushes did you use in it?

This is my more simple style, first I sketch, then lineart, colour and add textures last. I’ve mostly used Wolthera’s dynamic inking pen, airbrush, gradients and layer effects. A more detailed description and .kra file for inspecting can be found from my site here: https://neotheta.fi/tutorials/wips/crystal/

Where can people see more of your work?

https://neotheta.fi

Anything else you’d like to share?

I recently made a telegram sticker pack with one sticker to spread word about Krita (when people get my pack they get the Krita sticker too). Feel free to add it to yours too or use in another creative way!

kritasticker

Last weekend, ace Krita hacker Dmitry Kazakov attended KomMissia, the annual Russian comics festival. Best quote award goes to the Wacom booth attendants, who install Krita on all their demo machines because “too many people keep asking about it”!

Here’s Dmitry’s report: enjoy!

Last weekend I have attended the Russian annual comic festival “KomMissia”. That is a nice event where a lot of comic writers, painters and publishers meet, share ideas, talk and have a lot of fun together.

My main goal of visiting the event was to find out what people in the comic industry need and what tools they expect to see in a graphics application. One of the goals of our Kickstarter 2016 is to create text tools for the comic artists, so I got a lot of useful information about the process the painters use.

There were a lot of classes by famous comic masters. I got really impressed by the way how Dennis Calero works (although he doesn’t use Krita, I hope “yet”). He uses custom brushes in quite unexpected way to create the hatches on the painting. He paints a single hatch, then creates a brush from it and then just paints a set of hatches to create a shadow and uses ‘[‘ and ‘]’ shortcuts to modify the size of single hatches. Now I really want to implement a shortcut for that in Krita!

image02
I also got in touch with people from Wacom team who had a booth there. They showed a lot of nice and huge Cintiq’s. The funniest thing happened when I asked them if I can install Krita on their devices. They answered that they do already have Krita on most of their demo machines! They say that quite a lot of people asked them about Krita during the previous events, so they decided to install it by default 🙂 So now, if you happen to see a Wacom booth on an event, you can easily go a test Krita there!

image03

image04

There were also a lot of classes organized by the art-material shops. They let people try various markers, paints and papers. I tried all of them. And now I have a lot of new ideas for new Krita brushes! Hehe… 🙂

This is my “masterpiece” done with watercolor markers 🙂 We can actually implement something like that… The user might paint with usual brushes and then use a special tool for “watering” the canvas. That might be really useful for painters!

image07
And the paintings below are not just “testing strokes with acrylic markers”. It is live illustration of Kubelka-Munk color reflectance theory! The “lemon yellow” pigment is the same on both pictures, but due to the different opacity of its particles it looks absolutely different on different background colors!

image00

image08

So now I’ve got a lot of ideas about what brushes and tools can be implemented in Krita! Just follow us on Twitter and VK and you will be the first to know about new features! 🙂

PS:

More photos and paintings (by Nikky Art) from the event

image01
image06

image05

It has been over a month since Davide,Alessandro and I started working on WikiToLearn:Ratings  for GSoC-2016 and we have already started with Database design . I have already shared my experiences while setting up OrientDB inside  docker in this post. So now let’s take a step further and talk about how we made a sample graph database to represent our project (abstract here). To understand it in a better way , let’s consider the following scenario:

Jon,Jacob and Josh study Physics at a renowned university. One day they came across WikiToLearn  and they were deeply influenced by it’ s philosophy –knowledge only grows if shared. Being roommates they arrived at a collective decision to share their knowledge and author a course on Mechanics under physics  section on WikiToLearn.
So Jon decided to write about Newton Law,Josh about Work and Power . Jacob was busy with his cookery classes so Josh decided to author Pseudo Force for him while he was away.They were very happy with their work and wanted to share their work with all the university students but before that they decided to proof read each other’s work. So while doing it they improvised some of the sections of pages written. Now they came to know that WikiToLearn has this unique feature called Versions. Basically versions are a great way to keep track of the history of changes such that whenever a page is changed a new version is stacked on the top of old one such that it forms a chain of changes and only latest version is accessible to users. So they created versions on each other’s work by reviewing and editing is subsequently. Now when they are done reviewing they vote the page content so that the entire course rating can be generated by the Rating Engine.
Each user has some credibility that will determine the weight carried by his vote.This will be determined by his loyalty to WikiToLearn platform( his activities  like contributions,reviews,days active).Here it is essential to remember that a contributor can’t vote his own work.(😛 ). So now the work of the editors is over and now it’s up to the Rating Engine to calculate the Reliability of their work.They are waiting with their fingers crossed!

So to model this type of information I basically used OrientDB as a graph database.Let’s see a simple way of doing it.

Vertices and Edges:

So in this scene we have some entities like User,Page,Course and Version. These entities will form the heart of our graphical database. Information like User’s Name , Page Name will be embedded inside these entities. These entities will interact with each other with various relationships like Jon contributes newton law. 
In OrientDB these entities are  represented by Vertices and relationships by Edges of a graph.

Setting up the vertices:

Just like the Object Oriented terminology we extend out custom made classes to the base ones so in the web editor or the console,issue the following commands:

CREATE CLASS USER EXTENDS V
CREATE CLASS PAGE EXTENDS V
CREATE CLASS COURSE EXTENDS V
CREATE CLASS VERSION EXTENDS V
CREATE CLASS CONTRIBUTE EXTENDS E
CREATE CLASS REVIEW EXTENDS E
CREATE CLASS INSIDE EXTENDS E
CREATE CLASS V_STACK EXTENDS E
CREATE CLASS P_VERSION EXTENDS E

Let’s now embed information inside the vertices and edges don’t worry if you don’t understand all the used parameters they will be explained in the subsequent posts.

USER:

CREATE VERTEX USER SET NAME="JON",J_DATE="2014-05-12"


CREATE VERTEX USER SET NAME="JOSH",J_DATE="2015-05-20"


CREATE VERTEX USER SET NAME="JACOB",J_DATE="2013-12-10"

PAGE:

CREATE VERTEX PAGE SET NAME="NEWTON LAW",C_RELIABILITY=2.0,RATING=3.4


CREATE VERTEX PAGE SET NAME="WORK AND POWER",C_RELIABILITY=2.0,RATING=3.4


CREATE VERTEX PAGE SET NAME="PSEUDO FORCE",C_RELIABILITY=2.0,RATING=3.4

VERSION:

CREATE VERTEX VERSION SET V_NO=0,P_NAME="NEWTON LAW",C_RELIABILITY=1.0,RATING=4.2


CREATE VERTEX VERSION SET V_NO=1,P_NAME="NEWTON LAW",C_RELIABILITY=1.0,RATING=4.2


CREATE VERTEX VERSION SET V_NO=1,P_NAME="WORK AND POWER",C_RELIABILITY=1.0,RATING=4.2


CREATE VERTEX VERSION SET V_NO=0,P_NAME="WORK AND POWER",C_RELIABILITY=1.0,RATING=4.2


CREATE VERTEX VERSION SET V_NO=0,P_NAME="PSEUDO FORCE",C_RELIABILITY=1.0,RATING=4.2


CREATE VERTEX VERSION SET V_NO=1,P_NAME="PSEUDO FORCE",C_RELIABILITY=1.0,RATING=4.2

COURSE:

CREATE VERTEX COURSE SET NAME="MECHANICS",C_RELIABILITY=2.0,C_VOTE=5.2

Drawing Edges:

So now we need to link the disjoint vertices with relationships.We need to connect the contributor to his work (CONTRIBUTE), Reviewer to content reviewed(REVIEW), pages to course(INSIDE), Versions to pages in a stack like manner (V_STACK) and finally linking the current version to pages(P_VERSION). Let’s see them one by one:

CONTRIBUTE:

CREATE EDGE CONTRIBUTE FROM (SELECT FROM USER WHERE NAME="JON") TO (SELECT FROM VERSION WHERE P_NAME="NEWTON LAW")


CREATE EDGE CONTRIBUTE FROM (SELECT FROM USER WHERE NAME="JOSH") TO (SELECT FROM VERSION WHERE P_NAME="WORK AND POWER" OR (P_NAME="PSEUDO FORCE" AND V_NO=0))


CREATE EDGE CONTRIBUTE FROM (SELECT FROM USER WHERE NAME="JACOB") TO (SELECT FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=1)

REVIEW:

CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JON") TO (SELECT FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=0) SET VOTE=5


CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JOSH") TO (SELECT FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1) SET VOTE=8


CREATE EDGE REVIEW FROM (SELECT FROM USER WHERE NAME="JACOB") TO (SELECT FROM VERSION WHERE P_NAME="WORK AND POWER" ) SET VOTE=9

P_VERSION:

CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1)


CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=1)


CREATE EDGE P_VERSION FROM (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=0) TO (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=1)

V_STACK:

CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="NEWTON LAW" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="NEWTON LAW")


CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="WORK AND POWER" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="WORK AND POWER")


CREATE EDGE V_STACK FROM (SELECT * FROM VERSION WHERE P_NAME="PSEUDO FORCE" AND V_NO=1) TO (SELECT * FROM PAGE WHERE NAME ="PSEUDO FORCE")

Voila! here it is:)

ori

 


A few days ago, I published my last blogpost as ’ownCloud’ on our blog roll about the ownCloud community having grown by 80% in the last year. Talk about leaving on a high note!

Yes, I’ll be leaving ownCloud, Inc. - but not the community. As the numbers from my last post make clear, the ownCloud community is doing awesome. It is growing at an exponential rate and while that in itself poses challenges, the community is healthy and doing great.

I joined in 2014, when ownCloud, Inc. had about 36 employees. The community grew that year, according to our history page, from 1 million users to 2.2 while the number of average coders per month went from 62 to 76. For me, the coolest thing that year was the ownCloud Contributor Conference, that brought together 100 contributors for a week of hacking at the university of Berlin. A stressful, but awesome week. Though, my first meeting most of my colleagues was some months earlier at the Stuttgart meetup and my first release was ownCloud 7 not long before the event.

2015 was more of that - our history page has a great overview and I’m darn proud of having been a part of all those things. 2016 brought ownCloud 9, a major release, which was accompanied by an overhaul of owncloud.org, I hope you like our new website!

Not everything is finished, of course. We’re still smack in the middle of awesome work with Collaboraand Spreedas well as the WDLabs PiDrive project - I just finished and published this page about it. All great stuff which has great momentum and will certainly move forward.

Myself, I’ll stay around in the community. I’ll talk about the awesome stuff that is coming next early June but until then, don’t hesitate to contact me if you’ve got any questions about ownCloud or anything else. You can still catch me on jos@opensuse.org;-)

Berlin, September 1-4

KDAB is offering eight fantastic trainings at QtCon, each for just €250 a day, so incredibly good value.
Here’s what you can choose from, including three completely new courses:

  1. Introduction to Qt 3D – with Dr Sean Harmer
  2. Basic and Modern CMake – with Andreas Hartmetz
  3. Beyond code – Improved Quality through User Centric Development – with Björn Balazs
  4. Debugging and Profiling Qt applications – with Milian Wolff
  5. Introduction to QML – also known as Qt Quick – with Kevin Funk and Jesper Pedersen
  6. What’s new in C++11/C++14 – with Thomas McGuire
  7. Introduction to Modern OpenGL with Qt – with Giuseppe D’Angelo
  8. Introduction to Testing Qt applications with Squish – with Florian Turck

Abstracts

1. Introduction to Qt 3D – Dr Sean Harmer

Target Audience: Developers or Managers wishing to get an idea of what Qt 3D is about and learn how to make some attractive applications with 3D content in the process.

Prerequisite: A basic understanding of QML would be useful. No prior OpenGL or 3D experience is required.

Qt 5.7 introduces the powerful new Qt 3D module that can be used to integrate 3D content into your Qt applications using C++ or QML. In fact, Qt 3D provides an extensible framework for soft realtime simulations, of which rendering is just one aspect. This 1 day training will introduce you to Qt 3D’s features and APIs, show what you can achieve with them, and how Qt 3D can be extended by the user and by the Qt 3D authors in the future.

Along the way we will introduce the Qt 3D renderer and input systems and how they are built on top of a flexible, highly threaded, Entity Component System (ECS) architecture that scales very well and is ripe for future additions. You will learn:

  • How to construct a basic Qt 3D application
  • About Transform hierarchies and Entities and Components ot make a scene graph
  • How to display 3D graphical content using geometry, materials, textures
  • How Qt 3D maps onto the graphics pipeline
  • How to extend Qt 3D to use your own custom geometry
  • How to write custom materials and shaders
  • How to completely control the Qt 3D renderer dynamically at runtime using the Frame Graph
  • How to integrate Qt 3D with Qt Quick to provide a 2D user interface
  • How to handle advanced input with Qt 3D
  • Future plans for Qt 3D and how to extend it yourself

About the presenter

Dr. Sean Harmer
Senior Software Engineer at KDAB. Sean has been developing with C++ and Qt since 1998. and in a commercial setting since 2002. He holds a PhD in Astrophysics along with a Masters in Mathematics and Astrophysics. Sean has a broad range of experience and is keenly interested in scientific visualization and animation using Qt and OpenGL. 


2. Basic and modern CMake – Andreas Hartmetz

Target Audience: C and C++ Developers

Prerequisite: Experience with build systems
(well I guess – otherwise trainees will not know what problems even need
solving, so they won’t understand what the solutions are good for)

The best thing a build system can do is not get into the way.

CMake is the de facto standard build system for C and C++ outside of frameworks that require their own. It has earned this place by supporting the situations and special cases that arise in real projects.
CMake even has strong support for building Qt applications, and it’s a good alternative if you hit limitations in qmake.

This course will teach the basics of creating and building projects with CMake. In recent years, CMake has introduced some cleaner and more precise constructs. The course will focus on the new constructs where possible.

About the presenter

To follow


3 . Beyond code – Improved Quality through User Centric Development – Björn Balazs

Target Audience: Developer, Development Lead, Product Manager, Manager, Decision Maker interested in learning how users can be involved to boost a products’ success

Prerequisite: Being part of a product development team

Users ultimately decide about the success of your product – at the latest when they are supposed to use it. But, fear not: With this training we provide you with strategies for turning your users into allies early in the development process. These strategies will not only lead to better customer satisfaction, but also help to improve the development process itself.

Wondering how your product can benefit from the ideas behind Usability, User Centered Development, Design Thinking or Interaction Design?

With this introductory training you will not only understand the theory, but you will also take away tools and strategies you can directly introduce to your product development team back home. We will of course put a special focus on the challenges and opportunities that developing with Qt & QtQuick Technologies bring to the process.

Some Topics covered:

  • ISO 9241-210 or What is a User Centered Development Process?
  • Personas: Making Users actionable in the Development Process
  • What do users want? Getting User Feedback right.
  • Usability Testing: Guerilla vs. The Laboratory
  • Prototyping and How Qt can help.

About the presenter

Björn Balazs
Björn is a Senior Experience Engineer at KDAB in Berlin. He has specialized in Usability and User Experience since 1999 and holds a Diploma in Psychology. A longtime member of the KDE visual design group, Björn has worked for many free software projects. For the past ten years, he has regularly given trainings on user-centric development. Languages: German, English.


4. Debugging and Profiling Qt development – Milian Wolff

Target audience: Developers who want to find and fix problems

Prerequisite: Knowing the basics of C++, Qt and QML

This training gives an introduction to various tools, which help developers and testers in finding bugs and performance issues.

The tools presented cover a wide range of problems, from general purpose debugging and CPU profiling to Qt specific high-level analyzers. Often, it is relatively simple to run a tool, but interpreting the results, or even just using some of the more advanced tools, requires deep technical knowledge.
The most important tools on all major platforms that Qt supports, i.e. Linux, Windows, Mac OSX, iOS and Android, will be covered:

Debugging:

  • General purpose debuggers: GDB, LLDB, Windows debugging tools
  • Memory error detectors: valgrind’s memcheck, Dr memory, AddressSanitizer
  • OpenGL: apitrace
  • Various Qt built-in features for logging, QML
  • GammaRay to investigate internals of Qt Applications

Profiling:

  • CPU: valgrinds’s callgrind, Linux perf, Intel VTune Amplifier, Instruments, Visual Studio
  • Heap memory: valgrind’s massif, heaptrack, Instruments, Visual Studio
  • OpenGL: apitrace, NVidia nSight, AMD CodeXL, Vivante vProfile

Testing:

  • Qt TestLib: unit tests and benchmarks
  • Static code analysis
  • Code coverage

About the presenter

Milian Wolff
Software engineer at KDAB’s Berlin office, Milian has a special interest in tooling and profiling. He created the Massif-Visualizer and heaptrack, which are now used regularly to improve the performance of both C++ and Qt applications. These days, Milian applies this knowledge to improve code base performance for KDAB’s customers. He is the co-maintainer of the KDevelop IDE and in 2015 won their Akademy Award for his ongoing work there. He has a Masters Degree in Physics. Languages: English, German.


5. Introduction to QML – also known as Qt Quick
– Kevin Funk and Jesper Pedersen

Target Audience: Developers and managers interested in learning the autonomy of a QML application

Prerequisite: Knowing the basics of Qt at C++ level is an advantage but not a requirement

This training is an introduction to Qt Quick. On the one hand it will teach you how to compose fluid user interfaces with slick animations using the QML language. On the other hand it will teach you how you hook the QML side up to your business logic in C++.

About the presenters

Kevin Funk
Software engineer at KDAB, Kevin has actively developed with Qt since 2006 and has a special interest in tooling and profiling. An active contributor to KDAB’s GammaRay analyzer, state machine tooling, Kevin is responsible for the Continuous Integration System within KDAB. He’s one of the lead developers of the KDevelop IDE, and is pushing for cross-platform success inside KDE. Kevin holds a Masters Degree in Computer Science.

Jesper Pedersen
Senior Software Engineer at KDAB. Jesper has actively developed with Qt since 1998 and is the mind behind numerous KDE programs and components, as well as the main author of the course material we use for the Qt courses. He holds an MSc in Computer Science and has taught more than 70 Qt classes for companies such as Boeing, IBM, and Veritas. 


6. What’s new in C++11/C++14? – Thomas McGuire

Target Audience: C++ developers who want to upgrade their C++ skills

Prerequisite: Knowing the basics of C++ (the old standard) is a requirement, though more advanced topics will be explained as needed. Knowing the basics of Qt is beneficial, but not required.

This training is targeted at people who are interested to combine the new features of C++11/C++14 with Qt5 (and, to a lesser extent, Qt 4.8). It will teach you all about the new C++11/C++14 features, but also throws in Qt-specific information, including how to structure your code so that a simple recompile with a C++14 compiler will make your applications both faster and use less memory.

About the presenter

Thomas McGuire
Software Engineer at KDAB. Thomas has actively developed with Qt since 2006 and is now a contributor and approver in the Qt project. He joined KDAB in 2008, where his main responsibilities are working on customer projects, on-site consulting and holding trainings in Qt and C++11/14. Thomas has contributed to the KDE project, mainly to the KDE PIM applications and libraries, and was maintainer of the KMail application. He has been a speaker at conferences like KDE’s Akademy and Qt Developer Days. Thomas holds an MSc in Computer Science.


7. Introduction to Modern OpenGL with Qt
– Giuseppe D’Angelo

Target Audience: Developers interested in learning the basics of OpenGL.

Prerequisite: A basic level of linear algebra will be assumed for this course (multiplying a matrix and a vector). Mathematics will be kept to a bare minimum so as not to get in the way of eye candy!

OpenGL is a central part of QtQuick2 in Qt 5 and also plays a key role in displaying the main content of many widget-based applications.

OpenGL has been around for many years and in recent times has evolved to shed much of its legacy baggage and better expose the underlying hardware. Modern OpenGL allows us to take full advantage of the enormous power and parallel processing power of today’s GPUs. Maximizing performance of OpenGL rendering requires us to understand how GPUs work and how to efficiently feed them with data.

Qt provides a number of classes to make life easier when working with modern OpenGL. This training will show you how to do the basic tasks associated with OpenGL rendering and will go on to show how to use Qt and OpenGL to achieve a number of rendering effects and algorithms. You will also learn how to write custom QtQuick2 items using the OpenGL and scene graph APIs.

About the presenter

Giuseppe D’Angelo
Software Engineer at KDAB. Giuseppe is a long time contributor to Qt, having used Qt and C++ since 2000, and he is an Approver in the Qt Project. His contributions in Qt range from containers and regular expressions to GUI, Widgets, and OpenGL. A free software passionate and UNIX specialist, before joining KDAB, he organized conferences on opensource around Italy, especially about Perl. He holds a BSc in Computer Science.


8. Introduction to Testing Qt GUI Applications with Squish – Florian Turck

Target Audience: Testers, Developers and Managers interested in how to automate
testing of Qt applications

Prerequisite: Basic scripting skills and knowing the basics of Qt are a benefit for this training. Bring your laptop and request a free evaluation license and download in advance through http://www.froglogic.com/squish/evaluate.php

While unit testing is established to test components, integration and system tests verify that the overall system works as expected. Squish is the tool for automating these blackbox tests in the world of Qt.

The presenter will introduce you to the automated functional testing of user interfaces based on Qt. Besides getting to know the record and playback GUI testing tool Squish, additional topics range from best practices for test design over test refactoring to Behaviour Driven Testing.

This training includes theoretical modules and live demonstrations, but you are invited to join working on practical exercises – bring your laptop to participate.

About the presenter

Florian Turck – froglogic
Florian Turck is a froglogic Technical Sales Engineer and Software Trainer. An ISTQB-certified tester, he has conducted dozens of Squish trainings for various companies and provides consulting services to prospects and customers.

The post KDAB Training Day at QtCon appeared first on KDAB.

The GSoC plan to dominate the world of embedded system developments is near to have his first version !

Today one of the most important steps was performed, the first upload to a microController. The code was a blink compiled with a makefile and uploaded with the KDev-Embedded plugin to an AVR microController (Arduino Nano board).

First upload !First upload !

With … Read the rest

May 22, 2016

La Comunidad de Chakra está de enhorabuena pues su distribución sigue en plena forma. Ayer 22 de mayo fue anunciado en su web que ya están disponibles las actualizaciones Plasma de mayo para Chakra, las cuales ofrecerán nuevas funcionalidades pero sobre todo más estabilidad.

Actualizaciones Plasma de mayo para Chakra

Actualizaciones Plasma de mayo para ChakraYa lo he comentado alguna vez en el blog, no utilizo Chakra pero es una distribución que me llama muchísima la atención por su filosofía de rolling release y por su Comunidad creciente, además de por su amor por el escritorio Plasma de la Comunidad KDE.

De esta forma es para mi un placer anunciar que el pasado domingo 22 se liberaron las actualizaciones Plasma de mayo para Chakra nos ofrecen las siguientes novedades:

  • Plasma 5.6.4 incluye lo equivalente a un mes de corrección de errores y nuevas traducciones, con los cambios referentes al escritorio de plasma y al espacio de trabajo (workspace), kwin, kscreen y networkmanager, entre otros.
  • KDE Applications 16.04.1 incluye más de 25 correcciones de errores registrados y mejoras para kdepim, ark, kate, dolphin, kdenlive, lokalize, spectacle, entre otros.
  • KDE Frameworks 5.22.0 incluye correcciones de errores y mejoras para los íconos Breeze, Plasma Framework, kio, ktexteditor y kactivities, entre otros.

 

Mas información: Chakra

¿Qué es Chakra?

Chakra Linux es una distribución creado por una Comunidad al que le gusta seguir la filosofía KISS (Keep It Simple, Stupid), la elegancia de los escritorios Plasma de KDE y un sistema para empaquetar las aplicaciones gtk, para no perder programas por simples problemas de librerías.

Su modelo de actualizaciones divide su avance en dos velociadades: liberación semi-continuo (half-rolling release) de  una parte de software esencial (que es probada exhaustivamente como el núcleo Linux, las librerías primarias GNU y las librerías comunes) mientras que el software en la capa de aplicaciones es actualizado con mayor frecuencia.

 

TL;DR: Well Hey there, Chantara here. I will be working with 2 awesome mentors, Stikonas and teo-, to add LVM and hopefully RAID support for KDE Partition Manager and KPMCore library over my summer with Google Summer of Code. If you’re interested, read on!!! :)

Starting over

Okayy!!! Let me start with a proper introduction to my project first.

My original plan/proposal was to add LUKS and LVM supports, but thank to stikonas and teo- awesome works, LUKS support is already production ready at this point, with only a few minor fixes that needed to be done.

“well… then, you gonna only focus on LVM ??” NOPEEEEEE!!!!!!!!!

you see.. In my proposal, I had a strech goal, and it was to add RAID support as well. So, I will have to focus and finish LVM works as fast as possible to have more time for addding RAID suport as well.

What the heck is LUKS, LVM, and RAID ??

All this LUKS, LVM and RAID talk, and yet, I haven’t explained one bit what the heck those are. So, here goes my super short explanations:

LUKS: It’s basically a container around your filesystem that let you encrypt your data.

LVM: It’s almost like a blackbox/layer that takes your disks/partitions and display them in a preferably better and easier to manage interface.

RAID: It’s like sqeezing a bunch of disks together into one giant disk. Just that The harder you sqeeze(RAID 0 -> RAID 10), the more features but less space you have.

How am I planning to do all these works ??

LVM :

  • KPMCore : LVM implmentation on the core library will involve the use of external tool namely LVM2 toolsets. Right now, we are still finalizing the design that best represent LVM because LVM technically isn’t a device nor filesystem. It is more of software layer, which the codebase clearly wasn’t designed to handle, so we are brewing up a new design to deal with this new kind of beast.

  • KPM : Once the implementation on the core library is done, what’s left is to facilitate those freshly coded features to the useres. New widgets will be created, dialogs will be made.
    With our current design, we plan to represent VG(Volume Group/layer/blackbox) as a new seperate device with LV(Logical Volume) as the VG’s partitions.
    Because VG will consist of one or more disk’s physical partition(PV), the partitions on those disks that are part of VG will will be display with VG’s name as their mount point and LVM_PV as their type.


RAID:

  • KPMCore : RAID implementation on the core library will also involve the uses of external tool named mdadm. RAID implementation will hopefully benefit from the designed that we came up to implement LVM. well… because RAID has its similairity with LVM. both of them have many physical disks.

  • KPM : Once the core implementation is done, all that is left is pretty much adding them adding them with GUI interfaces, so that we can use it .

What is my development environment ??

Right now, I’m pretty happy with using Vim as my primary IDE, GDB as my debugging tool, and Qt Designer as my UI-related tool.
I’ve also set up a bunch of Virtual Machines as well just for testing purposes.

To all the keyboard-only-freak out there, I’m currently running Arch distro with KDE as my Desktop Environment, and have finally configured it enough to be a mouse-free environment/workstation. If you’re interested in it, check out my other blog soon. I’m adding some finishing touch and will probably publish it soon. ;)

Who am I ??

Finally!!! time to introduce myself. My name is Chantara Tith from Cambodia. If you have never heard of Cambodia, you might want to check out Angkor Wat.( It’s pretty amazing if you ask me )
I’ve just finished my Third year undergraduate semester exams at Royal University of Phnom Penh last Monday & Tuesday, so I’ll be able to give my full attention to the project over my summer break. That’s pretty much I can say about myself, perhaps this blog post will tell you more.

Where to find me ??

Feel free to contact me :

IRC: tctara @ Freenode
email: tith.chantara@gmail.com

Intro

 If you want to test KStars Lite without building then download the pre-built .apk file here (API 14, armeabi-v7a). Please, give me the feedback about it if possible (did you manage to run it, was the performance good enough, etc.)

Required dependencies

  • Qt for Android - You can download it here. Later we will point CMake to the folder with Qt libraries compiled for Android.
  • Setup Android environment:
    • Follow the instructions provided here to setup the environment
      • Most probably you will find ant in you distros repositories.
      • I had problems with ant when using OpenJDK but no problems with the latest Oracle JDK (version 8)
  • KF5 for Android - You have to build it yourself using following instructions (you can also find instructions here):
     cd /opt/android  
    git clone git://anongit.kde.org/scratch/cordlandwehr/kdesrc-conf-android.git
    mkdir -p extragear/kdesrc-build
    git clone git://anongit.kde.org/kdesrc-build extragear/kdesrc-build
    ln -s extragear/kdesrc-build/kdesrc-build kdesrc-build
    ln -s kdesrc-conf-android/kdesrc-buildrc kdesrc-buildrc
    Now open the kdesrc-buildrc file in any text editor and change the following lines:
    1. line 15: -DCMAKE_PREFIX_PATH= "path to Qt5 Android libraries. Example: /home/polaris/dev/Qt5.6.0/5.6/android_armv7"
    2. Line 42 "use-modules..." : If you want to save some time then comment it with # and add after it "use-modules kconfig ki18n kplotting". Thus only modules needed by KStars Lite will be built.

    Now set environment variables and run the script:
     export ANDROID_NDK="Your path to Android NDK folder"
     export ANDROID_SDK_ROOT="Your path to Android SDK folder"
     export Qt5_android="path to Qt5 Android libraries. Example: /home/polaris/dev/Qt5.6.0/5.6/android_armv7"
     export PATH=$ANDROID_SDK_ROOT/platform-tools/:$PATH
     export ANT="path to your ant installation (/usr/bin/ant on Ubuntu)"
     export JAVA_HOME="path to your JDK (choose from the folders at /usr/lib/jvm/ on Ubuntu)
     ./kdesrc-build libintl-lite extra-cmake-modules frameworks-android  

    Note: It is important to have libintl-lite as a first parameter. I spent some time on figuring out that it is not built if I don't specify it explicitly. It is a dependency of KI18n without which it won't be built!
    Note 2: All the environment variables set here will be used for compiling KStars Lite so please make sure that they are set before proceeding further.

Building instructions

  • Go to your KStars source folder and set the path to source directory:
     export kstars_DIR=`pwd`  
  • Create in a desired location 2 folders - build for final build and export for files that will be included in apk along with the code (textures, data, icons etc.). After that set env. variable for export
     cd export
     export kstars_PRODUCT_DIR=`pwd`
  • Now run CMake to configure make files:
    I use ccmake to see which parameters are missing
     ccmake "${kstars_DIR}" 
    /opt/android is a location where you downloaded and built KF5 for Android
     -DCMAKE_TOOLCHAIN_FILE=/opt/android/kde/install/share/ECM/toolchain/Android.cmake
     -DCMAKE_BUILD_TYPE=Release
     -DCMAKE_PREFIX_PATH="${Qt5_android}"
     -DCMAKE_INSTALL_PREFIX="${kstars_PRODUCT_DIR}" 
     -DQTANDROID_EXPORTED_TARGET=kstars
     -DANDROID_APK_DIR="${kstars_DIR}"/apk 
     -DBUILD_KSTARS_LITE=ON
     -DKF5Config_DIR=/opt/android/kde/install/lib/cmake/KF5Config/ 
     -DKF5Plotting_DIR=/opt/android/kde/install/lib/cmake/KF5Plotting/
     -DKF5I18n_DIR=/opt/android/kde/install/lib/cmake/KF5I18n
    Now this is important as you wont' be able to compile config file if you set this wrong. Use the path to KF5ConfigConfig.cmake on your system. This is needed to use host system kconfig_compiler rather than the Android version.
     -DKF5_HOST_TOOLING="Path to KF5Config cmake files e.g. /usr/lib/x86_64-linux-gnu/cmake/"
    Optional: Set Android API. By default is 14. Set if your want to compile for specific Android version (e.g. API level 9 for devices >= 2.3.1)
     -DANDROID_API_LEVEL=14
    Obviously cmake has to be executed in one line with all the parameters but without comments
  • Compile KStars Lite by executing:
     make
  • You think we are done? Not yet :) Now we have to create apk file and bundle all resources in it.

    Allow inclusion of all extra files in apk
     make install/strip
     make create-apk-kstars
  • Your apk is in "build/kstars_build_apk/bin/" with the name "QtApp-debug.apk"
  • If you want to install it to your device from your PC do the following:
    • Check that your device has USB debugging switched on and connect it via USB to your machine.
    • Make sure that adb is installed (or use one from android-sdk-linux/platform-tools/adb) and run:
       adb install -r kstars_build_apk/bin/QtApp-debug.apk
    Well, that's it! You now should have KStars Lite apk file. If you want to compile KStars Lite for desktops just pass -DBUILD_KSTARS_LITE=ON to cmake and enjoy it :)

      Our monthly Kdenlive Cafés (*) really helped us focusing the development on some awesome features. We now have a small team of really involved people that help us evolve towards the best free open source video editor for professionnals.

      We have opened the poll for our next Café date selection, so if you want to meet us, add yourself to the list: https://dudle.inf.tu-dresden.de/Kdenlivecafe7and8/

      And to give you an idea of what we do these days, here is a video of the last feature added in git master: timeline preview.

      Sometimes, you just have too much effects or transitions in your timeline to be able to play it in realtime (you can see on the video, it can only play 13 frames per seconds). This is where this new feature helps you: it pre-renders parts of the timeline so that they can be played in realtime. And you can continue working on other parts of the timeline while Kdenlive is working in the background for you.

      More exciting news will come in the next months, so stay tuned and join us for the café!

      (*) Kdenlive café is a two hour informal meetings on irc.freenode.net in channel #kdenlive

      Funding Krita

      We’re running this kickstarter to fund Krita’s development. That sounds like a truism, but free software projects actually trying to fund development is still a rarity. When KDE, our mother project, holds a fund raiser it’s to collect budget to make developers meetings possible, fund infrastructure (like this, Krita’s website) and so on, but KDE does not pay developers. Other projects don’t even try, or leave it to individual developers. Still others, like Blender, have a lot of experience funding development, of course.

      We are happily learning from Blender, and have funded development for years. The first fund raisers were to pay Lukas Tvrdy to work full-time on Krita for a couple of months. His work was handsomely funded and made it possible for Krita to take the leap from slow-and-buggy to usable for day to day work.

      Since 2013, the Krita Foundation supports Dmitry Kazakov to work full-time on Krita. And if we may be allowed to toot our horn a bit, that’s a pretty awesome achievement for a project that’s so much smaller than, for example, Blender. The results are there: every release make the previous release look old-hat. Since 2015, the Foundation also sponsors me, that’s Boudewijn Rempt, to work on Krita for three days a week. The other three days I have a day job — Krita doesn’t really bring in enough money to pay for my mortgage yet.

      So, what’s coming in, and what’s going out?

      In:

      krita-foundation-income-20152016

      • Kickstarter: last year’s kickstarter resulted in about 35,000 euros. (Which explains this year’s goal of 30,000, which I’m sure we’re going to make!)
      • Monthly donations through the development fund: about 350 euros per month, 4200 euros per year
      • Krita on Steam: about 500 euros a month, 6000 euros per year
      • One-time donations through paypal: about 500 euros per month, since this drops of sharply during the kickstarter month, it’s only about 5000 euros a years
      • Sales of training videos: about 500 euros per month, same as with the donations, so about 5000 euros a year.

      Last year we also had a total of 20,000 euros in special one-time donations, one earmarked for the port to Qt 5.

      So, we have a yearly income of about 60.000 euros. Not bad for a free software project without any solid commercial backing! Especially not when looking at what we’re doing with it!

      Now for spending the money — always fun!

      krita-foundationoutgo-20152016

      • Sponsored development: for Dmitry and me together, that’s about 42,000 a year. Yes, we’re cheap. And if you’re a commercial user of Krita and need something developed, contact us!
      • Supporting our volunteers: there are some volunteers in our community who spend an inordinate amount of time on Krita, for instance, preparing and sending out all kickstarter rewards. Dutch law allows us to give those volunteers a little something , and that comes to about 3000 euros a year.
      • Hardware. We cannot buy all obscure drawing tablets on the market, so that’s not where we spend our money. Besides, manufacturers like Wacom, Huion and Yiynova have supported us by sending us test hardware! But when we decided to make OSX a first-level supported platform, we needed a Mac. When there were reports of big trouble on AMD CPU/GPU hardware, we needed a test system. This comes to about 2500 euros
      • Mini-sprints: Basically, getting a small groups, the Summer of Code students, me and Dmitry together to prepare the projects, or gettting Wolthera and me together to prepare the kickstarter. That’s about 1000 euros a year.
      • Video course: we spend about 3000 euros a year on creating a new video training course. This year will be all about animation!
      • Kickstarter rewards, postage, administrative costs: 7000 euros.

      So, the total we spend at the moment is about… 57,500 euros.

      In other words, Mr. Micawber would declare us to be happy! “Annual income twenty pounds, annual expenditure nineteen nineteen and six, result happiness. Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery.

      But there’s not much of a buffer here, and a lot of potential for growth! And that’s still my personal goal for Krita: over the coming year or two, double the income and the spending.

      Well, I think that if you are here, and work with 3d printing, when you are doing your research, for sure you’ll find RepRap and start from there, right? RepRap is a major project about 3D printing and open source ideology around the 3D world. Today I want to walk through a little of history...


      This announcement is also available in Italian, Spanish and Taiwanese Mandarin.

      The latest updates for KDE's Plasma, Applications and Frameworks series are now available to all Chakra users, together with other package updates.

      Plasma 5.6.4 includes a month's worth of bugfixes and new translations, with the changes being related to the plasma desktop and workspace, kwin, kscreen and networkmanager, among others.

      Applications 16.04.1 include more than 25 recorded bugfixes and improvements to kdepim, ark, kate, dolphin. kdenlive, lokalize, spectacle, among others.'

      Frameworks 5.22.0 include bugfixes and improvements to breeze icons, plasma framework, kio, ktexteditor and kactivities, among others.

      Other notable package upgrades:

    • wine 1.9.10

      It should be safe to answer yes to any replacement question by Pacman. If in doubt or if you face another issue in relation to this update, please ask or report it on the related forum section.

      Most of our mirrors take 12-24h to synchronize, after which it should be safe to upgrade. To be sure, please use the mirror status page to check that your mirror synchronized with our main server after this announcement.
    • Once you realize how addictive and rewarding Open Source Development is, you will end up spending days with it. So here I am working on my WikiToLearn:Ratings project for GSoC-2016.Only few days back it felt that it is good time to choose a proper database application for handling our data , which can be modeled into a graph.We stumbled upon OrientDB a distributed graph database. So here I am sharing my experiences while setting up OrientDB inside Docker.

      Just imagine you went to a fine restaurant and you ordered a delicious pizza, as you were busy taming your taste buds you get served with this.

      maxresdefault
      You are further given some red tomatoes and freshly prepared basil to make sauce and toppings on your own. I know you how do you feel not because I went to such restaurant , but because this is a common scenario that the programmers face.

      When we are working in teams it becomes really essential to collaborate seamlessly. That requires that you have a uniform working environment as your fellow team mates. But unfortunately this is not the case. Ever! . There are always some differences in the developing environments that need to be bridged . Now that mostly involves installing dependencies, packages and what not. The situation similar to the pizzeria as we ourselves need to make sauce and toppings for our pizza!

      But what if I tell you that there is something that can save you from all this ?

      Here comes DOCKER.According to the internet:

      “Docker allows you to package an application with all of its dependencies into a standardized unit for software development.”

      That means to run an application on any platform you just need to install docker, build the pack with the application and all it’s supporting components and then you are done.
      Now anyone using that application only needs docker installed to run that application. No more ugly setup , nothing just run docker and your application is up.

      Tasty-Pizza

      So recently I got a chance to use docker to fire up my OrientDB database. Therefore in the remaining post I will be explaining what it took to run OrientDB inside Docker!
      I am using Ubuntu 14.04(LTS)

      1. Initially we need to download the Docker image of OrientDB .Think of this image as your full application along with all the necessary components to run it.
        So need to a need a set of instructions to download all the dependencies and  install them. This instructions can be run in a batch process with the help of a Dockerfile. Just copy the contents of this file and save it on your disk with your favorite text editor, then run this command on the terminal to build the image from the Dockerfile:docker build -f /path/to/a/Dockerfile .
      2.  

      3. Now once you have the image and the other dependencies you need to run this:docker run -d -p 2424:2424 -p 2480:2480  -v config:/orientdb/config     -v database:/orientdb/databases  -v backup:/orientdb/backup     -e ORIENTDB_ROOT_PASSWORD=mypasswdhere     orientdb:latestSo let’s understand what we just did. We need to run an instance of the image we just built. Docker provides a faculty known as Containers to do it. Containers are like resource friendly virtual machines , a sandbox where you will run your application.
        The -d parameter will detach the container so that it won’t hog the terminal and the container will be up even if your close the terminal.
        -p is used to map the ports.
        As we will be working with the databases we need persistent storage to hold our changes in memory. But the moment we will kill the containers running the application all the data associated with it are destroyed. Therefore we will use Volumes to store the data in main memory.So -v to specify volumes.
      4.  

      5. Your server is up now you can access the web interface by going on this address:http://localhost:2480/
      6.  

      7. If you want to run console you need to additionally issue this command:
        docker run -it --net="host" orientdb:latest /orientdb/bin/console.sh
        The –net=”host” will select the host networking mode in docker. You can read more about networking in docker here.To connect to your database issue:orientdb> connect remote:localhost root <Passwd>
      8.  

      9. Now if you need to kill the container you can issue this command to see the running containers: 
        docker ps
         
        You can see the container name you wish to kill and use:
        docker kill <container name>

       

      Congratulations! now you have a fully functional OrientDB server running inside a docker container.

      blog local.png


      May 21, 2016

      Let's start this post by watching two videos :) I have finally got KStars Lite working on Android.


      Sorry for bad quality, but it seems to be everything my old smartphone is capable of.
      And here comes the corresponding screen video! (Don't forget to set 720p)



      As you can see there are a lot of things to do - pinch to zoom right now works as scrolling with wheel, so I need to tweak it a bit. Interface will be changed completely and right now it is just my proposal prototype. Loading of files seems to take more time than on my laptop, but I'm happy to see that with asteroids and comets it still performs well on tablet (need to try it on other devices).

      And now I will tell you a small story about what has been done since the previous my post and how did I compile Android version:

      1. All nodes that are responsible for drawing graphics are now reparented to the class RootNode (later there may be used its subclasses for the same purpose). RootNode handles QSGTexture generation for stars and also clipping. The problem with clipping was that in QtQuick Scene Graph you can't draw ellipse as OpenGL draws everything in triangles. To do it I found C++ triangulation algorithm implementation specifically tailored for QQuickItem, but it was designed to handle all kinds of polygons so it required a lot of resources and made SkyMapLite really slow. Later I found much simpler solution: choose some corner (in the case of ellipse any its point) and create a triangle from this point to the next 2 points. Simple but works perfectly.
      2. Added asteroids and comets. To do it I changed the structure of nodes a bit. So now there are 2 types of SkyNodes - PlanetNode and PointSourceNode. Both of them reflect to SkyPainter's functions drawPlanet and drawPointSource. For all objects in PlanetItem and some of the objects in AsteroidsComet PlanetNode is used, while CometsItem uses only PointSourceNode to draw comets as stars. After adding asteroids and comets performance didn't fall down. I even tried to draw all of them as bright stars without any checkings on magnitude/zoom level and everything worked well.
      3. Android build - well, that is a long story :) Initially I thought about it as something easy to do and haven't even included to my tentative timeline in proposal, but I was totally wrong. First there was a problem with KF5 dependencies because less than a half of KF5 modules are available for Android.
        My mentor, Jasem Mutlaq, made a great thing and got rid of KIO dependency, without which I was able to compile Android version. Even after that it didn't work and I got only a black screen. I spent a lot of time trying to setup debugger as you can't debug CMake project for Android from Qt Creator. The only feedback from my tablet that I am able to get now is looking at log output (which seems to be sufficient as all major errors are there).
        After spending a plenty of time on searching for a cause of black screen, I found out that "include(KDECompilerSettings NO_POLICY_SCOPE)" in top CMakeLists.txt file seems to cause the error. Without it everything worked fine, but still I had to tackle a few minor bugs before I was able to see SkyMapLite on my tablet.
        I also started to work on pinch to zoom as you can see from my video. 
      You will find instructions on how to compile KStars Lite for Android in my next post (which will be published tomorrow I hope). For now, I will run Android build in various Android emulators to see whether it works fine everywhere and then I will port PlanetMoons to KStars Lite. Stay tuned!

        In 3 days, the initial deadline for Google Summer of Code starts, but for a lot of student’s, the GSoC started days ago.

        I manage a group on facebook with +/-500 students, and a lot of them started they project sooner. And that made me scared. Why? you may ask. With that, I see the difference between they planning and mine. Maybe they started sooner because the difficult is greater, or they think that 3 months isn’t enough time to do what they planned. But for me, I see on them the proactivity that I would like to see in me. I developed a project that consists in make a program better, with the actual libraries, to improve the use of the software. Is centered on that. And I think that I didn’t need start before the initial deadline. Because for part of my mind, when 23 of May arrive, it will become real. But see those students, already working on their projects makes me think about what kind of experience I want to have in this GSoC. I remember that a professor mine, in a lecture said that the “problem” of the class is that we are reactive and not proactive. And that could give to us some trouble in the future, in our jobs or still at the University. I always thought about it, but turn into a reactive person is kinda of hard. Perhaps is the environment: I have a table in my room where my laptop stays, and in this place is where I work and procrastinate, lately I’m guessing that is causing some trouble to concentrate and work. Today I traveled to an another city, where the central pole of my University is, and I’m planning to go there see if I can concentrate enough to work in this initial days of GSoC, and I truly hopes that it works. However, that depends on me. This past month, since I had chosen from GSoC, made me think a lot about what kind of person I’m, and who I want to become. I’m using the community bound period to know the people of KDE Community that I already participate and the people of the group on facebook and this experience couldn’t be more amazing that it is.

        Step by step, that is what I’m thinking right now, but sometimes you need to run or take a distance for a jump, and I guess that during this GSoC, that could happen. And I know, that when 30 August arrives, I will be a different person, and that… will be good. =)

         


        May 20, 2016

        Screenshot_20160518_160431

        1. sudo apt-add-repository ppa:kubuntu-ppa/backports
        2. sudo apt update
        3. sudo apt full-upgrade -y

        Breeze icons are very simple SVG files, especially the ones used for actions that are mostly monochromatic are very simple, and that’s part of their appeal.
        Since some time, Plasma themes that are SVG files as well have the capability of being colored with system themes.
        So, why not doing this for every icon as well?
        One problem with monochromatic icons is that they can lose contrast in particular situation: when the application uses another color scheme or in places such as in menu items uder the mouse, that get a blue background, giving a not too visible dark gray on dark blue.
        That’s one of those “last mile” polishing issues that may be small, but have quite a big impact on the perceived quality of the finished product.

        Starting with Plasma 5.7 Icons will behave the same way as Plasma themes: they can have an internal stylesheet which colors will be replaced at runtime with the colors from the system theme.

        Here, Dolphin with the colors theme “Wonton Soup” and all the breeze icons following the text color of the theme:
        dadel1

        Some applications, like Gwenview can use a completely custom color scheme, in the case of GwenView, it switches to a dark color scheme when fullscreen, regardless of the normal system color theme:
        colors2

        Icons that are in a “selected” state such as the menu item under the mouse or the current dolphin sidebar item change their color, just like the text does too:
        colors1
        Here with some custom colors for the highlight areas:
        colors3

        How to create a compatible icon?

        First of all, Big kudos to Andreas for updating the whole breeze theme to the standard described below 😀
        This is a quite minimal SVG file that supports colors from the system theme (Plasma Svg themes follow the same convention):

        <?xml version="1.0" encoding="UTF-8" standalone="no"?>
        <!-- Created with Inkscape (http://www.inkscape.org/) -->
        
        <svg
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:cc="http://creativecommons.org/ns#"
           xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:svg="http://www.w3.org/2000/svg"
           xmlns="http://www.w3.org/2000/svg"
           xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
           xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
           width="22"
           height="22"
           id="svg3049"
           version="1.1"
           inkscape:version="0.91 r13725"
           sodipodi:docname="coloredsvgicon.svg">
          <defs
             id="defs3051">
            <style
               type="text/css"
               id="current-color-scheme">
              .ColorScheme-Text {
                color:#4d4d4d;
              }
              .ColorScheme-Background {
                color:#eff0f1;
              }
              .ColorScheme-Highlight {
                color:#3daee9;
              }
              .ColorScheme-HighlightedText {
                color:#eff0f1;
              }
              .ColorScheme-PositiveText {
                color:#27ae60;
              }
              .ColorScheme-NeutralText {
                color:#f67400;
              }
              .ColorScheme-NegativeText {
                color:#da4453;
              }
              </style>
          </defs>
          <metadata
             id="metadata3054">
            <rdf:RDF>
              <cc:Work
                 rdf:about="">
                <dc:format>image/svg+xml</dc:format>
                <dc:type
                   rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
                <dc:title />
              </cc:Work>
            </rdf:RDF>
          </metadata>
          <g
             inkscape:label="Capa 1"
             inkscape:groupmode="layer"
             id="layer1"
             transform="translate(-421.71429,-525.79074)">
            <rect
               y="525.79071"
               x="421.71429"
               height="22"
               width="22"
               id="rect4102"
               style="fill:currentColor;fill-opacity:1;stroke:none"
               class="ColorScheme-Text" />
          </g>
        </svg>
        

        Here there are two important parts.
        The first is the definition of the actual CSS stylesheet:

        <style
               type="text/css"
               id="current-color-scheme">
              .ColorScheme-Text {
                color:#4d4d4d;
              }
              .ColorScheme-Background {
                color:#eff0f1;
              }
              .ColorScheme-Highlight {
                color:#3daee9;
              }
              .ColorScheme-HighlightedText {
                color:#eff0f1;
              }
              .ColorScheme-PositiveText {
                color:#27ae60;
              }
              .ColorScheme-NeutralText {
                color:#f67400;
              }
              .ColorScheme-NegativeText {
                color:#da4453;
              }
              </style>
        

        The colors defined in Text, Background, Highlight etc will be replaced with the corresponding colors from the system theme (look at the Systemsettings module to configure colors to see what colors they actually are)
        This also defines a very minimal palette of “semantic” colors: you have the foreground and background colors for purely monochromatic shapes, and other colors for small accents that make the icon slightly more expressive than purely monochromatic such as Highlight, positive, negative (an “x” icon to close will be usually of “negative” color)

        The other important part is the actual definition of the shape:

        <rect
               y="525.79071"
               x="421.71429"
               height="22"
               width="22"
               id="rect4102"
               style="fill:currentColor;fill-opacity:1;stroke:none"
               class="ColorScheme-Text" />
          </g>
        

        The rectangle has class=”ColorScheme-Text” that will make the stylesheet match to the class definition of ColorScheme-Text, that defines a color.
        In order to actually apply that color, you can see the attribute style=”fill:currentColor”. It’s important no other colors are defined in the style attribute.

        Hello everybody, I am Akshat Tandon and I am a computer science undergraduate at IIIT­-H, India. I have been selected in GSoC and this summer I will be working on Marble to improve its vector tiling and rendering capabilities.

        gsoc logo

        Marble, part of KDE software suite, is an open source virtual globe with tons of awesome features.

        Current state of things

        As of now Marble supports rendering of OpenStreetMap vector data for higher tile levels. In order to make the vector OSM map theme complete and end ­user ready, support for medium and lower tile levels must be added.

        What needs to be done

        For supporting low level rendering( levels 1, 3, 5, 7, 9), Marble should render using the Natural Earth vector dataset instead of the OSM vector dataset. The reason for this is that Natural Earth dataset has categorically arranged and filtered data which is required for step by step rendering of lower levels. Apart from this the rendered data should be styled so as to match the OSM theme and tiling support must be added on the server and client side.

        For the medium level tiles, rendering must be performed using the OSM dataset. OSM dataset gives us many small chunks and nodes for a particular geographic data item. These chunks and nodes need to be filtered and reduced to a manageable size for each specific level so as to get optimal performance and less screen clutter.

        Rendering of higher level tiles need to be improved by adding support for roof­types and texture tags of buildings as well as by adding support for street markers.

        My part of work

        My work will majorly involve adding vector tile support at low levels using the Natural Earth dataset. This dataset is provided in SHP format and hence prior to any coding, the vector data in SHP format will need to be converted into OSM format using pre-existing tools such as shp2osm. After this we will have the OSM files but they are not yet tiled. These files would contain an enormous amount of data and if we load all this data into Marble then it would go out of memory and any color or styling would not exist.

        Marble Natural Earth road dataset loaded in Marble. Notice the amount of detail, leading to screen clutter and the lack of any styling.

        After this conversion, my actual work starts in which I have to build a tool using the Mable libraries.

        1. Which loads all these OSM files containg Natural Earth data.
        2. Merges all the data in a single document.
        3. Simplifies the data for a certain zoom level by reducing and filtering the number of nodes required for rendering.
        4. Concatenates the polygons and polyline where it makes sense.
        5. Splits the data into lots of different rectangular tiles.

        The core of the work will involve lots of mathematical problems (e.g. simplifying paths, concatenating paths, averaging paths, clipping paths to a rect, drawing coastlines etc.)

        The goal is that by the end of GSoC, we will have a tool which cuts the natural earth dataset into tiles in OSM file format which are properly styled and rendered by Marble for each tile level in the same way as they are drawn for the bitmap tiles on openstreetmap.org

        May 19, 2016

        Today I started to study some code on Transmission Qt Client to separate the views from the models and controllers.
        Transmission in Qt is separated into a big Application module, that controls the sub-controllers, the Session, the Model, and the MainWindow. But unfortunately, the MainWindow and related Widgets and Dialogs are really tangled, having ui code and algorithms mixed together in a way that’s not really simple to untie them. Today I was studying the OptionsDialog – and porting it to QML. The visuals where easy to create ( and this is where QML shines), but the intrinsics weren’t. I want to make the Qt Widgets and the QML versions co-instalable, and this means that I’ll not throw away QtWidgets code, but I realized that I’ll have to rewrite (probably just move around and fix stuff) quite a lot of code to make things work. The OptionsDialog will load a single torrent file, extract it’s data, insert the parsed data from the torrents file into a FileTreeWidget, that holds a FileTreeModel and display it’s items using a FileTreeDelegate.This will change to a OptionsDialog that will load a single torrent file, a OptionsDialogController that will do the torrent file management, a FileTreeWidget, a FileTreeController and a FileTreeModel, so two new classes to make the QML handle the data the same way that currently the Widgets are handling (the widgets will also access the controller)This kind of separation is good even if your app is not on QML, because it doesn’t ties the code to a particular interface and changes are easier to make in the future.No pretty picture today.

        May 18, 2016

        Python Bindings

        Python provides a C API to define libraries which can be imported into a python environment. That python C interface is often used to provide bindings to existing libraries written in C++ and there are multiple existing technologies for that such as PyQt, PySide, Boost.Python and pybind.

        pybind seems to be a more modern implementation of what Boost.Python provides. To create a binding, C++ code is written describing how the target API is to be exposed. That gives the flexibility of defining precisely which methods get exposed to the python environment and which do not.

        PyQt and PySide are also similar in that they require the maintenance of a binding specification. In the case of PySide, that is an XML file, and in the case of PyQt that is a DSL which is similar to a C++ header. The advantage both of these systems have for Qt-based code is that they ship with bindings for Qt, relieving the binding author of the requirement to create those bindings.

        PyKF5 application using KItemModels and KWidgetsAddons

        PyKF5 application using KItemModels and KWidgetsAddons

        Generated Python Bindings

        For libraries which are large library collections, such as Qt5 and KDE Frameworks 5, manual binding specification soon becomes a task which is not suitable for manual creation by humans, so it is common to have the bindings generated from the C++ headers themselves.

        The way that KDE libraries and bindings were organized in the time of KDE4 led to PyQt-based bindings being generated in a semi-automated process and then checked into the SCM repository and maintained there. The C++ header parsing tools used to do that were written before standardization of C++11 and have not kept pace with compilers adding new language features, and C++ headers using them.

        Automatically Generated Python Bindings

        It came as a surprise to me that no bindings had been completed for the KDE Frameworks 5 libraries. An email from Shaheed Hague about a fresh approach to generating bindings using clang looked promising, but he was hitting problems with linking binding code to the correct shared libraries and generally figuring out what the end-goal looks like. Having used clang APIs before, and having some experience with CMake, I decided to see what I could do to help.

        Since then I’ve been helping get the bindings generator into something of a final form for the purposes of KDE Frameworks, and any other Qt-based or even non-Qt-based libraries. The binding generator uses the clang python cindex API to parse the headers of each library and generate a set of sip files, which are then processed to create the bindings. As the core concept of the generator is simply ‘use clang to parse the headers’ it can be adapted to other binding technologies in the future (such as PySide). PyQt-based bindings are the current focus because that fills a gap between what was provided with KDE4 and what is provided by KDE Frameworks 5.

        All of that is internal though and doesn’t appear in the buildsystem of any framework. As far as each buildsystem is concerned, a single CMake macro is used to enable the build of python (2 and 3) bindings for a KDE Frameworks library:


          ecm_generate_python_binding(
            TARGET KF5::ItemModels
            PYTHONNAMESPACE PyKF5
            MODULENAME KItemModels
            SIP_DEPENDS
              QtCore/QtCoremod.sip
            HEADERS
              ${KItemModels_HEADERS}
          )

        Each of the headers in the library are parsed to create the bindings, meaning we can then write this code:


          #!/usr/bin/env python
          #-*- coding: utf-8 -*-

          import sys

          sys.path.append(sys.argv[1])

          from PyQt5 import QtCore
          from PyQt5 import QtWidgets

          from PyKF5 import KItemModels

          app = QtWidgets.QApplication(sys.argv)

          stringListModel = QtCore.QStringListModel(
            ["Monday", "Tuesday", "Wednesday",
            "Thursday", "Friday", "Saturday", "Sunday"]);

          selectionProxy = KItemModels.KSelectionProxyModel()
          selectionProxy.setSourceModel(stringListModel)

          w = QtWidgets.QWidget()
          l = QtWidgets.QHBoxLayout(w)

          stringsView = QtWidgets.QTreeView()
          stringsView.setModel(stringListModel)
          stringsView.setSelectionMode(
            QtWidgets.QTreeView.ExtendedSelection)
          l.addWidget(stringsView)

          selectionProxy.setSelectionModel(
            stringsView.selectionModel())

          selectionView = QtWidgets.QTreeView()
          selectionView.setModel(selectionProxy)
          l.addWidget(selectionView)

          w.show()

          app.exec_()

        and it just works with python 2 and 3.

        Other libraries’ headers are more complex than KItemModels, so they have an extra rules file to maintain. The rules file is central to the design of this system in that it defines what to do when visiting each declaration in a C++ header file. It contains several small databases for handling declarations of containers, typedefs, methods and parameters, each of which may require special handling. The rules file for KCoreAddons is here.

        The rules file contains entries to discard some method which can’t be called from python (in the case of heavily templated code for example) or it might replace the default implementation of the binding code with something else, in order to implement memory management correctly or for better integration with python built-in types.

        Testing Automatically Generated Python Bindings

        Each of the KDE Frameworks I’ve so far added bindings for gets a simple test file to verify that the binding can be loaded in the python interpreter (2 and 3). The TODO application in the screenshot is in the umbrella repo.

        The binding generator itself also has tests to ensure that changes to it do not break generation for any framework. Actually extracting the important information using the cindex API is quite difficult and encounters many edge cases, like QStringLiteral (actually includes a lambda) in a parameter initializer.

        Help Testing Automatically Generated Python Bindings

        There is a call to action for anyone who wishes to help on the kde-bindings mailing list!


        Screenshot_20160518_160431

        Come over to #kubuntu-devel on freenode IRC, if you care to test from backports-landing.


        Older blog entries


        Planet KDE is made from the blogs of KDE's contributors. The opinions it contains are those of the contributor. This site is powered by Rawdog and Rawdog RSS. Feed readers can read Planet KDE with RSS, FOAF or OPML.