HAL
hal::ActionSetSelectionFocus Class Reference

Set the selection and focus. More...

#include <action_set_selection_focus.h>

Inheritance diagram for hal::ActionSetSelectionFocus:
Inheritance graph
Collaboration diagram for hal::ActionSetSelectionFocus:
Collaboration graph

Public Member Functions

 ActionSetSelectionFocus ()
 
QString tagname () const override
 
void writeToXml (QXmlStreamWriter &xmlOut) const override
 
void readFromXml (QXmlStreamReader &xmlIn) override
 
bool exec () override
 
void addToHash (QCryptographicHash &cryptoHash) const override
 
bool hasModifications () const
 
void setObject (const UserActionObject &obj) override
 
- Public Member Functions inherited from hal::UserAction
virtual ~UserAction ()
 
virtual UserActionObject object () const
 
int compoundOrder () const
 
void setCompoundOrder (int cmpord)
 
qint64 timeStamp () const
 
QString cryptographicHash (int recordNo) const
 
UserActionundoAction () const
 
QString debugDump () const
 
void setObjectLock (bool lock)
 
void setParentObjectLock (bool lock)
 
bool hasProjectModified () const
 

Friends

class SelectionRelay
 

Additional Inherited Members

- Protected Member Functions inherited from hal::UserAction
 UserAction ()
 
void writeParentObjectToXml (QXmlStreamWriter &xmlOut) const
 
void readParentObjectFromXml (QXmlStreamReader &xmlIn)
 
- Static Protected Member Functions inherited from hal::UserAction
static QString setToText (const QSet< u32 > &set)
 
static QSet< u32setFromText (const QString &s)
 
static QString gridToText (const QHash< hal::Node, QPoint > &grid)
 
static QHash< hal::Node, QPointgridFromText (const QString &txt)
 
- Protected Attributes inherited from hal::UserAction
UserActionObject mObject
 
UserActionObject mParentObject
 
int mCompoundOrder
 
UserActionmUndoAction
 
qint64 mTimeStamp
 
bool mObjectLock
 
bool mParentObjectLock
 
bool mProjectModified
 

Detailed Description

Set the selection and focus.

Sets the current selection and focus. The internal parameter are set directly by the SelectionRelay.

Undo Action: SetSelectionFocus

Definition at line 40 of file action_set_selection_focus.h.

Constructor & Destructor Documentation

◆ ActionSetSelectionFocus()

hal::ActionSetSelectionFocus::ActionSetSelectionFocus ( )

Action constructor.

Definition at line 16 of file action_set_selection_focus.cpp.

References hal::UserAction::mProjectModified.

Referenced by exec().

Member Function Documentation

◆ addToHash()

void hal::ActionSetSelectionFocus::addToHash ( QCryptographicHash cryptoHash) const
overridevirtual

Hook for derived classes to add parameter to cryptographic hash.

Parameters
cryptoHash- Additional hash data.

Reimplemented from hal::UserAction.

Definition at line 26 of file action_set_selection_focus.cpp.

References QCryptographicHash::addData(), and hal::UserAction::setToText().

◆ exec()

◆ hasModifications()

bool hal::ActionSetSelectionFocus::hasModifications ( ) const

◆ readFromXml()

void hal::ActionSetSelectionFocus::readFromXml ( QXmlStreamReader xmlIn)
overridevirtual

◆ setObject()

◆ tagname()

QString hal::ActionSetSelectionFocus::tagname ( ) const
overridevirtual

The xml tagname for the action is purely virtual and needs to be implemented in derived class.

Returns
The tagname.

Implements hal::UserAction.

Definition at line 21 of file action_set_selection_focus.cpp.

References hal::ActionSetSelectionFocusFactory::sFactory, and hal::UserActionFactory::tagname().

◆ writeToXml()

void hal::ActionSetSelectionFocus::writeToXml ( QXmlStreamWriter xmlOut) const
overridevirtual

Persist user interaction in xml macro file.

Parameters
xmlOut- The xml writer.

Reimplemented from hal::UserAction.

Definition at line 38 of file action_set_selection_focus.cpp.

References QSet::isEmpty(), hal::SelectionRelay::Left, QString::number(), hal::SelectionRelay::Right, hal::UserAction::setToText(), QXmlStreamWriter::writeAttribute(), and QXmlStreamWriter::writeTextElement().

Friends And Related Function Documentation

◆ SelectionRelay

friend class SelectionRelay
friend

Definition at line 42 of file action_set_selection_focus.h.


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