allow reseting the containment

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=774348
This commit is contained in:
Aaron J. Seigo 2008-02-13 02:30:07 +00:00
parent 134ccdec7c
commit 1b96f05721
2 changed files with 44 additions and 0 deletions

View File

@ -230,6 +230,16 @@ QString AppletBrowserWidget::application()
return d->application;
}
void AppletBrowserWidget::setContainment(Plasma::Containment *containment)
{
d->containment = containment;
}
Containment *AppletBrowserWidget::containment() const
{
return d->containment;
}
void AppletBrowserWidget::addApplet()
{
kDebug() << "Button ADD clicked";
@ -346,6 +356,16 @@ QString AppletBrowser::application()
return m_widget->application();
}
void AppletBrowser::setContainment(Plasma::Containment *containment)
{
m_widget->setContainment(containment);
}
Containment* AppletBrowser::containment() const
{
return m_widget->containment();
}
} // namespace Plasma
#include "appletbrowser.moc"

View File

@ -41,6 +41,18 @@ public:
void setApplication(const QString& application = QString());
QString application();
/**
* Changes the current default containment to add applets to
*
* @arg containment the new default
*/
void setContainment(Plasma::Containment *containment);
/**
* @return the current default containment to add applets to
*/
Containment* containment() const;
protected Q_SLOTS:
/**
* Adds currently selected applets
@ -85,6 +97,18 @@ public:
void setApplication(const QString& application = QString());
QString application();
/**
* Changes the current default containment to add applets to
*
* @arg containment the new default
*/
void setContainment(Plasma::Containment *containment);
/**
* @return the current default containment to add applets to
*/
Containment* containment() const;
private:
void init();
AppletBrowserWidget *m_widget;