![]() |
HAL
|
Pingroup user actions. More...
#include <action_pingroup.h>
Public Member Functions | |
ActionPingroup (PinActionType::Type tp=PinActionType::None, int id=0, const QString &name=QString(), int value=0) | |
ActionPingroup (const QList< AtomicAction > &aaList) | |
bool | exec () override |
QString | tagname () const override |
void | writeToXml (QXmlStreamWriter &xmlOut) const override |
void | readFromXml (QXmlStreamReader &xmlIn) override |
void | addToHash (QCryptographicHash &cryptoHash) const override |
![]() | |
virtual | ~UserAction () |
virtual UserActionObject | object () const |
virtual void | setObject (const UserActionObject &obj) |
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 |
Static Public Member Functions | |
static ActionPingroup * | addPinsToExistingGroup (const Module *m, u32 grpId, QList< u32 > pinIds, int pinRow=-1) |
static ActionPingroup * | addPinToExistingGroup (const Module *m, u32 grpId, u32 pinId, int pinRow=-1) |
static ActionPingroup * | addPinsToNewGroup (const Module *m, const QString &name, QList< u32 > pinIds, int grpRow=-1) |
static ActionPingroup * | addPinToNewGroup (const Module *m, const QString &name, u32 pinId, int grpRow=-1) |
static ActionPingroup * | removePinsFromGroup (const Module *m, QList< u32 > pinIds) |
static ActionPingroup * | deletePinGroup (const Module *m, u32 grpId) |
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 |
Pingroup user actions.
Arguments depends on PinActionType::Type:
GroupCreate: ID : ID of group to create negative ID: call constructor without ID, however, ID will be used internally for subsequent commands related to crated group name : name of group value : start index, assume ascending negative value: descending order starting with (-value-1)
GroupDelete ID : ID of group to delete
GroupMoveToRow ID : ID of group to move value : row to which group get moved within vector of pin groups
GroupRename ID : ID of group to rename name : new name
GroupTypeChange ID : ID of group to modifiy value : (int) PinType as of hal_core/netlist/gate_library/enums/pin_type.h
GroupDirChange ID : ID of group to modifiy value : (int) PinDirection as of hal_core/netlist/gate_library/enums/pin_direction.h
PinAsignToGroup ID : ID of pin value : ID of group, might be negative if group recently created
PinRename ID : ID of pin to rename name : new name
PinTypeChange ID : ID of pin to modify value : (int) PinType
PinDirChange ID : ID of pin to modify value : (int) PinDirection
PinMoveToRow ID : ID of pin value : row to which pin gets moved in pingroup
Definition at line 111 of file action_pingroup.h.
hal::ActionPingroup::ActionPingroup | ( | PinActionType::Type | tp = PinActionType::None , |
int | id = 0 , |
||
const QString & | name = QString() , |
||
int | value = 0 |
||
) |
Definition at line 118 of file action_pingroup.cpp.
References QList::append(), and name.
Referenced by addPinsToExistingGroup(), addPinsToNewGroup(), deletePinGroup(), and removePinsFromGroup().
hal::ActionPingroup::ActionPingroup | ( | const QList< AtomicAction > & | aaList | ) |
Definition at line 123 of file action_pingroup.cpp.
|
static |
Definition at line 435 of file action_pingroup.cpp.
References ActionPingroup(), QList::append(), hal::Module::get_id(), hal::UserActionObjectType::Module, hal::PinActionType::PinAsignToGroup, hal::PinActionType::PinMoveToRow, and hal::UserAction::setObject().
Referenced by addPinToExistingGroup(), and hal::ModulePinsTree::handleContextMenuRequested().
|
static |
Definition at line 458 of file action_pingroup.cpp.
References ActionPingroup(), QList::append(), QList::first(), hal::BasePin< T >::get_direction(), hal::Module::get_id(), hal::Module::get_pin_by_id(), hal::BasePin< T >::get_type(), hal::PinActionType::GroupCreate, hal::PinActionType::GroupDirChange, hal::PinActionType::GroupMoveToRow, hal::PinActionType::GroupTypeChange, QList::isEmpty(), hal::UserActionObjectType::Module, name, hal::PinActionType::PinAsignToGroup, and hal::UserAction::setObject().
Referenced by addPinToNewGroup().
|
static |
Definition at line 451 of file action_pingroup.cpp.
References addPinsToExistingGroup().
|
static |
Definition at line 480 of file action_pingroup.cpp.
References addPinsToNewGroup(), and name.
|
overridevirtual |
Hook for derived classes to add parameter to cryptographic hash.
cryptoHash | - Additional hash data. |
Reimplemented from hal::UserAction.
Definition at line 127 of file action_pingroup.cpp.
References QCryptographicHash::addData().
|
static |
Definition at line 487 of file action_pingroup.cpp.
References ActionPingroup(), QList::append(), QMap::end(), QMap::find(), QString::fromStdString(), hal::Module::get_id(), hal::PinGroup< T >::get_id(), hal::PinGroup< T >::get_name(), hal::Module::get_pin_group_by_id(), hal::Module::get_pin_groups(), hal::PinGroup< T >::get_pins(), hal::PinActionType::GroupCreate, hal::PinActionType::GroupDelete, QMap::insert(), hal::UserActionObjectType::Module, hal::PinActionType::PinAsignToGroup, and hal::UserAction::setObject().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
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 281 of file action_pingroup.cpp.
References ascending, hal::Module::assign_pin_to_group(), QSet::clear(), QMap::clear(), QSet::contains(), hal::Module::create_pin_group(), hal::Module::delete_pin_group(), hal::UserAction::exec(), QString::fromStdString(), hal::PinGroup< T >::get_direction(), hal::BasePin< T >::get_group(), hal::PinGroup< T >::get_id(), hal::Netlist::get_module_by_id(), hal::BasePin< T >::get_name(), hal::PinGroup< T >::get_name(), hal::Module::get_pin_by_id(), hal::Module::get_pin_group_by_id(), hal::PinGroup< T >::get_start_index(), hal::BasePin< T >::get_type(), hal::PinGroup< T >::get_type(), hal::gNetlist, hal::PinActionType::GroupCreate, hal::PinActionType::GroupDelete, hal::PinActionType::GroupDirChange, hal::PinActionType::GroupMoveToRow, hal::PinActionType::GroupRename, hal::PinActionType::GroupTypeChange, hal::UserActionObject::id(), QSet::insert(), hal::PinGroup< T >::is_ascending(), hal::UserAction::mObject, hal::UserActionObjectType::Module, hal::Module::move_pin_group(), hal::Module::move_pin_within_group(), name, hal::none, hal::PinActionType::PinAsignToGroup, hal::pinIndex2Row(), hal::PinActionType::PinMoveToRow, hal::PinActionType::PinRename, hal::pinRow2Index(), hal::PinActionType::PinTypeChange, hal::Module::set_pin_group_direction(), hal::Module::set_pin_group_name(), hal::Module::set_pin_group_type(), hal::Module::set_pin_name(), hal::Module::set_pin_type(), hal::UserActionObject::type(), hal::PinActionType::useExistingGroup(), and hal::PinActionType::useExistingPin().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
xmlIn | - The xml reader. |
Reimplemented from hal::UserAction.
Definition at line 154 of file action_pingroup.cpp.
References QList::append(), hal::PinActionType::fromString(), QXmlStreamReader::name(), name, hal::PinActionType::None, QXmlStreamReader::readElementText(), QXmlStreamReader::readNextStartElement(), and QString::toInt().
|
static |
Definition at line 541 of file action_pingroup.cpp.
References ActionPingroup(), QList::append(), QString::arg(), QSet::contains(), QString::fromStdString(), hal::Module::get_id(), hal::BasePin< T >::get_name(), hal::Module::get_pin_by_id(), hal::Module::get_pin_groups(), hal::PinActionType::GroupCreate, QSet::insert(), hal::UserActionObjectType::Module, name, hal::PinActionType::PinAsignToGroup, and hal::UserAction::setObject().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
overridevirtual |
The xml tagname for the action is purely virtual and needs to be implemented in derived class.
Implements hal::UserAction.
Definition at line 113 of file action_pingroup.cpp.
References hal::ActionPingroupFactory::sFactory, and hal::UserActionFactory::tagname().
|
overridevirtual |
Persist user interaction in xml macro file.
xmlOut | - The xml writer. |
Reimplemented from hal::UserAction.
Definition at line 138 of file action_pingroup.cpp.
References hal::PinActionType::None, QString::number(), hal::PinActionType::toString(), and QXmlStreamWriter::writeTextElement().