mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 11:22:58 +00:00
remove unused QWindowSurface::grabWidget() argument
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
fb22586acc
commit
42b1f681a6
4 changed files with 7 additions and 18 deletions
|
@ -211,16 +211,13 @@ QImage* QWindowSurface::buffer(const QWidget *widget)
|
|||
corresponding to \a widget. Returns a null QPixmap if an error
|
||||
occurs. The contents of the pixmap are only defined for the regions
|
||||
of \a widget that have received paint events since the last resize
|
||||
of the backing store.
|
||||
|
||||
If \a rectangle is a null rectangle (the default), the entire widget
|
||||
is grabbed. Otherwise, the grabbed area is limited to \a rectangle.
|
||||
of the backing store. The entire widget is grabbed.
|
||||
|
||||
The default implementation uses QWindowSurface::buffer().
|
||||
|
||||
\sa QPixmap::grabWidget()
|
||||
*/
|
||||
QPixmap QWindowSurface::grabWidget(const QWidget *widget, const QRect &rectangle) const
|
||||
QPixmap QWindowSurface::grabWidget(const QWidget *widget) const
|
||||
{
|
||||
if (widget->window() != window())
|
||||
return QPixmap();
|
||||
|
@ -230,7 +227,7 @@ QPixmap QWindowSurface::grabWidget(const QWidget *widget, const QRect &rectangle
|
|||
if (!img || img->isNull())
|
||||
return QPixmap();
|
||||
|
||||
QRect rect = rectangle.isEmpty() ? widget->rect() : (widget->rect() & rectangle);
|
||||
QRect rect = widget->rect();
|
||||
|
||||
rect.translate(offset(widget) - offset(widget->window()));
|
||||
rect &= QRect(QPoint(), img->size());
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
virtual void endPaint(const QRegion &);
|
||||
|
||||
virtual QImage* buffer(const QWidget *widget);
|
||||
virtual QPixmap grabWidget(const QWidget *widget, const QRect& rectangle = QRect()) const;
|
||||
virtual QPixmap grabWidget(const QWidget *widget) const;
|
||||
|
||||
virtual QPoint offset(const QWidget *widget) const;
|
||||
inline QRect rect(const QWidget *widget) const;
|
||||
|
|
|
@ -206,19 +206,12 @@ bool QX11WindowSurface::scroll(const QRegion &area, int dx, int dy)
|
|||
return true;
|
||||
}
|
||||
|
||||
QPixmap QX11WindowSurface::grabWidget(const QWidget *widget,
|
||||
const QRect& rect) const
|
||||
QPixmap QX11WindowSurface::grabWidget(const QWidget *widget) const
|
||||
{
|
||||
if (!widget || d_ptr->device.isNull())
|
||||
return QPixmap();
|
||||
|
||||
QRect srcRect;
|
||||
|
||||
// make sure the rect is inside the widget & clip to widget's rect
|
||||
if (!rect.isEmpty())
|
||||
srcRect = rect & widget->rect();
|
||||
else
|
||||
srcRect = widget->rect();
|
||||
QRect srcRect = widget->rect();
|
||||
|
||||
if (srcRect.isEmpty())
|
||||
return QPixmap();
|
||||
|
|
|
@ -69,8 +69,7 @@ public:
|
|||
void beginPaint(const QRegion &rgn);
|
||||
void setGeometry(const QRect &rect);
|
||||
bool scroll(const QRegion &area, int dx, int dy);
|
||||
QPixmap grabWidget(const QWidget *widget,
|
||||
const QRect& rectangle = QRect()) const;
|
||||
QPixmap grabWidget(const QWidget *widget) const;
|
||||
WindowSurfaceFeatures features() const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue