![]() |
HAL
|
Set the selection and focus. More...
#include <action_set_selection_focus.h>
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 |
![]() | |
virtual | ~UserAction () |
virtual UserActionObject | object () const |
int | compoundOrder () const |
void | setCompoundOrder (int cmpord) |
qint64 | timeStamp () const |
QString | cryptographicHash (int recordNo) const |
UserAction * | undoAction () const |
QString | debugDump () const |
void | setObjectLock (bool lock) |
void | setParentObjectLock (bool lock) |
bool | hasProjectModified () const |
Friends | |
class | SelectionRelay |
Additional Inherited Members | |
![]() | |
UserAction () | |
void | writeParentObjectToXml (QXmlStreamWriter &xmlOut) const |
void | readParentObjectFromXml (QXmlStreamReader &xmlIn) |
![]() | |
static QString | setToText (const QSet< u32 > &set) |
static QSet< u32 > | setFromText (const QString &s) |
static QString | gridToText (const QHash< hal::Node, QPoint > &grid) |
static QHash< hal::Node, QPoint > | gridFromText (const QString &txt) |
![]() | |
UserActionObject | mObject |
UserActionObject | mParentObject |
int | mCompoundOrder |
UserAction * | mUndoAction |
qint64 | mTimeStamp |
bool | mObjectLock |
bool | mParentObjectLock |
bool | mProjectModified |
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.
hal::ActionSetSelectionFocus::ActionSetSelectionFocus | ( | ) |
Action constructor.
Definition at line 16 of file action_set_selection_focus.cpp.
References hal::UserAction::mProjectModified.
Referenced by exec().
|
overridevirtual |
Hook for derived classes to add parameter to cryptographic hash.
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().
|
overridevirtual |
Executes user interaction and returns true on success. Note: Each implementation of exec() must include a call to the exec() method of base class to store the UserAction object in history and to transfer its ownership.
Reimplemented from hal::UserAction.
Definition at line 120 of file action_set_selection_focus.cpp.
References hal::SelectionRelay::actionSetSelected(), ActionSetSelectionFocus(), hal::UserAction::exec(), hal::SelectionRelay::focusId(), hal::SelectionRelay::focusType(), hal::UserActionObjectType::fromSelectionType(), hal::gSelectionRelay, hal::UserActionObject::id(), hal::UserAction::mObject, hal::UserAction::mUndoAction, hal::SelectionRelay::selectedGates(), hal::SelectionRelay::selectedModules(), hal::SelectionRelay::selectedNets(), hal::SelectionRelay::setFocusDirect(), hal::SelectionRelay::subfocus(), hal::SelectionRelay::subfocusIndex(), hal::UserActionObjectType::toSelectionType(), and hal::UserActionObject::type().
Referenced by hal::ModuleContextMenu::addGateSubmenu(), hal::ModuleContextMenu::addModuleSubmenu(), and hal::ModuleContextMenu::addNetSubmenu().
bool hal::ActionSetSelectionFocus::hasModifications | ( | ) | const |
Checks if the new selection/focus of this action differs from the current selection/focus.
Definition at line 87 of file action_set_selection_focus.cpp.
References hal::SelectionRelay::focusId(), hal::SelectionRelay::focusType(), hal::UserActionObjectType::fromSelectionType(), hal::gSelectionRelay, hal::UserActionObject::id(), hal::UserAction::mObject, hal::SelectionRelay::selectedGates(), hal::SelectionRelay::selectedModules(), hal::SelectionRelay::selectedNets(), hal::SelectionRelay::subfocus(), hal::SelectionRelay::subfocusIndex(), and hal::UserActionObject::type().
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
xmlIn | - The xml reader. |
Reimplemented from hal::UserAction.
Definition at line 59 of file action_set_selection_focus.cpp.
References QXmlStreamReader::attributes(), QStringRef::isEmpty(), QStringRef::isNull(), hal::SelectionRelay::Left, QXmlStreamReader::name(), QXmlStreamReader::readElementText(), QXmlStreamReader::readNextStartElement(), hal::SelectionRelay::Right, hal::UserAction::setFromText(), QStringRef::toInt(), and QXmlStreamAttributes::value().
|
overridevirtual |
Setter for object argument of interaction.
obj | - The object. |
Reimplemented from hal::UserAction.
Definition at line 100 of file action_set_selection_focus.cpp.
References hal::UserActionObjectType::Gate, hal::UserActionObject::id(), QSet::insert(), hal::UserActionObjectType::Module, hal::UserActionObjectType::Net, hal::UserAction::setObject(), and hal::UserActionObject::type().
Referenced by hal::ModuleContextMenu::addGateSubmenu(), hal::ModuleContextMenu::addModuleSubmenu(), hal::ModuleContextMenu::addNetSubmenu(), and hal::SelectionRelay::setFocus().
|
overridevirtual |
The xml tagname for the action is purely virtual and needs to be implemented in derived class.
Implements hal::UserAction.
Definition at line 21 of file action_set_selection_focus.cpp.
References hal::ActionSetSelectionFocusFactory::sFactory, and hal::UserActionFactory::tagname().
|
overridevirtual |
Persist user interaction in xml macro file.
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().
|
friend |
Definition at line 42 of file action_set_selection_focus.h.