|
Krita Source Code Documentation
|
The KisResourceTaggingManager class is a helper class for KisResourceItemChooser for tagChooser and tagFilter widgets. More...
#include <KisResourceTaggingManager.h>
Inheritance diagram for KisResourceTaggingManager:Classes | |
| class | Private |
Public Member Functions | |
| void | contextMenuRequested (KoResourceSP currentResource, QPoint pos) |
| contextMenuRequested method to get the context menu | |
| KisResourceTaggingManager (QString resourceType, KisTagFilterResourceProxyModel *model, QWidget *parent) | |
| KisResourceTaggingManager standard constructor of the KisResourceTaggingManager class. | |
| void | showTaggingBar (bool show) |
| showTaggingBar method to show or hide the tag chooser bar and the tag filter | |
| KisTagChooserWidget * | tagChooserWidget () |
| tagChooserWidget method to get the tag chooser widget | |
| KisTagFilterWidget * | tagFilterWidget () |
| tagFilterWidget method to get the tag filter widget | |
| ~KisResourceTaggingManager () override | |
| ~KisResourceTaggingManager destructor | |
Private Slots | |
| void | slotFilterByTagChanged (const bool filterByTag) |
| slotFilterByTagChanged slot for the "filter by tag" checkbox being checked or unchecked by the user | |
| void | tagChooserIndexChanged (const KisTagSP tag) |
| tagChooserIndexChanged slot for the signal that the tag chosen in the tags combobox changed | |
| void | tagSearchLineEditTextChanged (const QString &lineEditText) |
| tagSearchLineEditTextChanged slot for the signal that the text in the filter changed | |
Private Attributes | |
| Private *const | d |
The KisResourceTaggingManager class is a helper class for KisResourceItemChooser for tagChooser and tagFilter widgets.
It takes care of exchanging information about tags between KisTagChooserWidget and KisTagFilterWidget. It makes sure that the correct tag is put in the resource model proxy that is used in the KisResourceItemChooser. Historically it also managed a list of tags; now KisTagModel is taking care of it.
Definition at line 43 of file KisResourceTaggingManager.h.
|
explicit |
KisResourceTaggingManager standard constructor of the KisResourceTaggingManager class.
| resourceType | resource type of the resources that will be dealt with |
| model | proxy model that is used to show only the resources tagged with a specific tag |
| parent | parent widget |
Definition at line 58 of file KisResourceTaggingManager.cpp.
References connect(), d, KisTagFilterWidget::isFilterByTagChecked(), KisResourceTaggingManager::Private::model, KisResourceTaggingManager::Private::resourceType, slotFilterByTagChanged(), KisResourceTaggingManager::Private::tagChooser, tagChooserIndexChanged(), KisResourceTaggingManager::Private::tagFilter, KisResourceTaggingManager::Private::tagModel, and tagSearchLineEditTextChanged().
|
override |
~KisResourceTaggingManager destructor
Definition at line 79 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::tagModel.
| void KisResourceTaggingManager::contextMenuRequested | ( | KoResourceSP | currentResource, |
| QPoint | pos ) |
contextMenuRequested method to get the context menu
| currentResource | current selected resource |
| pos | position of the mouse cursor where the context menu should be created |
Definition at line 110 of file KisResourceTaggingManager.cpp.
References KisTagChooserWidget::currentlySelectedTag(), d, and KisResourceTaggingManager::Private::tagChooser.
| void KisResourceTaggingManager::showTaggingBar | ( | bool | show | ) |
showTaggingBar method to show or hide the tag chooser bar and the tag filter
| show | if true, the bars should be shown; if false, they should be hidden |
Definition at line 85 of file KisResourceTaggingManager.cpp.
References d, KisResourceTaggingManager::Private::resourceType, KisTagChooserWidget::setCurrentItem(), KisResourceTaggingManager::Private::tagChooser, and KisResourceTaggingManager::Private::tagFilter.
|
privateslot |
slotFilterByTagChanged slot for the "filter by tag" checkbox being checked or unchecked by the user
| filterByTag | current state of the checkbox |
It updates the filter in the filter proxy model to honor the "filter by tag" setting correctly.
Definition at line 105 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::model.
tagChooserIndexChanged slot for the signal that the tag chosen in the tags combobox changed
| tag | the currently chosen tag |
It puts the current tag in the filter proxy model to get only the resources filtered out by the tag.
Definition at line 95 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::model.
| KisTagChooserWidget * KisResourceTaggingManager::tagChooserWidget | ( | ) |
tagChooserWidget method to get the tag chooser widget
Definition at line 122 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::tagChooser.
| KisTagFilterWidget * KisResourceTaggingManager::tagFilterWidget | ( | ) |
tagFilterWidget method to get the tag filter widget
Definition at line 127 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::tagFilter.
|
privateslot |
tagSearchLineEditTextChanged slot for the signal that the text in the filter changed
| lineEditText | the current text in the filter box |
It updates the filter in the filter proxy model.
Definition at line 100 of file KisResourceTaggingManager.cpp.
References d, and KisResourceTaggingManager::Private::model.
|
private |
Definition at line 108 of file KisResourceTaggingManager.h.