PDA

View Full Version : Qt Software acrchitecture sugestions.



luisf.rossi
29th May 2014, 19:33
Hello,

I am an professional embedded C programmer that needs to create an application for one of our devices.

I would need some sugestions on how to organize my software.

Let me explain how the software should behave. There are 3 main views or menus. One for configuring and extracting data of our devices. Another one to export data, and finally one to visualize data. Let call them Control View, Data View and Analysis View.

At Control View there is an table where you can select the device you are going to work with. The software should periadically poll the connected devices to check if they are alive and to request some basic information to populate that table. Wherever you select some device from the table, you can control and extract data from that device using some buttons.

At the Data View, the last extracted data can be exported to some .txt according to some selected configurations (spacers and so on).

And finally, at the Analysis View, several plots and statiscs are generated from the extracted data.

I would like some sugestions and examples on how to organize the software and the interaction of the GUI frontend with the software backend. When i talk about organization, i mean both in an architecture point of view and source files point of view.

Let me know if i need to give any extra information.

Thank you

luisf.rossi
30th May 2014, 14:12
After some study i notice that I am going to need to use single inheritance to better organize the logic of my code. One very simple question. Considering that my UI was created with QT Creator, how can I create a class for each page of my QStackedWidget? Any example?

Regards,

Luis

Infinity
30th May 2014, 14:44
Any example?
Have you already checked out the Config Dialog Example? In that example is a separate class for each page of the QStackedWidget created. Of course you can use a designer UI file if you don't want to write everything manually like it is done in the example.

anda_skoa
31st May 2014, 10:10
Considering that my UI was created with QT Creator, how can I create a class for each page of my QStackedWidget?

You have multiple options:


Create the whole widget (including all pages) in designer in one go
Create the main form (with the stacked widget) and the page widgets separately in designer and promote each page to the respective page widget
Similar to the second option but add the pages in code


Cheers,
_