Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
Comments::HCommentText Class Reference

The HCommentText class provides the functionality to interact with the CommentText class. More...

Inheritance diagram for Comments::HCommentText:
Interaction::HText Interaction::GenericHandler Visualization::InteractionHandler

Public Types

using EmbedFunction = std::function< Model::Node *()>
 
- Public Types inherited from Interaction::GenericHandler
using CommentCreationFunction = std::function< Model::Node *()>
 
enum  CursorMoveOrientation { NoOrientation , VerticalOrientation , HorizontalOrientation }
 

Public Member Functions

virtual void keyPressEvent (Visualization::Item *target, QKeyEvent *event) override
 
virtual void mousePressEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event) override
 
- Public Member Functions inherited from Interaction::HText
virtual void focusOutEvent (Visualization::Item *target, QFocusEvent *event)
 
virtual void mouseDoubleClickEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event)
 
virtual void mouseMoveEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event)
 
- Public Member Functions inherited from Interaction::GenericHandler
virtual void action (Visualization::Item *target, const QString &action)
 
ActionPromptactionPrompt ()
 
void addCommand (Command *command)
 
virtual void beforeEvent (Visualization::Item *target, QEvent *event) override
 
virtual void command (Visualization::Item *target, const QString &command, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
const QList< Command * > & commands ()
 TODO: Commands are not inherited when the handler is inherited. More...
 
virtual void focusInEvent (Visualization::Item *target, QFocusEvent *event) override
 
void removeActionPrompt ()
 
bool removeFromList (Visualization::Item *target)
 Removes the node visualized by target from the list which contains it. More...
 
void showActionPrompt (Visualization::Item *actionRecevier, bool autoExecuteAction)
 
void toggleComment (Visualization::Item *itemWithComment, Model::Node *aNode, bool hideOnly)
 
virtual void wheelEvent (Visualization::Item *target, QGraphicsSceneWheelEvent *event) override
 
- Public Member Functions inherited from Visualization::InteractionHandler
virtual ~InteractionHandler ()
 
virtual void afterEvent (Item *target, QEvent *event)
 
virtual void command (Item *target, const QString &command, const std::unique_ptr< Cursor > &cursor)
 
virtual void contextMenuEvent (Item *target, QGraphicsSceneContextMenuEvent *event)
 
virtual void dragEnterEvent (Item *target, QGraphicsSceneDragDropEvent *event)
 
virtual void dragLeaveEvent (Item *target, QGraphicsSceneDragDropEvent *event)
 
virtual void dragMoveEvent (Item *target, QGraphicsSceneDragDropEvent *event)
 
virtual void dropEvent (Item *target, QGraphicsSceneDragDropEvent *event)
 
virtual void hoverEnterEvent (Item *target, QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (Item *target, QGraphicsSceneHoverEvent *event)
 
virtual void hoverMoveEvent (Item *target, QGraphicsSceneHoverEvent *event)
 
virtual void keyReleaseEvent (Item *target, QKeyEvent *event)
 

Static Public Member Functions

static HCommentTextinstance ()
 
static void registerEmbedKeyword (const QString &keyword, EmbedFunction function)
 
- Static Public Member Functions inherited from Interaction::HText
static HTextinstance ()
 
- Static Public Member Functions inherited from Interaction::GenericHandler
static CommandExecutionEngineexecutionEngine ()
 
static void fixCursorPositionForUndoAfterTreeManagerChange ()
 
static GenericHandlerinstance ()
 
static void setCommandExecutionEngine (CommandExecutionEngine *engine)
 
static void setCommentCreationFunction (CommentCreationFunction f)
 
- Static Public Member Functions inherited from Visualization::InteractionHandler
static InteractionHandlerinstance ()
 
static bool isClick (Item *target)
 
static bool isDrag (Item *target)
 

Protected Member Functions

 HCommentText ()
 
- Protected Member Functions inherited from Interaction::HText
 HText ()
 
void erase (Visualization::Item *target, bool forwards, bool onlyDeleteIfSelected)
 
void insertText (Visualization::Item *target, const QString &textToInsert)
 
- Protected Member Functions inherited from Interaction::GenericHandler
 GenericHandler ()
 
virtual void filterSelectedItems (Visualization::Item *target, QGraphicsSceneMouseEvent *event)
 
bool moveCursor (Visualization::Item *target, int key)
 
- Protected Member Functions inherited from Visualization::InteractionHandler
 InteractionHandler ()
 

Static Protected Member Functions

static QHash< QString, EmbedFunction > & embedKeywords ()
 

Detailed Description

The HCommentText class provides the functionality to interact with the CommentText class.

It offers the keyboard interaction to replace the textfield with another node.

Member Typedef Documentation

◆ EmbedFunction

Constructor & Destructor Documentation

◆ HCommentText()

Comments::HCommentText::HCommentText ( )
protected

Member Function Documentation

◆ embedKeywords()

QHash< QString, HCommentText::EmbedFunction > & Comments::HCommentText::embedKeywords ( )
staticprotected

◆ instance()

HCommentText * Comments::HCommentText::instance ( )
static

◆ keyPressEvent()

void Comments::HCommentText::keyPressEvent ( Visualization::Item target,
QKeyEvent *  event 
)
overridevirtual

Reimplemented from Interaction::HText.

◆ mousePressEvent()

void Comments::HCommentText::mousePressEvent ( Visualization::Item target,
QGraphicsSceneMouseEvent *  event 
)
overridevirtual

Reimplemented from Interaction::HText.

◆ registerEmbedKeyword()

void Comments::HCommentText::registerEmbedKeyword ( const QString &  keyword,
EmbedFunction  function 
)
static