remove the aspectRatioMode property
This commit is contained in:
parent
436d6c35e7
commit
798be9a407
@ -826,24 +826,6 @@ Location Applet::location() const
|
|||||||
return c ? c->d->location : Plasma::Desktop;
|
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
|
bool Applet::hasConfigurationInterface() const
|
||||||
{
|
{
|
||||||
return d->hasConfigurationInterface;
|
return d->hasConfigurationInterface;
|
||||||
|
@ -156,16 +156,6 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
*/
|
*/
|
||||||
virtual Location location() const;
|
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
|
* @return true is there is a popup assoiated with this Applet
|
||||||
* showing, such as the dialog of a PopupApplet. May be reimplemented
|
* showing, such as the dialog of a PopupApplet. May be reimplemented
|
||||||
|
@ -176,22 +176,6 @@ enum ImmutabilityType {
|
|||||||
can't unlock it **/
|
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,
|
* The ComonentType enumeration refers to the various types of components,
|
||||||
* or plugins, supported by plasma.
|
* or plugins, supported by plasma.
|
||||||
|
@ -58,7 +58,6 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
|
|||||||
q(applet),
|
q(applet),
|
||||||
remotingService(0),
|
remotingService(0),
|
||||||
backgroundHints(StandardBackground),
|
backgroundHints(StandardBackground),
|
||||||
aspectRatioMode(Plasma::KeepAspectRatio),
|
|
||||||
immutability(Mutable),
|
immutability(Mutable),
|
||||||
appletDescription(info ? *info : KPluginInfo(service)),
|
appletDescription(info ? *info : KPluginInfo(service)),
|
||||||
mainConfig(0),
|
mainConfig(0),
|
||||||
|
@ -134,7 +134,6 @@ public:
|
|||||||
// applet attributes
|
// applet attributes
|
||||||
Service *remotingService;
|
Service *remotingService;
|
||||||
BackgroundHints backgroundHints;
|
BackgroundHints backgroundHints;
|
||||||
AspectRatioMode aspectRatioMode;
|
|
||||||
ImmutabilityType immutability;
|
ImmutabilityType immutability;
|
||||||
|
|
||||||
// applet info we keep around in case its needed
|
// applet info we keep around in case its needed
|
||||||
|
@ -91,16 +91,6 @@ QString AppletInterface::currentActivity() const
|
|||||||
return applet()->context()->currentActivity();
|
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
|
bool AppletInterface::shouldConserveResources() const
|
||||||
{
|
{
|
||||||
return applet()->shouldConserveResources();
|
return applet()->shouldConserveResources();
|
||||||
|
@ -54,7 +54,6 @@ class AppletInterface : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(FormFactor)
|
Q_ENUMS(FormFactor)
|
||||||
Q_ENUMS(Location)
|
Q_ENUMS(Location)
|
||||||
Q_ENUMS(AspectRatioMode)
|
|
||||||
Q_ENUMS(BackgroundHints)
|
Q_ENUMS(BackgroundHints)
|
||||||
Q_ENUMS(QtOrientation)
|
Q_ENUMS(QtOrientation)
|
||||||
Q_ENUMS(QtModifiers)
|
Q_ENUMS(QtModifiers)
|
||||||
@ -67,7 +66,6 @@ class AppletInterface : public QObject
|
|||||||
Q_ENUMS(IntervalAlignment)
|
Q_ENUMS(IntervalAlignment)
|
||||||
Q_ENUMS(ThemeColors)
|
Q_ENUMS(ThemeColors)
|
||||||
Q_ENUMS(ItemStatus)
|
Q_ENUMS(ItemStatus)
|
||||||
Q_PROPERTY(AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode)
|
|
||||||
Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
|
Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
|
||||||
Q_PROPERTY(Location location READ location NOTIFY locationChanged)
|
Q_PROPERTY(Location location READ location NOTIFY locationChanged)
|
||||||
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged)
|
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged)
|
||||||
@ -123,19 +121,6 @@ enum Location {
|
|||||||
RightEdge /**< Along the right side of the screen */
|
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 {
|
enum ItemStatus {
|
||||||
UnknownStatus = 0, /**< The status is unknown **/
|
UnknownStatus = 0, /**< The status is unknown **/
|
||||||
PassiveStatus = 1, /**< The Item is passive **/
|
PassiveStatus = 1, /**< The Item is passive **/
|
||||||
@ -246,9 +231,6 @@ enum IntervalAlignment {
|
|||||||
QString currentActivity() const;
|
QString currentActivity() const;
|
||||||
bool shouldConserveResources() 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 void setFailedToLaunch(bool failed, const QString &reason = QString());
|
||||||
|
|
||||||
Q_INVOKABLE bool isBusy() const;
|
Q_INVOKABLE bool isBusy() const;
|
||||||
|
@ -85,16 +85,6 @@ QString AppletInterface::currentActivity() const
|
|||||||
return applet()->containment()->activity();
|
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
|
bool AppletInterface::shouldConserveResources() const
|
||||||
{
|
{
|
||||||
return applet()->shouldConserveResources();
|
return applet()->shouldConserveResources();
|
||||||
|
@ -49,7 +49,6 @@ class AppletInterface : public QQuickItem
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(FormFactor)
|
Q_ENUMS(FormFactor)
|
||||||
Q_ENUMS(Location)
|
Q_ENUMS(Location)
|
||||||
Q_ENUMS(AspectRatioMode)
|
|
||||||
Q_ENUMS(BackgroundHints)
|
Q_ENUMS(BackgroundHints)
|
||||||
Q_ENUMS(QtOrientation)
|
Q_ENUMS(QtOrientation)
|
||||||
Q_ENUMS(QtModifiers)
|
Q_ENUMS(QtModifiers)
|
||||||
@ -61,7 +60,6 @@ class AppletInterface : public QQuickItem
|
|||||||
Q_ENUMS(IntervalAlignment)
|
Q_ENUMS(IntervalAlignment)
|
||||||
Q_ENUMS(ThemeColors)
|
Q_ENUMS(ThemeColors)
|
||||||
Q_ENUMS(ItemStatus)
|
Q_ENUMS(ItemStatus)
|
||||||
Q_PROPERTY(AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode)
|
|
||||||
Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
|
Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
|
||||||
Q_PROPERTY(Location location READ location NOTIFY locationChanged)
|
Q_PROPERTY(Location location READ location NOTIFY locationChanged)
|
||||||
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged)
|
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged)
|
||||||
@ -113,19 +111,6 @@ enum Location {
|
|||||||
RightEdge /**< Along the right side of the screen */
|
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 {
|
enum ItemStatus {
|
||||||
UnknownStatus = 0, /**< The status is unknown **/
|
UnknownStatus = 0, /**< The status is unknown **/
|
||||||
PassiveStatus = 1, /**< The Item is passive **/
|
PassiveStatus = 1, /**< The Item is passive **/
|
||||||
@ -225,9 +210,6 @@ enum IntervalAlignment {
|
|||||||
QString currentActivity() const;
|
QString currentActivity() const;
|
||||||
bool shouldConserveResources() 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 void setFailedToLaunch(bool failed, const QString &reason = QString());
|
||||||
|
|
||||||
Q_INVOKABLE bool isBusy() const;
|
Q_INVOKABLE bool isBusy() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user