icon() and setIcon() in the api, pretty foundamental in a tool button...
svn path=/trunk/KDE/kdelibs/; revision=913027
This commit is contained in:
parent
53658a106e
commit
88abeaf783
@ -209,6 +209,16 @@ void ToolButton::setImage(const QString &path)
|
||||
d->setPixmap(this);
|
||||
}
|
||||
|
||||
void ToolButton::setIcon(const QIcon &icon)
|
||||
{
|
||||
nativeWidget()->setIcon(icon);
|
||||
}
|
||||
|
||||
QIcon ToolButton::icon() const
|
||||
{
|
||||
return nativeWidget()->icon();
|
||||
}
|
||||
|
||||
QString ToolButton::image() const
|
||||
{
|
||||
return d->imagePath;
|
||||
|
@ -104,6 +104,18 @@ public:
|
||||
*/
|
||||
QToolButton *nativeWidget() const;
|
||||
|
||||
/**
|
||||
* sets the icon for this toolbutton
|
||||
*
|
||||
* @arg icon the icon we want to use
|
||||
*/
|
||||
void setIcon(const QIcon &icon);
|
||||
|
||||
/**
|
||||
* @return the icon of this button
|
||||
*/
|
||||
QIcon icon() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void clicked();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user