|
Krita Source Code Documentation
|
The KisTagToolButton class manages the logic of the tag management popup. More...
#include <KisTagToolButton.h>
Inheritance diagram for KisTagToolButton:Classes | |
| class | Private |
Signals | |
| void | deletionOfCurrentTagRequested () |
| deletionOfCurrentTagRequested signals to KisTagChooserWidget to delete the current tag | |
| void | newTagRequested (const QString &tagName) |
| newTagRequested signals to the KisTagChooserWidget to create a new tag | |
| void | popupMenuAboutToShow () |
| popupMenuAboutToShow signals that the tags popup will be shown soon. | |
| void | renamingOfCurrentTagRequested (const QString &tagName) |
| renamingOfCurrentTagRequested signals to KisTagChooserWidget to rename the current tag | |
| void | undeletionOfTagRequested (const KisTagSP tag) |
| undeletionOfTagRequested signals to KisTagChooserWidget to undelete the mentioned tag | |
Private Slots | |
| void | onTagUndeleteClicked () |
| onTagUndeleteClicked is called when the user | |
Private Member Functions | |
| KisTagToolButton (QWidget *parent=0) | |
| void | loadIcon () |
| updates icon file when loading and changing themes | |
| void | readOnlyMode (bool activate) |
| readOnlyMode sets the mode of the popup | |
| void | setCurrentTag (const KisTagSP tag) |
| void | setUndeletionCandidate (const KisTagSP deletedTag) |
| setUndeletionCandidate sets a new item in the deleted tags list | |
| KisTagSP | undeletionCandidate () const |
| ~KisTagToolButton () override | |
Private Attributes | |
| Private *const | d |
Friends | |
| class | KisTagChooserWidget |
The KisTagToolButton class manages the logic of the tag management popup.
This class is responsible for the GUI for creating, renaming and removing tags. Since both renaming and removing is context-dependent (it depends on which tag is currently selected in the combobox), all actions Q_EMIT signals to the TagChooserWidget for it to handle actual creating, renaming and removal of tags in the KisTagModel.
Definition at line 32 of file KisTagToolButton.h.
|
explicitprivate |
Definition at line 44 of file KisTagToolButton.cpp.
References KisTagToolButton::Private::addTagAction, connect(), d, KisTagToolButton::Private::deleteTagAction, deletionOfCurrentTagRequested(), koIcon, loadIcon(), newTagRequested(), onTagUndeleteClicked(), popupMenuAboutToShow(), KisTagToolButton::Private::renameTagAction, renamingOfCurrentTagRequested(), LineEditAction::setCloseParentOnTrigger(), LineEditAction::setIcon(), LineEditAction::setPlaceholderText(), KisTagToolButton::Private::tagToolButton, and KisTagToolButton::Private::undeleteTagAction.
|
overrideprivate |
|
signal |
deletionOfCurrentTagRequested signals to KisTagChooserWidget to delete the current tag
Since KisTagToolButton doesn't know which tag is current or which KisTagModel it should be using, it signals KisTagChooserWidget to do remove the current tag.
|
private |
updates icon file when loading and changing themes
Definition at line 141 of file KisTagToolButton.cpp.
References d, koIcon, and KisTagToolButton::Private::tagToolButton.
|
signal |
newTagRequested signals to the KisTagChooserWidget to create a new tag
| tag | tag name written by the user (other fields are not used) |
Since KisTagToolButton doesn't know which KisTagModel it should be using (because it doesn't know the resourceType) and for the consistency, it signals KisTagChooserWidget to create a new tag with the name written by the user.
|
privateslot |
onTagUndeleteClicked is called when the user
Definition at line 146 of file KisTagToolButton.cpp.
References d, KisTagToolButton::Private::undeleteCandidate, and undeletionOfTagRequested().
|
signal |
popupMenuAboutToShow signals that the tags popup will be shown soon.
It is used by
|
private |
readOnlyMode sets the mode of the popup
If the mode is read-only, then renaming and removal of the tag is not accessible (the textbox and the buttons are hidden).
| activate | if true, then the popup is in the read-only mode. |
Definition at line 111 of file KisTagToolButton.cpp.
References d, KisTagToolButton::Private::deleteTagAction, KisTagToolButton::Private::renameTagAction, and LineEditAction::setVisible().
|
signal |
renamingOfCurrentTagRequested signals to KisTagChooserWidget to rename the current tag
| tag | tag name written by the user (other fields are not used) |
Since KisTagToolButton doesn't know which tag is current or which KisTagModel it should be using, it signals KisTagChooserWidget to do rename the current tag to the name written by the user.
Definition at line 135 of file KisTagToolButton.cpp.
References KisTagToolButton::Private::currentTag, d, and KisTagToolButton::Private::deleteTagAction.
setUndeletionCandidate sets a new item in the deleted tags list
Tags are never deleted fully, they are only marked inactive. Undeletion means marking them as active again. This function adds new tags for the user to be able to undelete them (mark active in the database).
| deletedTag | tag that can be undeleted (activated again) |
Definition at line 118 of file KisTagToolButton.cpp.
References d, KisTagToolButton::Private::undeleteCandidate, and KisTagToolButton::Private::undeleteTagAction.
|
private |
Definition at line 130 of file KisTagToolButton.cpp.
References d, and KisTagToolButton::Private::undeleteCandidate.
undeletionOfTagRequested signals to KisTagChooserWidget to undelete the mentioned tag
| tag | tag to be undeleted (marked active again) |
Tags are never deleted fully, they are only marked inactive. Undeletion means marking them as active again. This function signals to KisTagChooserWidget that a tag mentioned in the argument should be activated.
|
friend |
Definition at line 116 of file KisTagToolButton.h.
|
private |
Definition at line 115 of file KisTagToolButton.h.