Blog « VCreate Logic Blog
 
Home
 
 

GCF 2.3 Released

Post: Blog — Posted by: prashanthudupa @ 1:28 pm

After a bit of a delay, today we announce the release of GCF 2.3. You can download the latest version of GCF from our website. The main new feature in this release is the GCF - Qt Creator integration. With this plugin developers can now use Qt Creator to ease their GCF application development. In addition to this main new feature the latest version comes with several bug-fixes and minor feature additions. Read the change log to find what all has changed in GCF 2.3.0.

In addition to the technical changes, from this version of GCF commercial users can buy licenses of GCF from VCreate Logic and from our official reseller, KDAB.

We hope you like this release.

 

Project/File/Class wizards…

Post: Blog — Posted by: prashanthudupa @ 5:24 pm

Qt Creator comes built in with a set of project/class/file wizards. These wizards are great to get started with, but I always wished if there were an easy way to add support for more project/file/class wizards. In our projects we frequently write models, delegates and widgets. And the skeleton (or starting point) for most classes look the same. So if there was an easy way to quickly create skeleton for a model/delegate/widget class it would be very useful. With this in mind, I started working on the HintBasedWizard plugin for Qt Creator. You can download the source code by checking out the code from the following SVN location

SVN Location: https://svn2.hosted-projects.com/vcreatelogic/VCLTools/QtCPlugins
Username: anonymous
Password: anonymous

Right now we only have support for class wizards based on hints. The hints are provided in three files

  • Header hint
  • Source hint
  • Description hint

The header-hint for item-model class looks like this (and is saved in a file called ItemModelHeader)

#ifndef {{UPPER_CLASS_NAME}}_H
#define {{UPPER_CLASS_NAME}}_H

#include 

struct {{CLASS_NAME}}Data;
class {{CLASS_NAME}} : public QAbstractItemModel
{
    Q_OBJECT

public:
    {{CLASS_NAME}}(QObject* parent=0);
    ~{{CLASS_NAME}}();

    int rowCount(const QModelIndex& parent=QModelIndex()) const;
    int columnCount(const QModelIndex& parent=QModelIndex()) const;
    QVariant data(const QModelIndex& index, int role=Qt::DisplayRole) const;
    QModelIndex index(int row, int column, const QModelIndex& parent=QModelIndex()) const;
    QModelIndex parent(const QModelIndex& index) const;

private:
    {{CLASS_NAME}}Data* d;
};

#endif // {{UPPER_CLASS_NAME}}_H

The source-hint for the same looks like this (and is stored in a file called ItemModelSource)

#include "{{H_FILE_NAME}}"

struct {{CLASS_NAME}}Data
{

};

{{CLASS_NAME}}::{{CLASS_NAME}}(QObject* parent)
:QAbstractItemModel(parent)
{
    d = new {{CLASS_NAME}}Data;
}

{{CLASS_NAME}}::~{{CLASS_NAME}}()
{
    delete d;
}

int {{CLASS_NAME}}::rowCount(const QModelIndex& parent) const
{
    Q_UNUSED(parent);

    return 0;
}

int {{CLASS_NAME}}::columnCount(const QModelIndex& parent) const
{
    Q_UNUSED(parent);

    return 0;
}

QVariant {{CLASS_NAME}}::data(const QModelIndex& index, int role) const
{
    Q_UNUSED(index);
    Q_UNUSED(role);

    return QVariant();
}

QModelIndex {{CLASS_NAME}}::index(int row, int column, const QModelIndex& parent) const
{
    Q_UNUSED(row);
    Q_UNUSED(column);
    Q_UNUSED(parent);

    return QModelIndex();
}

QModelIndex {{CLASS_NAME}}::parent(const QModelIndex& index) const
{
    Q_UNUSED(index);

    return QModelIndex();
}

The description-hint, which is an XML file, for the same looks like this (and is stored in a file called ItemModelClassHint.xml)

<hint>

    <!-- Meta information about the hints -->
    <title>QAbstractItemModel class</title>
    <type>class</type>
    <name>Model class</name>
    <category>Qt Classes</category>
    <description>Generates a QAbstractItemModel implementation</description>
    <icon></icon>

    <!-- actual hints file -->
    <header>ItemModelHeader</header>
    <implementation>ItemModelSource</implementation>

    <!-- hint fields to ask -->
    <field name="CLASS_NAME" label="Class name">ItemModel</field>

</hint>

I store these files in a folder and launch Qt Creator (with the HintBasedWizard plugin compiled/installed ofcourse). Go to Tools -> Options -> Hints Configuration page and add the newly created hint-description file (ItemModelClassHint.xml) by clicking on the “Add Class Hint” button.

Click on Ok. Now start a new project and try adding a new class using the “File-> New” class wizard.

Select the “QAbstractItemModel class” class under Qt Classes and click “Ok”. In the wizard that shows up next, enter appropriate values.

Notice how default values are picked up from the text for <field name=”CLASS_NAME”> xml element in ItemModelClassHint.xml file. Click on Next and notice how the class gets generated for you within your project.

I can now create as many class-hints as I want and increase my productivity in programming. The HintBasedWizard plugin comes with class-wizards for the following class types

  • QAbstractItemModel
  • QWidget
  • QAbstractItemDelegate and
  • QGraphicsItem

We plan to add more class-hints in the coming days and also provide support for hint based project and file wizards.

 

Expand Declarations in Qt Creator

Post: Blog — Posted by: prashanthudupa @ 5:08 pm

One of the things I dont particularly enjoy is to transfer functions from .h (declaration) to .cpp (implementation), specifying the class scope and then creating open and close brackets. The whole process consumes time and I always thought that it can be automated quite easily in Qt Creator. Just wrote a plugin for Qt Creator that makes it possible.

Consider the following class definition below.

Select the function declarations from constructor all the way down to setCurrentColor(). Copy the code snippet using Ctrl+C. Now in the .cpp file for this class as shown below

With the ExpandDeclarations plugin installed, we can now hit the key-combination Ctrl+Shift+V, to get this dialog box

to get this

This one really saves time, I tell you.

You can grab a copy of the plugin from here: https://svn2.hosted-projects.com/vcreatelogic/VCLTools/QtCPlugins/. Username and password for read-only access is anonymous/anonymous. In the same location you can also find a plugin that provides a project wizard called “Qt Creator Plugin” that automatically generates a Qt Creator Plugin skeleton project for you.

You can now select File -> New project and select the “Qt Creator Plugin” project.

Answer some simple questions

And have a fully functional empty plugin project automatically generated :-).

These plugins are given away under LGPL. So you can use them for any purpose you see fit.

 

Happy New Year 2010

Post: Blog — Posted by: prashanthudupa @ 4:22 pm

From all of us here at VCreate Logic, wish you a very happy new year 2010. The current year (2009) has been fantastic for us. Good lot of license sales and new consulting business. We have lost some colleagues and gained new ones. All in all the year was a fun and learning experience.

On the downside, we would like to announce that we are postponing the release of the next version of GCF and VTK Designer by 1.5 months. Sincere apologies to everyone following our development. The last 2 months have been over-hectic, with too many projects nearing completion.

On the up-side, over the last few months a couple of interesting things have begun to happen. We have now become aware of atleast 2 open-source projects that are creating a customized version of VTK Designer. Yay!!! We hope that by mid 2010, those products will be ready for release. We are going to start on 2 new projects from January. Our schedule for the next 5 months is filled :-)

Thanks to all users of our open-source products, commercial license holders and customers. Your presence has kept us motivated and pushed us this far. Keep them coming, we are preparing to up the ante.

Once again, wish you a happy new year 2010.

 

VTK Designer has better DICOM imaging support

Post: Blog — Posted by: prashanthudupa @ 3:14 pm

We have been working on improving medical imaging support in VTK Designer for quite sometime. However, due to heavy workload in other products and projects; this one took a back seat. Up-until now users could select DICOM image set and do a surface render.

But now; over and above this we also support something called “Axial, Coronal and Sagittal plane views”. When DICOM images are loaded in this view, you will get…

The DICOM data-file loader in VTK Designer automatically creates the required pipeline, script and configuration form; and embeds it into the right panel. In that form users can view details about the patient and also extract different axial, coronal and sagittal planes by dragging the sliderbars and clicking “Refresh”.

We are also working on supporting volume rendering of medical images in VTK Designer.

 

GUIXML Editor in Qt Creator

Post: Blog — Posted by: prashanthudupa @ 7:03 pm

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

Post: Blog — Tags: , , , — Posted by: prashanthudupa @ 6:15 pm

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 about it as we make progress.

 

VTK Designer + Code Generator

Post: Blog — Posted by: prashanthudupa @ 10:39 am

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.

 

Document on Writing plugins for Qt Creator

Post: Blog — Posted by: jayakrishnan @ 1:33 pm

The next version (2.3) of GCF should (ideally) have a plugin for Qt Creator that will make creation and maintenance of GCF applications with Qt Creator easy. We started our progress towards that end by studying Qt Creator and understanding how plugins for it can be written. The result of that effort is a small document that explains a Qt Creator newbie how to write plugins. The document is a work in progress, but I am sure that it will be a useful starting point for Qt Creator plugin developers. Have a look at if for yourself, we would love to hear feedback from you.

URL: http://www.vcreatelogic.com/resources/downloads/. Click on the “Other Downloads” tab.

5th September Update: Added a chapter on providing editors for new file types in Qt Creator

11th September Update: Added a section (2.6) on building plugins located outside Qt Creator source. [Thanks to Eike Ziller for helping with this one]

 

GCF 2.2 Released

Post: Blog, News And Events — Posted by: kiran @ 2:59 pm

Date: 27th July 2009. Place: Bangalore

VCreate Logic announces the release of GCF 2.2.0, in tune with the roadmap announced early in the year. Version 2.2 has been under active design and development since December 2008. Listed below are some of the key changes

Key Highlights

  • Software Updater Framework - GCF now includes a software updater framework that can be activated to have your applications automatically download and install updates. GCF provides tools for you to create updates that you can host on a server site of your choice and have your applications download and install them!
  • Logger Module - GCF now provides a logger module that helps log messages from your programs.
  • CreateAppTemplateWizard replaces the old CreateAppTemplate tool. The new application generation wizard generates better code and helps configure more aspects of your application.

New Classes and Methods

  • GCF::AbstractFileDownloader and subclasses help in downloading files from local, http and ftp servers with ease.
  • GCF::ObjectIterator - This class helps in iterating through all exposed objects in a GCF application.
  • GCF::findObject<>() and GCF::findObjects<>() - These methods now make it easy to look for objects in GCF. Moreover developers can now search for objects from any class, not just from subclasses of GCF::AbstractComponent
  • GCF::connect() and GCF::disconnect() help make it easy for developers to make signal/slot connections between local and remote objects.

The above are in addition to the extended documentation and bug fixes. For a complete log of changes please read the changelog.

How to get the new version?

Just visit http://www.vcreatelogic.com/products/gcf/ and click on “Download GCF 2.2″. Once you download the ZIP file, unpack it and read the CompileHOWTO.txt file to figure out how to compile GCF on your system.

  • The cross-referenced documentation are available within doc/html.
  • You can add doc/help/GCFHelp.qch into Qt Assistant and refer to the documentation within assistant.
  • You can also read the new and updated manual contained within doc/Manual. 
 
Older Posts »