QElectroTech 0.100.0-dev
|
The ElementsCollectionWidget class This widget embedd a tree view that display the element collection (common, custom, embedded) and all action needed to use this widget. This is the element collection widget used in the diagram editor. More...
#include <elementscollectionwidget.h>
Inherits QWidget.
Public Slots | |
void | reload () |
ElementsCollectionWidget::reload, the displayed collections. | |
void | loadingFinished () |
ElementsCollectionWidget::loadingFinished Process when collection finished to be loaded. | |
Public Member Functions | |
ElementsCollectionWidget (QWidget *parent=nullptr) | |
ElementsCollectionWidget::ElementsCollectionWidget Default constructor. | |
void | expandFirstItems () |
ElementsCollectionWidget::expandFirstItems Expand each first item in the tree view. | |
void | addProject (QETProject *project) |
ElementsCollectionWidget::addProject Add project to be displayed. | |
void | removeProject (QETProject *project) |
void | highlightUnusedElement () |
ElementsCollectionWidget::highlightUnusedElement highlight the unused element. | |
void | setCurrentLocation (const ElementsLocation &location) |
ElementsCollectionWidget::setCurrentLocation Set the current item to be the item for location. | |
Protected Member Functions | |
void | leaveEvent (QEvent *event) override |
Private Member Functions | |
void | setUpAction () |
void | setUpWidget () |
ElementsCollectionWidget::setUpWidget Setup this widget. | |
void | setUpConnection () |
ElementsCollectionWidget::setUpConnection Setup the connection used in this widget. | |
void | customContextMenu (const QPoint &point) |
ElementsCollectionWidget::customContextMenu Display the context menu of this widget at point. | |
void | openDir () |
ElementsCollectionWidget::openDir Open the directory represented by the current selected item. | |
void | editElement () |
ElementsCollectionWidget::editElement Edit the element represented by the current selected item. | |
void | deleteElement () |
ElementsCollectionWidget::deleteElement Delete the element represented by the current selected item. | |
void | deleteDirectory () |
ElementsCollectionWidget::deleteDirectory Delete directory represented by the current selected item. | |
void | editDirectory () |
ElementsCollectionWidget::editDirectory Edit the directory represented by the current selected item. | |
void | newDirectory () |
ElementsCollectionWidget::newDirectory Create a new directory. | |
void | newElement () |
ElementsCollectionWidget::newElement Create a new element. | |
void | showThisDir () |
ElementsCollectionWidget::showThisDir Hide all directories except the pointed dir;. | |
void | resetShowThisDir () |
ElementsCollectionWidget::resetShowThisDir reset show this dir, all collection are show. If search field isn't empty, apply the search after show all collection. | |
void | dirProperties () |
ElementsCollectionWidget::dirProperties Open an informative dialog about the current index. | |
void | search () |
ElementsCollectionWidget::search Search every item (directory or element) that match the text of m_search_field and display it, other item who does not match text is hidden. | |
void | hideCollection (bool hide=true) |
ElementsCollectionWidget::hideCollection Hide all collection displayed in this tree. | |
void | hideItem (bool hide, const QModelIndex &index=QModelIndex(), bool recursive=true) |
ElementsCollectionWidget::hideItem Hide the item index. If recursive is true, hide all subchilds of index. | |
void | showAndExpandItem (const QModelIndex &index, bool parent=true, bool child=false) |
ElementsCollectionWidget::showAndExpandItem Show the item index and expand it. If parent is true, ensure parents of index is show and expanded If child is true, ensure all childs of index is show and expended. | |
ElementCollectionItem * | elementCollectionItemForIndex (const QModelIndex &index) |
ElementsCollectionWidget::elementCollectionItemForIndex. | |
void | locationWasSaved (const ElementsLocation &location) |
ElementsCollectionWidget::locationWasSaved This method is connected with the signal savedToLocation of Element editor (see ElementsCollectionWidget::editElement()) Update or add the item represented by location to m_model. | |
Private Attributes | |
ElementsCollectionModel * | m_model = nullptr |
ElementsCollectionModel * | m_new_model = nullptr |
QLineEdit * | m_search_field |
QTimer | m_search_timer |
ElementsTreeView * | m_tree_view |
QVBoxLayout * | m_main_vlayout |
QMenu * | m_context_menu |
QModelIndex | m_index_at_context_menu |
QModelIndex | m_showed_index |
QProgressBar * | m_progress_bar |
QAction * | m_open_dir |
QAction * | m_edit_element |
QAction * | m_delete_element |
QAction * | m_delete_dir |
QAction * | m_reload |
QAction * | m_edit_dir |
QAction * | m_new_directory |
QAction * | m_new_element |
QAction * | m_show_this_dir |
QAction * | m_show_all_dir |
QAction * | m_dir_propertie |
bool | m_first_show = true |
QList< QETProject * > | m_waiting_project |
QScopedPointer< QElapsedTimer > | m_loading_timer |
The ElementsCollectionWidget class This widget embedd a tree view that display the element collection (common, custom, embedded) and all action needed to use this widget. This is the element collection widget used in the diagram editor.
ElementsCollectionWidget::ElementsCollectionWidget | ( | QWidget * | parent = nullptr | ) |
ElementsCollectionWidget::ElementsCollectionWidget Default constructor.
parent | : parent widget of this widget. |
void ElementsCollectionWidget::addProject | ( | QETProject * | project | ) |
ElementsCollectionWidget::addProject Add project to be displayed.
project |
|
private |
ElementsCollectionWidget::customContextMenu Display the context menu of this widget at point.
point |
|
private |
ElementsCollectionWidget::deleteDirectory Delete directory represented by the current selected item.
|
private |
ElementsCollectionWidget::deleteElement Delete the element represented by the current selected item.
|
private |
ElementsCollectionWidget::dirProperties Open an informative dialog about the current index.
|
private |
ElementsCollectionWidget::editDirectory Edit the directory represented by the current selected item.
|
private |
ElementsCollectionWidget::editElement Edit the element represented by the current selected item.
|
private |
ElementsCollectionWidget::elementCollectionItemForIndex.
index |
void ElementsCollectionWidget::expandFirstItems | ( | ) |
ElementsCollectionWidget::expandFirstItems Expand each first item in the tree view.
|
private |
ElementsCollectionWidget::hideCollection Hide all collection displayed in this tree.
hide- | true = hide , false = visible |
|
private |
ElementsCollectionWidget::hideItem Hide the item index. If recursive is true, hide all subchilds of index.
hide | : - true = hide , false = visible |
index | : - index to hide |
recursive | : - true = apply to child , false = only for index |
void ElementsCollectionWidget::highlightUnusedElement | ( | ) |
ElementsCollectionWidget::highlightUnusedElement highlight the unused element.
|
overrideprotected |
|
slot |
ElementsCollectionWidget::loadingFinished Process when collection finished to be loaded.
|
private |
ElementsCollectionWidget::locationWasSaved This method is connected with the signal savedToLocation of Element editor (see ElementsCollectionWidget::editElement()) Update or add the item represented by location to m_model.
location |
|
private |
ElementsCollectionWidget::newDirectory Create a new directory.
|
private |
ElementsCollectionWidget::newElement Create a new element.
|
private |
ElementsCollectionWidget::openDir Open the directory represented by the current selected item.
|
slot |
ElementsCollectionWidget::reload, the displayed collections.
void ElementsCollectionWidget::removeProject | ( | QETProject * | project | ) |
|
private |
ElementsCollectionWidget::resetShowThisDir reset show this dir, all collection are show. If search field isn't empty, apply the search after show all collection.
|
private |
ElementsCollectionWidget::search Search every item (directory or element) that match the text of m_search_field and display it, other item who does not match text is hidden.
void ElementsCollectionWidget::setCurrentLocation | ( | const ElementsLocation & | location | ) |
ElementsCollectionWidget::setCurrentLocation Set the current item to be the item for location.
location |
|
private |
|
private |
ElementsCollectionWidget::setUpConnection Setup the connection used in this widget.
|
private |
ElementsCollectionWidget::setUpWidget Setup this widget.
|
private |
ElementsCollectionWidget::showAndExpandItem Show the item index and expand it. If parent is true, ensure parents of index is show and expanded If child is true, ensure all childs of index is show and expended.
index- | index to show |
parent- | Apply to parent |
child- | Apply to all childs |
|
private |
ElementsCollectionWidget::showThisDir Hide all directories except the pointed dir;.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |