Results 1 to 7 of 7

Thread: mapping manager

  1. #1
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default mapping manager

    Hi,
    I want to develop an application which is sth. like a mapping manager.
    I have two different lists of names and i shall be able to map them some how. One to many mapping is also feasible. (selecting many form the first list and many from the next list or one by one)

    I did not see any gui app. like this before.

    If there is any idea how it should look like then it would be of great help to me.

    Please provide me any links of any other tools which already have it and if any code snippets are there it would be of great help

    regards,
    sree

  2. #2
    Join Date
    Jan 2006
    Location
    Skopje, Macedonia
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: mapping manager

    Hi,

    Try Using QPair http://doc.trolltech.com/4.2/qpair.html

    You can use this class to connect two values of the lists.
    Iterate trough the frist list and the second and create another list
    of QPairs (from the selected names) that will connect the values.
    If you have a gui (lets say two list widgets) you'll just
    have to go trough the lists, see whats selected and
    create the list.
    This way you'll get linear structure which is easy to handle.

    Another way using QPairs is to create a list where
    the frist element is the name/index of the element of the
    first list and second element will be a list of names/indexes
    of the elements from the second list that are connected
    to that element from the first list.


    GREETZ, chombium

  3. The following user says thank you to chombium for this useful post:

    sreedhar (14th February 2007)

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

    Default Re: mapping manager

    The situation seems perfect for using a relation - either through a relational database or simply having two data structures, one holding a list of "mappings" and the other holding a list of names together with a list of indices from the other data structure. You can then use a QListView or QTreeView (or their convinience class counterparts) to display this relation.

  5. The following user says thank you to wysota for this useful post:

    sreedhar (14th February 2007)

  6. #4
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: mapping manager

    thanks for the reply.

    I want to know how the look and feel.
    How the mapping widgets should look like.
    Two list etc. and the third list with the completed mappings etc. where i can delete mapping and the items are added back to the original lists.

    How can i state with multiple selection in the two lists that this should be mapped to the other item in the second list. i.e. i want to support selection of multiple items from the first list and second list and state the pairs among them

    regards

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

    Default Re: mapping manager

    In my opinion you don't really need a third list. You can have two lists - one with "base" items and the other with all related items. Items in the second list may be checked or unchecked depending on whether an item from the first list contains a particular relation or not.

  8. The following user says thank you to wysota for this useful post:

    sreedhar (15th February 2007)

  9. #6
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: mapping manager

    Initially there is no predefined mapping between the lists.

    The user can map any element from the first list to any element in the second list.

    The user must be able to define the mapping, and be able to delete the mapping he already specified.

    If somebody saw such type of gui can you please provide me an idea how it should look like,
    code snippets will be helpfull, or any web links might also be helpfull

    regards,
    sreedhar

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

    Default Re: mapping manager

    I would do it like in the attached example.
    Attached Files Attached Files

  11. The following user says thank you to wysota for this useful post:

    sreedhar (17th February 2007)

Similar Threads

  1. object-relational mapping support?
    By brcain in forum Qt Programming
    Replies: 18
    Last Post: 28th January 2016, 11:42
  2. [itemView] QHeaderView lose mapping at column insertion
    By lauranger in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2006, 18:18
  3. Cannot attach region manager
    By bhm in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2006, 12:31
  4. Replies: 4
    Last Post: 29th March 2006, 23:44
  5. writing a layout manager
    By jayw710 in forum Qt Programming
    Replies: 2
    Last Post: 15th February 2006, 23:53

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.