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 | Private Member Functions | Private Attributes
OOInteraction::HExpression Class Reference
Inheritance diagram for OOInteraction::HExpression:
Interaction::GenericHandler Visualization::InteractionHandler OOInteraction::HArrayInitializer

Public Types

typedef std::function< void(OOModel::Expression *&, int &)> ExpressionChangeMonitorFunction
 
- Public Types inherited from Interaction::GenericHandler
using CommentCreationFunction = std::function< Model::Node *()>
 
enum  CursorMoveOrientation { NoOrientation , VerticalOrientation , HorizontalOrientation }
 

Public Member Functions

void appendExpressionMonitor (ExpressionChangeMonitorFunction monitor)
 
virtual void keyPressEvent (Visualization::Item *target, QKeyEvent *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
 
virtual void mouseDoubleClickEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event) override
 
virtual void mouseMoveEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event) override
 
virtual void mousePressEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *event) override
 
virtual void mouseReleaseEvent (Visualization::Item *target, QGraphicsSceneMouseEvent *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 focusOutEvent (Item *target, QFocusEvent *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 HExpressioninstance ()
 
- 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

 HExpression ()=default
 
- 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 ()
 

Private Member Functions

void doAutoComplete (Visualization::Item *target, const QString &autoCompleteStr)
 
OOModel::ExpressionStatementparentExpressionStatement (OOModel::Expression *e)
 
void setNewExpression (Visualization::Item *target, Visualization::Item *topMostItem, const QString &text, int index)
 
void showAutoComplete (Visualization::Item *target, bool showIfEmpty=true, bool showIfPreciselyMatched=true)
 
Visualization::ItemstringInfo (Visualization::Item *target, Qt::Key key, QString &str, int &index)
 
void toggleAutoComplete (Visualization::Item *target)
 

Private Attributes

QList< ExpressionChangeMonitorFunctionexpressionMonitors_
 

Member Typedef Documentation

◆ ExpressionChangeMonitorFunction

Constructor & Destructor Documentation

◆ HExpression()

OOInteraction::HExpression::HExpression ( )
protecteddefault

Member Function Documentation

◆ appendExpressionMonitor()

void OOInteraction::HExpression::appendExpressionMonitor ( ExpressionChangeMonitorFunction  monitor)
inline

◆ doAutoComplete()

void OOInteraction::HExpression::doAutoComplete ( Visualization::Item target,
const QString &  autoCompleteStr 
)
private

◆ instance()

HExpression * OOInteraction::HExpression::instance ( )
static

◆ keyPressEvent()

void OOInteraction::HExpression::keyPressEvent ( Visualization::Item target,
QKeyEvent *  event 
)
virtual

Reimplemented from Interaction::GenericHandler.

Reimplemented in OOInteraction::HArrayInitializer.

◆ parentExpressionStatement()

ExpressionStatement * OOInteraction::HExpression::parentExpressionStatement ( OOModel::Expression e)
private

◆ setNewExpression()

void OOInteraction::HExpression::setNewExpression ( Visualization::Item target,
Visualization::Item topMostItem,
const QString &  text,
int  index 
)
private

◆ showAutoComplete()

void OOInteraction::HExpression::showAutoComplete ( Visualization::Item target,
bool  showIfEmpty = true,
bool  showIfPreciselyMatched = true 
)
private

◆ stringInfo()

Item * OOInteraction::HExpression::stringInfo ( Visualization::Item target,
Qt::Key  key,
QString &  str,
int &  index 
)
private

◆ toggleAutoComplete()

void OOInteraction::HExpression::toggleAutoComplete ( Visualization::Item target)
private

Member Data Documentation

◆ expressionMonitors_

QList<ExpressionChangeMonitorFunction> OOInteraction::HExpression::expressionMonitors_
private