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. Ideas on Implementing mouse press/move /release (theoretical question)
Forum Updated to NodeBB v4.3 + New Features

Ideas on Implementing mouse press/move /release (theoretical question)

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 1.8k 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.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    Hi,
    I am working with a projector device that communicates with my Qt application and sends me the coordinates of the touched points on the screen and I an getting those points from the projector driver installed on our test machine.

    The problem I have is that I am only getting coordinate information and nothing more: something like:
    @

    (868,544)
    (880,511)
    (878,511)
    (872,510)
    (867,510)
    (861,509)
    (856,507)
    (851,504)
    (844,500)
    (837,494)
    (830,487)
    (826,482)
    (821,477)
    ........................

    @

    and I need some kind of mechanism , similar to press/move /release of the mouse to know when to start and end the drawing.(I am working on a pen drawing application). I have thought of using some timers and set up some rules but this kind of limits the user.

    Any Ideas on how one can implement this.I realize this is not a Qt problem but I could use some help.Any input will be appreciated.
    Thanks.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Perhaps you can leverage Qt 5's QPA (Qt Platform Abstraction) interfaces? It provides an interface for input methods as well.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NicuPopescu
        wrote on last edited by
        #3

        could you tell what projector, or something similar? are you sure the state changes of "one point" with/without coordinates info is not registered and can be get via driver? Actually I wonder what does a "touched point" means for your device?

        1 Reply Last reply
        0
        • musimbateM Offline
          musimbateM Offline
          musimbate
          wrote on last edited by
          #4

          Thank you all for the replies:
          @Andre: QPA looks promissing but not applicable to the current state of the project.
          @NicuPopescu:Our project is a whiteboard system.Users use an IR pen to write on the screen and I get coordinates of the touched points(Hope this makes ''touched points clear").I think the projector system should have a way to give this informantion and their company just gave us a simple API that generates points as you move the pen(just like mouse move event) and nothing else.Still looking for a possible way around this.

          Thanks again for your replies.

          Why join the navy if you can be a pirate?-Steve Jobs

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vaquita Tim
            wrote on last edited by
            #5

            Yes, as you say, you only really have information which could interpret as mouse move events.

            And yes, really you should get some more data from the company's sdk...

            Still, if I understand correctly, the points only come when the pen is touching. And, when the pen is not touching, you get no data. And when the pen is moving round touched to the board, I imagine you get data at a fairly fixed rate. In which case I think the "timer" option you mention sounds reasonable. Just wrap each series of points with a mouse down and a mouse up, and have the mouse move values in between (with the left button down flag set).

            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