qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Signals | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ScreenGrabberChooserRectItem Class Referencefinal

#include <screengrabberchooserrectitem.h>

Inheritance diagram for ScreenGrabberChooserRectItem:
Inheritance graph
Collaboration diagram for ScreenGrabberChooserRectItem:
Collaboration graph

Signals

void doubleClicked ()
 
void regionChosen (QRect rect)
 

Public Member Functions

 ScreenGrabberChooserRectItem (QGraphicsScene *scene)
 
 ~ScreenGrabberChooserRectItem ()
 
QRectF boundingRect () const final
 
void beginResize (QPointF mousePos)
 
QRect chosenRect () const
 
void showHandles ()
 
void hideHandles ()
 

Protected Member Functions

bool sceneEventFilter (QGraphicsItem *watched, QEvent *event) final
 

Private Types

enum  State { None, Resizing, HandleResizing, Moving }
 

Private Member Functions

void forwardMainRectEvent (QEvent *event)
 
void forwardHandleEvent (QGraphicsItem *watched, QEvent *event)
 
void mousePress (QGraphicsSceneMouseEvent *event)
 
void mouseMove (QGraphicsSceneMouseEvent *event)
 
void mouseRelease (QGraphicsSceneMouseEvent *event)
 
void mouseDoubleClick (QGraphicsSceneMouseEvent *event)
 
void mousePressHandle (int x, int y, QGraphicsSceneMouseEvent *event)
 
void mouseMoveHandle (int x, int y, QGraphicsSceneMouseEvent *event)
 
void mouseReleaseHandle (int x, int y, QGraphicsSceneMouseEvent *event)
 
QPoint getHandleMultiplier (QGraphicsItem *handle)
 
void updateHandlePositions ()
 
QGraphicsRectItem * createHandleItem (QGraphicsScene *scene)
 

Private Attributes

State state = None
 
int rectWidth = 0
 
int rectHeight = 0
 
QPointF startPos
 
QGraphicsRectItem * mainRect
 
QGraphicsRectItem * topLeft
 
QGraphicsRectItem * topCenter
 
QGraphicsRectItem * topRight
 
QGraphicsRectItem * rightCenter
 
QGraphicsRectItem * bottomRight
 
QGraphicsRectItem * bottomCenter
 
QGraphicsRectItem * bottomLeft
 
QGraphicsRectItem * leftCenter
 

Detailed Description

Definition at line 24 of file screengrabberchooserrectitem.h.

Member Enumeration Documentation

◆ State

Enumerator
None 
Resizing 
HandleResizing 
Moving 

Definition at line 48 of file screengrabberchooserrectitem.h.

Constructor & Destructor Documentation

◆ ScreenGrabberChooserRectItem()

ScreenGrabberChooserRectItem::ScreenGrabberChooserRectItem ( QGraphicsScene *  scene)
explicit

Definition at line 33 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:

◆ ~ScreenGrabberChooserRectItem()

ScreenGrabberChooserRectItem::~ScreenGrabberChooserRectItem ( )

Definition at line 61 of file screengrabberchooserrectitem.cpp.

Member Function Documentation

◆ beginResize()

void ScreenGrabberChooserRectItem::beginResize ( QPointF  mousePos)

Definition at line 71 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boundingRect()

QRectF ScreenGrabberChooserRectItem::boundingRect ( ) const
final

Definition at line 65 of file screengrabberchooserrectitem.cpp.

◆ chosenRect()

QRect ScreenGrabberChooserRectItem::chosenRect ( ) const

Definition at line 83 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ createHandleItem()

QGraphicsRectItem * ScreenGrabberChooserRectItem::createHandleItem ( QGraphicsScene *  scene)
private

Definition at line 274 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ doubleClicked

void ScreenGrabberChooserRectItem::doubleClicked ( )
signal
Here is the caller graph for this function:

◆ forwardHandleEvent()

void ScreenGrabberChooserRectItem::forwardHandleEvent ( QGraphicsItem *  watched,
QEvent *  event 
)
private

Definition at line 315 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forwardMainRectEvent()

void ScreenGrabberChooserRectItem::forwardMainRectEvent ( QEvent *  event)
private

Definition at line 297 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHandleMultiplier()

QPoint ScreenGrabberChooserRectItem::getHandleMultiplier ( QGraphicsItem *  handle)
private

Definition at line 233 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ hideHandles()

void ScreenGrabberChooserRectItem::hideHandles ( )

Definition at line 111 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ mouseDoubleClick()

void ScreenGrabberChooserRectItem::mouseDoubleClick ( QGraphicsSceneMouseEvent *  event)
private

Definition at line 178 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ mouseMove()

void ScreenGrabberChooserRectItem::mouseMove ( QGraphicsSceneMouseEvent *  event)
private

Definition at line 131 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseMoveHandle()

void ScreenGrabberChooserRectItem::mouseMoveHandle ( int  x,
int  y,
QGraphicsSceneMouseEvent *  event 
)
private

Definition at line 193 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mousePress()

void ScreenGrabberChooserRectItem::mousePress ( QGraphicsSceneMouseEvent *  event)
private

Definition at line 123 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ mousePressHandle()

void ScreenGrabberChooserRectItem::mousePressHandle ( int  x,
int  y,
QGraphicsSceneMouseEvent *  event 
)
private

Definition at line 184 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ mouseRelease()

void ScreenGrabberChooserRectItem::mouseRelease ( QGraphicsSceneMouseEvent *  event)
private

Definition at line 151 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseReleaseHandle()

void ScreenGrabberChooserRectItem::mouseReleaseHandle ( int  x,
int  y,
QGraphicsSceneMouseEvent *  event 
)
private

Definition at line 224 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ regionChosen

void ScreenGrabberChooserRectItem::regionChosen ( QRect  rect)
signal
Here is the caller graph for this function:

◆ sceneEventFilter()

bool ScreenGrabberChooserRectItem::sceneEventFilter ( QGraphicsItem *  watched,
QEvent *  event 
)
finalprotected

Definition at line 287 of file screengrabberchooserrectitem.cpp.

Here is the call graph for this function:

◆ showHandles()

void ScreenGrabberChooserRectItem::showHandles ( )

Definition at line 99 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

◆ updateHandlePositions()

void ScreenGrabberChooserRectItem::updateHandlePositions ( )
private

Definition at line 262 of file screengrabberchooserrectitem.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ bottomCenter

QGraphicsRectItem* ScreenGrabberChooserRectItem::bottomCenter
private

Definition at line 84 of file screengrabberchooserrectitem.h.

◆ bottomLeft

QGraphicsRectItem* ScreenGrabberChooserRectItem::bottomLeft
private

Definition at line 85 of file screengrabberchooserrectitem.h.

◆ bottomRight

QGraphicsRectItem* ScreenGrabberChooserRectItem::bottomRight
private

Definition at line 83 of file screengrabberchooserrectitem.h.

◆ leftCenter

QGraphicsRectItem* ScreenGrabberChooserRectItem::leftCenter
private

Definition at line 86 of file screengrabberchooserrectitem.h.

◆ mainRect

QGraphicsRectItem* ScreenGrabberChooserRectItem::mainRect
private

Definition at line 78 of file screengrabberchooserrectitem.h.

◆ rectHeight

int ScreenGrabberChooserRectItem::rectHeight = 0
private

Definition at line 58 of file screengrabberchooserrectitem.h.

◆ rectWidth

int ScreenGrabberChooserRectItem::rectWidth = 0
private

Definition at line 57 of file screengrabberchooserrectitem.h.

◆ rightCenter

QGraphicsRectItem* ScreenGrabberChooserRectItem::rightCenter
private

Definition at line 82 of file screengrabberchooserrectitem.h.

◆ startPos

QPointF ScreenGrabberChooserRectItem::startPos
private

Definition at line 59 of file screengrabberchooserrectitem.h.

◆ state

State ScreenGrabberChooserRectItem::state = None
private

Definition at line 56 of file screengrabberchooserrectitem.h.

◆ topCenter

QGraphicsRectItem* ScreenGrabberChooserRectItem::topCenter
private

Definition at line 80 of file screengrabberchooserrectitem.h.

◆ topLeft

QGraphicsRectItem* ScreenGrabberChooserRectItem::topLeft
private

Definition at line 79 of file screengrabberchooserrectitem.h.

◆ topRight

QGraphicsRectItem* ScreenGrabberChooserRectItem::topRight
private

Definition at line 81 of file screengrabberchooserrectitem.h.


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