* zoomRequested
* zoomIn/Out -> pimpl * Plasma::ZoomDirection enumeration svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801132
This commit is contained in:
parent
f50fad8cb9
commit
4d6ab4bb1a
@ -205,7 +205,7 @@ void Containment::setContainmentType(Containment::Type type)
|
||||
connect(zoomInTool, SIGNAL(clicked()), this, SLOT(zoomIn()));
|
||||
|
||||
QGraphicsWidget *zoomOutTool = addToolBoxTool("zoomOut", "zoom-out", i18n("Zoom Out"));
|
||||
connect(zoomOutTool, SIGNAL(clicked()), this, SIGNAL(zoomOut()));
|
||||
connect(zoomOutTool, SIGNAL(clicked()), this, SLOT(zoomOut()));
|
||||
|
||||
if (immutability() != SystemImmutable) {
|
||||
QGraphicsWidget *lockTool = addToolBoxTool("lockWidgets", "object-locked",
|
||||
@ -498,11 +498,6 @@ void Containment::toggleDesktopImmutability()
|
||||
d->setLockToolText();
|
||||
}
|
||||
|
||||
void Containment::zoomIn()
|
||||
{
|
||||
emit zoomIn(this);
|
||||
}
|
||||
|
||||
void Containment::addSiblingContainment()
|
||||
{
|
||||
emit addSiblingContainment(this);
|
||||
@ -899,6 +894,16 @@ void Containment::closeToolBox()
|
||||
|
||||
// Private class implementation
|
||||
|
||||
void Containment::Private::zoomIn()
|
||||
{
|
||||
emit q->zoomRequested(q, Plasma::ZoomIn);
|
||||
}
|
||||
|
||||
void Containment::Private::zoomOut()
|
||||
{
|
||||
emit q->zoomRequested(q, Plasma::ZoomOut);
|
||||
}
|
||||
|
||||
Toolbox* Containment::Private::createToolBox()
|
||||
{
|
||||
if (!toolBox) {
|
||||
|
@ -287,16 +287,9 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
void appletRemoved(Plasma::Applet* applet);
|
||||
|
||||
/**
|
||||
* Emitted when the containment requests zooming in one step.
|
||||
* Usually only used for desktop containments.
|
||||
* Emitted when the containment requests zooming in or out one step.
|
||||
*/
|
||||
void zoomIn(Plasma::Containment *);
|
||||
|
||||
/**
|
||||
* Emitted when the containment requests zooming out one step.
|
||||
* Usually only used for desktop containments.
|
||||
*/
|
||||
void zoomOut();
|
||||
void zoomRequested(Plasma::Containment * containment, Plasma::ZoomDirection direction);
|
||||
|
||||
/**
|
||||
* Emitted when the containment wants a new containment to be created.
|
||||
@ -347,12 +340,6 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
*/
|
||||
void toggleDesktopImmutability();
|
||||
|
||||
/**
|
||||
* Make the containment request zooming in one step.
|
||||
* Usually only used for desktop containments.
|
||||
*/
|
||||
void zoomIn();
|
||||
|
||||
/**
|
||||
* Tells the corona to create a new desktop containment
|
||||
*/
|
||||
@ -394,6 +381,8 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
Q_PRIVATE_SLOT(d, void handleDisappeared(AppletHandle *handle))
|
||||
Q_PRIVATE_SLOT(d, void destroyApplet())
|
||||
Q_PRIVATE_SLOT(d, void positionToolBox())
|
||||
Q_PRIVATE_SLOT(d, void zoomIn())
|
||||
Q_PRIVATE_SLOT(d, void zoomOut())
|
||||
|
||||
friend class Applet;
|
||||
class Private;
|
||||
|
@ -69,6 +69,8 @@ public:
|
||||
void destroyApplet();
|
||||
void appletDestroyed(QObject*);
|
||||
void appletAnimationComplete(QGraphicsItem *item, Plasma::Animator::Animation anim);
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
|
||||
Applet* addApplet(const QString& name, const QVariantList& args = QVariantList(),
|
||||
const QRectF &geometry = QRectF(-1, -1, -1, -1), uint id = 0,
|
||||
|
7
plasma.h
7
plasma.h
@ -80,6 +80,13 @@ enum Direction { Down = 0 /**< Display downards */ ,
|
||||
Right /**< Display to the right */
|
||||
};
|
||||
|
||||
/**
|
||||
* The direction of a zoom action.
|
||||
*/
|
||||
enum ZoomDirection { ZoomIn = 0 /**< Zoom in one step */,
|
||||
ZoomOut = 1 /**< Zoom out one step */
|
||||
};
|
||||
|
||||
/**
|
||||
* The Location enumeration describes where on screen an element, such as an
|
||||
* Applet or its managing container, is positioned on the screen.
|
||||
|
Loading…
Reference in New Issue
Block a user