![]() |
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) |
static ActionPingroup * | toggleAscendingGroup (const Module *m, u32 grpId) |
static ActionPingroup * | changePinGroupType (const Module *m, u32 grpId, int ptype) |
static int | pinGroupIndex (const Module *mod, const PinGroup< ModulePin > *pgrp) |
static int | pinIndex2Row (const ModulePin *pin, int index) |
static int | pinRow2Index (const ModulePin *pin, int row) |
static QString | generateGroupName (const Module *mod, const ModulePin *pin) |
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 * 2, LSB : 0=descending 1=ascending
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 102 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 117 of file action_pingroup.cpp.
References QList::append(), and name.
hal::ActionPingroup::ActionPingroup | ( | const QList< AtomicAction > & | aaList | ) |
Definition at line 122 of file action_pingroup.cpp.
|
static |
Definition at line 420 of file action_pingroup.cpp.
References QList::append(), hal::Module::get_id(), and hal::UserAction::setObject().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
static |
Definition at line 444 of file action_pingroup.cpp.
References QList::append(), QList::first(), hal::BasePin< T >::get_direction(), hal::Module::get_id(), hal::Module::get_pin_by_id(), hal::BasePin< T >::get_type(), QList::isEmpty(), name, and hal::UserAction::setObject().
|
static |
Definition at line 437 of file action_pingroup.cpp.
|
static |
Definition at line 466 of file action_pingroup.cpp.
References name.
|
overridevirtual |
Hook for derived classes to add parameter to cryptographic hash.
cryptoHash | - Additional hash data. |
Reimplemented from hal::UserAction.
Definition at line 126 of file action_pingroup.cpp.
References QCryptographicHash::addData().
|
static |
Definition at line 592 of file action_pingroup.cpp.
References QList::append(), hal::Module::get_id(), hal::PinGroup< T >::get_id(), hal::Module::get_pin_group_by_id(), hal::PinGroup< T >::get_pins(), pins, and hal::UserAction::setObject().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
static |
Definition at line 473 of file action_pingroup.cpp.
References 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(), QMap::insert(), hal::PinGroup< T >::is_descending(), 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 255 of file action_pingroup.cpp.
References QList::append(), ascending, hal::Module::assign_pin_to_group(), QList::clear(), QSet::clear(), QMap::clear(), QSet::contains(), hal::Module::create_pin_group(), hal::Module::delete_pin_group(), QString::fromStdString(), hal::PinGroup< T >::get_direction(), hal::BasePin< T >::get_group(), hal::PinGroup< T >::get_id(), hal::PinGroup< T >::get_lowest_index(), 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::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, pinIndex2Row(), hal::PinActionType::PinMoveToRow, hal::PinActionType::PinRename, 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().
Definition at line 60 of file action_pingroup.cpp.
References QString::arg(), QSet::contains(), QString::fromStdString(), test_plugin::g, hal::BasePin< T >::get_name(), hal::Module::get_pin_groups(), and QSet::insert().
|
static |
Definition at line 10 of file action_pingroup.cpp.
References hal::Module::get_pin_groups().
Referenced by hal::ModulePinsTreeModel::handleModulePortsChanged().
|
static |
Definition at line 39 of file action_pingroup.cpp.
References hal::BasePin< T >::get_group().
Referenced by hal::dumpPingroups(), exec(), and hal::ModulePinsTreeModel::handleModulePortsChanged().
|
static |
Definition at line 47 of file action_pingroup.cpp.
References hal::BasePin< T >::get_group().
Referenced by exec().
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
xmlIn | - The xml reader. |
Reimplemented from hal::UserAction.
Definition at line 153 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 531 of file action_pingroup.cpp.
References 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(), QSet::insert(), name, 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 112 of file action_pingroup.cpp.
References hal::ActionPingroupFactory::sFactory, and hal::UserActionFactory::tagname().
|
static |
Definition at line 559 of file action_pingroup.cpp.
References QList::append(), QUuid::createUuid(), QString::fromStdString(), hal::Module::get_id(), hal::PinGroup< T >::get_lowest_index(), hal::PinGroup< T >::get_name(), hal::Module::get_pin_group_by_id(), hal::PinGroup< T >::get_pins(), hal::PinGroup< T >::is_ascending(), pins, hal::UserAction::setObject(), and QUuid::toString().
Referenced by hal::ModulePinsTree::handleContextMenuRequested().
|
overridevirtual |
Persist user interaction in xml macro file.
xmlOut | - The xml writer. |
Reimplemented from hal::UserAction.
Definition at line 137 of file action_pingroup.cpp.
References hal::PinActionType::None, QString::number(), hal::PinActionType::toString(), and QXmlStreamWriter::writeTextElement().