GCF Version 2.4 Released

GCF (Generic Component Framework), based on Qt, allows developers to compose applications as a collection of components. GCF offers a ready made application architecture

  • to manage loading, initialization and unloading of components,
  • to configure components using XML files,
  • to merge GUI offered by different components into a single application container widget,
  • to have components easily discover functionality offered by other components,
  • to automatically download and install component updates from one or more update servers,
  • to communicate with components on other applications within and outside the host computer (IPC),
  • to create signal/slot connections between objects residing in different processes (IPC)
  • to load KParts and ActiveX components with ease

On November 24, 2010, we at VCL announced the availability of GCF Version 2.4.

The main new feature in this version is the “GCF Application Server” tool. Using this tool developers can now create and host GCF components for access from a web-application. This means that you can now create web-services using Qt/GCF and write AJAX style web applications to call on methods exposed by objects in your GCF components. Visit http://www.vcreatelogic.com/docs/gcf-2.4.0/html/gcfappserver.html to know more!

In addition to the above key new feature, the latest version of GCF

  • works with Qt 4.6 and Qt 4.7 (infact the minimum requirement is 4.6)
  • has an updated plugin to help to create GCF applications using Qt Creator 2.0.1. Pre-compiled binaries (Windows and Linux) for Qt Creator 2.0.1 available.
  • enables IPC over HTTP protocol

Download the latest release of GCF by visiting http://www.vcreatelogic.com/resources/downloads/.

FOSSCamp 2010 (An LCC Event in SJCE Mysore)

LCC (or Linux Campus Club) is an organization that was started in 2004 under the department of Computer Science SJCE Mysore India, with a primary goal of fostering the use of free open source software among the students. For the last three years they have been hosting an annual event called FOSSCamp to accelerate the awareness of Open-Source philosophy, tools and systems. This year they had invited me over to be chief guest at their FOSSCamp 2010 event (29th October to 31st October).

The inaugural event was a crowd puller. About 150 people attended the event, most of them students of engineering ofcourse. From the CS HOD’s talk I gathered that LCC has over 200 registered members. I find that pretty impressive. As a technical education institution it is inspiring to note that over the past few years, they have moved all their computer systems completely to FOSS.

On Saturday (30th of October), I gave a 2 hour workshop of sorts on Qt. About 130 students attended the talk. It was surprising for me to see so much of interest in Qt! A few of the students had already explored Qt. Almost everyone had heard about Qt; but there were some misconceptions about it. I spent my 2 hours clearing those misconceptions and showcasing for them what’s possible with Qt.

In all it was a wonderful experience for me. I enjoyed talking to that crowd. I would surely love to go back and see them again!

Internet Explorer 9

I downloaded “Internet Explorer 9 Beta” a couple of weeks ago. I have been consistently using it since then. I must say that the experience so far has been awesome! Browsing is smoother – Windows 7 Integration is nice! – It is much much much much faster than IE8 – It renders most of the websites that I visit quite well.

But programming the browser (using JS) is not quite the same as Chrome or Firefox. But there are easy workarounds, so I dont have too many complaints there. All in all; its very inspiring to see a super-rock-solid browser coming out of Microsoft. I strongly recommend folks to try it out. Its worth it!

Equated Monthly Installments

About two weeks ago we bought a 40×60 site in Shimoga, right next to my father in law’s plot. The site is in a good location. We hope to construct our house in there in about 10 years time and move there in about 15 years time. One of the top thoughts in my wife’s and my head for the last 1.5 months has been “EMI!!!”. We go out for taking a loan and land up computing what would be the EMI we would be paying on a monthly basis. It is about that time I really figured out the math behind EMI computations. For my benefit and for the benefit of those looking to take loans, here is a calculator that helps you with EMI computations.

Please enter the following three fields marked in *

Principal (*) :
Yearly Rate of Interest (*) :
Number of Months (*) :
EMI :
Click calculate to view EMI
Extra amount paid:

Click calculate to view

One final word of advise: Take a look at the Extra amount paid field before finalizing on your decision to take loan.

Why is work = giving-presentations?

Have you noticed that almost any ad/movie about a guy or gal doing work has something to do with giving-presentations? And usually the presentation has a chart (line-graph going up or bar chart growing taller) and then everybody in the room listening to the presentation is wearing full 3 piece suit and shining glasses. Each one of these people have a few sheets of papers in front of them. They all have ball-pens; and they are thinking.. After sometime for no reason they all clap and the dude/gal giving the presentation is super-surprised about the adulation.

I know that I work. I know that I work rather good. But I don’t give presentations every single day to a room full of people in suits. Perhaps I am not doing any worthwhile work at all! Because the ads sell stuff to “working people” giving presentations and I don’t. Perhaps they are targeting only the movie characters that do give presentations all the time at work.

Using vtkRenderWindow with QGraphicsView

We are about to begin on a project that requires us to have floating and transparent widgets over VTK render-window output. About a year back, we had wanted to provide something similar to VTK Designer 2. We wanted users to have the ability to load UI (created using Qt Designer) directly on the VTK output window. At that time (you can follow the thread here) we were unable to come up with something satisfactory.

With the recent changes in Qt, it is now possible for us to have vtkRenderWindow within QGraphicsView. Infact we can now have vtkRenderWindow paint on to a QGLWidget viewport of QGraphicsView. Thats exactly what the vtkQtGraphicsViewRenderWindow class allows us to do.

The class is defined as follows

#ifdef Q_WS_WIN
    #include "vtkWin32OpenGLRenderWindow.h"
    typedef vtkWin32OpenGLRenderWindow vtkRenderWindowClass;
#endif

#ifdef Q_WS_X11
    #include "vtkXOpenGLRenderWindow.h"
    typedef vtkXOpenGLRenderWindow vtkRenderWindowClass;
#endif

class vtkQtGraphicsViewRenderWindow : public QGraphicsView,
                                      public vtkRenderWindowClass
{
    Q_OBJECT

public:
    vtkQtGraphicsViewRenderWindow(QWidget* parent = 0);
    ~vtkQtGraphicsViewRenderWindow();
    ....
};

Since vtkQtGraphicsViewRenderWindow is a subclass of both QGraphicsView and vtkRenderWindow,
– we can add any QGraphicsItem to its scene.
– we can use it as a drop-in replacement for vtkRenderWindow.

For example, take a look at the code below.

vtkRenderer* CreateVTKPipeline()
{
    vtkRenderer* renderer = vtkRenderer::New();

    // Omitted code that create a fractal terrain scene.

    return renderer;
}

int main(int argc, char** argv)
{
    QApplication a(argc, argv);

    vtkRenderer* renderer = CreateVTKPipeline();

    vtkQtGraphicsViewRenderWindow gView;
    gView.AddRenderer( renderer );
    gView.resize(800, 600);
    gView.show();

    QCalendarWidget* calendar = new QCalendarWidget;
    calendar->setWindowOpacity(0.7);

    QGraphicsProxyWidget* sceneWidget = new QGraphicsProxyWidget(0, Qt::Dialog);
    sceneWidget->setWidget(calendar);
    sceneWidget->setPos( -sceneWidget->boundingRect().topLeft() );
    sceneWidget->setFlag(QGraphicsItem::ItemIsMovable);
    sceneWidget->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
    sceneWidget->setWindowTitle("Calendar Widget");

    QGraphicsScene* scene = gView.scene();
    scene->addItem(sceneWidget);

    return a.exec();
}

Output of the above program becomes:

vtkQtGraphicsViewRenderWindow
vtkQtGraphicsViewRenderWindow

Whats cooler about the above program is that we can move and resize the translucent QCalendarWidget – and have the background VTK scene updated!

You can checkout a copy of the class and test program from here:
https://svn2.hosted-projects.com/vcreatelogic/VCLTools/vtkQtGraphicsViewRenderWindow
Username: anonymous
Password: anonymous

[Original Post from Abhishek Patil here: http://www.vcreatelogic.com/p/2010/06/using-vtkrenderwindow-with-qgraphicsview/]

We are about to begin on a project that requires us to have floating and transparent widgets over VTK render-window output. About a year  back, we had wanted to provide something similar to VTK Designer 2.  We wanted users to have the ability to load UI (created using Qt Designer) directly on the VTK output window. At that time (<a href=”http://www.vtk.org/pipermail/vtkusers/2008-October/097685.html”>you can follow the thread here</a>) we were unable to come up with something satisfactory.

With the recent changes in Qt, it is now possible for us to have vtkRenderWindow within QGraphicsView. Infact we can now have vtkRenderWindow paint on to a QGLWidget viewport of QGraphicsView. Thats exactly what the  vtkQtGraphicsViewRenderWindow class allows us to do.

The class is defined as follows
<pre>#ifdef Q_WS_WIN
#include “vtkWin32OpenGLRenderWindow.h”
typedef vtkWin32OpenGLRenderWindow vtkRenderWindowClass;
#endif

#ifdef Q_WS_X11
#include “vtkXOpenGLRenderWindow.h”
typedef vtkXOpenGLRenderWindow vtkRenderWindowClass;
#endif

class vtkQtGraphicsViewRenderWindow : public QGraphicsView,
public vtkRenderWindowClass
{
Q_OBJECT

public:
vtkQtGraphicsViewRenderWindow(QWidget* parent = 0);
~vtkQtGraphicsViewRenderWindow();
….
};</pre>
Since vtkQtGraphicsViewRenderWindow is a subclass of both QGraphicsView and vtkRenderWindow,
– we can add any QGraphicsItem to its scene.
– we can use it as a drop-in replacement for vtkRenderWindow.

For example, take a look at the code below.
<pre>vtkRenderer* CreateVTKPipeline()
{
vtkRenderer* renderer = vtkRenderer::New();

// Omitted code that create a fractal terrain scene.

return renderer;
}

int main(int argc, char** argv)
{
QApplication a(argc, argv);

vtkRenderer* renderer = CreateVTKPipeline();

vtkQtGraphicsViewRenderWindow gView;
gView.AddRenderer( renderer );
gView.resize(800, 600);
gView.show();

QCalendarWidget* calendar = new QCalendarWidget;
calendar-&gt;setWindowOpacity(0.7);

QGraphicsProxyWidget* sceneWidget = new QGraphicsProxyWidget(0, Qt::Dialog);
sceneWidget-&gt;setWidget(calendar);
sceneWidget-&gt;setPos( -sceneWidget-&gt;boundingRect().topLeft() );
sceneWidget-&gt;setFlag(QGraphicsItem::ItemIsMovable);
sceneWidget-&gt;setCacheMode(QGraphicsItem::DeviceCoordinateCache);
sceneWidget-&gt;setWindowTitle(“Calendar Widget”);

QGraphicsScene* scene = gView.scene();
scene-&gt;addItem(sceneWidget);

return a.exec();
}</pre>
Output of the above program becomes:

<img class=”  ” style=”margin-top: 5px; margin-bottom: 5px;” src=”http://www.vcreatelogic.com/forblog/abhishekpatil/vtkQtGraphicsViewRenderWindow.png” alt=”vtkQtGraphicsViewRenderWindow” width=”412″ height=”324″ />
vtkQtGraphicsViewRenderWindow

Whats cooler about the above program is that we can move and resize the translucent <code>QCalendarWidget</code> – and have the background VTK scene updated!

You can checkout a copy of the class and test program from here:
<a href=”https://svn2.hosted-projects.com/vcreatelogic/VCLTools/vtkQtGraphicsViewRenderWindow”>https://svn2.hosted-projects.com/vcreatelogic/VCLTools/vtkQtGraphicsViewRenderWindow</a>
Username: anonymous
Password: anonymous

Moving to CMake

Over the past few weeks we have been playing around with CMake and we figured that it would be a good idea to have GCF build-able using CMake. There are a few open-source projects that make use of GCF with CMake anyway; we figured it would be a good idea to have a CMake build-system GCF supported officially.

We have begun the process of making GCF build-able with CMake. Currently we are able to build the GCF library and all its built-in components. We are slowly moving examples and tools also into it. The idea is to have GCF compilable using both QMake and CMake for as long as possible. In the coming months we should also have the GCF-QtCreator plugin and CreateAppTemplateWizard supporting CMake based GCF projects.

Once all this is done, we will then be moving VTK Designer 2 away from QMake build system and totally into a CMake based one. This move coupled with the use of CPack should help us in fast generation of VTK Designer 2 installers.

Possibility of IT Returns!

For the very first time in my life work-life have I noticed someone in my circle actually getting IT returns. I am infact supposed to get some money back from the IT department myself, however I had (until-now) given up hope on actually receiving the returns. Even after repeated follow-ups, I have until now never received returns. I have come to understand one rule about our IT department – “If I dont pay taxes on time, I will get punished. But if the IT department doesnt return on time, there is no penalty for them.” Actually going by the rule book they are supposed to pay 18% interest, but that happens only if they ever pay. How can a 18% interest be paid on nothing????

Anyways, atleast now I know of an actual person at work my office who has received IT returns. So congratulations to him.