Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Need suggestions on dynamic UI data
Forum Updated to NodeBB v4.3 + New Features

Need suggestions on dynamic UI data

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 942 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blueshift
    wrote on last edited by
    #1

    Hi,

    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?

    JonBJ 1 Reply Last reply
    0
    • B blueshift

      Hi,

      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?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @blueshift
      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".

      B 1 Reply Last reply
      1
      • JonBJ JonB

        @blueshift
        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".

        B Offline
        B Offline
        blueshift
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          What are these parameters ?
          Can you explain what your application should be doing ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            What are these parameters ?
            Can you explain what your application should be doing ?

            B Offline
            B Offline
            blueshift
            wrote on last edited by
            #5

            @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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved