QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ElementProvider Class Reference

#include <elementprovider.h>

Collaboration diagram for ElementProvider:
Collaboration graph

Public Member Functions

 ElementProvider (QETProject *prj, Diagram *diagram=nullptr)
 ElementProvider::ElementProvider Constructor.
 
 ElementProvider (Diagram *diag)
 ElementProvider::ElementProvider Constructor.
 
QVector< QPointer< Element > > freeElement (ElementData::Types filter) const
 ElementProvider::FreeElement Search and return the asked element corresponding with the given filter All returned element are free, ie element aren't connected with another element.
 
QList< Element * > fromUuids (QList< QUuid >) const
 ElementProvider::fromUuids.
 
QVector< QPointer< Element > > find (ElementData::Types elmt_type) const
 ElementProvider::find Search and return the element with the type given in parameter.
 
QVector< QetGraphicsTableItem * > table (QetGraphicsTableItem *table=nullptr, QAbstractItemModel *model=nullptr)
 ElementProvider::table.
 
QetGraphicsTableItemtableFromUuid (const QUuid &uuid)
 ElementProvider::tableFromUuid.
 
QVector< TerminalElement * > freeTerminal () const
 ElementProvider::freeTerminal.
 

Private Attributes

QList< Diagram * > m_diagram_list
 

Detailed Description

this class can search in the given diagram or project some kind of element like 'folio report' or 'master' and return it. We can get element element with specific status like 'free'.

Constructor & Destructor Documentation

◆ ElementProvider() [1/2]

ElementProvider::ElementProvider ( QETProject prj,
Diagram diagram = nullptr 
)

ElementProvider::ElementProvider Constructor.

Parameters
prjthe project where we must find element
diagramthe diagram to exclude from the search
Here is the call graph for this function:

◆ ElementProvider() [2/2]

ElementProvider::ElementProvider ( Diagram diag)

ElementProvider::ElementProvider Constructor.

Parameters
diagDiagram to search

Member Function Documentation

◆ find()

QVector< QPointer< Element > > ElementProvider::find ( ElementData::Types  elmt_type) const

ElementProvider::find Search and return the element with the type given in parameter.

Parameters
elmt_type
Returns
Here is the caller graph for this function:

◆ freeElement()

QVector< QPointer< Element > > ElementProvider::freeElement ( ElementData::Types  filter) const

ElementProvider::FreeElement Search and return the asked element corresponding with the given filter All returned element are free, ie element aren't connected with another element.

Parameters
filterthe filter for search element
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeTerminal()

QVector< TerminalElement * > ElementProvider::freeTerminal ( ) const

ElementProvider::freeTerminal.

Returns
a vector of every terminals element who doesn't belong to a terminal strip.
Here is the caller graph for this function:

◆ fromUuids()

QList< Element * > ElementProvider::fromUuids ( QList< QUuid >  uuid_list) const

ElementProvider::fromUuids.

Parameters
uuid_listlist of uuid must be found
Returns
all elements with uuid corresponding to uuid in uuid_list
Here is the call graph for this function:
Here is the caller graph for this function:

◆ table()

QVector< QetGraphicsTableItem * > ElementProvider::table ( QetGraphicsTableItem table = nullptr,
QAbstractItemModel *  model = nullptr 
)

ElementProvider::table.

Parameters
table
model
Returns
All tables which display the derivated class of model (if set) and not already in all the chain of next/previous table of table (if set) If table and model are nullptr, return every tables
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tableFromUuid()

QetGraphicsTableItem * ElementProvider::tableFromUuid ( const QUuid &  uuid)

ElementProvider::tableFromUuid.

Parameters
uuid
Returns
the table with uuid uuid or nullptr if not found
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_diagram_list

QList<Diagram *> ElementProvider::m_diagram_list
private

The documentation for this class was generated from the following files: