Scribus
Open source desktop publishing at your fingertips
CellSelect Class Reference

#include <canvasgesture_cellselect.h>

Inheritance diagram for CellSelect:
Collaboration diagram for CellSelect:

Public Member Functions

 CellSelect (CanvasMode *parent)
 
virtual void activate (bool fromGesture)
 
virtual void deactivate (bool forGesture)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual bool handleKeyEvents ()
 
virtual void drawControls (QPainter *p)
 
void setup (PageItem_Table *table, const TableCell &cell)
 Sets up this gesture to select cells in table, starting with cell.
 
- Public Member Functions inherited from CanvasGesture
virtual void enterEvent (QEvent *e)
 
virtual void leaveEvent (QEvent *e)
 
virtual void dragEnterEvent (QDragEnterEvent *e)
 
virtual void dragMoveEvent (QDragMoveEvent *e)
 
virtual void dragLeaveEvent (QDragLeaveEvent *e)
 
virtual void dropEvent (QDropEvent *e)
 
virtual void mouseDoubleClickEvent (QMouseEvent *m)
 
virtual void keyReleaseEvent (QKeyEvent *e)
 
virtual void inputMethodEvent (QInputMethodEvent *e)
 
CanvasModedelegate ()
 
void setDelegate (CanvasMode *delegate)
 
- Public Member Functions inherited from CanvasMode
virtual void updateViewMode (CanvasViewMode *viewmode)
 
void drawSelectionHandles (QPainter *psx, QRectF selectionRect, bool background, bool insideGroup=false, double sx=1.0, double sy=1.0)
 
void drawSelection (QPainter *psx, bool drawHandles)
 
void drawSnapLine (QPainter *psx)
 
void drawOutline (QPainter *p, double scalex=1.0, double scaley=1.0, double deltax=0.0, double deltay=0.0)
 
QCursor modeCursor ()
 
void setModeCursor ()
 
ScribusViewview () const
 

Additional Inherited Members

- Static Public Member Functions inherited from CanvasMode
static CanvasModecreateForAppMode (ScribusView *view, int appMode)
 
- Protected Member Functions inherited from TableGesture
 TableGesture (CanvasMode *parent)
 
 TableGesture (ScribusView *view)
 
PageItem_Tabletable () const
 Returns the currently edited table.
 
void setTable (PageItem_Table *table)
 Sets the currently edited table to table.
 
QPointF globalToTableGrid (const QPoint point, bool snap=true)
 
void paintTableOutline (const QList< double > &rowHeights, const QList< double > &rowPositions, const QList< double > &columnWidths, const QList< double > &columnPositions, QPainter *p)
 
void paintCellSelection (QPainter *p)
 
- Protected Member Functions inherited from CanvasGesture
 CanvasGesture (CanvasMode *parent)
 
 CanvasGesture (ScribusView *view)
 
- Protected Member Functions inherited from CanvasMode
 CanvasMode (ScribusView *view)
 
void setResizeCursor (int how, double rot=0.0)
 
bool commonMouseMove (QMouseEvent *m)
 
void commonDrawControls (QPainter *p, bool drawHandles)
 
void commonDrawTextCursor (QPainter *p, PageItem_TextFrame *textframe, const QPointF &offset)
 Draws the text cursor for textframe, offset by offset.
 
void commonkeyPressEvent_NormalNodeEdit (QKeyEvent *e)
 
void commonkeyReleaseEvent (QKeyEvent *e)
 
- Protected Attributes inherited from CanvasGesture
CanvasModem_delegate
 
- Protected Attributes inherited from CanvasMode
ScribusView *const m_view
 
Canvas *const m_canvas
 
ScribusDoc *const m_doc
 
PanGesturem_panGesture
 
UndoManagerundoManager
 
double xSnap
 
double ySnap
 

Detailed Description

Handles selection of cells on behalf of the table editing canvas mode.

A single mouse click on a cell will select the cell. A single mouse click with the Ctrl modifier on a cell will deselect the cell. Pressing the mouse button on a cell and dragging it to another cell will select all cells that start in the rectangle between the first and the second cell.

The selection gesture may be cancelled by pressing the Escape key.

Member Function Documentation

virtual void CellSelect::activate ( bool  fromGesture)
inlinevirtual

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.

void CellSelect::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.

void CellSelect::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.


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