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

#include <ddtCornergrabber.hpp>

Inheritance diagram for CornerGrabber:

Public Types

enum  { CG_MOUSE_RELEASED = 0 , CG_MOUSE_DOWN , CG_MOUSE_MOVING }
 

Public Attributes

qreal mouse_down_x
 
qreal mouse_down_y
 
 CornerGrabber (QGraphicsItem *parent=nullptr, const int corner=0)
 
int GetCorner () const
 
void SetMouseState (const int state)
 
int GetMouseState () const
 

Detailed Description

Class for corner grabbing resizable graphical elements.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CG_MOUSE_RELEASED 
CG_MOUSE_DOWN 
CG_MOUSE_MOVING 

Constructor & Destructor Documentation

◆ CornerGrabber()

CornerGrabber::CornerGrabber ( QGraphicsItem *  parent = nullptr,
const int  corner = 0 
)
explicit

Constructor

Parameters
parentPointer to the parent graphics item.
cornerThe corner.

Member Function Documentation

◆ GetCorner()

int CornerGrabber::GetCorner ( ) const

Check which corner was selected

Returns
The selected corner.

◆ GetMouseState()

int CornerGrabber::GetMouseState ( ) const

Get the current mouse state

Returns
The state of the mouse button.

◆ SetMouseState()

void CornerGrabber::SetMouseState ( const int  state)

Record the current mouse state

Parameters
stateThe current mouse state.

Member Data Documentation

◆ mouse_down_x

qreal CornerGrabber::mouse_down_x

Mouse coordinate x

◆ mouse_down_y

qreal CornerGrabber::mouse_down_y

Mouse coordinate y


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