QElectroTech
0.8-dev
|
#include <elementspanel.h>
Public Slots | |
void | slot_doubleClick (QTreeWidgetItem *, int) |
void | reload (bool=false) |
ElementsPanel::reload Reload the elements tree. More... | |
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 | requestForDiagram (Diagram *) |
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. More... | |
virtual void | diagramAdded (QETProject *, Diagram *) |
GenericPanel::diagramAdded. More... | |
virtual void | diagramRemoved (QETProject *, Diagram *) |
GenericPanel::diagramRemoved. More... | |
virtual void | projectDiagramsOrderChanged (QETProject *, int, int) |
GenericPanel::projectDiagramsOrderChanged. More... | |
virtual void | diagramTitleChanged (Diagram *, const QString &) |
GenericPanel::diagramTitleChanged Inform this panel the diagram diagram has changed its title to title. More... | |
virtual void | templatesCollectionChanged (TitleBlockTemplatesCollection *, const QString &) |
GenericPanel::templatesCollectionChanged. More... | |
virtual void | diagramUsedTemplate (TitleBlockTemplatesCollection *, const QString &) |
GenericPanel::diagramUsedTemplate. More... | |
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. More... | |
virtual QTreeWidgetItem * | fillProjectItem (QTreeWidgetItem *, QETProject *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillProjectItem. More... | |
virtual QTreeWidgetItem * | getItemForDiagram (Diagram *, bool *=nullptr) |
GenericPanel::getItemForDiagram. More... | |
virtual QTreeWidgetItem * | updateDiagramItem (QTreeWidgetItem *, Diagram *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::updateDiagramItem. More... | |
virtual QTreeWidgetItem * | fillDiagramItem (QTreeWidgetItem *, Diagram *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillDiagramItem. More... | |
virtual QTreeWidgetItem * | getItemForTemplatesCollection (TitleBlockTemplatesCollection *, bool *=nullptr) |
GenericPanel::getItemForTemplatesCollection. More... | |
virtual QTreeWidgetItem * | fillTemplatesCollectionItem (QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillTemplatesCollectionItem. More... | |
virtual QTreeWidgetItem * | getItemForTemplate (const TitleBlockTemplateLocation &, bool *=nullptr) |
GenericPanel::getItemForTemplate. More... | |
virtual QTreeWidgetItem * | fillTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions=AddAllChild, bool=false) |
GenericPanel::fillTemplateItem. More... | |
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. More... | |
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. More... | |
virtual QString | defaultText (QET::ItemType) |
GenericPanel::defaultText. More... | |
virtual QIcon | defaultIcon (QET::ItemType) |
GenericPanel::defaultIcon. More... | |
virtual QTreeWidgetItem * | makeItem (QET::ItemType, QTreeWidgetItem *=nullptr, const QString &=QString(), const QIcon &=QIcon()) |
GenericPanel::makeItem Create a QTreeWidgetItem. More... | |
virtual void | deleteItem (QTreeWidgetItem *, bool=false) |
GenericPanel::deleteItem Delete and item and its children. More... | |
virtual void | markItemAsUnused (QTreeWidgetItem *) |
GenericPanel::markItemAsUnused Mark the provided QTreeWidgetItem as unused in its parent project. More... | |
virtual void | reparent (QTreeWidgetItem *, QTreeWidgetItem *) |
GenericPanel::reparent. More... | |
QList< QTreeWidgetItem * > | childItems (QTreeWidgetItem *, QET::ItemType, bool=false) const |
GenericPanel::childItems. More... | |
template<typename T > | |
void | removeObsoleteItems (const QList< T > &, QTreeWidgetItem *, QET::ItemType, bool) |
template<typename T > | |
T | valueForItem (QTreeWidgetItem *) const |
void | unregisterItem (QTreeWidgetItem *) |
GenericPanel::unregisterItem. More... | |
bool | event (QEvent *) override |
GenericPanel::event Handle various events; reimplemented here to emit the signal firstActivated(). More... | |
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. More... | |
QTreeWidgetItem * | updateTemplatesCollectionItem (QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false) override |
GenericPanel::updateTemplatesCollectionItem. More... | |
QTreeWidgetItem * | updateTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions, bool=false) override |
GenericPanel::updateTemplateItem. More... | |
Private Attributes | |
QSet< QETProject * > | projects_to_display_ |
list of projects that have been added to this panel More... | |
QTreeWidgetItem * | common_tbt_collection_item_ |
pointer to the item representing the common templates collection More... | |
QTreeWidgetItem * | custom_tbt_collection_item_ |
pointer to the item representing the user templates collection More... | |
bool | first_reload_ |
used to distinguish the first time this panel is reloaded More... | |
QString | filter_ |
Currently applied filter. More... | |
QStringList | filter_list_ |
Currently applied list of filter. More... | |
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 |
|
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 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