From 43e6bac986975e4d82f122a3decc10aab08233e2 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 30 Apr 2008 22:13:27 +0000 Subject: [PATCH] Plasma::AspectRatioMode, just like Qt::AspectRatioMode. the setter/getter in Applet even used Mode. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802866 --- applet.cpp | 6 +++--- applet.h | 8 ++++---- plasma.h | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/applet.cpp b/applet.cpp index 9e742e303..99e34ddd9 100644 --- a/applet.cpp +++ b/applet.cpp @@ -761,12 +761,12 @@ Location Applet::location() const return c ? c->d->location : Plasma::Desktop; } -Plasma::AspectRatio Applet::aspectRatioMode() const +Plasma::AspectRatioMode Applet::aspectRatioMode() const { return d->aspectRatioMode; } -void Applet::setAspectRatioMode(Plasma::AspectRatio mode) +void Applet::setAspectRatioMode(Plasma::AspectRatioMode mode) { d->aspectRatioMode = mode; } @@ -1183,7 +1183,7 @@ Applet::Private::Private(KService::Ptr service, int uniqueID, Applet *applet) cachedBackground(0), mainConfig(0), pendingConstraints(NoConstraint), - aspectRatioMode(Qt::KeepAspectRatio), + aspectRatioMode(Plasma::KeepAspectRatio), immutability(NotImmutable), hasConfigurationInterface(false), failed(false), diff --git a/applet.h b/applet.h index a70c599c6..3cb1c37a3 100644 --- a/applet.h +++ b/applet.h @@ -218,16 +218,16 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget * @see Plasma::Location */ virtual Location location() const; - - /** + + /** * @return the prefered aspect ratio mode for placement and resizing */ - Plasma::AspectRatio aspectRatioMode() const; + Plasma::AspectRatioMode aspectRatioMode() const; /** * Sets the prefered aspect ratio mode for placement and resizing */ - void setAspectRatioMode(Plasma::AspectRatio); + void setAspectRatioMode(Plasma::AspectRatioMode); /** * Returns a list of all known applets. diff --git a/plasma.h b/plasma.h index e0f2150ab..5d74d0a73 100644 --- a/plasma.h +++ b/plasma.h @@ -146,19 +146,19 @@ enum ItemTypes { AppletType = QGraphicsItem::UserType + 1, * Defines the immutability of items like applets, corona and containments * they can be free to modify, locked down by the user or locked down by the system (e.g. kiosk setups) */ -enum ImmutabilityType { NotImmutable = 1 /**The item can be modified in any way **/, - UserImmutable = 2 /**The user has requested a lock down, and can undo the lock down at any time **/, - SystemImmutable = 4 /** the item is locked down by the system, the user can't unlock it **/ +enum ImmutabilityType { NotImmutable = 1 /**< The item can be modified in any way **/, + UserImmutable = 2 /**< The user has requested a lock down, and can undo the lock down at any time **/, + SystemImmutable = 4 /**< the item is locked down by the system, the user can't unlock it **/ }; /** * Defines the aspect ratio used when scaling an applet */ -enum AspectRatio { IgnoreAspectRatio = 0 /** The applet can be freely resized */, - KeepAspectRatio = 1 /** The applet keeps a fixed aspect ratio */, - Square = 2 /** The applet is always a square */ - }; +enum AspectRatioMode { IgnoreAspectRatio = 0 /**< The applet can be freely resized */, + KeepAspectRatio = 1 /**< The applet keeps a fixed aspect ratio */, + Square = 2 /**< The applet is always a square */ + }; /** * The ComonentType enumeration refers to the various types of components,