gui::PageViewMode_NewObject Class Reference

#include <pageviewmode.h>

Inheritance diagram for gui::PageViewMode_NewObject:
gui::PageViewMode

List of all members.

Public Slots

virtual void mousePressLeftButton (QMouseEvent *e, QPainter *p, QWidget *w)
virtual void mouseReleaseLeftButton (QMouseEvent *e, QPainter *p, QWidget *w)
virtual void mouseMoveWithPressedLeftButton (QMouseEvent *e, QPainter *p, QWidget *w)
virtual void repaint (QPainter &p, QWidget *w)

Public Member Functions

 PageViewMode_NewObject (const QString &drawingObject, const QString &_scriptFncAtMouseRelease, const QString &_scriptFncAtMoveSelectedObjects, const QString &_scriptFncAtResizeSelectedObjects)

Detailed Description

Class is STRATEGY pattern for mode construction. Includes method for selecting objects on page and manipulating with him.

This implementation only draw new objects with draw methods (STRATEGY pattern) defined in constructor. Nothing operators or other objects are selected.


Constructor & Destructor Documentation

gui::PageViewMode_NewObject::PageViewMode_NewObject ( const QString &  drawingObject,
const QString &  _scriptFncAtMouseRelease,
const QString &  _scriptFncAtMoveSelectedObjects,
const QString &  _scriptFncAtResizeSelectedObjects 
)

Standard constructor.

Parameters:
drawingObject Text definition of drawing method (see DrawingObjectFactory)
_scriptFncAtMouseRelease Script command for call after selected object(s)
_scriptFncAtMoveSelectedObjects Script command for call after move selected object(s)
_scriptFncAtResizeSelectedObjects Script command for call after resize selected object(s)

Member Function Documentation

void gui::PageViewMode_NewObject::mouseMoveWithPressedLeftButton ( QMouseEvent *  e,
QPainter *  p,
QWidget *  w 
) [virtual, slot]

Method is calling if is press left mouse button and is moving with mouse.

Parameters:
e Pointer to mouse event (see Qt::QMouseEvent).
p Pointer to initialized painter for draw changes (see Qt::QPainter). Method emit at end 'needRepaint' if p is NULL.
w Pointer to widget (see Qt::QWidget). E.g. for change mouse cursor above operators.
See also:
PageViewMode::mousePressEvent

Reimplemented from gui::PageViewMode.

References gui::PageViewMode::drawingObject, gui::PageViewMode::needRepaint(), gui::PageViewMode::pressPosition, and gui::PageViewMode::releasePosition.

void gui::PageViewMode_NewObject::mousePressLeftButton ( QMouseEvent *  e,
QPainter *  p,
QWidget *  w 
) [virtual, slot]

Method is calling if is press left mouse button.

Parameters:
e Pointer to mouse event (see Qt::QMouseEvent).
p Pointer to initialized painter for draw changes (see Qt::QPainter). Method emit at end 'needRepaint' if p is NULL.
w Pointer to widget (see Qt::QWidget). E.g. for change mouse cursor above operators.
See also:
mouseReleaseLeftButton
PageViewMode::mousePressEvent

Reimplemented from gui::PageViewMode.

References gui::PageViewMode::drawingObject, gui::PageViewMode::needRepaint(), gui::PageViewMode::pressPosition, and gui::PageViewMode::releasePosition.

void gui::PageViewMode_NewObject::mouseReleaseLeftButton ( QMouseEvent *  e,
QPainter *  p,
QWidget *  w 
) [virtual, slot]

Method is calling if is release left mouse button.

Parameters:
e Pointer to mouse event (see Qt::QMouseEvent).
p Pointer to initialized painter for draw changes (see Qt::QPainter). Method emit at end 'needRepaint' if p is NULL.
w Pointer to widget (see Qt::QWidget). E.g. for change mouse cursor above operators.
See also:
mousePressLeftButton
PageViewMode::mousePressEvent

Reimplemented from gui::PageViewMode.

References gui::PageViewMode::drawingObject, gui::PageViewMode::needRepaint(), gui::PageViewMode::pressPosition, and gui::PageViewMode::releasePosition.

void gui::PageViewMode_NewObject::repaint ( QPainter &  p,
QWidget *  w 
) [virtual, slot]

Repaint method for draw actual state of mode (selected region, moving and resizing in action, ...).

Parameters:
p Pointer to initialized painter for draw changes (see Qt::QPainter). Method emit at end 'needRepaint' if p is NULL.
w Pointer to widget (see Qt::QWidget). E.g. for change mouse cursor above operators.

It is only drawing method use, if viewing parent need clear repaint.

Reimplemented from gui::PageViewMode.

References gui::PageViewMode::drawingObject, gui::PageViewMode::isMoving, gui::PageViewMode::isPressedLeftButton, gui::PageViewMode::pressPosition, and gui::PageViewMode::releasePosition.


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