a useful method to remove a previously set iconAction
svn path=/trunk/KDE/kdelibs/; revision=916376
This commit is contained in:
parent
bb8c603060
commit
82fb975523
@ -348,6 +348,16 @@ void IconWidget::addIconAction(QAction *action)
|
||||
iconAction->setRect(d->actionRect((IconWidgetPrivate::ActionPosition)count));
|
||||
}
|
||||
|
||||
void IconWidget::removeIconAction(QAction *action)
|
||||
{
|
||||
foreach (IconAction *i_action, d->cornerActions) {
|
||||
if (i_action->action() == action) {
|
||||
delete i_action;
|
||||
d->cornerActions.removeAll(i_action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IconWidget::setAction(QAction *action)
|
||||
{
|
||||
if (d->action) {
|
||||
|
@ -151,6 +151,12 @@ public:
|
||||
*/
|
||||
void addIconAction(QAction *action);
|
||||
|
||||
/**
|
||||
* Removes a previously set iconAction. The action will be removed from the widget
|
||||
* but will not be deleted.
|
||||
*/
|
||||
void removeIconAction(QAction *action);
|
||||
|
||||
/**
|
||||
* Associate an action with this IconWidget
|
||||
* this makes the IconWidget follow the state of the action, using its icon, text, etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user