Unsolved Need suggestions on dynamic UI data
I am designing a common GUI based on Qt Widgets that will cater to multiple applications of the same category. Basically, each application has almost similar functionality just differentiated by no. of parameters it has.
So, we have this Table/Tree Widget that lists all these parameters. These parameters are of type number, booleans, strings etc. so accordingly I have used Label, Checkbox, Spinbox widgets.
To have a common display application instead of multiple for each of the application, we designed an XML based on each application. This XML will contain information(basically the contents of table) to show in the GUI. It is somewhat of the format below:
<tab id="0"> <tablelayout class="2coltable"> <row> <item class="label"> ..... </item> <item class="checkbox"> ..... </item> </row> <row> <item class="label"> ..... </item> <item class="spinbox"> ..... </item> </row> .... .... <tablelayout> </tab>
I basically parse this XML and add the widgets accordingly on my layout.
For this project, I had also thought of having these parameters in a database DB file or even designing a separate Qt UI file for each application and use the UI loading functionality in Qt.
Now, I don't want to go into the design of this XML format. I would like to know what are common design methodologies that are used while designing a UI that shows dynamic data based on configuration or context. Where is the data that it wants to show dynamically is usually stored and in which format?
JonB last edited by JonB
I don't believe there is any such thing as a "common design methodology" for this area. Every app/development tool uses whatever it considers appropriate, sometimes proprietary.
Saving a design as XML and then using that to construct at runtime is used elsewhere (e.g. Visual Studio), and seems pretty good, IMHO.
BTW, one nice "extra" can put in easily in your XML is to use its "data declaration" syntax to impose "constraints" on the values. For example, you can specify minimum & maximum values for integer fields, or the list of valid selections for a combobox-list-type. I leverage that to make the GUI "better".
@JonB Ofcourse, each development tool will have its own method of UI creation. My intent was to know about how an app stores its dynamic UI related data to be shown in its UI. Like say a Internet Media Player, it gets the songs list based on some XML/JSON service; however its main interface remains the same.
And yes Jon, as you rightly pointed, XML seems good enough for me too. And I also intend to have XML schemas for this.
UI application will have almost 50-300 parameters in different categories based on target application. So, I needed this data to be configurable. However, this is a closed system on an embedded device. So, I am left with having only XML or a database file option for this.
SGaist Lifetime Qt Champion last edited by
What are these parameters ?
Can you explain what your application should be doing ?
@SGaist This is industrial application and fetching data from different Analog and Digital IOs like Temperature/Pressures plus you have setpoints(min, max, trip point, warning point associated with each of these IOs plus other application related setpoints.
The parameters are of type boolean, combobox, numeric and strings.