Меnu:


Our main product the Sales and Inventory System is coded in wxwidgets, QT is the alternative to wxwidgets for cross-platform development, when we decided for wxwidgets, QT still belonged to the company Trolltech, this factor decided our inclination to wxwidgets. However, recently, we have seen the need to port the OneHandMenu (was coded in Gtk for the Nokia N900) to QT for the Nokia N9 which uses Meego as Operative System. With this on our mind, we are taking the opportunity to port the timelineApp to QT before porting the OneHandMenuApp to QT.

With how many binaries of the timelineApp we count

1. wxwidgets
2. Gtk
3. commonQT
4. QT

As you noticed, just by reading and comparing our blogpost about the timelineApp, we can see different implementations in different programming languages with different libraries for the same functionality. Probably By now We have complete series about the TimelineApp.

Implementation details

Qt as a GUI toolkit for the timelineApp, does not use a dynamic dialog as It is the case for the commonQT implementation, on this case, the dialog uses the UI file 'timelinedetaildialog.ui', created using the tool designer of QT.

The files with ui extension, are within the folder UI. The sources are inside the src folder. As you can see in the listing below.

├── CMakeLists.txt
├── src
│   ├── main.cpp
│   ├── timelinedetaildialog.cpp
│   ├── timelinedetaildialog.h
│   ├── timelineframe.cpp
│   └── timelineframe.h
├── timelines.sqlite3
└── ui
    ├── timelinedetaildialog.ui
    └── timelineframe.ui

By the way the version of QT that we are using is version 5. The timelineApp commonQT version was coded with QT version 4.

Some notes about the code

Detailing some files, it will be a short explanation.

1. main.c, the entry point of the timelineApp QT version, it shows the Frame or main Form.
2. timelineframe.ui output of the QT designer tool.
3. timelineframe.h, this class inherits from the UI file.
4. timelineframe.cpp implements the methods for displaying the data, among other features.
5. timelinedetaildialog.cpp, simple dialog, methods just for loading the data.
6. CMakeLists.txt, It is for compiling the project.
7. timelines.sqlite3, It is the database, there is a build script in the readme file for its creation.

Comments about the UI

We are using the direct approach when integrating the UI file to the project.

It should be noted that It was necessary to add in the XML file the property 'objectName' within the widget tag (compared with the XML file used in the commonQT implementation). So it could be used in QT5, besides that, we have changed the name of some of the objects with respect to timeline-commonQTApp. If You (the reader) make a difference between the 'timelineframe.ui' and the 'timeline_main_form_widget.ui' You will be able to see the changes being described.

Download code and compile


https://disk.yandex.com/d/CkkJxeFKLOIddg

Viewing images of the timeline-QT App

The images of the timelineAppQt are practically the same as the ones from the timelineAppCommonQT, see the images at the link.

Conclusion

This development has been quite interesting, it allowed us to update and improve our previous blogpost about the timeline-commonQTApp, which by the way, as we have compared them. It offers us the same functionality as the QT version.

There is a new common lisp library 'commonqt5', it might be interesting to try it out, it seems that version got rid of the smoke library dependency.

To be able to port the oneHandMenu from GTK to QT, we need to first configure a virtual machine that allows us to compile the code. In the future we hope to be able to have the virtual machine and to adapt the oneHandMenu to QT, that will allow us to use the oneHandMenu-QT in the phone Nokia N9.

Last change: 03.12.2023 15:28

blog comments powered by Disqus