Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

FreehandMode Class Reference

#include <canvasmode_drawfreehand.h>

Inheritance diagram for FreehandMode:

Inheritance graph
[legend]
Collaboration diagram for FreehandMode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FreehandMode (ScribusView *view)
virtual void enterEvent (QEvent *)
virtual void leaveEvent (QEvent *)
virtual void activate (bool)
virtual void deactivate (bool)
virtual void mouseDoubleClickEvent (QMouseEvent *m)
virtual void mouseReleaseEvent (QMouseEvent *m)
virtual void mouseMoveEvent (QMouseEvent *m)
virtual void mousePressEvent (QMouseEvent *m)
virtual void drawControls (QPainter *p)

Private Member Functions

bool GetItem (PageItem **pi)
void selectPage (QMouseEvent *m)

Private Attributes

int Cp
int oldCp
bool inItemCreation
bool shiftSelItems
bool FirstPoly
bool m_MouseButtonPressed
int frameResizeHandle
int RotMode
int dragConstrainInitPtX
int dragConstrainInitPtY
double Mxp
double Myp
double Dxp
double Dyp
int GxM
int GyM
double SeRx
double SeRy
bool MoveGX
bool MoveGY
FPointArray RecordP


Detailed Description

Handles the creation of new pageitems

Definition at line 32 of file canvasmode_drawfreehand.h.


Constructor & Destructor Documentation

FreehandMode::FreehandMode ( ScribusView view  ) 


Member Function Documentation

void FreehandMode::enterEvent ( QEvent *   )  [virtual]

Reimplemented from CanvasMode.

Definition at line 95 of file canvasmode_drawfreehand.cpp.

References m_MouseButtonPressed, and CanvasMode::setModeCursor().

void FreehandMode::leaveEvent ( QEvent *  e  )  [virtual]

Reimplemented from CanvasMode.

Definition at line 104 of file canvasmode_drawfreehand.cpp.

References m_MouseButtonPressed.

void FreehandMode::activate ( bool  fromGesture  )  [virtual]

Is called when this mode becomes active, either because it was selected by the user (fromgesture == false) or because a gesture completed and the canvas returns back to this mode (fromGesture == true)

Reimplemented from CanvasMode.

Definition at line 111 of file canvasmode_drawfreehand.cpp.

References Cp, Dxp, Dyp, FirstPoly, frameResizeHandle, GxM, GyM, inItemCreation, MoveGX, MoveGY, Mxp, Myp, oldCp, RotMode, CanvasMode::setModeCursor(), and shiftSelItems.

void FreehandMode::deactivate ( bool  forGesture  )  [virtual]

Is called when this mode becomes inactive, either because the canvas switches to another mode (forGesture == false) or because a gesture is activated (forGesture == true)

Reimplemented from CanvasMode.

Definition at line 127 of file canvasmode_drawfreehand.cpp.

References CanvasMode::m_view, and ScribusView::redrawMarker.

void FreehandMode::mouseDoubleClickEvent ( QMouseEvent *  m  )  [virtual]

void FreehandMode::mouseReleaseEvent ( QMouseEvent *  m  )  [virtual]

Reimplemented from CanvasMode.

Definition at line 310 of file canvasmode_drawfreehand.cpp.

References Selection::addItem(), FPointArray::addPoint(), ScribusDoc::AdjustItemSize(), ScribusDoc::ApplyGridF(), ScribusDoc::ApplyGuides(), ScribusDoc::appMode, PageItem::asImageFrame(), PageItem::asLine(), PageItem::asTextFrame(), UndoManager::beginTransaction(), bezierFit(), ScribusDoc::changed(), PageItem::checkChanges(), OneClick::checkRemember, Selection::clear(), PageSelector::clearFocus(), PageItem::ClipEdited, UndoTransaction::commit(), PageItem::ContourLine, FPointArray::copy(), Selection::count(), UndoManager::Create, ScribusDoc::currentPageNumber(), ScribusView::Deselect(), toolPrefs::dPenLine, ScribusDoc::DragP, toolPrefs::dWidth, Dxp, Dyp, PageItem::emitAllToGUI(), ScribusView::endGroupTransaction(), NodeEditContext::finishTransaction(), frameResizeHandle, PageItem::FrameType, FPointArray::fromQPainterPath(), PrefsContext::getBool(), PrefsFile::getContext(), PrefsContext::getDouble(), Selection::getGroupRect(), PrefsContext::getInt(), GetItem(), getMaxClipF(), getMinClipF(), PageItem::getTransform(), UndoObject::getUName(), UndoObject::getUPixmap(), Canvas::globalToCanvas(), ScribusView::groupTransactionStarted(), ScribusView::HaveSelRect, PageItem::height, UndoManager::ICreate, PageItem::imageFlippedH(), PageItem::imageFlippedV(), PageItem::imageXScale, PageItem::imageYScale, inItemCreation, PrefsManager::instance(), UndoManager::instance(), UndoManager::IResize, Selection::isMultipleSelection(), ScribusDoc::itemAdd(), ScribusDoc::itemAddCommit(), Selection::itemAt(), PageItem::ItemNr, ScribusDoc::Items, ScribusDoc::leaveDrag, CanvasMode::m_canvas, CanvasMode::m_doc, m_MouseButtonPressed, M_PI, ScribusDoc::m_Selection, CanvasMode::m_view, Canvas::m_viewMode, ScribusDoc::masterPageMode(), ScribusView::MidButt, modeDrawBezierLine, modeDrawFreehandLine, modeDrawImage, modeDrawLine, modeDrawRegularPolygon, modeDrawShapes, modeDrawText, modeEdit, modeNormal, PageItem::moveImageInFrame(), ScribusDoc::MoveItem(), ScribusDoc::MoveRotated(), ScribusDoc::MoveSizeItem(), ScribusView::moveTimerElapsed(), Mxp, Myp, ScribusDoc::nodeEdit, CommonStrings::None, PageItem::OldB2, PageItem::OldH2, ScribusDoc::OnPage(), CanvasViewMode::operItemResizing, PageItem::OwnPage, p, ScribusDoc::Pages, ScribusView::pageSelector, FPointArray::point(), PageItem::PoLine, PageItem::PolyLine, PrefsManager::prefsFile, RecordP, ScribusView::redrawMarker, ScribusView::requestMode(), ScribusView::resetMousePressed(), Canvas::resetRenderMode(), UndoManager::Resize, FPointArray::resize(), UndoManager::ResizeFromTo, ScribusDoc::RotateItem(), PageItem::rotation, OneClick::RotationGroup, UndoManager::ScratchSpace, SeRx, SeRy, PrefsContext::set(), ScribusDoc::setCurrentPage(), Selection::setGroupRect(), PageItem::setHeight(), ScribusView::setMenTxt(), ScribusDoc::setRedrawBounding(), Canvas::setRenderModeUseBuffer(), PageItem::setWidth(), PageItem::setXPos(), PageItem::setXYPos(), PageItem::setYPos(), shiftSelItems, FPointArray::size(), ScribusDoc::SizeItem(), PageItem::Sizing, ScribusDoc::SnapGuides, OneClick::spinHeight, OneClick::spinWidth, ScribusView::stopDragTimer(), ScribusDoc::SubMode, submodePaintingDone, ScribusDoc::toolSettings, tr(), FPoint::transformPoint(), FPointArray::translate(), UndoManager::undoEnabled(), ScribusView::undoManager, unitGetRatioFromIndex(), ScribusDoc::unitIndex(), PageItem::Unspecified, SingleObservable< OBSERVED >::update(), ScribusView::updateCanvas(), PageItem::updateClip(), ScribusDoc::useRaster, PageItem::width, FPoint::x(), PageItem::xPos, FPoint::y(), PageItem::yPos, and ScribusView::zoomSpinBox.

void FreehandMode::mouseMoveEvent ( QMouseEvent *  m  )  [virtual]

void FreehandMode::mousePressEvent ( QMouseEvent *  m  )  [virtual]

void FreehandMode::drawControls ( QPainter *  p  )  [virtual]

Draws the controls for this mode and the selection marker. If viewmode.drawSelectionWithControls is true, also draws the selection contents first.

Reimplemented from CanvasMode.

Definition at line 78 of file canvasmode_drawfreehand.cpp.

bool FreehandMode::GetItem ( PageItem **  pi  )  [inline, private]

void FreehandMode::selectPage ( QMouseEvent *  m  )  [private]


Member Data Documentation

int FreehandMode::Cp [private]

Definition at line 52 of file canvasmode_drawfreehand.h.

Referenced by activate(), and FreehandMode().

int FreehandMode::oldCp [private]

Definition at line 52 of file canvasmode_drawfreehand.h.

Referenced by activate(), and FreehandMode().

bool FreehandMode::FirstPoly [private]

Definition at line 53 of file canvasmode_drawfreehand.h.

Referenced by activate(), and FreehandMode().

Definition at line 55 of file canvasmode_drawfreehand.h.

Referenced by activate(), FreehandMode(), and mouseReleaseEvent().

int FreehandMode::RotMode [private]

Definition at line 56 of file canvasmode_drawfreehand.h.

Referenced by activate(), and FreehandMode().

Definition at line 57 of file canvasmode_drawfreehand.h.

Definition at line 57 of file canvasmode_drawfreehand.h.

double FreehandMode::Mxp [private]

double FreehandMode::Myp [private]

double FreehandMode::Dxp [private]

double FreehandMode::Dyp [private]

int FreehandMode::GxM [private]

Definition at line 59 of file canvasmode_drawfreehand.h.

Referenced by activate(), FreehandMode(), and mouseMoveEvent().

int FreehandMode::GyM [private]

Definition at line 59 of file canvasmode_drawfreehand.h.

Referenced by activate(), FreehandMode(), and mouseMoveEvent().

double FreehandMode::SeRx [private]

Definition at line 60 of file canvasmode_drawfreehand.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

double FreehandMode::SeRy [private]

Definition at line 60 of file canvasmode_drawfreehand.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

bool FreehandMode::MoveGX [private]

Definition at line 61 of file canvasmode_drawfreehand.h.

Referenced by activate(), FreehandMode(), and mousePressEvent().

bool FreehandMode::MoveGY [private]

Definition at line 61 of file canvasmode_drawfreehand.h.

Referenced by activate(), FreehandMode(), and mousePressEvent().

Definition at line 62 of file canvasmode_drawfreehand.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.