QElectroTech 0.100.0-dev
|
#include <elementspanel.h>
Public Slots | |
void | slot_doubleClick (QTreeWidgetItem *, int) |
void | reload () |
ElementsPanel::reload Reload the elements tree. | |
void | filter (const QString &, QET::Filtering=QET::RegularFilter) |
void | projectWasOpened (QETProject *) |
void | projectWasClosed (QETProject *) |
void | buildFilterList () |
void | applyCurrentFilter (const QList< QTreeWidgetItem * > &) |
void | ensureHierarchyIsVisible (const QList< QTreeWidgetItem * > &) |
Signals | |
void | requestForProject (QETProject *) |
void | requestForTitleBlockTemplate (const TitleBlockTemplateLocation &) |
Signals inherited from GenericPanel | |
bool | firstActivated () |
void | panelContentChanged () |
Protected Slots | |
void | panelContentChange () |
Protected Slots inherited from GenericPanel | |
virtual void | projectInformationsChanged (QETProject *) |
GenericPanel::projectInformationsChanged. | |
virtual void | diagramAdded (QETProject *, Diagram *) |
GenericPanel::diagramAdded. | |
virtual void | diagramRemoved (QETProject *, Diagram *) |
GenericPanel::diagramRemoved. | |
virtual void | projectDiagramsOrderChanged (QETProject *, int, int) |
GenericPanel::projectDiagramsOrderChanged. | |
virtual void | diagramTitleChanged (Diagram *) |
GenericPanel::diagramTitleChanged Inform this panel the diagram diagram has changed its title to title. | |
virtual void | templatesCollectionChanged (TitleBlockTemplatesCollection *, const QString &) |
GenericPanel::templatesCollectionChanged. | |
virtual void | diagramUsedTemplate (TitleBlockTemplatesCollection *, const QString &) |
GenericPanel::diagramUsedTemplate. | |
Protected Member Functions | |
void | startDrag (Qt::DropActions) override |
void | startTitleBlockTemplateDrag (const TitleBlockTemplateLocation &) |
bool | matchesFilter (const QTreeWidgetItem *, const QString &) const |
Protected Member Functions inherited from GenericPanel | |
virtual QTreeWidgetItem * | getItemForProject (QETProject *, bool *=nullptr) |
virtual QTreeWidgetItem * | updateProjectItem (QTreeWidgetItem *, QETProject *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::updateProjectItem. | |
virtual QTreeWidgetItem * | fillProjectItem (QTreeWidgetItem *, QETProject *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillProjectItem. | |
virtual QTreeWidgetItem * | getItemForDiagram (Diagram *, bool *=nullptr) |
GenericPanel::getItemForDiagram. | |
virtual QTreeWidgetItem * | updateDiagramItem (QTreeWidgetItem *, Diagram *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::updateDiagramItem. | |
virtual QTreeWidgetItem * | fillDiagramItem (QTreeWidgetItem *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillDiagramItem. | |
virtual QTreeWidgetItem * | getItemForTemplatesCollection (TitleBlockTemplatesCollection *, bool *=nullptr) |
GenericPanel::getItemForTemplatesCollection. | |
virtual QTreeWidgetItem * | fillTemplatesCollectionItem (QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillTemplatesCollectionItem. | |
virtual QTreeWidgetItem * | getItemForTemplate (const TitleBlockTemplateLocation &, bool *=nullptr) |
GenericPanel::getItemForTemplate. | |
virtual QTreeWidgetItem * | fillTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillTemplateItem. | |
virtual QTreeWidgetItem * | updateItem (QTreeWidgetItem *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::updateItem This generic method is called at the end of each update*Item method. Its only purpose is being reimplemented in a subclass. The default implementation does nothing. | |
virtual QTreeWidgetItem * | fillItem (QTreeWidgetItem *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillItem This generic method is called at the end of each fill*Item method. Its only purpose is being reimplemented in a subclass. The default implementation does nothing. | |
virtual QString | defaultText (QET::ItemType) |
GenericPanel::defaultText. | |
virtual QIcon | defaultIcon (QET::ItemType) |
GenericPanel::defaultIcon. | |
virtual QTreeWidgetItem * | makeItem (QET::ItemType, QTreeWidgetItem *=nullptr, const QString &=QString(), const QIcon &=QIcon()) |
GenericPanel::makeItem Create a QTreeWidgetItem. | |
virtual void | deleteItem (QTreeWidgetItem *, bool=false) |
GenericPanel::deleteItem Delete and item and its children. | |
virtual void | markItemAsUnused (QTreeWidgetItem *) |
GenericPanel::markItemAsUnused Mark the provided QTreeWidgetItem as unused in its parent project. | |
virtual void | reparent (QTreeWidgetItem *, QTreeWidgetItem *) |
GenericPanel::reparent. | |
QList< QTreeWidgetItem * > | childItems (QTreeWidgetItem *, QET::ItemType, bool=false) const |
GenericPanel::childItems. | |
template<typename T > | |
void | removeObsoleteItems (const QList< T > &, QTreeWidgetItem *, QET::ItemType, bool) |
template<typename T > | |
T | valueForItem (QTreeWidgetItem *) const |
void | unregisterItem (QTreeWidgetItem *) |
GenericPanel::unregisterItem. | |
bool | event (QEvent *) override |
GenericPanel::event Handle various events; reimplemented here to emit the signal firstActivated(). | |
Private Member Functions | |
ElementsPanel (const ElementsPanel &) | |
QTreeWidgetItem * | addProject (QETProject *, QTreeWidgetItem *=nullptr, PanelOptions=AddAllChild) override |
ElementsPanel::addProject Methode permettant d'ajouter un projet au panel d'elements. | |
QTreeWidgetItem * | updateTemplatesCollectionItem (QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false) override |
GenericPanel::updateTemplatesCollectionItem. | |
QTreeWidgetItem * | updateTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions, bool=false) override |
GenericPanel::updateTemplateItem. | |
Private Attributes | |
QSet< QETProject * > | projects_to_display_ |
list of projects that have been added to this panel | |
QTreeWidgetItem * | common_tbt_collection_item_ |
pointer to the item representing the common templates collection | |
QTreeWidgetItem * | company_tbt_collection_item_ |
pointer to the item representing the company's templates collection | |
QTreeWidgetItem * | custom_tbt_collection_item_ |
pointer to the item representing the user templates collection | |
bool | first_reload_ |
used to distinguish the first time this panel is reloaded | |
QString | filter_ |
Currently applied filter. | |
QStringList | filter_list_ |
Currently applied list of filter. | |
Additional Inherited Members | |
Public Types inherited from GenericPanel | |
enum | PanelOption { AddChildDiagrams = 1 , AddChildTemplatesCollection = 2 , AddChildTemplates = 4 , AddAllChildTemplates = 6 , AddAllChild = 63 , All = 127 } |
enum | MetaData { Item = Qt::UserRole + 1 , AliasItem , Parent , PanelFlags } |
This class provides a tree widget listing known filesystem-based elements collections and opened project files along with their content (diagrams, embedded collections, ...). It enables users to perform various actions on the displayed content
ElementsPanel::ElementsPanel | ( | QWidget * | parent = nullptr | ) |
Constructeur
parent | Le QWidget parent du panel d'appareils |
|
override |
Destructeur
|
private |
|
overrideprivatevirtual |
ElementsPanel::addProject Methode permettant d'ajouter un projet au panel d'elements.
project | : project Projet a inserer dans le panel d'elements |
parent_item | : Q_UNUSED QTreeWidgetItem parent sous lequel sera insere le projet |
options | : Q_UNUSED |
Reimplemented from GenericPanel.
|
slot |
Apply the current filter to a given item.
|
slot |
Build filter list for multiple filter
QString ElementsPanel::dirPathForItem | ( | QTreeWidgetItem * | item | ) |
ElementsPanel::dirPathForItem.
item | : a QTreeWidgetItem |
|
slot |
items | une liste de QTreeWidgetItem pour lesquels il faut s'assurer que eux et leurs parents sont visibles |
QString ElementsPanel::filePathForItem | ( | QTreeWidgetItem * | item | ) |
ElementsPanel::filePathForItem.
item | : a QTreeWidgetItem |
|
slot |
Hide items that do not match the provided string, ensure others are visible along with their parent hierarchy. When ending the filtering, restore the tree as it was before the filtering (except the current item) and scroll to the currently selected item.
m | String to be matched |
filtering | whether to begin/apply/end the filtering |
|
protected |
|
protectedslot |
Ensure the filter is applied again after the panel content has changed.
|
slot |
Enleve un projet du panel d'elements
project | Projet a enlever du panel |
|
slot |
Rajoute un projet au panel d'elements
project | Projet ouvert a rajouter au panel |
|
slot |
ElementsPanel::reload Reload the elements tree.
reload_collections | : true for read all collections since their sources (files, projects ...) |
|
signal |
|
signal |
|
slot |
Gere le double-clic sur un element. Si un double-clic sur un projet est effectue, le signal requestForProject est emis. Si un double-clic sur un schema est effectue, le signal requestForDiagram est emis.
qtwi |
|
overrideprotected |
Gere le debut des drag'n drop
supportedActions | Les actions supportees |
|
protected |
Handle the dragging of a title block template
location | Location of the dragged template. |
|
overrideprivatevirtual |
GenericPanel::updateTemplateItem.
tb_template_qtwi | |
tb_template | |
options | |
freshly_created |
Reimplemented from GenericPanel.
|
overrideprivatevirtual |
GenericPanel::updateTemplatesCollectionItem.
tbt_collection_qtwi | |
tbt_collection | |
options | |
freshly_created |
Reimplemented from GenericPanel.
|
private |
pointer to the item representing the common templates collection
|
private |
pointer to the item representing the company's templates collection
|
private |
pointer to the item representing the user templates collection
|
private |
Currently applied filter.
|
private |
Currently applied list of filter.
|
private |
used to distinguish the first time this panel is reloaded
|
private |
list of projects that have been added to this panel