* add setToolBoxOpen
* show/hide -> open/close svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801128
This commit is contained in:
parent
a915bf7e6b
commit
f50fad8cb9
@ -865,7 +865,7 @@ void Containment::enableToolBoxTool(const QString &toolname, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
bool Containment::isToolboxToolEnabled(const QString &toolname) const
|
||||
bool Containment::isToolBoxToolEnabled(const QString &toolname) const
|
||||
{
|
||||
if (d->toolBox) {
|
||||
return d->toolBox->isToolEnabled(toolname);
|
||||
@ -873,14 +873,23 @@ bool Containment::isToolboxToolEnabled(const QString &toolname) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void Containment::showToolbox()
|
||||
void Containment::setToolBoxOpen(bool open)
|
||||
{
|
||||
if (open) {
|
||||
openToolBox();
|
||||
} else {
|
||||
closeToolBox();
|
||||
}
|
||||
}
|
||||
|
||||
void Containment::openToolBox()
|
||||
{
|
||||
if (d->toolBox) {
|
||||
d->toolBox->showToolbox();
|
||||
}
|
||||
}
|
||||
|
||||
void Containment::hideToolbox()
|
||||
void Containment::closeToolBox()
|
||||
{
|
||||
if (d->toolBox) {
|
||||
d->toolBox->hideToolbox();
|
||||
|
@ -235,7 +235,7 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
void loadContainment(KConfigGroup* group);
|
||||
|
||||
/**
|
||||
* Constructs a toolbox item and adds it to the toolbox. The toolbox takes over ownership of the item. Returns the constructed tool.
|
||||
* Constructs a ToolBox item and adds it to the toolbox. The toolbox takes over ownership of the item. Returns the constructed tool.
|
||||
*
|
||||
* @param toolName the name of the tool
|
||||
* @param iconName the name of the icon
|
||||
@ -256,17 +256,24 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
/**
|
||||
* Returns whether or not a given toolbox tool is enabled
|
||||
*/
|
||||
bool isToolboxToolEnabled(const QString &toolName) const;
|
||||
bool isToolBoxToolEnabled(const QString &toolName) const;
|
||||
|
||||
/**
|
||||
* Open the Plasma toolbox
|
||||
* Sets the open or closed state of the Containment's toolbox
|
||||
*
|
||||
* @arg open true to open the ToolBox, false to close it
|
||||
*/
|
||||
void showToolbox();
|
||||
void setToolBoxOpen(bool open);
|
||||
|
||||
/**
|
||||
* Close the Plasma toolbox
|
||||
* Open the Containment's toolbox
|
||||
*/
|
||||
void hideToolbox();
|
||||
void openToolBox();
|
||||
|
||||
/**
|
||||
* Closes Containment's toolbox
|
||||
*/
|
||||
void closeToolBox();
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user