qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MovableWidget Class Reference

#include <movablewidget.h>

Inheritance diagram for MovableWidget:
Inheritance graph
Collaboration diagram for MovableWidget:
Collaboration graph

Public Member Functions

 MovableWidget (QWidget *parent)
 
void resetBoundary (QRect newBoundary)
 
void setBoundary (QRect newBoundary)
 
float getRatio () const
 
void setRatio (float r)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void mouseDoubleClickEvent (QMouseEvent *event)
 

Private Types

enum  Mode : Modes {
  Moving = 0x01, ResizeLeft = 0x02, ResizeRight = 0x04, ResizeUp = 0x08,
  ResizeDown = 0x10, Resize = ResizeLeft | ResizeRight | ResizeUp | ResizeDown
}
 
typedef uint8_t Modes
 

Private Member Functions

void checkBoundary (QPoint &point) const
 
void checkBoundaryLeft (int &x) const
 

Private Attributes

Modes mode = 0
 
QPoint lastPoint
 
QRect boundaryRect
 
QSizeF actualSize
 
QPointF actualPos
 
float ratio
 

Detailed Description

Definition at line 24 of file movablewidget.h.

Member Typedef Documentation

◆ Modes

typedef uint8_t MovableWidget::Modes
private

Definition at line 43 of file movablewidget.h.

Member Enumeration Documentation

◆ Mode

enum MovableWidget::Mode : Modes
private
Enumerator
Moving 
ResizeLeft 
ResizeRight 
ResizeUp 
ResizeDown 
Resize 

Definition at line 45 of file movablewidget.h.

Constructor & Destructor Documentation

◆ MovableWidget()

MovableWidget::MovableWidget ( QWidget *  parent)
explicit

Definition at line 25 of file movablewidget.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ checkBoundary()

void MovableWidget::checkBoundary ( QPoint &  point) const
private

Definition at line 251 of file movablewidget.cpp.

Here is the caller graph for this function:

◆ checkBoundaryLeft()

void MovableWidget::checkBoundaryLeft ( int &  x) const
private

◆ getRatio()

float MovableWidget::getRatio ( ) const

Definition at line 83 of file movablewidget.cpp.

Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void MovableWidget::mouseDoubleClickEvent ( QMouseEvent *  event)
protected

Definition at line 237 of file movablewidget.cpp.

◆ mouseMoveEvent()

void MovableWidget::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 110 of file movablewidget.cpp.

Here is the call graph for this function:

◆ mousePressEvent()

void MovableWidget::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 100 of file movablewidget.cpp.

◆ mouseReleaseEvent()

void MovableWidget::mouseReleaseEvent ( QMouseEvent *  event)
protected

Definition at line 231 of file movablewidget.cpp.

◆ resetBoundary()

void MovableWidget::resetBoundary ( QRect  newBoundary)

Definition at line 37 of file movablewidget.cpp.

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

◆ setBoundary()

void MovableWidget::setBoundary ( QRect  newBoundary)

Definition at line 48 of file movablewidget.cpp.

◆ setRatio()

void MovableWidget::setRatio ( float  r)

Definition at line 88 of file movablewidget.cpp.

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

Member Data Documentation

◆ actualPos

QPointF MovableWidget::actualPos
private

Definition at line 59 of file movablewidget.h.

◆ actualSize

QSizeF MovableWidget::actualSize
private

Definition at line 58 of file movablewidget.h.

◆ boundaryRect

QRect MovableWidget::boundaryRect
private

Definition at line 57 of file movablewidget.h.

◆ lastPoint

QPoint MovableWidget::lastPoint
private

Definition at line 56 of file movablewidget.h.

◆ mode

Modes MovableWidget::mode = 0
private

Definition at line 55 of file movablewidget.h.

◆ ratio

float MovableWidget::ratio
private

Definition at line 60 of file movablewidget.h.


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