18 #ifndef GENERIC_PANEL_H 19 #define GENERIC_PANEL_H 21 #include <QTreeWidget> 23 class QTreeWidgetItem;
110 virtual QTreeWidgetItem *
fillItem (QTreeWidgetItem *, PanelOptions =
AddAllChild,
bool =
false);
126 virtual QTreeWidgetItem *
makeItem(
QET::ItemType, QTreeWidgetItem * =
nullptr,
const QString & = QString(),
const QIcon & = QIcon());
127 virtual void deleteItem(QTreeWidgetItem *,
bool =
false);
129 virtual void reparent(QTreeWidgetItem *, QTreeWidgetItem *);
132 template<
typename T> T
valueForItem(QTreeWidgetItem *)
const;
135 bool event(QEvent *)
override;
virtual QTreeWidgetItem * fillTemplateItem(QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions=AddAllChild, bool=false)
virtual void templatesCollectionChanged(TitleBlockTemplatesCollection *, const QString &)
void panelContentChanged()
virtual QTreeWidgetItem * updateProjectItem(QTreeWidgetItem *, QETProject *, PanelOptions=AddAllChild, bool=false)
virtual QTreeWidgetItem * addProject(QETProject *, QTreeWidgetItem *=nullptr, PanelOptions=AddAllChild)
virtual QTreeWidgetItem * itemForProject(QETProject *)
virtual void diagramUsedTemplate(TitleBlockTemplatesCollection *, const QString &)
virtual void projectInformationsChanged(QETProject *)
GenericPanel(QWidget *=nullptr)
void emitFirstActivated()
virtual int currentItemType()
virtual TitleBlockTemplateLocation templateLocationForItem(QTreeWidgetItem *) const
virtual QTreeWidgetItem * fillProjectItem(QTreeWidgetItem *, QETProject *, PanelOptions=AddAllChild, bool=false)
virtual QTreeWidgetItem * updateTemplatesCollectionItem(QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false)
virtual void deleteItem(QTreeWidgetItem *, bool=false)
virtual QTreeWidgetItem * addTemplate(const TitleBlockTemplateLocation &, QTreeWidgetItem *=nullptr, PanelOptions=AddAllChild)
virtual void diagramAdded(QETProject *, Diagram *)
virtual QTreeWidgetItem * fillDiagramItem(QTreeWidgetItem *, Diagram *, PanelOptions=AddAllChild, bool=false)
QHash< QETProject *, QTreeWidgetItem * > projects_
Allow quick retrieval of the item representing a given project.
virtual QTreeWidgetItem * getItemForTemplatesCollection(TitleBlockTemplatesCollection *, bool *=nullptr)
virtual QIcon defaultIcon(QET::ItemType)
virtual TitleBlockTemplateLocation selectedTemplateLocation() const
virtual QTreeWidgetItem * getItemForProject(QETProject *, bool *=nullptr)
virtual void diagramTitleChanged(Diagram *, const QString &)
bool first_activation_
boolean used to track the first time this widget is activated/shown
virtual QTreeWidgetItem * addTemplatesCollection(TitleBlockTemplatesCollection *, QTreeWidgetItem *=nullptr, PanelOptions=AddAllChild)
virtual QString defaultText(QET::ItemType)
bool event(QEvent *) override
virtual QTreeWidgetItem * makeItem(QET::ItemType, QTreeWidgetItem *=nullptr, const QString &=QString(), const QIcon &=QIcon())
virtual QETProject * projectForItem(QTreeWidgetItem *) const
QList< QTreeWidgetItem * > childItems(QTreeWidgetItem *, QET::ItemType, bool=false) const
virtual QTreeWidgetItem * getItemForDiagram(Diagram *, bool *=nullptr)
virtual Diagram * diagramForItem(QTreeWidgetItem *) const
virtual QTreeWidgetItem * updateTemplateItem(QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions=AddAllChild, bool=false)
virtual void reparent(QTreeWidgetItem *, QTreeWidgetItem *)
virtual QTreeWidgetItem * updateDiagramItem(QTreeWidgetItem *, Diagram *, PanelOptions=AddAllChild, bool=false)
virtual QTreeWidgetItem * addDiagram(Diagram *, QTreeWidgetItem *=nullptr, PanelOptions=AddAllChild)
virtual void diagramRemoved(QETProject *, Diagram *)
QHash< TitleBlockTemplateLocation, QTreeWidgetItem * > tb_templates_
Allow quick retrieval of the item representing a title block template.
virtual QTreeWidgetItem * updateItem(QTreeWidgetItem *, PanelOptions=AddAllChild, bool=false)
virtual Diagram * selectedDiagram() const
virtual void projectDiagramsOrderChanged(QETProject *, int, int)
GenericPanel::projectDiagramsOrderChanged.
QHash< Diagram *, QTreeWidgetItem * > diagrams_
Allow quick retrieval of the item representing a given diagram.
virtual QTreeWidgetItem * fillItem(QTreeWidgetItem *, PanelOptions=AddAllChild, bool=false)
virtual QTreeWidgetItem * getItemForTemplate(const TitleBlockTemplateLocation &, bool *=nullptr)
virtual QTreeWidgetItem * fillTemplatesCollectionItem(QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions=AddAllChild, bool=false)
virtual void markItemAsUnused(QTreeWidgetItem *)
T valueForItem(QTreeWidgetItem *) const
void removeObsoleteItems(const QList< T > &, QTreeWidgetItem *, QET::ItemType, bool)
virtual QTreeWidgetItem * itemForTemplatesCollection(TitleBlockTemplatesCollection *)
void unregisterItem(QTreeWidgetItem *)
virtual QETProject * selectedProject() const