QElectroTech 0.100.0-dev
|
#include <diagramcontent.h>
Public Types | |
enum | Filter { Elements = 1 , TextFields = 2 , ElementTextFields = 4 , Images = 8 , ConductorsToMove = 16 , ConductorsToUpdate = 32 , OtherConductors = 64 , AnyConductor = 112 , Shapes = 128 , TextGroup = 256 , Tables = 512 , TerminalStrip = 1024 , All = 2047 , SelectedOnly = 2048 } |
Used to filter the different items carried by this container. More... | |
Public Attributes | |
QList< Element * > | m_elements |
QSet< IndependentTextItem * > | m_text_fields |
QSet< DiagramImageItem * > | m_images |
QSet< QetShapeItem * > | m_shapes |
QList< Conductor * > | m_conductors_to_update |
QList< Conductor * > | m_conductors_to_move |
QList< Conductor * > | m_other_conductors |
QList< Conductor * > | m_potential_conductors |
QSet< DynamicElementTextItem * > | m_element_texts |
QSet< ElementTextItemGroup * > | m_texts_groups |
QList< QGraphicsItem * > | m_selected_items |
QVector< QetGraphicsTableItem * > | m_tables |
QVector< TerminalStripItem * > | m_terminal_strip |
This class provides a container that makes the transmission of diagram content to other functions/methods easier. The different kind of items are made available through a handful of filter-aware methods. Considering selected elements are to be moved, the filter notably distinguishes conductors to be moved from those to be updated. Please note this container does not systematically contains a whole diagram: it may describe only a part of it, e.g. selected items.
DiagramContent::DiagramContent | ( | ) |
DiagramContent::DiagramContent | ( | Diagram * | diagram, |
bool | selected = true |
||
) |
DiagramContent::DiagramContent Constructor.
diagram | : Construct a diagramContent and fill it with the selected item of diagram |
selected | : this diagramcontent get only selected items if true. |
DiagramContent::~DiagramContent | ( | ) |
void DiagramContent::clear | ( | ) |
DiagramContent::clear Remove all items from the diagram content.
QList< Conductor * > DiagramContent::conductors | ( | int | filter = AnyConductor | ) | const |
filter |
int DiagramContent::count | ( | int | filter = All | ) | const |
filter |
bool DiagramContent::hasCopiableItems | ( | ) | const |
DiagramContent::hasCopiableItems.
bool DiagramContent::hasDeletableItems | ( | ) | const |
DiagramContent::hasDeletableItems.
bool DiagramContent::hasTextEditing | ( | ) |
DiagramContent::hasTextEditing.
QList< QGraphicsItem * > DiagramContent::items | ( | int | filter = All | ) | const |
filter |
DiagramContent & DiagramContent::operator+= | ( | const DiagramContent & | other | ) |
bool DiagramContent::potentialIsManaged | ( | QList< Conductor * > | conductors | ) |
DiagramContent::potentialIsManaged.
conductors | a list of conductors at the same potential. |
int DiagramContent::removeNonMovableItems | ( | ) |
DiagramContent::removeNonMovableItems Remove all non movable item.
QList< DiagramTextItem * > DiagramContent::selectedTexts | ( | ) | const |
DiagramContent::selectedTexts.
QList< ElementTextItemGroup * > DiagramContent::selectedTextsGroup | ( | ) | const |
DiagramContent::selectedTextsGroup.
QString DiagramContent::sentence | ( | int | filter = All | ) | const |
filter |
QList<Conductor *> DiagramContent::m_conductors_to_move |
QList<Conductor *> DiagramContent::m_conductors_to_update |
QSet<DynamicElementTextItem *> DiagramContent::m_element_texts |
QList<Element *> DiagramContent::m_elements |
QSet<DiagramImageItem *> DiagramContent::m_images |
QList<Conductor *> DiagramContent::m_other_conductors |
QList<Conductor *> DiagramContent::m_potential_conductors |
QList<QGraphicsItem *> DiagramContent::m_selected_items |
QSet<QetShapeItem *> DiagramContent::m_shapes |
QVector<QetGraphicsTableItem *> DiagramContent::m_tables |
QVector<TerminalStripItem *> DiagramContent::m_terminal_strip |
QSet<IndependentTextItem *> DiagramContent::m_text_fields |
QSet<ElementTextItemGroup *> DiagramContent::m_texts_groups |