diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-28 15:02:47 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-29 13:50:16 +0200 |
commit | dfd3fdfe664e214ca1bba72b96d19b89ff25e7bc (patch) | |
tree | f4e6afe4de72c808606e123e51baa19b02e63b1a /vcl/qt5/Qt5SvpGraphics.cxx | |
parent | 894450d6ebbb2d5e063d72b971580d1b8c10a5e3 (diff) |
qt5: Remove "5" from class names in qt5 VCL plugin
Rename classes for the qt5 VCL plugin to no longer
contain the Qt version number "5" in them, e.g.
"Qt5Widget" -> "QtWidget".
Also, adapt some variable names and comments
accordingly.
The code will be used for an upcoming qt6 VCL plugin
as well, so a "Qt" prefix fits better than a "Qt5"
one.
Renaming the headers and source files will be done
in a separate commit to make tracking git history easier.
Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122805
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5/Qt5SvpGraphics.cxx')
-rw-r--r-- | vcl/qt5/Qt5SvpGraphics.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/vcl/qt5/Qt5SvpGraphics.cxx b/vcl/qt5/Qt5SvpGraphics.cxx index 5143114bcb74..1d2b4dc7de1a 100644 --- a/vcl/qt5/Qt5SvpGraphics.cxx +++ b/vcl/qt5/Qt5SvpGraphics.cxx @@ -24,18 +24,18 @@ #include <QtGui/QWindow> #include <QtWidgets/QWidget> -Qt5SvpGraphics::Qt5SvpGraphics(Qt5Frame* pFrame) +QtSvpGraphics::QtSvpGraphics(QtFrame* pFrame) : m_pFrame(pFrame) { - if (!Qt5Data::noNativeControls()) - m_pWidgetDraw.reset(new Qt5Graphics_Controls(*this)); + if (!QtData::noNativeControls()) + m_pWidgetDraw.reset(new QtGraphics_Controls(*this)); if (m_pFrame) setDevicePixelRatioF(m_pFrame->devicePixelRatioF()); } -Qt5SvpGraphics::~Qt5SvpGraphics() {} +QtSvpGraphics::~QtSvpGraphics() {} -void Qt5SvpGraphics::updateQWidget() const +void QtSvpGraphics::updateQWidget() const { if (!m_pFrame) return; @@ -46,18 +46,18 @@ void Qt5SvpGraphics::updateQWidget() const #if ENABLE_CAIRO_CANVAS -bool Qt5SvpGraphics::SupportsCairo() const { return true; } +bool QtSvpGraphics::SupportsCairo() const { return true; } cairo::SurfaceSharedPtr -Qt5SvpGraphics::CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const +QtSvpGraphics::CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const { - return std::make_shared<cairo::Qt5SvpSurface>(rSurface); + return std::make_shared<cairo::QtSvpSurface>(rSurface); } -cairo::SurfaceSharedPtr Qt5SvpGraphics::CreateSurface(const OutputDevice& /*rRefDevice*/, int x, - int y, int width, int height) const +cairo::SurfaceSharedPtr QtSvpGraphics::CreateSurface(const OutputDevice& /*rRefDevice*/, int x, + int y, int width, int height) const { - return std::make_shared<cairo::Qt5SvpSurface>(this, x, y, width, height); + return std::make_shared<cairo::QtSvpSurface>(this, x, y, width, height); } #endif @@ -74,13 +74,13 @@ static void QImage2BitmapBuffer(QImage& rImg, BitmapBuffer& rBuf) rBuf.mnScanlineSize = rImg.bytesPerLine(); } -void Qt5SvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) +void QtSvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) { assert(m_pWidgetDraw); - assert(dynamic_cast<Qt5Graphics_Controls*>(m_pWidgetDraw.get())); + assert(dynamic_cast<QtGraphics_Controls*>(m_pWidgetDraw.get())); assert(!rDamagedRegion.IsEmpty()); - QImage* pImage = static_cast<Qt5Graphics_Controls*>(m_pWidgetDraw.get())->getImage(); + QImage* pImage = static_cast<QtGraphics_Controls*>(m_pWidgetDraw.get())->getImage(); assert(pImage); if (pImage->width() == 0 || pImage->height() == 0) return; @@ -92,7 +92,7 @@ void Qt5SvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) drawBitmap(aTR, &aBuffer, CAIRO_OPERATOR_OVER); } -void Qt5SvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) +void QtSvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) { char* pForceDpi; if ((pForceDpi = getenv("SAL_FORCEDPI"))) |