diff --git a/plasma/applet.cpp b/plasma/applet.cpp index 75d62b234..03236dcdf 100644 --- a/plasma/applet.cpp +++ b/plasma/applet.cpp @@ -826,24 +826,6 @@ Location Applet::location() const return c ? c->d->location : Plasma::Desktop; } -Plasma::AspectRatioMode Applet::aspectRatioMode() const -{ - return d->aspectRatioMode; -} - -void Applet::setAspectRatioMode(Plasma::AspectRatioMode mode) -{ - //FIXME: port away from popupapplet - /* - PopupApplet *popup = qobject_cast(this); - if (popup && popup->d->dialogPtr) { - popup->d->dialogPtr.data()->setAspectRatioMode(mode); - popup->d->savedAspectRatio = mode; - }*/ - - d->aspectRatioMode = mode; -} - bool Applet::hasConfigurationInterface() const { return d->hasConfigurationInterface; diff --git a/plasma/applet.h b/plasma/applet.h index aef565486..ec7ef0799 100644 --- a/plasma/applet.h +++ b/plasma/applet.h @@ -156,16 +156,6 @@ class PLASMA_EXPORT Applet : public QObject */ virtual Location location() const; - /** - * @return the preferred aspect ratio mode for placement and resizing - */ - Plasma::AspectRatioMode aspectRatioMode() const; - - /** - * Sets the preferred aspect ratio mode for placement and resizing - */ - void setAspectRatioMode(Plasma::AspectRatioMode); - /** * @return true is there is a popup assoiated with this Applet * showing, such as the dialog of a PopupApplet. May be reimplemented diff --git a/plasma/plasma.h b/plasma/plasma.h index bc613dd3f..6f7425e23 100644 --- a/plasma/plasma.h +++ b/plasma/plasma.h @@ -176,22 +176,6 @@ enum ImmutabilityType { can't unlock it **/ }; -/** - * Defines the aspect ratio used when resizing an applet - */ -enum AspectRatioMode { - InvalidAspectRatioMode = -1, /**< Unset mode used for dev convenience - when there is a need to store the - aspectRatioMode somewhere */ - 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 */ - ConstrainedSquare = 3, /**< The applet is no wider (in horizontal - formfactors) or no higher (in vertical - ones) than a square */ - FixedSize = 4 /** The applet cannot be resized */ -}; - /** * The ComonentType enumeration refers to the various types of components, * or plugins, supported by plasma. diff --git a/plasma/private/applet_p.cpp b/plasma/private/applet_p.cpp index 70827811d..1dcf17063 100644 --- a/plasma/private/applet_p.cpp +++ b/plasma/private/applet_p.cpp @@ -58,7 +58,6 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int q(applet), remotingService(0), backgroundHints(StandardBackground), - aspectRatioMode(Plasma::KeepAspectRatio), immutability(Mutable), appletDescription(info ? *info : KPluginInfo(service)), mainConfig(0), diff --git a/plasma/private/applet_p.h b/plasma/private/applet_p.h index 604a09a94..cd7526e28 100644 --- a/plasma/private/applet_p.h +++ b/plasma/private/applet_p.h @@ -134,7 +134,6 @@ public: // applet attributes Service *remotingService; BackgroundHints backgroundHints; - AspectRatioMode aspectRatioMode; ImmutabilityType immutability; // applet info we keep around in case its needed diff --git a/scriptengines/javascript/plasmoid/appletinterface.cpp b/scriptengines/javascript/plasmoid/appletinterface.cpp index 1a9f66b89..85c7a4e55 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.cpp +++ b/scriptengines/javascript/plasmoid/appletinterface.cpp @@ -91,16 +91,6 @@ QString AppletInterface::currentActivity() const return applet()->context()->currentActivity(); } -AppletInterface::AspectRatioMode AppletInterface::aspectRatioMode() const -{ - return static_cast(applet()->aspectRatioMode()); -} - -void AppletInterface::setAspectRatioMode(AppletInterface::AspectRatioMode mode) -{ - applet()->setAspectRatioMode(static_cast(mode)); -} - bool AppletInterface::shouldConserveResources() const { return applet()->shouldConserveResources(); diff --git a/scriptengines/javascript/plasmoid/appletinterface.h b/scriptengines/javascript/plasmoid/appletinterface.h index af293a7c2..860070fbc 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.h +++ b/scriptengines/javascript/plasmoid/appletinterface.h @@ -54,7 +54,6 @@ class AppletInterface : public QObject Q_OBJECT Q_ENUMS(FormFactor) Q_ENUMS(Location) - Q_ENUMS(AspectRatioMode) Q_ENUMS(BackgroundHints) Q_ENUMS(QtOrientation) Q_ENUMS(QtModifiers) @@ -67,7 +66,6 @@ class AppletInterface : public QObject Q_ENUMS(IntervalAlignment) Q_ENUMS(ThemeColors) Q_ENUMS(ItemStatus) - Q_PROPERTY(AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode) Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged) Q_PROPERTY(Location location READ location NOTIFY locationChanged) Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged) @@ -123,19 +121,6 @@ enum Location { RightEdge /**< Along the right side of the screen */ }; -enum AspectRatioMode { - InvalidAspectRatioMode = -1, /**< Unsetted mode used for dev convenience - when there is a need to store the - aspectRatioMode somewhere */ - 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 */ - ConstrainedSquare = 3, /**< The applet is no wider (in horizontal - formfactors) or no higher (in vertical - ones) than a square */ - FixedSize = 4 /** The applet cannot be resized */ -}; - enum ItemStatus { UnknownStatus = 0, /**< The status is unknown **/ PassiveStatus = 1, /**< The Item is passive **/ @@ -246,9 +231,6 @@ enum IntervalAlignment { QString currentActivity() const; bool shouldConserveResources() const; - Q_INVOKABLE AspectRatioMode aspectRatioMode() const; - Q_INVOKABLE void setAspectRatioMode(AspectRatioMode mode); - Q_INVOKABLE void setFailedToLaunch(bool failed, const QString &reason = QString()); Q_INVOKABLE bool isBusy() const; diff --git a/scriptengines/qml/plasmoid/appletinterface.cpp b/scriptengines/qml/plasmoid/appletinterface.cpp index 76a7deef8..fe3e52e4f 100644 --- a/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/scriptengines/qml/plasmoid/appletinterface.cpp @@ -85,16 +85,6 @@ QString AppletInterface::currentActivity() const return applet()->containment()->activity(); } -AppletInterface::AspectRatioMode AppletInterface::aspectRatioMode() const -{ - return static_cast(applet()->aspectRatioMode()); -} - -void AppletInterface::setAspectRatioMode(AppletInterface::AspectRatioMode mode) -{ - applet()->setAspectRatioMode(static_cast(mode)); -} - bool AppletInterface::shouldConserveResources() const { return applet()->shouldConserveResources(); diff --git a/scriptengines/qml/plasmoid/appletinterface.h b/scriptengines/qml/plasmoid/appletinterface.h index 7306366a4..b1e7d2ed5 100644 --- a/scriptengines/qml/plasmoid/appletinterface.h +++ b/scriptengines/qml/plasmoid/appletinterface.h @@ -49,7 +49,6 @@ class AppletInterface : public QQuickItem Q_OBJECT Q_ENUMS(FormFactor) Q_ENUMS(Location) - Q_ENUMS(AspectRatioMode) Q_ENUMS(BackgroundHints) Q_ENUMS(QtOrientation) Q_ENUMS(QtModifiers) @@ -61,7 +60,6 @@ class AppletInterface : public QQuickItem Q_ENUMS(IntervalAlignment) Q_ENUMS(ThemeColors) Q_ENUMS(ItemStatus) - Q_PROPERTY(AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode) Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged) Q_PROPERTY(Location location READ location NOTIFY locationChanged) Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged) @@ -113,19 +111,6 @@ enum Location { RightEdge /**< Along the right side of the screen */ }; -enum AspectRatioMode { - InvalidAspectRatioMode = -1, /**< Unsetted mode used for dev convenience - when there is a need to store the - aspectRatioMode somewhere */ - 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 */ - ConstrainedSquare = 3, /**< The applet is no wider (in horizontal - formfactors) or no higher (in vertical - ones) than a square */ - FixedSize = 4 /** The applet cannot be resized */ -}; - enum ItemStatus { UnknownStatus = 0, /**< The status is unknown **/ PassiveStatus = 1, /**< The Item is passive **/ @@ -225,9 +210,6 @@ enum IntervalAlignment { QString currentActivity() const; bool shouldConserveResources() const; - Q_INVOKABLE AspectRatioMode aspectRatioMode() const; - Q_INVOKABLE void setAspectRatioMode(AspectRatioMode mode); - Q_INVOKABLE void setFailedToLaunch(bool failed, const QString &reason = QString()); Q_INVOKABLE bool isBusy() const;