diff options
author | Michele Calgaro <[email protected]> | 2023-08-24 21:28:39 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-08-31 10:03:10 +0900 |
commit | 030a2248f3630fd0404df98beffc78b5b5ca4c31 (patch) | |
tree | 75d55e7e177ca48e69d59f74181ce37841ecd51b /src/modules/objects/class_painter.cpp | |
parent | 17118265cf93b35b0b68e450ea5f43046c1d81c3 (diff) | |
download | kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.tar.gz kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.zip |
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/modules/objects/class_painter.cpp')
-rw-r--r-- | src/modules/objects/class_painter.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/src/modules/objects/class_painter.cpp b/src/modules/objects/class_painter.cpp index 28b774ec..b7f78d23 100644 --- a/src/modules/objects/class_painter.cpp +++ b/src/modules/objects/class_painter.cpp @@ -149,18 +149,6 @@ Sets the background mode of the painter to <bgMode>: valid values are:[br] - Transparent (that is the default value);[br] - Opaque.[br] - !fn: $setOpacity(<opacity_factor:real>) [QT4 ONLY] - Sets the painter opacity that affects all painter operations (drawpixmap, drawtext...). Valid values range are from 0 (total transparency) to 1 (total opacity)[br] - You must invoke the [classfnc]$begin[/classfnc] before using it. - !fn: $setTextAntialiasing(<boolean>) [QT4 ONLY] - Enable/disable antialias in text if possible. - You must call the [classfnc]$begin[/classfnc] before using it. - !fn: $setAntialiasing(<boolean>) [QT4 ONLY] - Enable/disable antialias in edges of primitives if possible. - You must call the [classfnc]$begin[/classfnc] before using it. - !fn: $setSmoothPixmapTransform(<boolean>) [QT4 ONLY] - Enable/disable smooth bilinear pixmap transformation algorithm (such as bilinear). - You must call the [classfnc]$begin[/classfnc] before using it. Example:[br] [br] class (hello,widget)[br] @@ -371,12 +359,6 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_painter,"painter","object") KVSO_REGISTER_HANDLER(KviKvsObject_painter,"translate",functiontranslateMatrix) KVSO_REGISTER_HANDLER(KviKvsObject_painter,"reset",functionresetMatrix) -#ifdef COMPILE_USE_QT4 - KVSO_REGISTER_HANDLER(KviKvsObject_painter,"setOpacity",functionsetOpacity) - KVSO_REGISTER_HANDLER(KviKvsObject_painter,"setTextAntialiasing",functionsetTextAntialiasing) - KVSO_REGISTER_HANDLER(KviKvsObject_painter,"setAntialiasing",functionsetAntialiasing) - KVSO_REGISTER_HANDLER(KviKvsObject_painter,"setSmoothPixmapTransform",functionsetSmoothPixmapTransform) -#endif KVSO_REGISTER_HANDLER(KviKvsObject_painter,"begin",functionbegin) KVSO_REGISTER_HANDLER(KviKvsObject_painter,"end",functionend) @@ -596,9 +578,7 @@ bool KviKvsObject_painter::functiondrawWinFocusRect(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_END(c) TQString function="$drawWinFocusRect"; KVSO_PARAMETERS_PAINTER(pXOrArray,iY,iW,iH) -#ifndef COMPILE_USE_QT4 if(m_pPainter) m_pPainter->drawWinFocusRect(iX,iY,iW,iH); -#endif return true; } bool KviKvsObject_painter::functiondrawEllipse(KviKvsObjectFunctionCall *c) @@ -843,25 +823,11 @@ bool KviKvsObject_painter::functiondrawText(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("mode",KVS_PT_STRING,KVS_PF_OPTIONAL,szMode) KVSO_PARAMETERS_END(c) if(!m_pPainter)return true; -#ifdef COMPILE_USE_QT4 - if (!szMode.isEmpty()){ - if(KviTQString::equalCI(szMode,"RTL"))m_pPainter->setLayoutDirection(TQt::RightToLeft); - else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->setLayoutDirection(TQt::LeftToRight); - else - { - c->warning(__tr2qs("Invalid mode '%Q'"),&szMode); - return true; - } - } - - m_pPainter->drawText(iX,iY,szText); -#else if(KviTQString::equalCI(szMode,"Auto")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::Auto); else if(KviTQString::equalCI(szMode,"RTL")) m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::RTL); else if(KviTQString::equalCI(szMode,"LTR"))m_pPainter->drawText(iX,iY,szText,iLen,TQPainter::LTR); else c->warning(__tr2qs("Invalid mode '%Q'"),&szMode); -#endif return true; } @@ -955,52 +921,6 @@ bool KviKvsObject_painter::functionresetMatrix(KviKvsObjectFunctionCall *c) return true; } -#ifdef COMPILE_USE_QT4 -bool KviKvsObject_painter::functionsetOpacity(KviKvsObjectFunctionCall *c) -{ - if(!m_pPainter)return true; - kvs_real_t dOpacity; - - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("opacity_factor",KVS_PT_DOUBLE,0,dOpacity) - KVSO_PARAMETERS_END(c) - m_pPainter->setOpacity(dOpacity); - return true; -} -bool KviKvsObject_painter::functionsetTextAntialiasing(KviKvsObjectFunctionCall *c) -{ - if(!m_pPainter)return true; - - bool bEnabled; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) - KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(TQPainter::TextAntialiasing,bEnabled); - return true; -} -bool KviKvsObject_painter::functionsetAntialiasing(KviKvsObjectFunctionCall *c) -{ - if(!m_pPainter)return true; - - bool bEnabled; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) - KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(TQPainter::Antialiasing,bEnabled); - return true; -} -bool KviKvsObject_painter::functionsetSmoothPixmapTransform(KviKvsObjectFunctionCall *c) -{ - if(!m_pPainter)return true; - - bool bEnabled; - KVSO_PARAMETERS_BEGIN(c) - KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) - KVSO_PARAMETERS_END(c) - m_pPainter->setRenderHint(TQPainter::SmoothPixmapTransform,bEnabled); - return true; -} -#endif |