diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 15:24:48 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 15:24:48 +0900 |
commit | 338f7820f9ce4264d2bfa767c29dda4ea03bc52a (patch) | |
tree | af5f8ca03db748d0e92349ea59b32e9e59ece574 /lib/tdeqt4converter.cpp | |
parent | 0f7f50ffa0596d88bd40cb1aea429fa04ae30ef6 (diff) | |
download | qt4-tqt-theme-engine-replace/qt-tqt.tar.gz qt4-tqt-theme-engine-replace/qt-tqt.zip |
Replace Qt with TQtreplace/qt-tqt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'lib/tdeqt4converter.cpp')
-rw-r--r-- | lib/tdeqt4converter.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/lib/tdeqt4converter.cpp b/lib/tdeqt4converter.cpp index b324bbb..8ca45eb 100644 --- a/lib/tdeqt4converter.cpp +++ b/lib/tdeqt4converter.cpp @@ -18,15 +18,15 @@ #include "tdeqt4converter.h" -TQt::Orientation convertQt4ToTQt3Orientation(Qt::Orientation qt4orient) +TQt::Orientation convertQt4ToTQt3Orientation(TQt::Orientation qt4orient) { TQt::Orientation tqt3orient; switch ( qt4orient ) { - case Qt::Horizontal: + case TQt::Horizontal: tqt3orient = TQt::Horizontal; break; - case Qt::Vertical: + case TQt::Vertical: tqt3orient = TQt::Vertical; break; } @@ -120,7 +120,7 @@ TQPixmap convertQt4ToTQt3Pixmap(QPixmap qt4pixmap, bool copyTransparency, TQColo qtPM.detach(); if (copyTransparency) { - qtPM.fill(Qt::transparent); + qtPM.fill(TQt::transparent); } else { tqtPM.fill(*bgcolor); @@ -140,10 +140,10 @@ TQRegion convertQt4ToTQt3Region(QRegion qt4region) // SLOW if (!qt4br.isNull()) { QBitmap regionMask(qt4br.x()+qt4br.width(), qt4br.y()+qt4br.height()); - regionMask.fill(Qt::color0); + regionMask.fill(TQt::color0); QPainter qt4brpainter(®ionMask); qt4brpainter.setClipRegion(qt4region); - qt4brpainter.fillRect(0,0,regionMask.width(),regionMask.height(),Qt::color1); + qt4brpainter.fillRect(0,0,regionMask.width(),regionMask.height(),TQt::color1); qt4brpainter.end(); TQBitmap tqt3RegionMask; tqt3RegionMask = convertQt4ToTQt3Pixmap(regionMask); @@ -252,59 +252,59 @@ QBrush convertTQt3ToQt4Brush(TQBrush tqt3brush) { QBrush qt4brush; TQt::BrushStyle tqt3brushstyle = tqt3brush.style(); - Qt::BrushStyle qt4brushstyle; + TQt::BrushStyle qt4brushstyle; switch ( tqt3brushstyle ) { case TQt::NoBrush: - qt4brushstyle = Qt::NoBrush; + qt4brushstyle = TQt::NoBrush; break; case TQt::SolidPattern: - qt4brushstyle = Qt::SolidPattern; + qt4brushstyle = TQt::SolidPattern; break; case TQt::Dense1Pattern: - qt4brushstyle = Qt::Dense1Pattern; + qt4brushstyle = TQt::Dense1Pattern; break; case TQt::Dense2Pattern: - qt4brushstyle = Qt::Dense2Pattern; + qt4brushstyle = TQt::Dense2Pattern; break; case TQt::Dense3Pattern: - qt4brushstyle = Qt::Dense3Pattern; + qt4brushstyle = TQt::Dense3Pattern; break; case TQt::Dense4Pattern: - qt4brushstyle = Qt::Dense4Pattern; + qt4brushstyle = TQt::Dense4Pattern; break; case TQt::Dense5Pattern: - qt4brushstyle = Qt::Dense5Pattern; + qt4brushstyle = TQt::Dense5Pattern; break; case TQt::Dense6Pattern: - qt4brushstyle = Qt::Dense6Pattern; + qt4brushstyle = TQt::Dense6Pattern; break; case TQt::Dense7Pattern: - qt4brushstyle = Qt::Dense7Pattern; + qt4brushstyle = TQt::Dense7Pattern; break; case TQt::HorPattern: - qt4brushstyle = Qt::HorPattern; + qt4brushstyle = TQt::HorPattern; break; case TQt::VerPattern: - qt4brushstyle = Qt::VerPattern; + qt4brushstyle = TQt::VerPattern; break; case TQt::CrossPattern: - qt4brushstyle = Qt::CrossPattern; + qt4brushstyle = TQt::CrossPattern; break; case TQt::BDiagPattern: - qt4brushstyle = Qt::BDiagPattern; + qt4brushstyle = TQt::BDiagPattern; break; case TQt::FDiagPattern: - qt4brushstyle = Qt::FDiagPattern; + qt4brushstyle = TQt::FDiagPattern; break; case TQt::DiagCrossPattern: - qt4brushstyle = Qt::DiagCrossPattern; + qt4brushstyle = TQt::DiagCrossPattern; break; case TQt::CustomPattern: - qt4brushstyle = Qt::TexturePattern; + qt4brushstyle = TQt::TexturePattern; break; default: - qt4brushstyle = Qt::NoBrush; + qt4brushstyle = TQt::NoBrush; #if defined(QT_CHECK_RANGE) tqWarning( "convertTQt3ToQt4Brush: Invalid brush style %d", tqt3brushstyle ); #endif @@ -312,7 +312,7 @@ QBrush convertTQt3ToQt4Brush(TQBrush tqt3brush) qt4brush.setStyle(qt4brushstyle); TQColor qt3color = tqt3brush.color(); qt4brush.setColor(QColor(qt3color.red(), qt3color.green(), qt3color.blue(), 255)); - if (qt4brushstyle == Qt::TexturePattern) { + if (qt4brushstyle == TQt::TexturePattern) { TQPixmap tqtPM = *tqt3brush.pixmap(); QPixmap qtPM = QPixmap::fromX11Pixmap(tqtPM.handle(), QPixmap::ImplicitlyShared); qtPM.detach(); @@ -325,56 +325,56 @@ QBrush convertTQt3ToQt4Brush(TQBrush tqt3brush) TQBrush convertQt4ToTQt3Brush(QBrush qt4brush) { TQBrush tqt3brush; - Qt::BrushStyle qt4brushstyle = qt4brush.style(); + TQt::BrushStyle qt4brushstyle = qt4brush.style(); TQt::BrushStyle tqt3brushstyle; switch ( qt4brushstyle ) { - case Qt::NoBrush: + case TQt::NoBrush: tqt3brushstyle = TQt::NoBrush; break; - case Qt::SolidPattern: + case TQt::SolidPattern: tqt3brushstyle = TQt::SolidPattern; break; - case Qt::Dense1Pattern: + case TQt::Dense1Pattern: tqt3brushstyle = TQt::Dense1Pattern; break; - case Qt::Dense2Pattern: + case TQt::Dense2Pattern: tqt3brushstyle = TQt::Dense2Pattern; break; - case Qt::Dense3Pattern: + case TQt::Dense3Pattern: tqt3brushstyle = TQt::Dense3Pattern; break; - case Qt::Dense4Pattern: + case TQt::Dense4Pattern: tqt3brushstyle = TQt::Dense4Pattern; break; - case Qt::Dense5Pattern: + case TQt::Dense5Pattern: tqt3brushstyle = TQt::Dense5Pattern; break; - case Qt::Dense6Pattern: + case TQt::Dense6Pattern: tqt3brushstyle = TQt::Dense6Pattern; break; - case Qt::Dense7Pattern: + case TQt::Dense7Pattern: tqt3brushstyle = TQt::Dense7Pattern; break; - case Qt::HorPattern: + case TQt::HorPattern: tqt3brushstyle = TQt::HorPattern; break; - case Qt::VerPattern: + case TQt::VerPattern: tqt3brushstyle = TQt::VerPattern; break; - case Qt::CrossPattern: + case TQt::CrossPattern: tqt3brushstyle = TQt::CrossPattern; break; - case Qt::BDiagPattern: + case TQt::BDiagPattern: tqt3brushstyle = TQt::BDiagPattern; break; - case Qt::FDiagPattern: + case TQt::FDiagPattern: tqt3brushstyle = TQt::FDiagPattern; break; - case Qt::DiagCrossPattern: + case TQt::DiagCrossPattern: tqt3brushstyle = TQt::DiagCrossPattern; break; - case Qt::TexturePattern: + case TQt::TexturePattern: tqt3brushstyle = TQt::CustomPattern; break; default: |