#include <strokeseditor.h>
Inheritance diagram for StrokesEditor:

Public Types | |
| enum | State { EmptyState, StartedState, FinishedState } |
Public Slots | |
| virtual void | setAutoClear (bool autoClear) |
| virtual void | setModified (bool modified) |
| virtual void | setReadOnly (bool readOnly) |
| virtual void | setRecordHiRes (bool enable) |
| virtual void | setStrokes (const StrokeList &strokes, bool updateWidget=true) |
| virtual void | setMultiStrokeTimeout (double timeout) |
| void | stopMultiStrokeTimoutTimer () |
Signals | |
| void | recordHiResToggled (bool enabled) |
| void | multiStrokeTimeoutChanged (double timeout) |
| void | strokingAboutToStart () |
| void | strokingStarted () |
| void | strokingFinished (const StrokeList &strokes) |
Public Member Functions | |
| StrokesEditor (QWidget *parent=0) | |
| StrokesEditor (const StrokeList &strokes, QWidget *parent=0, bool readOnly=false) | |
| State | state () const |
| bool | autoClear () const |
| bool | isModified () const |
| bool | isReadOnly () const |
| bool | isStrokeBeginDrawn () const |
| bool | recordHiRes () const |
| double | multiStrokeTimeout () const |
Protected Member Functions | |
| virtual void | beginNewStroke (StrokePoint pt) |
| virtual void | addPointToStroke (const StrokePoint &pt) |
| virtual void | endStroke () |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual void | mouseMoveEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | tabletEvent (QTabletEvent *event) |
Properties | |
| bool | autoClear |
| bool | readOnly |
| bool | recordHiRes |
| double | multiStrokeTimeout |
| enum StrokesEditor::State |
| StrokesEditor::StrokesEditor | ( | QWidget * | parent = 0 |
) |
| StrokesEditor::StrokesEditor | ( | const StrokeList & | strokes, | |
| QWidget * | parent = 0, |
|||
| bool | readOnly = false | |||
| ) |
Convenience constructor.
| StrokesEditor::State StrokesEditor::state | ( | ) | const |
| bool StrokesEditor::autoClear | ( | ) | const |
| bool StrokesEditor::isModified | ( | ) | const |
Note: Calling setStrokes() resets the modified flag to false.
| bool StrokesEditor::isReadOnly | ( | ) | const |
| bool StrokesEditor::isStrokeBeginDrawn | ( | ) | const |
| bool StrokesEditor::recordHiRes | ( | ) | const |
| double StrokesEditor::multiStrokeTimeout | ( | ) | const |
| void StrokesEditor::recordHiResToggled | ( | bool | enabled | ) | [signal] |
| void StrokesEditor::multiStrokeTimeoutChanged | ( | double | timeout | ) | [signal] |
| void StrokesEditor::strokingAboutToStart | ( | ) | [signal] |
| void StrokesEditor::strokingStarted | ( | ) | [signal] |
| void StrokesEditor::strokingFinished | ( | const StrokeList & | strokes | ) | [signal] |
| void StrokesEditor::setAutoClear | ( | bool | autoClear | ) | [virtual, slot] |
| void StrokesEditor::setModified | ( | bool | modified | ) | [virtual, slot] |
Note: Calling setStrokes() resets the modified flag to false.
| void StrokesEditor::setReadOnly | ( | bool | readOnly | ) | [virtual, slot] |
| void StrokesEditor::setRecordHiRes | ( | bool | enable | ) | [virtual, slot] |
| void StrokesEditor::setStrokes | ( | const StrokeList & | strokes, | |
| bool | updateWidget = true | |||
| ) | [virtual, slot] |
Calling this will reset the modified flag to false.
Also calls stopMultiStrokeTimoutTimer();
Reimplemented from StrokesViewer.
| void StrokesEditor::setMultiStrokeTimeout | ( | double | timeout | ) | [virtual, slot] |
Sets how much time can pass between multiple strokes before multiStrokeFinished() is emitted. The time is expressed in terms of seconds.
| void StrokesEditor::stopMultiStrokeTimoutTimer | ( | ) | [slot] |
| void StrokesEditor::beginNewStroke | ( | StrokePoint | pt | ) | [protected, virtual] |
Note: Unlike endStroke(), this requires the x, y and pressure parameters because this corresponds to a MOVE TO, vs. the addPointToStroke()'s LINE TO. Also, you may want to call endStroke() without a point.
If this is not the first stroke and the time between now and when the previous stroke began is larger then the multi-stroke timeout, then the multiStrokeFinished() signal is emitted first.
Sets the modified flag to true.
| void StrokesEditor::addPointToStroke | ( | const StrokePoint & | pt | ) | [protected, virtual] |
Asserts that isStroking() == true.
| void StrokesEditor::endStroke | ( | ) | [protected, virtual] |
| void StrokesEditor::mousePressEvent | ( | QMouseEvent * | event | ) | [protected, virtual] |
| void StrokesEditor::mouseMoveEvent | ( | QMouseEvent * | event | ) | [protected, virtual] |
| void StrokesEditor::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [protected, virtual] |
| void StrokesEditor::tabletEvent | ( | QTabletEvent * | event | ) | [protected, virtual] |
bool StrokesEditor::autoClear [read, write] |
bool StrokesEditor::readOnly [read, write] |
bool StrokesEditor::recordHiRes [read, write] |
double StrokesEditor::multiStrokeTimeout [read, write] |
Returns the how much time can pass between multiple strokes before multiStrokeFinished() is emitted. The time is expressed in terms of seconds.
1.5.2