SymbolEditor  1.3.0
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
Editor Class Reference

Manages the editor window allowing user interaction with the various tools. More...

#include <Editor.h>

Inheritance diagram for Editor:
Collaboration diagram for Editor:

Public Types

enum  ToolMode {
  MoveTo, LineTo, CubicTo, Rectangle,
  Ellipse, Character
}
 

Public Slots

void selectTool (QAction *action)
 
void charSelected (const QChar &character)
 
void enableSnap (bool enabled)
 
void selectFilled (bool enabled)
 
void selectFillRule (QAction *action)
 
void selectCapStyle (QAction *action)
 
void selectJoinStyle (QAction *action)
 
void increaseLineWidth ()
 
void decreaseLineWidth ()
 
void rotateLeft ()
 
void rotateRight ()
 
void flipHorizontal ()
 
void flipVertical ()
 
void scalePreferred ()
 
void readSettings ()
 

Signals

void message (const QString &text)
 
void minLineWidth (bool reached)
 
void maxLineWidth (bool reached)
 

Public Member Functions

 Editor (QWidget *parent=0)
 
 ~Editor ()
 
QPair< qint16, Symbolsymbol ()
 
void setSymbol (const QPair< qint16, Symbol > &pair)
 
QPainterPath moveTo (const QPointF &to)
 
QPainterPath lineTo (const QPointF &to)
 
QPainterPath cubicTo (const QPointF &control1, const QPointF &control2, const QPointF &to)
 
QPainterPath addRectangle (const QPointF &from, const QPointF &to)
 
QPainterPath addEllipse (const QPointF &from, const QPointF &to)
 
void removeLast (const QPainterPath &path)
 
void movePoint (int index, const QPointF &to)
 
void rotatePointsLeft ()
 
void rotatePointsRight ()
 
void flipPointsHorizontal ()
 
void flipPointsVertical ()
 
void setFilled (bool filled)
 
void setFillRule (Qt::FillRule rule)
 
void setCapStyle (Qt::PenCapStyle capStyle)
 
void setJoinStyle (Qt::PenJoinStyle joinStyle)
 
void setLineWidth (double width)
 
QPainterPath setPath (const QPainterPath &path)
 
void clear ()
 
QUndoStack * undoStack ()
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void paintEvent (QPaintEvent *event)
 
void keyPressEvent (QKeyEvent *event)
 

Private Member Functions

void addPoint (const QPointF &point)
 
QPointF snapPoint (const QPoint &point) const
 
QPair< bool, QPointF > snapToGrid (const QPoint &point) const
 
QPair< bool, QPointF > snapToGuide (const QPointF &point) const
 
QPointF toSymbol (const QPoint &point) const
 
QPoint toScreen (const QPointF &point) const
 
bool node (const QPointF &point) const
 
QPair< bool, int > nodeUnderCursor (const QPointF &point) const
 
void deconstructPainterPath ()
 
void constructPainterPath ()
 
bool constructGuides (const QPointF &to)
 
void constructLineGuides (const QPointF &from, const QPointF &to)
 
void constructCircleGuides (const QPointF &from, const QPointF &to)
 
QLineF projected (const QLineF &line) const
 

Private Attributes

int m_size
 
bool m_snap
 
bool m_fill
 
QUndoStack m_undoStack
 
ToolMode m_toolMode
 
QList< QPointF > m_points
 
QList< QPainterPath::ElementType > m_elements
 
QList< QPointF > m_activePoints
 
qint16 m_index
 
QPainterPath m_painterPath
 
Symbol m_symbol
 
bool m_dragging
 
QPointF m_start
 
QPointF m_tracking
 
QRectF m_rubberBand
 
QPair< bool, int > m_dragPointIndex
 
QVector< qreal > m_angles
 
QList< QLineF > m_guideLines
 
QList< qreal > m_guideCircles
 
QList< QPointF > m_snapPoints
 
QLineF m_topEdge
 
QLineF m_bottomEdge
 
QLineF m_leftEdge
 
QLineF m_rightEdge
 
KCharSelect * m_charSelect
 
int m_gridElements
 
int m_elementSize
 
int m_elementGrouping
 
int m_pointSize
 
double m_snapThreshold
 
int m_borderSize
 
QColor m_preferredSizeColor
 
QColor m_guideLineColor
 

Detailed Description

Manages the editor window allowing user interaction with the various tools.

The Editor class is used to edit the new symbols or the symbols from the loaded library. It shows a grid of gridElements of elementSize grouped into elementGroup number of elements.

The path is a QPainterPath element and is constructed from the various elements created by the tools. The constructed QPainterPath is used to draw the path in the editor so it is an accurate representation of the final path. The QPainterPath is deconstructed into its individual elements and points for editing.

There are additional attributes used to draw the path, filled or unfilled, the fill rule, line width, end cap and join styles can be changed to alter the appearance of the path.

The user interacts with the editor using the various tools. For each tool a number of points need to be defined, simple tools like move to and line to only require one point whereas cubic to requires three to define the two control points and the end point.

Convenience tools are available for rectangles and ellipses but these are broken down into lines and curves in the constructed path.

Points that have been added can be moved to adjust the shape by dragging them around. The points will snap to the grid intersections if the snap option is enabled. Otherwise they can be positioned anywhere.

Tools are available to rotate or flip the symbol which adjusts the points positions and reconstructs the QPainterPath.

Guide lines and circles will be displayed if the current position of the mouse on the editor aligns with an existing point either horizontally, vertically or at a specified angle, or if the point lies on the same circle as the original where its origin is at the center of the grid.

Definition at line 74 of file Editor.h.

Member Enumeration Documentation

Enumerator:
MoveTo 
LineTo 
CubicTo 
Rectangle 
Ellipse 
Character 

Definition at line 79 of file Editor.h.

Constructor & Destructor Documentation

Editor::Editor ( QWidget *  parent = 0)
explicit

Construct the Editor. The editor is a sub class of a QWidget and is added to a layout widget. The boundary edges of the symbol editor are defined in the range 0..1. These are used to intersect the guidelines which are shown at the m_angles relative to existing points

Parameters
parenta pointer to the parent widget, this is passed to the base class object

Definition at line 169 of file Editor.cpp.

Here is the call graph for this function:

Editor::~Editor ( )

Destructor for the Editor. No additional destruction is required here.

Definition at line 192 of file Editor.cpp.

Member Function Documentation

QPainterPath Editor::addEllipse ( const QPointF &  from,
const QPointF &  to 
)

Add an ellipse as a new sub path. The points are in symbol coordinates. Returns the current painterPath for later undo.

Parameters
froma const reference to a QPointF representing the first corner
toa const reference to a QPointF representing the second corner
Returns
a QPainterPath representing the original path

Definition at line 317 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::addPoint ( const QPointF &  point)
private

Add a point for the current tool. Each tool requires a number of points to be defined to fully describe the shape the tool represents. This function adds the points and keeps track of the number of points required. When the number of points required have been selected, the tool command can be implemented and added to the symbol undo stack. The points are in symbol coordinates in the range 0..1

Parameters
pointa const reference to a QPointF

Definition at line 873 of file Editor.cpp.

Here is the caller graph for this function:

QPainterPath Editor::addRectangle ( const QPointF &  from,
const QPointF &  to 
)

Add a rectangle as a new sub path. The points are in symbol coordinates. Returns the current painterPath for later undo.

Parameters
froma const reference to a QPointF representing the first corner
toa const reference to a QPointF representing the second corner
Returns
a QPainterPath representing the original path

Definition at line 297 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::charSelected ( const QChar &  character)
slot

Called when a character is selected from the KCharSelect widget. Create a QPainterPath object and make it available to the editor for insertion.

Parameters
chara QChar containing the character selected.

Definition at line 582 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::clear ( )

Clear the editor to represent a blank symbol. Delete the existing data and update the display.

Definition at line 525 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::constructCircleGuides ( const QPointF &  from,
const QPointF &  to 
)
private

Construct circular guides for the given point. Calculate the possible intersection points where point p would be if it was mirrored across the vertical and horizontal center lines, this would be comparable to it being on a circle whose center is at the grid center. There are special cases where the point is on the center line. These mirrored points will not be included as they are the same as the new one.

Parameters
froma const reference to a QPointF representing the point to test, from m_points or m_activePoints
toa const reference to a QPointF representing the cursor position

Definition at line 1395 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::constructGuides ( const QPointF &  to)
private

Construct guides for the point relative to the other points. Iterate through points in m_points and m_active points passing them to the constructLineGuides and constructCircleGuides with the new point to create guide lines conforming with the requirements for each.

Parameters
toa const reference to a QPointF representing the new point position
Returns
true if guides created, false otherwise. Guides will be in m_guideLines and m_guideCircles

Definition at line 1347 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::constructLineGuides ( const QPointF &  from,
const QPointF &  to 
)
private

Construct line guides for the given point. The angle formed by the line from-to is tested against the allowed angles. If the angle is acceptable a new QLineF is created projected to the edges of the grid.

Parameters
froma const reference to a QPointF representing the point to test, from m_points or m_activePoints
toa const reference to a QPointF representing the cursor position

Definition at line 1372 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::constructPainterPath ( )
private

Construct a QPainterPath from the commands and points. Initialise an empty QPainterPath. Iterate all elements stored in m_elements and add them to the path.

Definition at line 1309 of file Editor.cpp.

Here is the caller graph for this function:

QPainterPath Editor::cubicTo ( const QPointF &  control1,
const QPointF &  control2,
const QPointF &  to 
)

Add a cubic spline to the sub path. The points are in symbol coordinates. Returns the current painterPath for later undo.

Parameters
control1a const reference to a QPointF representing the first control point
control2a const reference to a QPointF representing the second control point
toa const reference to a QPointF representing the end point of the curve
Returns
a QPainterPath representing the original path

Definition at line 277 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::deconstructPainterPath ( )
private

Convert a QPainterPath to commands and points. Clear the current lists of points. Iterate all the elements of the QPainterPath adding commands and points as necessary.

Definition at line 1271 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::decreaseLineWidth ( )
slot

Decrease the thickness of the path.

Definition at line 673 of file Editor.cpp.

Here is the call graph for this function:

void Editor::enableSnap ( bool  enabled)
slot

Switch the snap mode on or off.

Parameters
enabledtrue if on, false otherwise

Definition at line 605 of file Editor.cpp.

void Editor::flipHorizontal ( )
slot

Flip the symbol horizontally about the vertical center line.

Definition at line 700 of file Editor.cpp.

void Editor::flipPointsHorizontal ( )

Flip all the points about a vertical axis passing through the symbol center.

Definition at line 397 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::flipPointsVertical ( )

Flip all the points about a horizontal axis passing through the symbol center.

Definition at line 419 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::flipVertical ( )
slot

Flip the symbol vertically about the horizontal center line.

Definition at line 709 of file Editor.cpp.

void Editor::increaseLineWidth ( )
slot

Increase the thickness of the path.

Definition at line 664 of file Editor.cpp.

Here is the call graph for this function:

void Editor::keyPressEvent ( QKeyEvent *  event)
protected

Process key presses to check for Escape to clear the current points being entered.

Parameters
eventa pointer to a QKeyEvent

Definition at line 1076 of file Editor.cpp.

QPainterPath Editor::lineTo ( const QPointF &  to)

Add a line to the sub path. The point is in symbol coordinates. Returns the current painterPath for later undo.

Parameters
toa const reference to a QPointF representing the end point of the line
Returns
a QPainterPath representing the original path

Definition at line 256 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::maxLineWidth ( bool  reached)
signal

Here is the caller graph for this function:

void Editor::message ( const QString &  text)
signal
void Editor::minLineWidth ( bool  reached)
signal

Here is the caller graph for this function:

void Editor::mouseMoveEvent ( QMouseEvent *  event)
protected

Process the mouse move event. Effective for the left mouse button pressed. Clear any currently defined guides. If dragging a point, update the points position and update the view, otherwise if the toolmode is for a rectangle or an ellipse initialise the rubber band rectange and update the view. If the left button is not pressed, test if the cursor is over an existing point and if it is change the cursor to a SizeAllCursor to indicate it can be moved, otherwise reset it to an ArrowCursor. Guide lines are constructed for each of the existing points to show if the new position lies in line with or at a specific angle to or on a circular path to that point.

Parameters
eventa pointer to a QMouseEvent

Definition at line 788 of file Editor.cpp.

Here is the call graph for this function:

void Editor::mousePressEvent ( QMouseEvent *  event)
protected

Process the mouse press event. Effective for the left mouse button pressed. Test if the cursor is over an existing point in which case dragging of the point is enabled. Otherwise a point is added to the active points.

Parameters
eventa pointer to a QMouseEvent

Definition at line 753 of file Editor.cpp.

Here is the call graph for this function:

void Editor::mouseReleaseEvent ( QMouseEvent *  event)
protected

Process the mouse release event. If dragging a point that is in the m_points list and it hasn't been dragged back to its start position create a MovePointCommand and push it onto the editor undo stack. Pushing commands onto the stack will execute it, although the point is already in its new position, this will have no adverse effects, but will record the move for possible undo/redo later. If not dragging a point, clear the rubber band rectangle and add a point if the new point is not the same as the starting point.

Parameters
eventa pointer to a QMouseEvent

Definition at line 841 of file Editor.cpp.

Here is the call graph for this function:

void Editor::movePoint ( int  index,
const QPointF &  to 
)

Move a point node to a new position.

Parameters
indexthe index of the point to move
toa const reference to a QPointF representing the new position

Definition at line 346 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPainterPath Editor::moveTo ( const QPointF &  to)

Move the start of the sub path. The point is in symbol coordinates. Returns the current painterPath for later undo.

Parameters
toa const reference to a QPointF representing the new start position
Returns
a QPainterPath representing the original path

Definition at line 237 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::node ( const QPointF &  point) const
private

Test if a control point is at the point specified. This will test both the committed m_points and the uncommitted m_activePoints

Parameters
pointa const reference to a QPointF representing the symbol coordinate
Returns
true if a node exists here, false otherwise

Definition at line 1211 of file Editor.cpp.

Here is the caller graph for this function:

QPair< bool, int > Editor::nodeUnderCursor ( const QPointF &  point) const
private

Find the index of the node that is at the point specified. This will test both the committed m_points and the uncommitted m_activePoints

Parameters
pointa const reference to a QPointF representing the point to find
Returns
a QPair<bool, int> representing the list and the index of the node, true if committed, false otherwise -1 is returned as the index if the node was not found

Definition at line 1244 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::paintEvent ( QPaintEvent *  event)
protected

Paint the contents of the editor. This will fill the background and draw a grid based on the elementSize and elementGroup. For each element of the current path the control points are drawn with suitable lines joining them, for example for a cubic curve, a curve is drawn, but the control points are joined with dashed lines. A complete path is constructed and painted in a light colour with transparency to show the current symbol shape. TODO scale the painter earlier to avoid the use of toScreen.

Parameters
eventa pointer to a QPaintEvent

Definition at line 919 of file Editor.cpp.

Here is the call graph for this function:

QLineF Editor::projected ( const QLineF &  line) const
private

Project the line to the edges of the grid. Calculate the points where the projected line would intersect the edges. Check which edges get intersected within the coordinate 0..1 which will determine which points are required to construct the projected line. A special case occurs when the line is a diagonal passing through the corners as it intersects all sides within the coordinate range 0..1

Parameters
linea const reference to a QLineF
Returns
a QLineF representing the projected line

Definition at line 1430 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::readSettings ( )
slot

Read the settings from the configuration file and apply them. The widget is resized to accommodate a gridElements number of cells of width elementSize. An additional 1 is added to allow for a right and bottom edge to be drawn.

Definition at line 729 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::removeLast ( const QPainterPath &  path)

Remove the last added element by restoring the path that existed before the last command.

Parameters
patha const reference to a QPainterPath being restored

Definition at line 332 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::rotateLeft ( )
slot

Rotate the symbol left (counter clock wise)

Definition at line 682 of file Editor.cpp.

void Editor::rotatePointsLeft ( )

Rotate all the points around the center of the symbol 90 degrees counter clockwise.

Definition at line 357 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::rotatePointsRight ( )

Rotate all the points around the center of the symbol 90 degrees clockwise

Definition at line 377 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::rotateRight ( )
slot

Rotate the symbol right (clock wise)

Definition at line 691 of file Editor.cpp.

void Editor::scalePreferred ( )
slot

Scale the symbol to fit within the preferred size.

Definition at line 718 of file Editor.cpp.

void Editor::selectCapStyle ( QAction *  action)
slot

Select the pen cap style. The specified value is taken from the sending actions data.

Parameters
actiona pointer to the action that triggered the selection

Definition at line 641 of file Editor.cpp.

Here is the call graph for this function:

void Editor::selectFilled ( bool  filled)
slot

Switch the fill mode on or off.

Parameters
filledtrue if on, false otherwise

Definition at line 616 of file Editor.cpp.

Here is the call graph for this function:

void Editor::selectFillRule ( QAction *  action)
slot

Select the fill rule to be used when filling is enabled. The specified rule is taken from the sending actions data.

Parameters
actiona pointer to the action triggering the selection

Definition at line 628 of file Editor.cpp.

Here is the call graph for this function:

void Editor::selectJoinStyle ( QAction *  action)
slot

Select the pen join style. The specified value is taken from the sending actions data.

Parameters
actiona pointer to the action that triggered the selection

Definition at line 654 of file Editor.cpp.

Here is the call graph for this function:

void Editor::selectTool ( QAction *  action)
slot

Select the next tool. Remove any points that may have been used in the last tool command but not yet committed. Set the tool mode from the sending actions data. If the character selector tool is selected, display a KCharSelect widget to get a character to be inserted otherwise hide the KCharSelect widget.

Parameters
actiona pointer to the action triggering the selection

Definition at line 558 of file Editor.cpp.

Here is the call graph for this function:

void Editor::setCapStyle ( Qt::PenCapStyle  capStyle)

Set the pen cap style, see the QPen documentation for details on the styles.

Parameters
capStylea Qt::PenCapStyle value

Definition at line 467 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setFilled ( bool  filled)

Set the fill state of the symbols path.

Parameters
filledtrue if the path is to be filled, false for outline paths

Definition at line 443 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setFillRule ( Qt::FillRule  rule)

Set the fill rule of the symbols path.

Parameters
rulea Qt::FillRule value, see the QPainterPath documentation for details

Definition at line 455 of file Editor.cpp.

Here is the caller graph for this function:

void Editor::setJoinStyle ( Qt::PenJoinStyle  joinStyle)

Set the pen join style, see the QPen documentation for details on the styles.

Parameters
joinStylea Qt::PenJoinStyle value

Definition at line 479 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setLineWidth ( double  width)

Set the line width. The width parameter is rounded to 2 decimal places to avoid errors in the comparisons. Signals are emitted to enable or disable the relevant actions depending on the values.

Parameters
widththe new line width

Definition at line 493 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPainterPath Editor::setPath ( const QPainterPath &  path)

Set the painter path to the requested path updating the points lists and the view.

Parameters
pathcontains the new path
Returns
the old path

Definition at line 510 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setSymbol ( const QPair< qint16, Symbol > &  pair)

Set the symbol and index to be edited. The undo stack will be cleared.

Parameters
paira QPair consisting of the index and the Symbol

Definition at line 217 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPointF Editor::snapPoint ( const QPoint &  point) const
private

Convert a point to a snap point.

The point comes from the mouse events pos() value and will be converted to a value in symbol coordinates. If snapping is enabled, the point will be snapped to a guide or to a grid intersection. If snapping is disabled, the point is returned converted to the symbol coordinates.

Parameters
pointa const reference to a QPoint
Returns
a QPointF representing the symbol coordinates either snapped or not.

Definition at line 1121 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPair< bool, QPointF > Editor::snapToGrid ( const QPoint &  point) const
private

Convert a point to a symbol snap point. The point will have come from the mouse events pos() value and will be converted to a value that represents an intersection of the grid lines. This will happen only if snapping is enabled.

Parameters
pointa const reference to a QPoint
Returns
a QPair<bool, QPointF> the bool element determines if a snap point was found represented by the QPointF element

Definition at line 1143 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPair< bool, QPointF > Editor::snapToGuide ( const QPointF &  point) const
private

Convert a point to a guide snap point. The point will have come from the mouse events pos() value and will be converted to a value that is within the threshold of a calculated guide intersection. This will happen only if the snapping is enabled.

Parameters
pointa const reference to a QPointF
Returns
a QPair<bool, QPointF> the bool element determines if a snap point was found represented by the QPointF element

Definition at line 1168 of file Editor.cpp.

Here is the caller graph for this function:

QPair< qint16, Symbol > Editor::symbol ( )

Get the index and Symbol. Update the Symbol with the path being edited.

Returns
the edited Symbol and it's index in a QPair

Definition at line 204 of file Editor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QPoint Editor::toScreen ( const QPointF &  point) const
private

Convert a symbol point to a screen point. The symbol point will be a QPointF in the range 0..1 and will be converted to a value representing the position in the editor.

Parameters
pointa const reference to a QPointF
Returns
a QPoint representing the screen position in the editor

Definition at line 1195 of file Editor.cpp.

Here is the caller graph for this function:

QPointF Editor::toSymbol ( const QPoint &  point) const
private

Convert a point to a symbol point.

The point will have come from the mouse events pos() value and will be converted to a value representing a point in the symbol, not necessarily at a snap position.

Parameters
pointa const reference to a QPoint
Returns
a QPointF representing the point in symbol coordinates between 0..1

Definition at line 1101 of file Editor.cpp.

Here is the caller graph for this function:

QUndoStack * Editor::undoStack ( )

Get a pointer to the undo stack.

Returns
a pointer to the QUndoStack

Definition at line 543 of file Editor.cpp.

Here is the caller graph for this function:

Member Data Documentation

QList<QPointF> Editor::m_activePoints
private

the points that are being entered for the current command

Definition at line 170 of file Editor.h.

QVector<qreal> Editor::m_angles
private

the angles allowed for constructing guide lines

Definition at line 182 of file Editor.h.

int Editor::m_borderSize
private

The number of cell elements used for the border (Configuration::editor_BorderSize)

Definition at line 198 of file Editor.h.

QLineF Editor::m_bottomEdge
private

represents the bottom edge of the editor from 0,1 to 1,1

Definition at line 187 of file Editor.h.

KCharSelect* Editor::m_charSelect
private

pointer to KCharSelect dialog used to add characters to paths

Definition at line 191 of file Editor.h.

bool Editor::m_dragging
private

true if currently dragging a point around

Definition at line 176 of file Editor.h.

QPair<bool, int> Editor::m_dragPointIndex
private

represents the list and index of the point being moved, true for m_points, false for m_activePoints

Definition at line 180 of file Editor.h.

int Editor::m_elementGrouping
private

The number of cells in a group (Configuration::editor_ElementGroup)

Definition at line 195 of file Editor.h.

QList<QPainterPath::ElementType> Editor::m_elements
private

the basic elements making up the path, move, line and curve

Definition at line 168 of file Editor.h.

int Editor::m_elementSize
private

The size in pixels of an element (Configuration::editor_ElementSize)

Definition at line 194 of file Editor.h.

bool Editor::m_fill
private

true if fill mode is enabled

Definition at line 161 of file Editor.h.

int Editor::m_gridElements
private

The number of grid elements (Configuration::editor_GridElements)

Definition at line 193 of file Editor.h.

QList<qreal> Editor::m_guideCircles
private

the guide circles that have been constructed for a given point

Definition at line 184 of file Editor.h.

QColor Editor::m_guideLineColor
private

The color of the guide lines (Configuration::editor_GuideLineColor)

Definition at line 200 of file Editor.h.

QList<QLineF> Editor::m_guideLines
private

the guide lines that have been constructed for a given point

Definition at line 183 of file Editor.h.

qint16 Editor::m_index
private

the index of the symbol as stored in the library, this is 0 for new symbols

Definition at line 172 of file Editor.h.

QLineF Editor::m_leftEdge
private

represents the left edge of the editor from 0,1 to 0,1

Definition at line 188 of file Editor.h.

QPainterPath Editor::m_painterPath
private

the path from m_symbol currently being edited

Definition at line 173 of file Editor.h.

QList<QPointF> Editor::m_points
private

the points that have been committed relating to the elements in m_elements

Definition at line 167 of file Editor.h.

int Editor::m_pointSize
private

The size of a point in pixels (Configuration::editor_PointSize)

Definition at line 196 of file Editor.h.

QColor Editor::m_preferredSizeColor
private

The color of the preferred size square (Configuration::editor_PreferredSizeColor)

Definition at line 199 of file Editor.h.

QLineF Editor::m_rightEdge
private

represents the right edge of the editor from 1,0 to 1,1

Definition at line 189 of file Editor.h.

QRectF Editor::m_rubberBand
private

a rubber band rectangle in symbol coordinates, is null when not required

Definition at line 179 of file Editor.h.

int Editor::m_size
private

the overall size of the editor

Definition at line 158 of file Editor.h.

bool Editor::m_snap
private

true if snap mode is enabled

Definition at line 160 of file Editor.h.

QList<QPointF> Editor::m_snapPoints
private

points that intersect with guide lines

Definition at line 185 of file Editor.h.

double Editor::m_snapThreshold
private

The distance to check within the range of a point (Configuration::editor_SnapThreshold)

Definition at line 197 of file Editor.h.

QPointF Editor::m_start
private

the start position of a drag operation or the start of a rubber band selection

Definition at line 177 of file Editor.h.

Symbol Editor::m_symbol
private

the symbol containing the QPainterPath and rendering attributes

Definition at line 174 of file Editor.h.

ToolMode Editor::m_toolMode
private

the current tool selected

Definition at line 165 of file Editor.h.

QLineF Editor::m_topEdge
private

represents the top edge of the editor from 0,0 to 1,0

Definition at line 186 of file Editor.h.

QPointF Editor::m_tracking
private

the current position of a drag operation or the position of a rubber band selection

Definition at line 178 of file Editor.h.

QUndoStack Editor::m_undoStack
private

holds the commands that modify the editor contents allowing for undo

Definition at line 163 of file Editor.h.


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