This widget draws two positions, one moved by drag and drop, the other moved by a separate thread toward the first position.
More...
#include <WidgetUpdate.hpp>
|
void | paintEvent (QPaintEvent *event) |
| Draws the position pointed by the mouse. More...
|
|
void | mouseMoveEvent (QMouseEvent *event) |
| Moves the drawn position where the mouse is, if left button is pressed. More...
|
|
|
void | updatePosition (const int dist) |
| Moves the position along a given distance toward the aimed one. More...
|
|
|
QRect | region (const QPoint &pos, const bool big=false) const |
| Returns the graphical region drawn around the position. More...
|
|
void | modify (QPoint &variable, const QPoint &value) |
| Memorizes a new value in a variable and redraw. More...
|
|
This widget draws two positions, one moved by drag and drop, the other moved by a separate thread toward the first position.
Definition at line 106 of file WidgetUpdate.hpp.
UpdateWidget::UpdateWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
inline |
The widget's constructor.
- Parameters
-
parent | The containing widget. |
Definition at line 158 of file WidgetUpdate.hpp.
UpdateWidget::~UpdateWidget |
( |
| ) |
|
|
inline |
void UpdateWidget::init |
( |
| ) |
|
|
inline |
void UpdateWidget::modify |
( |
QPoint & |
variable, |
|
|
const QPoint & |
value |
|
) |
| |
|
inlineprivate |
Memorizes a new value in a variable and redraw.
- Parameters
-
variable | either position or aimed, |
value | the new value for this variable. |
Definition at line 125 of file WidgetUpdate.hpp.
void UpdateWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Moves the drawn position where the mouse is, if left button is pressed.
- Parameters
-
event | The mouse event, giving its position. |
Definition at line 51 of file WidgetUpdate.cpp.
void UpdateWidget::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protected |
Draws the position pointed by the mouse.
- Parameters
-
event | The drawing event, giving the region which should be redrawn. |
Definition at line 34 of file WidgetUpdate.cpp.
QRect UpdateWidget::region |
( |
const QPoint & |
pos, |
|
|
const bool |
big = false |
|
) |
| const |
|
inlineprivate |
Returns the graphical region drawn around the position.
- Parameters
-
pos | The position, a couple of integers, |
big | wether the region should be increased. |
- Returns
- The graphical region drawn around the point.
Definition at line 117 of file WidgetUpdate.hpp.
void UpdateWidget::updatePosition |
( |
const int |
dist | ) |
|
|
inlineprivateslot |
Moves the position along a given distance toward the aimed one.
- Parameters
-
dist | The distance of the motion. |
Definition at line 146 of file WidgetUpdate.hpp.
QPoint UpdateWidget::aimed |
|
private |
QPoint UpdateWidget::position |
|
private |
The documentation for this class was generated from the following files: