scripting: Remove deprecated properties in WindowThumbnailItem
This commit is contained in:
parent
5de308792f
commit
d18f7efac2
4 changed files with 0 additions and 116 deletions
|
@ -21,9 +21,6 @@ WindowThumbnailItem::WindowThumbnailItem(QQuickItem *parent)
|
|||
: QQuickItem(parent)
|
||||
, m_wId(0)
|
||||
, m_image()
|
||||
, m_clipToItem(nullptr)
|
||||
, m_brightness(1.0)
|
||||
, m_saturation(1.0)
|
||||
, m_sourceSize(QSize())
|
||||
{
|
||||
setFlag(ItemHasContents);
|
||||
|
@ -40,11 +37,6 @@ void WindowThumbnailItem::setWId(qulonglong wId)
|
|||
findImage();
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setClipTo(QQuickItem *clip)
|
||||
{
|
||||
qWarning() << "ThumbnailItem.clipTo is removed and it has no replacements";
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::findImage()
|
||||
{
|
||||
QString imagePath;
|
||||
|
@ -101,31 +93,11 @@ QSGNode *WindowThumbnailItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeD
|
|||
return node;
|
||||
}
|
||||
|
||||
qreal WindowThumbnailItem::brightness() const
|
||||
{
|
||||
return m_brightness;
|
||||
}
|
||||
|
||||
qreal WindowThumbnailItem::saturation() const
|
||||
{
|
||||
return m_saturation;
|
||||
}
|
||||
|
||||
QSize WindowThumbnailItem::sourceSize() const
|
||||
{
|
||||
return m_sourceSize;
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setBrightness(qreal brightness)
|
||||
{
|
||||
qWarning() << "ThumbnailItem.brightness is removed. Use a shader effect to change brightness";
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setSaturation(qreal saturation)
|
||||
{
|
||||
qWarning() << "ThumbnailItem.saturation is removed. Use a shader effect to change saturation";
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setSourceSize(const QSize &size)
|
||||
{
|
||||
if (m_sourceSize == size) {
|
||||
|
|
|
@ -19,21 +19,6 @@ class WindowThumbnailItem : public QQuickItem
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(qulonglong wId READ wId WRITE setWId NOTIFY wIdChanged SCRIPTABLE true)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated clipTo has no replacement
|
||||
*/
|
||||
Q_PROPERTY(QQuickItem *clipTo READ clipTo WRITE setClipTo NOTIFY clipToChanged)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated use a shader effect to change the brightness
|
||||
*/
|
||||
Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated use a shader effect to change color saturation
|
||||
*/
|
||||
Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
|
||||
Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged)
|
||||
public:
|
||||
explicit WindowThumbnailItem(QQuickItem *parent = nullptr);
|
||||
|
@ -43,17 +28,8 @@ public:
|
|||
{
|
||||
return m_wId;
|
||||
}
|
||||
QQuickItem *clipTo() const
|
||||
{
|
||||
return m_clipToItem;
|
||||
}
|
||||
qreal brightness() const;
|
||||
qreal saturation() const;
|
||||
QSize sourceSize() const;
|
||||
void setWId(qulonglong wId);
|
||||
void setClipTo(QQuickItem *clip);
|
||||
void setBrightness(qreal brightness);
|
||||
void setSaturation(qreal saturation);
|
||||
void setSourceSize(const QSize &size);
|
||||
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override;
|
||||
|
||||
|
@ -66,18 +42,12 @@ public:
|
|||
};
|
||||
Q_SIGNALS:
|
||||
void wIdChanged(qulonglong wid);
|
||||
void clipToChanged();
|
||||
void brightnessChanged();
|
||||
void saturationChanged();
|
||||
void sourceSizeChanged();
|
||||
|
||||
private:
|
||||
void findImage();
|
||||
qulonglong m_wId;
|
||||
QImage m_image;
|
||||
QQuickItem *m_clipToItem;
|
||||
qreal m_brightness;
|
||||
qreal m_saturation;
|
||||
QSize m_sourceSize;
|
||||
};
|
||||
|
||||
|
|
|
@ -256,36 +256,6 @@ QSGNode *WindowThumbnailItem::updatePaintNode(QSGNode *oldNode, QQuickItem::Upda
|
|||
return node;
|
||||
}
|
||||
|
||||
qreal WindowThumbnailItem::saturation() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setSaturation(qreal saturation)
|
||||
{
|
||||
qCWarning(KWIN_SCRIPTING) << "ThumbnailItem.saturation is removed. Use a shader effect to change saturation";
|
||||
}
|
||||
|
||||
qreal WindowThumbnailItem::brightness() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setBrightness(qreal brightness)
|
||||
{
|
||||
qCWarning(KWIN_SCRIPTING) << "ThumbnailItem.brightness is removed. Use a shader effect to change brightness";
|
||||
}
|
||||
|
||||
QQuickItem *WindowThumbnailItem::clipTo() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void WindowThumbnailItem::setClipTo(QQuickItem *clip)
|
||||
{
|
||||
qCWarning(KWIN_SCRIPTING) << "ThumbnailItem.clipTo is removed and it has no replacements";
|
||||
}
|
||||
|
||||
QUuid WindowThumbnailItem::wId() const
|
||||
{
|
||||
return m_wId;
|
||||
|
|
|
@ -24,23 +24,7 @@ class WindowThumbnailItem : public QQuickItem
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(QUuid wId READ wId WRITE setWId NOTIFY wIdChanged)
|
||||
Q_PROPERTY(KWin::Window *client READ client WRITE setClient NOTIFY clientChanged)
|
||||
|
||||
Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated use a shader effect to change the brightness
|
||||
*/
|
||||
Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated use a shader effect to change color saturation
|
||||
*/
|
||||
Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
|
||||
/**
|
||||
* TODO Plasma 6: Remove.
|
||||
* @deprecated clipTo has no replacement
|
||||
*/
|
||||
Q_PROPERTY(QQuickItem *clipTo READ clipTo WRITE setClipTo NOTIFY clipToChanged)
|
||||
|
||||
public:
|
||||
explicit WindowThumbnailItem(QQuickItem *parent = nullptr);
|
||||
|
@ -52,15 +36,6 @@ public:
|
|||
Window *client() const;
|
||||
void setClient(Window *client);
|
||||
|
||||
qreal brightness() const;
|
||||
void setBrightness(qreal brightness);
|
||||
|
||||
qreal saturation() const;
|
||||
void setSaturation(qreal saturation);
|
||||
|
||||
QQuickItem *clipTo() const;
|
||||
void setClipTo(QQuickItem *clip);
|
||||
|
||||
QSize sourceSize() const;
|
||||
void setSourceSize(const QSize &sourceSize);
|
||||
|
||||
|
@ -74,9 +49,6 @@ protected:
|
|||
Q_SIGNALS:
|
||||
void wIdChanged();
|
||||
void clientChanged();
|
||||
void brightnessChanged();
|
||||
void saturationChanged();
|
||||
void clipToChanged();
|
||||
void sourceSizeChanged();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue