ddt 1.2.1
Loading...
Searching...
No Matches
Public Types | Public Attributes | List of all members
PointGrabber Class Reference

#include <ddtPointGrabber.hpp>

Inheritance diagram for PointGrabber:

Public Types

enum  { PG_MOUSE_RELEASED = 0 , PG_MOUSE_DOWN , PG_MOUSE_MOVING }
 

Public Attributes

qreal mouse_down_x = 0.0
 
qreal mouse_down_y = 0.0
 
 PointGrabber (QGraphicsItem *parent=nullptr, const int point_num=0)
 
int GetPointNumber () const
 
void SetMouseState (const int state)
 
int GetMouseState () const
 

Detailed Description

Class for point grabbing.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PG_MOUSE_RELEASED 
PG_MOUSE_DOWN 
PG_MOUSE_MOVING 

Constructor & Destructor Documentation

◆ PointGrabber()

PointGrabber::PointGrabber ( QGraphicsItem * parent = nullptr,
const int point_num = 0 )
explicit

Constructor

Parameters
parentPointer to the parent graphics item.
point_numberThe point number.

Member Function Documentation

◆ GetMouseState()

int PointGrabber::GetMouseState ( ) const

Get the current mouse state

Returns
The state of the mouse button.

◆ GetPointNumber()

int PointGrabber::GetPointNumber ( ) const

Check which point was selected

Returns
The selected point number.

◆ SetMouseState()

void PointGrabber::SetMouseState ( const int state)

Record the current mouse state

Parameters
stateThe current mouse state.

Member Data Documentation

◆ mouse_down_x

qreal PointGrabber::mouse_down_x = 0.0

Mouse coordinate x

◆ mouse_down_y

qreal PointGrabber::mouse_down_y = 0.0

Mouse coordinate y


The documentation for this class was generated from the following files: