#include <diagrameditor.h>
Inheritance diagram for DiagramEditor:

Public Slots | |
| virtual void | copy () |
| virtual void | cut () |
| virtual void | del () |
| virtual void | paste () |
| virtual void | selectAll () |
Public Member Functions | |
| DiagramEditor (JavaVM *jvm, QWidget *parent=0) | |
| DiagramEditor (AbstractController *diagramController, AbstractController *digestDbController, AbstractController *settingsController, JavaVM *jvm, QWidget *parent=0) | |
| QSize | sizeHint () const |
| Digest::Tool | currentTool () const |
| void | setCurrentTool (Digest::Tool tool) |
Protected Types | |
| enum | GestureType { UnknownGesture, CircleGesture, LineGesture, SquareGesture } |
Protected Slots | |
| virtual bool | tryBeginElementEditing (AbstractElement *) |
| virtual void | currentElementEditingFinished () |
Protected Member Functions | |
| virtual void | customEvent (QEvent *) |
| virtual void | diagramResetEvent (VEvent *) |
| virtual void | elementAddedEvent (VElementEvent *) |
| virtual void | elementRemovedEvent (VElementEvent *) |
| virtual void | elementAttributeAddedEvent (VElementAttributeEvent *) |
| virtual void | elementAttributeRemovedEvent (VElementAttributeEvent *) |
| virtual void | elementAttributeDataChangedEvent (VElementAttributeEvent *) |
| virtual void | elementSelectionChangedEvent (VElementSelectionChangedEvent *) |
| virtual void | elementSetOrderChangedEvent (VElementSetOrderChangedEvent *) |
| virtual void | settingsResetEvent (VEvent *) |
| virtual void | settingsValueChangedEvent (VSettingsValueChangedEvent *) |
| virtual void | digestDbResetEvent (VEvent *) |
| virtual void | trainedRecogsEvent (VTrainedRecogsEvent *) |
| virtual void | keyPressEvent (QKeyEvent *) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *) |
| virtual void | mousePressEvent (QMouseEvent *) |
| virtual void | mouseReleaseEvent (QMouseEvent *) |
| virtual void | mouseMoveEvent (QMouseEvent *) |
| virtual void | tabletEvent (QTabletEvent *) |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | selectionPress (const QPointF &pos, Qt::KeyboardModifiers modifiers) |
| virtual void | selectionRelease () |
| virtual void | selectionMove (const QPointF &pos) |
| virtual QPicture | buildElementPicture (const AbstractElement *element) const |
| AbstractElement * | findElementAt (const QPointF &pos) const |
| AbstractElement * | addNewElement (int type) |
| AbstractElementAttribute * | addNewElementAttribute (int type, AbstractElement *element) |
| virtual void | refreshRecogniser () |
| virtual void | recogniseCurrentStroke () |
enum DiagramEditor::GestureType [protected] |
| DiagramEditor::DiagramEditor | ( | JavaVM * | jvm, | |
| QWidget * | parent = 0 | |||
| ) |
Constructs a diagram editor with the given parent.
| DiagramEditor::DiagramEditor | ( | AbstractController * | diagramController, | |
| AbstractController * | digestDbController, | |||
| AbstractController * | settingsController, | |||
| JavaVM * | jvm, | |||
| QWidget * | parent = 0 | |||
| ) |
Constructs a diagram editor with the given parent and attaches itself to the controller.
| QSize DiagramEditor::sizeHint | ( | ) | const |
| Digest::Tool DiagramEditor::currentTool | ( | ) | const [inline] |
| void DiagramEditor::setCurrentTool | ( | Digest::Tool | tool | ) |
| void DiagramEditor::copy | ( | ) | [virtual, slot] |
Copies any selected diagram elements into the clipboard.
If there are no selected elements, nothing happens.
| void DiagramEditor::cut | ( | ) | [virtual, slot] |
Copies any selected elements into the clipboard and the deletes them from the Diagram.
If there are no selected elements, nothing happens.
| void DiagramEditor::del | ( | ) | [virtual, slot] |
Deletes any selected diagram elements from the Diagram.
If there are no selected elements, nothing happens.
| void DiagramEditor::paste | ( | ) | [virtual, slot] |
Inserts any diagram elements that are in the clipboard into the Diagram.
| void DiagramEditor::selectAll | ( | ) | [virtual, slot] |
| bool DiagramEditor::tryBeginElementEditing | ( | AbstractElement * | ) | [protected, virtual, slot] |
| void DiagramEditor::currentElementEditingFinished | ( | ) | [protected, virtual, slot] |
This slot is in charge of updating the element that is currently in edit and any of its attributes and then destroying the current editor.
| void DiagramEditor::customEvent | ( | QEvent * | e | ) | [protected, virtual] |
Calls AbstractDiagramView::dispatchEvent(), AbstractDigestDbView::dispatchEvent(), or AbstractSettingsView::dispatchEvent(), depending on the event sender's module ID.
| void DiagramEditor::diagramResetEvent | ( | VEvent * | ) | [protected, virtual] |
Conveniance event handler.
Warning: It will be called in addition to resetEvent(). It's useful when mixing multiple views together.
This implementation does nothing.
Reimplemented from AbstractDiagramView.
| void DiagramEditor::elementAddedEvent | ( | VElementEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::elementRemovedEvent | ( | VElementEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::elementAttributeAddedEvent | ( | VElementAttributeEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::elementAttributeRemovedEvent | ( | VElementAttributeEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::elementAttributeDataChangedEvent | ( | VElementAttributeEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::elementSelectionChangedEvent | ( | VElementSelectionChangedEvent * | ) | [protected, virtual] |
Reimplemented from AbstractDiagramView.
| void DiagramEditor::elementSetOrderChangedEvent | ( | VElementSetOrderChangedEvent * | ) | [protected, virtual] |
Reimplemented from AbstractElementDocView.
| void DiagramEditor::settingsResetEvent | ( | VEvent * | ) | [protected, virtual] |
Unconditionally calls refreshRecogniser().
Reimplemented from AbstractSettingsView.
| void DiagramEditor::settingsValueChangedEvent | ( | VSettingsValueChangedEvent * | event | ) | [protected, virtual] |
Calls refreshRecogniser() if recognition is enabled or disabled or if there is a change in which trained recogniser is to be used.
Reimplemented from AbstractSettingsView.
| void DiagramEditor::digestDbResetEvent | ( | VEvent * | ) | [protected, virtual] |
Unconditionally calls refreshRecogniser().
Reimplemented from AbstractDigestDbView.
| void DiagramEditor::trainedRecogsEvent | ( | VTrainedRecogsEvent * | event | ) | [protected, virtual] |
Calls refreshRecogniser() if there is an active recogniser and the event refers to its trained recognier record ID.
Reimplemented from AbstractDigestDbView.
| void DiagramEditor::keyPressEvent | ( | QKeyEvent * | ) | [protected, virtual] |
| void DiagramEditor::mouseDoubleClickEvent | ( | QMouseEvent * | ) | [protected, virtual] |
| void DiagramEditor::mousePressEvent | ( | QMouseEvent * | ) | [protected, virtual] |
| void DiagramEditor::mouseReleaseEvent | ( | QMouseEvent * | ) | [protected, virtual] |
| void DiagramEditor::mouseMoveEvent | ( | QMouseEvent * | ) | [protected, virtual] |
| void DiagramEditor::tabletEvent | ( | QTabletEvent * | ) | [protected, virtual] |
| void DiagramEditor::paintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
| void DiagramEditor::selectionPress | ( | const QPointF & | pos, | |
| Qt::KeyboardModifiers | modifiers | |||
| ) | [protected, virtual] |
| void DiagramEditor::selectionRelease | ( | ) | [protected, virtual] |
| void DiagramEditor::selectionMove | ( | const QPointF & | pos | ) | [protected, virtual] |
| QPicture DiagramEditor::buildElementPicture | ( | const AbstractElement * | element | ) | const [protected, virtual] |
Warning: The path return does not include the element's position. This allows use to reuse a path even while it's being moved around.
| AbstractElement * DiagramEditor::findElementAt | ( | const QPointF & | pos | ) | const [protected] |
| AbstractElement * DiagramEditor::addNewElement | ( | int | type | ) | [protected] |
Uses DiagramElementFactory to create the element and then posts a CElementAddEvent to the Diagram's controller if it was successfully created.
Returns the pointer to the new element.
Note: The type is an int, as to aid extensibility.
| AbstractElementAttribute * DiagramEditor::addNewElementAttribute | ( | int | type, | |
| AbstractElement * | element | |||
| ) | [protected] |
Uses DiagramElementAttributeFactory to create the element and then posts a CElementAttributeAddEvent to the Diagram's controller if it was successfully created.
Returns the pointer to the new element.
Note: The type is an int, as to aid extensibility.
| void DiagramEditor::refreshRecogniser | ( | ) | [protected, virtual] |
Destroys and if possible, recreates the gesture recogniser, according to the settingsModel(), using the digestDbModel().
This may safely be called if either of these models havn't been initialised, as it will simply delete any existing recogniser and return.
| void DiagramEditor::recogniseCurrentStroke | ( | ) | [protected, virtual] |
Attempts to recognise the current gesture's stroke, as drawn by the user and then adds a new DiagramGesture to the diagram, using the ink data and shape results.
This may safely be called if there is no recogniser, it will just return without doing anything.
1.5.2