![]() |
HAL
|
The NodeBoxes class owns all NodeBox'es from hal view. More...
#include <node_box.h>
Public Member Functions | |
NodeBoxes () | |
~NodeBoxes () | |
void | addBox (const Node &nd, int px, int py) |
addBox call NodeBox constructor and store pointer in vector More... | |
void | clearBoxes () |
clearBoxes delete all NodeBox'es and clear vector. More... | |
NodeBox * | boxForGate (const Gate *g) const |
boxForGate find NodeBox by Gate pointer. More... | |
NodeBox * | boxForPoint (const QPoint &p) const |
boxForPoint find NodeBox by grid position More... | |
NodeBox * | boxForNode (const Node &n) const |
boxForNode find NodeBox by node More... | |
NodeBox * | boxForItem (GraphicsNode *item) const |
boxForItem find NodeBox by graphics item More... | |
QSet< u32 > | filterNotInView (const QSet< u32 > &gats) const |
![]() | |
QVector () | |
QVector (int size) | |
QVector (int size, const T &value) | |
QVector (const QVector< T > &other) | |
QVector (QVector< T > &&other) | |
QVector (std::initializer_list< T > args) | |
QVector (InputIterator first, InputIterator last) | |
~QVector () | |
QVector< T > & | operator= (const QVector< T > &other) |
QVector< T > & | operator= (QVector< T > &&other) |
QVector< T > & | operator= (std::initializer_list< T > args) |
void | swap (QVector< T > &other) |
bool | operator== (const QVector< T > &other) const const |
bool | operator!= (const QVector< T > &other) const const |
int | size () const const |
bool | isEmpty () const const |
void | resize (int size) |
int | capacity () const const |
void | reserve (int size) |
void | squeeze () |
T * | data () |
const T * | data () const const |
const T * | constData () const const |
void | clear () |
const T & | at (int i) const const |
T & | operator[] (int i) |
const T & | operator[] (int i) const const |
void | append (const T &value) |
void | append (T &&value) |
void | append (const QVector< T > &value) |
void | prepend (T &&value) |
void | prepend (const T &value) |
void | insert (int i, T &&value) |
void | insert (int i, const T &value) |
void | insert (int i, int count, const T &value) |
QVector::iterator | insert (QVector::iterator before, int count, const T &value) |
QVector::iterator | insert (QVector::iterator before, const T &value) |
QVector::iterator | insert (QVector::iterator before, T &&value) |
void | replace (int i, const T &value) |
void | remove (int i) |
void | remove (int i, int count) |
void | removeFirst () |
void | removeLast () |
T | takeFirst () |
T | takeLast () |
QVector< T > & | fill (const T &value, int size) |
int | indexOf (const T &value, int from) const const |
int | lastIndexOf (const T &value, int from) const const |
bool | contains (const T &value) const const |
int | count (const T &value) const const |
int | count () const const |
void | removeAt (int i) |
int | removeAll (const T &t) |
bool | removeOne (const T &t) |
int | length () const const |
T | takeAt (int i) |
void | move (int from, int to) |
QVector::iterator | begin () |
QVector::const_iterator | begin () const const |
QVector::const_iterator | cbegin () const const |
QVector::const_iterator | constBegin () const const |
QVector::iterator | end () |
QVector::const_iterator | end () const const |
QVector::const_iterator | cend () const const |
QVector::const_iterator | constEnd () const const |
QVector::reverse_iterator | rbegin () |
QVector::const_reverse_iterator | rbegin () const const |
QVector::reverse_iterator | rend () |
QVector::const_reverse_iterator | rend () const const |
QVector::const_reverse_iterator | crbegin () const const |
QVector::const_reverse_iterator | crend () const const |
QVector::iterator | erase (QVector::iterator begin, QVector::iterator end) |
QVector::iterator | erase (QVector::iterator pos) |
T & | first () |
const T & | first () const const |
const T & | constFirst () const const |
T & | last () |
const T & | last () const const |
const T & | constLast () const const |
bool | startsWith (const T &value) const const |
bool | endsWith (const T &value) const const |
QVector< T > | mid (int pos, int length) const const |
T | value (int i) const const |
T | value (int i, const T &defaultValue) const const |
void | swapItemsAt (int i, int j) |
void | push_back (const T &value) |
void | push_back (T &&value) |
void | push_front (T &&value) |
void | push_front (const T &value) |
void | pop_back () |
void | pop_front () |
bool | empty () const const |
T & | front () |
QVector::const_reference | front () const const |
QVector::reference | back () |
QVector::const_reference | back () const const |
void | shrink_to_fit () |
QVector< T > & | operator+= (const QVector< T > &other) |
QVector< T > & | operator+= (const T &value) |
QVector< T > & | operator+= (T &&value) |
QVector< T > | operator+ (const QVector< T > &other) const const |
QVector< T > & | operator<< (const T &value) |
QVector< T > & | operator<< (const QVector< T > &other) |
QVector< T > & | operator<< (T &&value) |
QDataStream & | operator<< (QDataStream &out, const QVector< T > &vector) |
QList< T > | toList () const const |
std::vector< T > | toStdVector () const const |
bool | operator< (const QVector< T > &lhs, const QVector< T > &rhs) |
bool | operator<= (const QVector< T > &lhs, const QVector< T > &rhs) |
bool | operator> (const QVector< T > &lhs, const QVector< T > &rhs) |
bool | operator>= (const QVector< T > &lhs, const QVector< T > &rhs) |
uint | qHash (const QVector< T > &key, uint seed) |
QDataStream & | operator>> (QDataStream &in, QVector< T > &vector) |
Additional Inherited Members | |
![]() | |
QVector< T > | fromList (const QList< T > &list) |
QVector< T > | fromStdVector (const std::vector< T > &vector) |
![]() | |
typedef | iterator |
typedef | const_iterator |
typedef | reverse_iterator |
typedef | const_reverse_iterator |
typedef | value_type |
typedef | pointer |
typedef | const_pointer |
typedef | reference |
typedef | const_reference |
typedef | difference_type |
typedef | Iterator |
typedef | ConstIterator |
typedef | size_type |
The NodeBoxes class owns all NodeBox'es from hal view.
Several index members (QHash) allow fast access by grid position, node id, mouse click in graphics, or net endpoint. Pointer to new NodeBox'es should only be added using the addBox() method to update index correctly.
Definition at line 149 of file node_box.h.
|
inline |
Constructor
Definition at line 155 of file node_box.h.
hal::NodeBoxes::~NodeBoxes | ( | ) |
Destructor
Definition at line 44 of file node_box.cpp.
void hal::NodeBoxes::addBox | ( | const Node & | nd, |
int | px, | ||
int | py | ||
) |
addBox call NodeBox constructor and store pointer in vector
nd | Node to be created and added |
px | grid x-position |
py | grid y-position |
Definition at line 61 of file node_box.cpp.
References QVector< NodeBox * >::append(), test_plugin::g, hal::Netlist::get_gate_by_id(), hal::Module::get_gates(), hal::Netlist::get_module_by_id(), hal::NodeBox::getNode(), hal::gNetlist, hal::NodeBox::id(), hal::Node::isGate(), hal::Node::isModule(), and hal::NodeBox::item().
boxForGate find NodeBox by Gate pointer.
g | pointer to netlist Gate |
A NodeBox is returned if the box either represents the given gate or if the gate is part of a module rendered as box. The method ist mostly used to find boxes by net endpoints.
Definition at line 184 of file node_box.h.
References test_plugin::g.
Referenced by hal::GraphContext::getNetDestination(), and hal::GraphContext::getNetSource().
|
inline |
boxForItem find NodeBox by graphics item
item | pointer to graphics item |
Mostly used to find NodeBox selected in QGraphicsView engine, e.g. by mouse position
Definition at line 209 of file node_box.h.
Referenced by hal::GraphLayouter::gridPointByItem().
boxForNode find NodeBox by node
n | the node |
Used to search gates or modules by ID.
Definition at line 200 of file node_box.h.
References test::n.
Referenced by hal::NetlistRelay::addToModuleDialog(), hal::ShortestPath::module(), and hal::DragController::set().
boxForPoint find NodeBox by grid position
p | integer grid position |
Definition at line 191 of file node_box.h.
Referenced by hal::DragController::isDropAllowed().
void hal::NodeBoxes::clearBoxes | ( | ) |
clearBoxes delete all NodeBox'es and clear vector.
Definition at line 50 of file node_box.cpp.
References QVector< NodeBox * >::clear().
Definition at line 83 of file node_box.cpp.
References hal::Node::Gate, and QSet::insert().