Results 1 to 2 of 2

Thread: Using Qt in an application with lots of parameters

  1. #1
    Join Date
    May 2007
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Using Qt in an application with lots of parameters

    Hi,

    I am working on a scientific application that has a lot (approx. 200) of different parameters. Each of these parameters has a type (double, int, choice list, etc.), a name, a list of dependencies, a unit (mm, velocity), etc.

    All these parameters can be organized in different groups. The number of parameters can also change depending of the user input, so I need to be able to add new parameters at runtime.

    Each time a parameter is changed (by the user, or by the application itself) it needs to notify it's dependent list to recalculate a bunch of stuff.

    I was wondering if any of you had work on such system and how you used Qt to help you in this task.

    I was maybe thinking of using QEvents for the notification part. (One thing that I'm not really sure, is that the parameters are organized like a graph and not like a tree... so there is a possibility of infinite loops when doing notifications).

    Do you think the Qt MVC would be of any help here? What would be the benefit of using Qt MVC in this kind of problem... Those of you using Qt MVC are using it to solve what kind of problems?

    I want to be able to access the values as directly as possible to perform all the calculations... For example, the QVariant type wouldn't really help me here.

    The system is quite large and I want to be sure to pick the right thing before going in a 6-8 months of development!

    Thanks,

    Marc

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using Qt in an application with lots of parameters

    You can use one of broadcasting algorithms. An easy solution would be to assign each notification an increasing unique number and transmit the notification to all ones dependencies. Then each module would check if its last handled notification is greater or equal the currently received one. If so, it would ignore it. Otherwise it would handle it, update its notification counter and submit the notification to all its deps. You would then make sure you handle each notification only once and that you handle them in increasing order (so you would never handle a notification older than the last handled one).

Similar Threads

  1. Replies: 8
    Last Post: 28th January 2015, 09:45
  2. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  3. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  4. Module to process application parameters
    By Opilki_Inside in forum General Programming
    Replies: 4
    Last Post: 8th February 2007, 23:26
  5. Application very heavy for lots object
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 29th April 2006, 17:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.