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. Click on a line drawing graph and find element
Forum Updated to NodeBB v4.3 + New Features

Click on a line drawing graph and find element

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 423 Views 3 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by Andy314
    #1

    Hello,
    this is not really a Qt question but maybe in Qt has a integrated solution for this
    I have primitive line drawing graph. On it I see a car (strictly 5 graphs showing front, back, left, right, top side of a car).
    The use can click/touch on the graph and the software should detect what component (f.e. bumper, door, etc.) and which point on that component was clicked.

    I had never such a request before and dont know what is the standard solution for this task.

    My idea is to show the graph in a bitmap on the screen and define before ellipses or polygons matching objects shown in the graph. Develop an algorithm that find envelopping polygons for a click-point. (I remember barely on a determinate of a matrix).

    Is this the right way ? Has Qt - some tools for this task ?

    Thanks for help
    Andreas

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

      Hi,

      What technology are you using ? QGraphicsView ? Qt Quick ?

      On possible way is to have one item per clickable car piece and you assemble these items to become your car.

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

      Andy314A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What technology are you using ? QGraphicsView ? Qt Quick ?

        On possible way is to have one item per clickable car piece and you assemble these items to become your car.

        Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by
        #3

        Hi @SGaist

        The app ist widget-based. It is still open what technic, but I would prefer QGrapicsView.

        Do you mean I should put Objects in a GraphScene for every piece and "construct" the car, to draw it on screen and detect clicks. (Use no bitmap for the car but, digitize the given drawing.)

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

          Is it going to be 2D or 3D ?

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

          Andy314A 1 Reply Last reply
          0
          • SGaistS SGaist

            Is it going to be 2D or 3D ?

            Andy314A Offline
            Andy314A Offline
            Andy314
            wrote on last edited by
            #5

            @SGaist 2D

            1 Reply Last reply
            0
            • Andy314A Andy314

              Hi @SGaist

              The app ist widget-based. It is still open what technic, but I would prefer QGrapicsView.

              Do you mean I should put Objects in a GraphScene for every piece and "construct" the car, to draw it on screen and detect clicks. (Use no bitmap for the car but, digitize the given drawing.)

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by
              #6

              @Andy314 said in Click on a line drawing graph and find element:

              Do you mean I should put Objects in a GraphScene for every piece and "construct" the car, to draw it on screen and detect clicks. (Use no bitmap for the car but, digitize the given drawing.)

              Yes. You can create your car using different QGraphicItems (front / rear bumper... etc.) and put them together. Each click can be handled different to perform some actions.
              If you dont want to design your parts with Qt, you can also use images and assign them to your items.


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              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