added necessary changes to enable ::region() slot for kcommondecoration
REVIEW: 107253
This commit is contained in:
parent
53ae2b91e2
commit
98a68c3bfe
4 changed files with 35 additions and 0 deletions
|
@ -334,6 +334,11 @@ void KCommonDecoration::objDestroyed(QObject *obj)
|
||||||
m_previewWidget = 0;
|
m_previewWidget = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRegion KCommonDecoration::region(KDecorationDefines::Region r)
|
||||||
|
{
|
||||||
|
return QRegion();
|
||||||
|
}
|
||||||
|
|
||||||
int KCommonDecoration::buttonsLeftWidth() const
|
int KCommonDecoration::buttonsLeftWidth() const
|
||||||
{
|
{
|
||||||
return buttonContainerWidth(m_buttonsLeft);
|
return buttonContainerWidth(m_buttonsLeft);
|
||||||
|
|
|
@ -376,6 +376,16 @@ private Q_SLOTS:
|
||||||
/* look out for buttons that have been destroyed. */
|
/* look out for buttons that have been destroyed. */
|
||||||
void objDestroyed(QObject *obj);
|
void objDestroyed(QObject *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This slot can be reimplemented to return the regions defined
|
||||||
|
* by KDecorationDefines::Region.
|
||||||
|
*
|
||||||
|
* The default implementation always returns an empty region.
|
||||||
|
*
|
||||||
|
* @since 4.10
|
||||||
|
*/
|
||||||
|
QRegion region(KDecorationDefines::Region r);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void resetLayout();
|
void resetLayout();
|
||||||
|
|
||||||
|
|
|
@ -126,3 +126,13 @@ void KCommonDecorationWrapper::wrapSetAlphaEnabled(bool enabled)
|
||||||
setAlphaEnabled(enabled);
|
setAlphaEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRegion KCommonDecorationWrapper::region(KDecorationDefines::Region r)
|
||||||
|
{
|
||||||
|
QRegion region;
|
||||||
|
QMetaObject::invokeMethod(decoration, "region",
|
||||||
|
Qt::DirectConnection,
|
||||||
|
Q_RETURN_ARG(QRegion, region),
|
||||||
|
Q_ARG(KDecorationDefines::Region,
|
||||||
|
KDecorationDefines::ExtendedBorderRegion));
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
|
@ -62,6 +62,16 @@ public:
|
||||||
virtual void padding(int &left, int &right, int &top, int &bottom) const;
|
virtual void padding(int &left, int &right, int &top, int &bottom) const;
|
||||||
|
|
||||||
void wrapSetAlphaEnabled(bool enabled);
|
void wrapSetAlphaEnabled(bool enabled);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
/**
|
||||||
|
* This slot can be reimplemented to return the regions defined
|
||||||
|
* by KDecorationDefines::Region.
|
||||||
|
*
|
||||||
|
* @since 4.10
|
||||||
|
*/
|
||||||
|
QRegion region(KDecorationDefines::Region r);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KCommonDecoration* decoration;
|
KCommonDecoration* decoration;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue