Krita Source Code Documentation
Loading...
Searching...
No Matches
KisTagChooserWidget Class Reference

The KisTagChooserWidget class is responsible for all the logic that the tags combobox has in various resource choosers. More...

#include <KisTagChooserWidget.h>

+ Inheritance diagram for KisTagChooserWidget:

Public Slots

void addTag (const QString &tag)
 tagToolCreateNewTag slot for the signal from KisTagToolButton that a new tag needs to be created
 
void addTag (const QString &tag, KoResourceSP resource)
 
void addTag (KisTagSP tag, KoResourceSP resource)
 
void tagChanged (int index)
 tagChanged slot for the signal from the combobox that the index changed
 

Signals

void sigTagChosen (const KisTagSP tag)
 sigTagChosen is emitted when the selected tag in the combobox changes due to user interaction or by other means
 

Public Member Functions

int currentIndex () const
 currentIndex returns the current index in tags combobox
 
KisTagSP currentlySelectedTag ()
 currentlySelectedTag returns the current tag from combobox
 
 KisTagChooserWidget (KisTagModel *model, QString resourceType, QWidget *parent)
 
bool selectedTagIsReadOnly ()
 selectedTagIsReadOnly checks whether the tag is readonly (generated by Krita)
 
void setCurrentItem (const QString &tag)
 setCurrentItem sets the tag from the param as the current tag in the combobox
 
void updateIcons ()
 update icon files on loading and theme change
 
 ~KisTagChooserWidget () override
 

Public Attributes

QScopedPointer< KisTagModelallTagsModel
 
KisTagSP cachedTag
 
QComboBox * comboBox
 
KisTagModelmodel
 
QString resourceType
 
KisTagToolButtontagToolButton
 

Private Types

enum  OverwriteDialogOptions { Replace , Undelete , Cancel }
 

Private Slots

void cacheSelectedTag ()
 cacheSelectedTag slot that stores current tag selection.
 
void restoreTagFromCache ()
 restoreTagFromCache slot designed to restore a selected tag from previously cached selection.
 
void slotTagModelDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > roles)
 
void tagToolContextMenuAboutToShow ()
 tagToolContextMenuAboutToShow slot for the signal from the KisTagToolButton that the popup will be shown soon
 
void tagToolDeleteCurrentTag ()
 tagToolDeleteCurrentTag slot for the signal from the KisTagToolButton that the current tag needs to be deleted
 
void tagToolRenameCurrentTag (const QString &tag)
 tagToolRenameCurrentTag slot for the signal from KisTagToolButton that the current tag needs to be renamed
 
void tagToolUndeleteLastTag (KisTagSP tag)
 tagToolUndeleteLastTag slot for the signal from the KisTagToolButton that the last deleted tag needs to be undeleted
 

Private Member Functions

OverwriteDialogOptions overwriteTagDialog (KisTagChooserWidget *parent, bool undelete)
 
void setCurrentIndex (int index)
 setCurrentIndex sets the current index in the combobox
 
- Private Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Private Attributes

Private *const d
 
- Private Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Detailed Description

The KisTagChooserWidget class is responsible for all the logic that the tags combobox has in various resource choosers.

It uses KisTagModel as a model for items in the combobox. It is also responsible for the popup for tag removal, renaming and creation that appears on the right side of the tag combobox (via KisTagToolButton) All the logic for adding and removing tags is done through KisTagModel.

Definition at line 33 of file KisTagChooserWidget.cpp.

Member Enumeration Documentation

◆ OverwriteDialogOptions

Enumerator
Replace 
Undelete 
Cancel 

Definition at line 119 of file KisTagChooserWidget.h.

Constructor & Destructor Documentation

◆ KisTagChooserWidget()

KisTagChooserWidget::KisTagChooserWidget ( KisTagModel * model,
QString resourceType,
QWidget * parent )
explicit

Definition at line 44 of file KisTagChooserWidget.cpp.

45 : QWidget(parent)
46 , d(new Private)
47{
48 d->resourceType = resourceType;
49
50 d->comboBox = new QComboBox(this);
51 d->comboBox->setToolTip(i18n("Tag"));
52 d->comboBox->setSizePolicy(QSizePolicy::Policy::Expanding , QSizePolicy::Policy::Fixed);
53
54 // Allow the combo box to not depend on content size.
55 // Removing below code will cause the QComboBox when inside a QSplitter to have a width
56 // equal to the longest QComboBox item regardless of size policy.
57 d->comboBox->setMinimumContentsLength(1);
58 d->comboBox->setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon);
59
60 d->comboBox->setInsertPolicy(QComboBox::InsertAlphabetically);
62 d->comboBox->setModel(model);
63
64 d->model = model;
65 d->allTagsModel.reset(new KisTagModel(resourceType));
66 d->allTagsModel->setTagFilter(KisTagModel::ShowAllTags);
67
68 QGridLayout* comboLayout = new QGridLayout(this);
69
70 comboLayout->addWidget(d->comboBox, 0, 0);
71
72 d->tagToolButton = new KisTagToolButton(this);
73 d->tagToolButton->setToolTip(i18n("Tag options"));
74 comboLayout->addWidget(d->tagToolButton, 0, 1);
75
76 comboLayout->setSpacing(0);
77 comboLayout->setContentsMargins(0, 0, 0, 0);
78 comboLayout->setColumnStretch(0, 3);
79 this->setEnabled(true);
80
81 connect(d->comboBox, SIGNAL(currentIndexChanged(int)),
82 this, SLOT(tagChanged(int)));
83
84 connect(d->tagToolButton, SIGNAL(popupMenuAboutToShow()),
85 this, SLOT (tagToolContextMenuAboutToShow()));
86
87 connect(d->tagToolButton, SIGNAL(newTagRequested(QString)),
88 this, SLOT(addTag(QString)));
89
90 connect(d->tagToolButton, SIGNAL(deletionOfCurrentTagRequested()),
91 this, SLOT(tagToolDeleteCurrentTag()));
92
93 connect(d->tagToolButton, SIGNAL(renamingOfCurrentTagRequested(const QString&)),
94 this, SLOT(tagToolRenameCurrentTag(const QString&)));
95
96 connect(d->tagToolButton, SIGNAL(undeletionOfTagRequested(KisTagSP)),
97 this, SLOT(tagToolUndeleteLastTag(KisTagSP)));
98
99
100 // Workaround for handling tag selection deselection when model resets.
101 // Occurs when model changes under the user e.g. +/- a resource storage.
102 connect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(cacheSelectedTag()));
103 connect(d->model, SIGNAL(modelReset()), this, SLOT(restoreTagFromCache()));
104 connect(d->allTagsModel.data(), SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)),
105 this, SLOT(slotTagModelDataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)));
106
107}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void tagChanged(int index)
tagChanged slot for the signal from the combobox that the index changed
void slotTagModelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > roles)
void tagToolDeleteCurrentTag()
tagToolDeleteCurrentTag slot for the signal from the KisTagToolButton that the current tag needs to b...
void addTag(const QString &tag)
tagToolCreateNewTag slot for the signal from KisTagToolButton that a new tag needs to be created
void tagToolRenameCurrentTag(const QString &tag)
tagToolRenameCurrentTag slot for the signal from KisTagToolButton that the current tag needs to be re...
void restoreTagFromCache()
restoreTagFromCache slot designed to restore a selected tag from previously cached selection.
void tagToolUndeleteLastTag(KisTagSP tag)
tagToolUndeleteLastTag slot for the signal from the KisTagToolButton that the last deleted tag needs ...
void tagToolContextMenuAboutToShow()
tagToolContextMenuAboutToShow slot for the signal from the KisTagToolButton that the popup will be sh...
void cacheSelectedTag()
cacheSelectedTag slot that stores current tag selection.
The KisTagToolButton class manages the logic of the tag management popup.

References addTag(), cacheSelectedTag(), connect(), d, model, KisAllTagsModel::Name, resourceType, restoreTagFromCache(), KisTagModel::ShowAllTags, slotTagModelDataChanged(), tagChanged(), tagToolContextMenuAboutToShow(), tagToolDeleteCurrentTag(), tagToolRenameCurrentTag(), and tagToolUndeleteLastTag().

◆ ~KisTagChooserWidget()

KisTagChooserWidget::~KisTagChooserWidget ( )
override

Definition at line 109 of file KisTagChooserWidget.cpp.

110{
111 delete d;
112}

References d.

Member Function Documentation

◆ addTag [1/3]

void KisTagChooserWidget::addTag ( const QString & tag)
slot

tagToolCreateNewTag slot for the signal from KisTagToolButton that a new tag needs to be created

Parameters
tagtag with the name to be created
Returns
created tag taken from the model, with a valid id

Definition at line 258 of file KisTagChooserWidget.cpp.

259{
260 addTag(tag, 0);
261}

References addTag().

◆ addTag [2/3]

void KisTagChooserWidget::addTag ( const QString & tag,
KoResourceSP resource )
slot

Definition at line 274 of file KisTagChooserWidget.cpp.

275{
276 if (tagName == KisAllTagsModel::urlAll() || tagName == KisAllTagsModel::urlAllUntagged()) {
277 QMessageBox::information(this, i18nc("Dialog title", "Can't create the tag"), i18nc("Dialog message", "You can't use this name for your custom tags."), QMessageBox::Ok);
278 return;
279 }
280
281 if (tagName.isEmpty()) return;
282
283 KisTagSP tagForUrl = d->model->tagForUrl(tagName);
284 if (!tagForUrl.isNull()) {
285 int response = overwriteTagDialog(this, tagForUrl->active());
286 if (response == Undelete) { // Undelete
287 d->model->setTagActive(tagForUrl);
288 if (!resource.isNull()) {
289 KisTagResourceModel(d->resourceType).tagResources(tagForUrl, QVector<int>() << resource->resourceId());
290 }
291 d->model->sort(KisAllTagsModel::Name);
292 return;
293 } else if (response == Cancel) { // Cancel
294 return;
295 }
296 }
297 QVector<KoResourceSP> resources = (resource.isNull() ? QVector<KoResourceSP>() : (QVector<KoResourceSP>() << resource));
298 d->model->addTag(tagName, true, resources); // this will overwrite the tag
299 d->model->sort(KisAllTagsModel::Name);
300}
static QString urlAll()
Definition KisTagModel.h:92
static QString urlAllUntagged()
Definition KisTagModel.h:93
OverwriteDialogOptions overwriteTagDialog(KisTagChooserWidget *parent, bool undelete)
The KisTagResourceModel class makes it possible to retrieve the resources for certain tags or the tag...
bool tagResources(const KisTagSP tag, const QVector< int > &resourceIds) override

References Cancel, d, KisAllTagsModel::Name, overwriteTagDialog(), KisTagResourceModel::tagResources(), Undelete, KisAllTagsModel::urlAll(), and KisAllTagsModel::urlAllUntagged().

◆ addTag [3/3]

void KisTagChooserWidget::addTag ( KisTagSP tag,
KoResourceSP resource )
slot

Definition at line 302 of file KisTagChooserWidget.cpp.

303{
304 if (tag->name() == KisAllTagsModel::urlAll() || tag->name() == KisAllTagsModel::urlAllUntagged()) {
305 QMessageBox::information(this, i18nc("Dialog title", "Can't rename the tag"), i18nc("Dialog message", "You can't use this name for your custom tags."), QMessageBox::Ok);
306 return;
307 }
308
309 KisTagSP tagForUrl = d->model->tagForUrl(tag->url());
310 if (!tagForUrl.isNull()) {
311 int response = overwriteTagDialog(this, tagForUrl->active());
312 if (response == Undelete) { // Undelete
313 d->model->setTagActive(tagForUrl);
314 if (!resource.isNull()) {
315 KisTagResourceModel(d->resourceType).tagResources(tagForUrl, QVector<int>() << resource->resourceId());
316 }
317 d->model->sort(KisAllTagsModel::Name);
318 return;
319 } else if (response == Cancel) { // Cancel
320 return;
321 }
322 }
323 QVector<KoResourceSP> resources = (resource.isNull() ? QVector<KoResourceSP>() : (QVector<KoResourceSP>() << resource));
324 d->model->addTag(tag, true, resources); // this will overwrite the tag
325 d->model->sort(KisAllTagsModel::Name);
326}

References Cancel, d, KisAllTagsModel::Name, overwriteTagDialog(), KisTagResourceModel::tagResources(), Undelete, KisAllTagsModel::urlAll(), and KisAllTagsModel::urlAllUntagged().

◆ cacheSelectedTag

void KisTagChooserWidget::cacheSelectedTag ( )
privateslot

cacheSelectedTag slot that stores current tag selection.

Used to allow restoration of tag even after a model reset. Will store the tag just before model resets.

Definition at line 188 of file KisTagChooserWidget.cpp.

189{
190 d->cachedTag = currentlySelectedTag();
191}
KisTagSP currentlySelectedTag()
currentlySelectedTag returns the current tag from combobox

References currentlySelectedTag(), and d.

◆ currentIndex()

int KisTagChooserWidget::currentIndex ( ) const

currentIndex returns the current index in tags combobox

Returns
the index of the current item in tags combobox

Definition at line 242 of file KisTagChooserWidget.cpp.

243{
244 return d->comboBox->currentIndex();
245}

References d.

◆ currentlySelectedTag()

KisTagSP KisTagChooserWidget::currentlySelectedTag ( )

currentlySelectedTag returns the current tag from combobox

See also
currentIndex
Returns
the tag that is currently selected in the tag combobox

Definition at line 328 of file KisTagChooserWidget.cpp.

329{
330 int row = d->comboBox->currentIndex();
331 if (row < 0) {
332 return nullptr;
333 }
334
335 QModelIndex index = d->model->index(row, 0);
336 KisTagSP tag = d->model->tagForIndex(index);
337 return tag;
338}

References d.

◆ overwriteTagDialog()

KisTagChooserWidget::OverwriteDialogOptions KisTagChooserWidget::overwriteTagDialog ( KisTagChooserWidget * parent,
bool undelete )
private

Definition at line 263 of file KisTagChooserWidget.cpp.

264{
265 QString undeleteOption = !tagIsActive ? i18nc("Option in a dialog to undelete (reactivate) existing tag with its old assigned resources", "Restore previous tag")
266 : i18nc("Option in a dialog to use existing tag with its old assigned resources", "Use existing tag");
267 // if you use this simple cast, the order of buttons must match order of options in the enum
268 return (KisTagChooserWidget::OverwriteDialogOptions)QMessageBox::question(parent, i18nc("Dialog title", "Overwrite tag?"), i18nc("Question to the user in a dialog about creating a tag",
269 "A tag with this unique name already exists. Do you want to replace it?"),
270 i18nc("Option in a dialog to discard the previously existing tag and creating a new one in its place", "Replace (overwrite) tag"),
271 undeleteOption, i18n("Cancel"));
272}

◆ restoreTagFromCache

void KisTagChooserWidget::restoreTagFromCache ( )
privateslot

restoreTagFromCache slot designed to restore a selected tag from previously cached selection.

Companion to cacheSelectedTag, this method restore the selection after model reset.

Definition at line 193 of file KisTagChooserWidget.cpp.

194{
195 if (d->cachedTag) {
196 QModelIndex cachedIndex = d->model->indexForTag(d->cachedTag);
197 setCurrentIndex(cachedIndex.row());
198 d->cachedTag = nullptr;
199 }
200}
void setCurrentIndex(int index)
setCurrentIndex sets the current index in the combobox

References d, and setCurrentIndex().

◆ selectedTagIsReadOnly()

bool KisTagChooserWidget::selectedTagIsReadOnly ( )

selectedTagIsReadOnly checks whether the tag is readonly (generated by Krita)

Returns
true if the tag was generated by Krita, false if it's just a normal tag

◆ setCurrentIndex()

void KisTagChooserWidget::setCurrentIndex ( int index)
private

setCurrentIndex sets the current index in the combobox

Parameters
indexindex is the index of the tag in the combobox

Definition at line 237 of file KisTagChooserWidget.cpp.

238{
239 d->comboBox->setCurrentIndex(index);
240}

References d.

◆ setCurrentItem()

void KisTagChooserWidget::setCurrentItem ( const QString & tag)

setCurrentItem sets the tag from the param as the current tag in the combobox

Parameters
tagtag url to be set as current in the combobox
Returns
true if successful, false if not successful

Definition at line 247 of file KisTagChooserWidget.cpp.

248{
249 for (int i = 0; i < d->model->rowCount(); i++) {
250 QModelIndex index = d->model->index(i, 0);
251 QString currentRowTag = d->model->data(index, Qt::UserRole + KisAllTagsModel::Url).toString();
252 if (currentRowTag == tag) {
254 }
255 }
256}

References d, setCurrentIndex(), and KisAllTagsModel::Url.

◆ sigTagChosen

void KisTagChooserWidget::sigTagChosen ( const KisTagSP tag)
signal

sigTagChosen is emitted when the selected tag in the combobox changes due to user interaction or by other means

Parameters
tagcurrent tag

◆ slotTagModelDataChanged

void KisTagChooserWidget::slotTagModelDataChanged ( const QModelIndex & topLeft,
const QModelIndex & bottomRight,
const QVector< int > roles )
privateslot

Definition at line 202 of file KisTagChooserWidget.cpp.

203{
204 // we care only about the check status
205 if (!roles.isEmpty() && !roles.contains(Qt::CheckStateRole)) {
206 return;
207 }
208
209 const QModelIndex currIdx =
210 d->allTagsModel->indexForTag(d->tagToolButton->undeletionCandidate());
211
212 if (currIdx.isValid() &&
213 currIdx.row() >= topLeft.row() && currIdx.row() <= bottomRight.row() &&
214 currIdx.column() >= topLeft.column() && currIdx.column() <= bottomRight.column()) {
215
216 const bool isNowActive = d->allTagsModel->data(currIdx, Qt::CheckStateRole).toBool();
217
218 if (isNowActive) {
219 d->tagToolButton->setUndeletionCandidate(KisTagSP());
220 }
221 }
222
223 for (int row = topLeft.row(); row <= bottomRight.row(); row++) {
224 for (int column = topLeft.column(); column <= bottomRight.column(); column++) {
225 const QModelIndex idx = d->allTagsModel->index(row, column);
226
227 const bool isActive = d->allTagsModel->data(idx, Qt::CheckStateRole).toBool();
228
229 if (idx != currIdx && !isActive) {
230 d->tagToolButton->setUndeletionCandidate(d->allTagsModel->tagForIndex(idx));
231 break;
232 }
233 }
234 }
235}
QSharedPointer< KisTag > KisTagSP
Definition KisTag.h:20

References d.

◆ tagChanged

void KisTagChooserWidget::tagChanged ( int index)
slot

tagChanged slot for the signal from the combobox that the index changed

Parameters
indexnew index

When the index in the combobox changes, for example because of user's interaction, combobox emits a signal; this method is called when it happens.

Definition at line 124 of file KisTagChooserWidget.cpp.

125{
126 if (tagIndex >= 0) {
128 d->tagToolButton->setCurrentTag(tag);
129 KConfigGroup group = KSharedConfig::openConfig()->group("SelectedTags");
130 group.writeEntry(d->resourceType, currentlySelectedTag()->url());
131 d->model->sort(KisAllTagsModel::Name);
132 Q_EMIT sigTagChosen(tag);
133 } else {
135 }
136}
void sigTagChosen(const KisTagSP tag)
sigTagChosen is emitted when the selected tag in the combobox changes due to user interaction or by o...

References currentlySelectedTag(), d, KisAllTagsModel::Name, setCurrentIndex(), and sigTagChosen().

◆ tagToolContextMenuAboutToShow

void KisTagChooserWidget::tagToolContextMenuAboutToShow ( )
privateslot

tagToolContextMenuAboutToShow slot for the signal from the KisTagToolButton that the popup will be shown soon

Based on the current tag (if it's readonly or not), the popup looks different, so this function sets the correct mode on the KisTagToolButton popup.

Definition at line 345 of file KisTagChooserWidget.cpp.

346{
347 /* only enable the save button if the selected tag set is editable */
348 if (currentlySelectedTag()) {
349 d->tagToolButton->readOnlyMode(currentlySelectedTag()->id() < 0);
350 }
351 else {
352 d->tagToolButton->readOnlyMode(true);
353 }
354}

References currentlySelectedTag(), and d.

◆ tagToolDeleteCurrentTag

void KisTagChooserWidget::tagToolDeleteCurrentTag ( )
privateslot

tagToolDeleteCurrentTag slot for the signal from the KisTagToolButton that the current tag needs to be deleted

Note that tags are not deleted but just marked inactive in the database.

Definition at line 114 of file KisTagChooserWidget.cpp.

115{
116 KisTagSP currentTag = currentlySelectedTag();
117 if (!currentTag.isNull() && currentTag->id() >= 0) {
118 d->model->setTagInactive(currentTag);
120 d->model->sort(KisAllTagsModel::Name);
121 }
122}

References currentlySelectedTag(), d, KisAllTagsModel::Name, and setCurrentIndex().

◆ tagToolRenameCurrentTag

void KisTagChooserWidget::tagToolRenameCurrentTag ( const QString & tag)
privateslot

tagToolRenameCurrentTag slot for the signal from KisTagToolButton that the current tag needs to be renamed

Parameters
newNamenew name for the tag

Definition at line 138 of file KisTagChooserWidget.cpp.

139{
141 bool canRenameCurrentTag = !tag.isNull() && (tagName != tag->name());
142
143 if (tagName == KisAllTagsModel::urlAll() || tagName == KisAllTagsModel::urlAllUntagged()) {
144 QMessageBox::information(this, i18nc("Dialog title", "Can't rename the tag"), i18nc("Dialog message", "You can't use this name for your custom tags."), QMessageBox::Ok);
145 return;
146 }
147
148 bool result = false;
149
150 if (canRenameCurrentTag && !tagName.isEmpty()) {
151 result = d->model->renameTag(tag, tagName, false);
152
153 if (!result) {
154 KisTagSP tagToRemove = d->model->tagForUrl(tagName);
155
156 if (tagToRemove &&
157 QMessageBox::question(this, i18nc("Dialog title", "Remove existing tag with that name?"),
158 i18nc("Dialog message (the arguments are both somewhat user readable nouns or adjectives (names of the tags), can be treated as nouns since they represent the tags)",
159 "A tag with this unique name already exists. In order to continue renaming, the existing tag needs to be removed. Do you want to continue?\n"
160 "Tag to be removed: %1\n"
161 "Tag's unique name: %2", tagToRemove->name(), tagToRemove->url()), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Cancel) {
162 result = d->model->renameTag(tag, tagName, true);
164 }
165 }
166 }
167
168 if (result) {
169 KisTagSP renamedTag = d->model->tagForUrl(tagName);
171 const QModelIndex idx = d->model->indexForTag(renamedTag);
172 setCurrentIndex(idx.row());
173 }
174}
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References currentlySelectedTag(), d, KIS_SAFE_ASSERT_RECOVER_RETURN, setCurrentIndex(), KisAllTagsModel::urlAll(), and KisAllTagsModel::urlAllUntagged().

◆ tagToolUndeleteLastTag

void KisTagChooserWidget::tagToolUndeleteLastTag ( KisTagSP tag)
privateslot

tagToolUndeleteLastTag slot for the signal from the KisTagToolButton that the last deleted tag needs to be undeleted

Parameters
tagtag to be undeleted (marked active)

Definition at line 176 of file KisTagChooserWidget.cpp.

177{
178 int previousIndex = d->comboBox->currentIndex();
179
180 bool success = d->model->setTagActive(tag);
181 setCurrentIndex(previousIndex);
182 if (success) {
183 setCurrentItem(tag->name());
184 d->model->sort(KisAllTagsModel::Name);
185 }
186}
void setCurrentItem(const QString &tag)
setCurrentItem sets the tag from the param as the current tag in the combobox

References d, KisAllTagsModel::Name, setCurrentIndex(), and setCurrentItem().

◆ updateIcons()

void KisTagChooserWidget::updateIcons ( )

update icon files on loading and theme change

Definition at line 340 of file KisTagChooserWidget.cpp.

341{
342 d->tagToolButton->loadIcon();
343}

References d.

Member Data Documentation

◆ allTagsModel

QScopedPointer<KisTagModel> KisTagChooserWidget::allTagsModel

Definition at line 41 of file KisTagChooserWidget.cpp.

◆ cachedTag

KisTagSP KisTagChooserWidget::cachedTag

Definition at line 39 of file KisTagChooserWidget.cpp.

◆ comboBox

QComboBox* KisTagChooserWidget::comboBox

Definition at line 36 of file KisTagChooserWidget.cpp.

◆ d

Private* const KisTagChooserWidget::d
private

Definition at line 129 of file KisTagChooserWidget.h.

◆ model

KisTagModel* KisTagChooserWidget::model

Definition at line 38 of file KisTagChooserWidget.cpp.

◆ resourceType

QString KisTagChooserWidget::resourceType

Definition at line 40 of file KisTagChooserWidget.cpp.

◆ tagToolButton

KisTagToolButton* KisTagChooserWidget::tagToolButton

Definition at line 37 of file KisTagChooserWidget.cpp.


The documentation for this class was generated from the following files: