GUIXML Editor in Qt Creator

When you open a GCF project in Qt Creator, you will notice that the project tree on the left hand side also shows GUIXML files against each component and the global ComponentLoaderComponent.xml (CLC for short) file. The CLC file describes the order of loading of components. Each component’s GUIXML file describes the GUI of the component.

When you double click on any of the GUIXML files, you will get a fancy XML editor that color codes the whole file. Known elements and attributes are marked in bold face; while unknown ones are color coded but in italics. The custom XML editor works only for GCF’s GUIXML files, Qt Creator will default to a simple QPlainTextEdit for other kinds of XML files. We have also implemented find support for the GUIXML editor; that way users can just hit “Ctrl+F” and search for text using the familiar “find text bar” along the bottom edge of the window.

[ Chapter 5 of the document on Writing Qt Creator Plugins was very useful for implementing this feature. Thanks to my colleague Vasudha for researching on this one]

GCF – Qt Creator Integration

Over the past few weeks we have been researching on Qt Creator, its architecture and plugin model. In a previous blog my colleague JK has written about a document that we wrote on Qt Creator plugins. This week (ie yesterday) we started working on a plugin for Qt Creator called GCFSupport. The idea behind the plugin is to make GCF programming in Qt Creator really really really simple. The progress has been good so far..

You can now click on “File -> New” (Note: the GCFSupport plugin code is still not made available on the public SVN, but it will be very soon)

and notice that the “New..” project dialog box shows an option for creating a GCF application.

Upon selecting “GCF Application”, you will see the CreateAppTemplateWizard in Qt Creator.

……

After generating the code and clicking “Finish”, you will notice that Qt Creator loads the newly created GCF application project.

The GCFSupport plugin automatically detects whether an Qt 4 project is a GCF project or not. If yes, then it automatically inserts PROJECT_BASE and GCF_BASE variables into the QMake build step.

Because of this, the user will be able to build and run GCF applications directly from Qt Creator. The goals for the GCFSupport plugin goes beyond just creating and compiling GCF applications. Will blog more aboutit as we make progress.

VTK Designer + Code Generator

A feature that has been requested the most over the past few months is the code generator. I have personally received several emails from VTK Designer 2 users asking about the code generator that existed in the 1.x series but has magically disappeared in the 2.x series. Since then we invested some efforts in getting the code generator design right. All the wrong design choices in the first code generator (written for 1.x) were discarded and a new design was engineered from scratch.

Adithya, an Intern at our company, and I set out on this task. Over the past 2 months the code generator has taken good shape. The CodeGenerator is implemented as a whole new component (thanks very much to GCF). It hooks into exposed interfaces from the canvas and visualization network components of VTK Designer and uses hints provided by nodes and connections to automatically generate the code. We still dont have the whole thing ready, but the results are showing up.

 

There is still a lot of work left, which I am sure Adithya will complete by the time his internship gets over at VCL. Right now we are only concentrating on a simple VTK/C++ code generator; however we have plans to provide Python and a pure OpenGL code generator as well.