toggleDesktopImmutability -> pimpl
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801134
This commit is contained in:
parent
4d6ab4bb1a
commit
c5e0d52ac3
@ -479,25 +479,6 @@ Location Containment::location() const
|
|||||||
return d->location;
|
return d->location;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Containment::toggleDesktopImmutability()
|
|
||||||
{
|
|
||||||
if (corona()) {
|
|
||||||
if (corona()->immutability() == NotImmutable) {
|
|
||||||
corona()->setImmutability(UserImmutable);
|
|
||||||
} else if (corona()->immutability() == UserImmutable) {
|
|
||||||
corona()->setImmutability(NotImmutable);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (immutability() == NotImmutable) {
|
|
||||||
setImmutability(UserImmutable);
|
|
||||||
} else if (immutability() == UserImmutable) {
|
|
||||||
setImmutability(NotImmutable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
d->setLockToolText();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Containment::addSiblingContainment()
|
void Containment::addSiblingContainment()
|
||||||
{
|
{
|
||||||
emit addSiblingContainment(this);
|
emit addSiblingContainment(this);
|
||||||
@ -894,6 +875,25 @@ void Containment::closeToolBox()
|
|||||||
|
|
||||||
// Private class implementation
|
// Private class implementation
|
||||||
|
|
||||||
|
void Containment::Private::toggleDesktopImmutability()
|
||||||
|
{
|
||||||
|
if (q->corona()) {
|
||||||
|
if (q->corona()->immutability() == NotImmutable) {
|
||||||
|
q->corona()->setImmutability(UserImmutable);
|
||||||
|
} else if (q->corona()->immutability() == UserImmutable) {
|
||||||
|
q->corona()->setImmutability(NotImmutable);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (q->immutability() == NotImmutable) {
|
||||||
|
q->setImmutability(UserImmutable);
|
||||||
|
} else if (q->immutability() == UserImmutable) {
|
||||||
|
q->setImmutability(NotImmutable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setLockToolText();
|
||||||
|
}
|
||||||
|
|
||||||
void Containment::Private::zoomIn()
|
void Containment::Private::zoomIn()
|
||||||
{
|
{
|
||||||
emit q->zoomRequested(q, Plasma::ZoomIn);
|
emit q->zoomRequested(q, Plasma::ZoomIn);
|
||||||
|
@ -333,13 +333,6 @@ class PLASMA_EXPORT Containment : public Applet
|
|||||||
*/
|
*/
|
||||||
void setFormFactor(Plasma::FormFactor formFactor);
|
void setFormFactor(Plasma::FormFactor formFactor);
|
||||||
|
|
||||||
/**
|
|
||||||
* Locks or unlocks plasma's applets.
|
|
||||||
* When plasma is locked, applets cannot be transformed, added or deleted
|
|
||||||
* but they can still be configured.
|
|
||||||
*/
|
|
||||||
void toggleDesktopImmutability();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells the corona to create a new desktop containment
|
* Tells the corona to create a new desktop containment
|
||||||
*/
|
*/
|
||||||
@ -383,6 +376,7 @@ class PLASMA_EXPORT Containment : public Applet
|
|||||||
Q_PRIVATE_SLOT(d, void positionToolBox())
|
Q_PRIVATE_SLOT(d, void positionToolBox())
|
||||||
Q_PRIVATE_SLOT(d, void zoomIn())
|
Q_PRIVATE_SLOT(d, void zoomIn())
|
||||||
Q_PRIVATE_SLOT(d, void zoomOut())
|
Q_PRIVATE_SLOT(d, void zoomOut())
|
||||||
|
Q_PRIVATE_SLOT(d, void toggleDesktopImmutability());
|
||||||
|
|
||||||
friend class Applet;
|
friend class Applet;
|
||||||
class Private;
|
class Private;
|
||||||
|
@ -72,6 +72,13 @@ public:
|
|||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Locks or unlocks plasma's applets.
|
||||||
|
* When plasma is locked, applets cannot be transformed, added or deleted
|
||||||
|
* but they can still be configured.
|
||||||
|
*/
|
||||||
|
void toggleDesktopImmutability();
|
||||||
|
|
||||||
Applet* addApplet(const QString& name, const QVariantList& args = QVariantList(),
|
Applet* addApplet(const QString& name, const QVariantList& args = QVariantList(),
|
||||||
const QRectF &geometry = QRectF(-1, -1, -1, -1), uint id = 0,
|
const QRectF &geometry = QRectF(-1, -1, -1, -1), uint id = 0,
|
||||||
bool delayedInit = false);
|
bool delayedInit = false);
|
||||||
|
Loading…
Reference in New Issue
Block a user