remove the aspectRatioMode property

This commit is contained in:
Marco Martin 2013-02-11 19:32:41 +01:00
parent 436d6c35e7
commit 798be9a407
9 changed files with 0 additions and 102 deletions

View File

@ -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<PopupApplet *>(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;

View File

@ -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

View File

@ -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.

View File

@ -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),

View File

@ -134,7 +134,6 @@ public:
// applet attributes
Service *remotingService;
BackgroundHints backgroundHints;
AspectRatioMode aspectRatioMode;
ImmutabilityType immutability;
// applet info we keep around in case its needed

View File

@ -91,16 +91,6 @@ QString AppletInterface::currentActivity() const
return applet()->context()->currentActivity();
}
AppletInterface::AspectRatioMode AppletInterface::aspectRatioMode() const
{
return static_cast<AspectRatioMode>(applet()->aspectRatioMode());
}
void AppletInterface::setAspectRatioMode(AppletInterface::AspectRatioMode mode)
{
applet()->setAspectRatioMode(static_cast<Plasma::AspectRatioMode>(mode));
}
bool AppletInterface::shouldConserveResources() const
{
return applet()->shouldConserveResources();

View File

@ -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;

View File

@ -85,16 +85,6 @@ QString AppletInterface::currentActivity() const
return applet()->containment()->activity();
}
AppletInterface::AspectRatioMode AppletInterface::aspectRatioMode() const
{
return static_cast<AspectRatioMode>(applet()->aspectRatioMode());
}
void AppletInterface::setAspectRatioMode(AppletInterface::AspectRatioMode mode)
{
applet()->setAspectRatioMode(static_cast<Plasma::AspectRatioMode>(mode));
}
bool AppletInterface::shouldConserveResources() const
{
return applet()->shouldConserveResources();

View File

@ -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;