Files
wxWidgets/src/qt/nonownedwnd.cpp
Tim Stahlhut cca0921400 Fix file names in header comments
No real changes, just fix comments containing copy-and-paste typos.

Closes https://github.com/wxWidgets/wxWidgets/pull/984
2018-10-20 13:27:23 +02:00

70 lines
1.9 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: src/qt/nonownedwnd.cpp
// Author: Sean D'Epagnier
// Copyright: (c) 2016 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
#include "wx/region.h"
#include "wx/region.h"
#endif // WX_PRECOMP
#include "wx/nonownedwnd.h"
#include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h"
#include <QtGui/QBitmap>
#include <QtGui/QPainter>
#include <QtWidgets/QWidget>
// ============================================================================
// wxNonOwnedWindow implementation
// ============================================================================
wxNonOwnedWindow::wxNonOwnedWindow()
{
}
bool wxNonOwnedWindow::DoClearShape()
{
GetHandle()->setMask(QBitmap());
return true;
}
bool wxNonOwnedWindow::DoSetRegionShape(const wxRegion& region)
{
QPixmap pixmap(GetHandle()->size());
QPainter painter(&pixmap);
painter.fillRect(pixmap.rect(), Qt::white);
painter.setClipRegion(region.GetHandle());
painter.fillRect(pixmap.rect(), Qt::black);
GetHandle()->setMask(pixmap.createMaskFromColor(Qt::white));
return true;
}
#if wxUSE_GRAPHICS_CONTEXT
bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
{
wxMISSING_IMPLEMENTATION( __FUNCTION__ );
return true;
}
#endif