Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
replace/qt-tqt
Michele Calgaro 1 year ago
parent 0f7f50ffa0
commit 338f7820f9
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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(&regionMask);
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:

@ -64,7 +64,7 @@ enum TQt3WidgetType {
TQT3WT_TQToolButton
};
TQt::Orientation convertQt4ToTQt3Orientation(Qt::Orientation qt4orient);
TQt::Orientation convertQt4ToTQt3Orientation(TQt::Orientation qt4orient);
TQSlider::TickSetting convertQt4ToTQt3TickSetting(QSlider::TickPosition qt4ts);
QColor convertTQt3ToQt4Color(TQColor tqt3color);
TQColor convertQt4ToTQt3Color(QColor qt4color);

@ -48,7 +48,7 @@
inline int qt4PainterRectSubtraction(QPainter* pd) {
QPen pen = pd->pen();
return pen.style() != Qt::NoPen && pen.width() == 0 ? 1 : 0;
return pen.style() != TQt::NoPen && pen.width() == 0 ? 1 : 0;
}
inline QRect qt4PainterAdjustedRectangle(const QRect &r, QPainter* pd)
@ -105,7 +105,7 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
QString qt4string;
QMatrix qt4matrix;
QRegion qt4region;
Qt::BGMode qt4bkmode = Qt::TransparentMode;
TQt::BGMode qt4bkmode = TQt::TransparentMode;
QPainter::CompositionMode qt4compositionmode = QPainter::CompositionMode_SourceOver;
int qt4formattedtextflags = 0;
@ -244,52 +244,52 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
qt4rect = QRect(p[0].rect->x(), p[0].rect->y(), p[0].rect->width(), p[0].rect->height());
qt4formattedtextflags = 0;
// if (p[1].ival & TQt::AlignAuto) {
// qt4formattedtextflags = qt4formattedtextflags | Qt::AlignAuto;
// qt4formattedtextflags = qt4formattedtextflags | TQt::AlignAuto;
// }
if ((p[1].ival & TQt::AlignLeft) == TQt::AlignLeft) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignLeft;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignLeft;
}
if ((p[1].ival & TQt::AlignRight) == TQt::AlignRight) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignRight;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignRight;
}
if ((p[1].ival & TQt::AlignHCenter) == TQt::AlignHCenter) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignHCenter;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignHCenter;
}
if ((p[1].ival & TQt::AlignJustify) == TQt::AlignJustify) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignJustify;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignJustify;
}
if ((p[1].ival & TQt::AlignTop) == TQt::AlignTop) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignTop;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignTop;
}
if ((p[1].ival & TQt::AlignBottom) == TQt::AlignBottom) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignBottom;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignBottom;
}
if ((p[1].ival & TQt::AlignVCenter) == TQt::AlignVCenter) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignVCenter;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignVCenter;
}
if ((p[1].ival & TQt::AlignCenter) == TQt::AlignCenter) {
qt4formattedtextflags = qt4formattedtextflags | Qt::AlignCenter;
qt4formattedtextflags = qt4formattedtextflags | TQt::AlignCenter;
}
if ((p[1].ival & TQt::SingleLine) == TQt::SingleLine) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextSingleLine;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextSingleLine;
}
if ((p[1].ival & TQt::DontClip) == TQt::DontClip) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextDontClip;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextDontClip;
}
if ((p[1].ival & TQt::ExpandTabs) == TQt::ExpandTabs) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextExpandTabs;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextExpandTabs;
}
if ((p[1].ival & TQt::ShowPrefix) == TQt::ShowPrefix) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextShowMnemonic;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextShowMnemonic;
}
if ((p[1].ival & TQt::WordBreak) == TQt::WordBreak) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextWordWrap;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextWordWrap;
}
if ((p[1].ival & TQt::BreakAnywhere) == TQt::BreakAnywhere) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextWrapAnywhere;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextWrapAnywhere;
}
if ((p[1].ival & TQt::NoAccel) == TQt::NoAccel) {
qt4formattedtextflags = qt4formattedtextflags | Qt::TextHideMnemonic;
qt4formattedtextflags = qt4formattedtextflags | TQt::TextHideMnemonic;
}
qt4string = QString::fromUtf8(p[2].str->utf8().data());
}
@ -313,58 +313,58 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
}
if (c == PdcSetBrush) {
TQt::BrushStyle tqt3brushstyle = p[0].brush->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( "TDEQt4PaintDevice::cmd: Invalid brush style %d", tqt3brushstyle );
#endif
@ -372,7 +372,7 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
qt4brush.setStyle(qt4brushstyle);
TQColor qt3color = p[0].brush->color();
qt4brush.setColor(QColor(qt3color.red(), qt3color.green(), qt3color.blue(), 255));
if (qt4brushstyle == Qt::TexturePattern) {
if (qt4brushstyle == TQt::TexturePattern) {
#ifdef USE_QT4_FROM_X11_PIXMAP_FUNCTIONS
TQPixmap tqtPM = *p[0].brush->pixmap();
QPixmap qtPM = QPixmap::fromX11Pixmap(tqtPM.handle(), QPixmap::ImplicitlyShared);
@ -389,28 +389,28 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
if (c == PdcSetPen) {
bool customPenStyle = false;
TQt::PenStyle tqt3penstyle = p[0].pen->style();
Qt::PenStyle qt4penstyle;
TQt::PenStyle qt4penstyle;
QVector<qreal> dashes;
qreal mark;
qreal space;
switch ( tqt3penstyle ) {
case TQt::NoPen:
qt4penstyle = Qt::NoPen;
qt4penstyle = TQt::NoPen;
break;
case TQt::SolidLine:
qt4penstyle = Qt::SolidLine;
qt4penstyle = TQt::SolidLine;
break;
case TQt::DashLine:
qt4penstyle = Qt::DashLine;
qt4penstyle = TQt::DashLine;
break;
case TQt::DotLine:
qt4penstyle = Qt::DotLine;
qt4penstyle = TQt::DotLine;
break;
case TQt::DashDotLine:
qt4penstyle = Qt::DashDotLine;
qt4penstyle = TQt::DashDotLine;
break;
case TQt::DashDotDotLine:
qt4penstyle = Qt::DashDotDotLine;
qt4penstyle = TQt::DashDotDotLine;
break;
case TQt::FineDotLine:
customPenStyle = true;
@ -420,10 +420,10 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
qt4pen.setDashPattern(dashes);
break;
case TQt::MPenStyle:
qt4penstyle = Qt::MPenStyle;
qt4penstyle = TQt::MPenStyle;
break;
default:
qt4penstyle = Qt::NoPen;
qt4penstyle = TQt::NoPen;
#if defined(QT_CHECK_RANGE)
tqWarning( "TDEQt4PaintDevice::cmd: Invalid pen style %d", tqt3penstyle );
#endif
@ -432,42 +432,42 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
qt4pen.setStyle(qt4penstyle);
}
TQt::PenCapStyle tqt3pencapstyle = p[0].pen->capStyle();
Qt::PenCapStyle qt4pencapstyle;
TQt::PenCapStyle qt4pencapstyle;
switch ( tqt3pencapstyle ) {
case TQt::FlatCap:
qt4pencapstyle = Qt::FlatCap;
qt4pencapstyle = TQt::FlatCap;
break;
case TQt::SquareCap:
qt4pencapstyle = Qt::SquareCap;
qt4pencapstyle = TQt::SquareCap;
break;
case TQt::RoundCap:
qt4pencapstyle = Qt::RoundCap;
qt4pencapstyle = TQt::RoundCap;
break;
case TQt::MPenCapStyle:
qt4pencapstyle = Qt::MPenCapStyle;
qt4pencapstyle = TQt::MPenCapStyle;
default:
qt4pencapstyle = Qt::FlatCap;
qt4pencapstyle = TQt::FlatCap;
#if defined(QT_CHECK_RANGE)
tqWarning( "TDEQt4PaintDevice::cmd: Invalid pen cap style %d", tqt3pencapstyle );
#endif
}
qt4pen.setCapStyle(qt4pencapstyle);
TQt::PenJoinStyle tqt3penjoinstyle = p[0].pen->joinStyle();
Qt::PenJoinStyle qt4penjoinstyle;
TQt::PenJoinStyle qt4penjoinstyle;
switch ( tqt3penjoinstyle ) {
case TQt::MiterJoin:
qt4penjoinstyle = Qt::MiterJoin;
qt4penjoinstyle = TQt::MiterJoin;
break;
case TQt::BevelJoin:
qt4penjoinstyle = Qt::BevelJoin;
qt4penjoinstyle = TQt::BevelJoin;
break;
case TQt::RoundJoin:
qt4penjoinstyle = Qt::RoundJoin;
qt4penjoinstyle = TQt::RoundJoin;
break;
case TQt::MPenJoinStyle:
qt4penjoinstyle = Qt::MPenJoinStyle;
qt4penjoinstyle = TQt::MPenJoinStyle;
default:
qt4penjoinstyle = Qt::MiterJoin;
qt4penjoinstyle = TQt::MiterJoin;
#if defined(QT_CHECK_RANGE)
tqWarning( "TDEQt4PaintDevice::cmd: Invalid pen join style %d", tqt3penjoinstyle );
#endif
@ -481,13 +481,13 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
TQt::BGMode qt3bkmode = (TQt::BGMode)p[0].ival;
switch ( qt3bkmode ) {
case TQt::TransparentMode:
qt4bkmode = Qt::TransparentMode;
qt4bkmode = TQt::TransparentMode;
break;
case TQt::OpaqueMode:
qt4bkmode = Qt::OpaqueMode;
qt4bkmode = TQt::OpaqueMode;
break;
default:
qt4bkmode = Qt::TransparentMode;
qt4bkmode = TQt::TransparentMode;
#if defined(QT_CHECK_RANGE)
tqWarning( "TDEQt4PaintDevice::cmd: Invalid background mode %d", qt3bkmode );
#endif
@ -566,7 +566,7 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
m_qt4painter->drawPolyline( qt4polygon );
break;
case PdcDrawPolygon:
m_qt4painter->drawPolygon( qt4polygon, (p[1].ival == 0)?Qt::OddEvenFill:Qt::WindingFill );
m_qt4painter->drawPolygon( qt4polygon, (p[1].ival == 0)?TQt::OddEvenFill:TQt::WindingFill );
break;
case PdcDrawCubicBezier:
index = 0;
@ -705,7 +705,7 @@ bool TDEQt4PaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
m_qt4painter->setClipping( (m_qt4OrigClipping)?true:p[0].ival );
break;
case PdcSetClipRegion:
m_qt4painter->setClipRegion( (m_qt4OrigClipping)?qt4region.intersected(m_qt4OrigClipRegion):qt4region, Qt::ReplaceClip );
m_qt4painter->setClipRegion( (m_qt4OrigClipping)?qt4region.intersected(m_qt4OrigClipRegion):qt4region, TQt::ReplaceClip );
break;
default:
#if defined(QT_CHECK_RANGE)

@ -1671,7 +1671,7 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
m_tqt3progressbar_widget->setGeometry(0, 0, qt4progressbar_widget->width(), qt4progressbar_widget->height());
m_tqt3progressbar_widget->setEnabled(qt4progressbar_widget->isEnabled());
m_tqt3progressbar_widget->setProgress(qt4progressbar_widget->value()-qt4progressbar_widget->minimum(),qt4progressbar_widget->maximum()-qt4progressbar_widget->minimum());
if (qt4progressbar_widget->orientation() != Qt::Horizontal) {
if (qt4progressbar_widget->orientation() != TQt::Horizontal) {
// Qt3 cannot draw vertical progress bars
if (enable_debug_warnings) {
printf("No rules to draw vertical Qt4 progress bar\n"); fflush(stdout);
@ -2012,7 +2012,7 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
// Construct an internal TQTitleBar widget from the options and widget provided by Qt4
m_tqt3titlebar_widget->setGeometry(qt4styleoptions->rect.x(), qt4styleoptions->rect.y(), qt4styleoptions->rect.width(), qt4styleoptions->rect.height());
m_tqt3titlebar_widget->setCaption(convertQt4ToTQt3String(qt4titlebar_options->text));
m_tqt3titlebar_widget->setActive(qt4titlebar_options->titleBarState & Qt::WindowActive);
m_tqt3titlebar_widget->setActive(qt4titlebar_options->titleBarState & TQt::WindowActive);
// HACK
// TQt3 does not know how to handle transparent icons in title bars,
@ -2064,11 +2064,11 @@ TQWidget* Qt4TDEStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
m_tqt3toolbutton_widget->setEnabled(qt4toolbutton_widget->isEnabled());
m_tqt3toolbutton_widget->setIconSet(convertQt4ToTQt3IconSet(qt4toolbutton_widget->icon(), m_tqt3IconSize_Small, m_tqt3IconSize_Large, m_internalTQt3PixmapCache));
// m_tqt3toolbutton_widget->setUsesBigPixmap(qt4toolbutton_widget->);
m_tqt3toolbutton_widget->setUsesTextLabel(((qt4toolbutton_widget->toolButtonStyle() != Qt::ToolButtonIconOnly) && (qt4toolbutton_widget->toolButtonStyle() != Qt::ToolButtonFollowStyle)));
m_tqt3toolbutton_widget->setUsesTextLabel(((qt4toolbutton_widget->toolButtonStyle() != TQt::ToolButtonIconOnly) && (qt4toolbutton_widget->toolButtonStyle() != TQt::ToolButtonFollowStyle)));
m_tqt3toolbutton_widget->setTextLabel(convertQt4ToTQt3String(qt4toolbutton_widget->text()));
m_tqt3toolbutton_widget->setToggleButton(qt4toolbutton_widget->isCheckable());
m_tqt3toolbutton_widget->setOn(qt4toolbutton_widget->isChecked());
if (qt4toolbutton_widget->toolButtonStyle() == Qt::ToolButtonTextBesideIcon) {
if (qt4toolbutton_widget->toolButtonStyle() == TQt::ToolButtonTextBesideIcon) {
m_tqt3toolbutton_widget->setTextPosition(TQToolButton::BesideIcon);
}
m_tqt3toolbutton_widget->setAutoRaise(qt4toolbutton_widget->autoRaise());
@ -2338,13 +2338,13 @@ void Qt4TDEStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
// This logic is taken from Qt4 (qcommonstyle.cpp)
// It will need to be kept in sync with whatever Nokia does
drawCloseButton = (tbopt->subControls & SC_TitleBarCloseButton && tbopt->titleBarFlags & Qt::WindowSystemMenuHint);
drawMaxButton = (tbopt->subControls & SC_TitleBarMaxButton && tbopt->titleBarFlags & Qt::WindowMaximizeButtonHint && !(tbopt->titleBarState & Qt::WindowMaximized));
drawMinButton = (tbopt->subControls & SC_TitleBarMinButton && tbopt->titleBarFlags & Qt::WindowMinimizeButtonHint && !(tbopt->titleBarState & Qt::WindowMinimized));
drawNormalButton = (tbopt->subControls & SC_TitleBarNormalButton) && (((tbopt->titleBarFlags & Qt::WindowMinimizeButtonHint) && (tbopt->titleBarState & Qt::WindowMinimized)) || ((tbopt->titleBarFlags & Qt::WindowMaximizeButtonHint) && (tbopt->titleBarState & Qt::WindowMaximized)));
drawShadeButton = (tbopt->subControls & SC_TitleBarShadeButton && tbopt->titleBarFlags & Qt::WindowShadeButtonHint && !(tbopt->titleBarState & Qt::WindowMinimized));
drawUnshadeButton = (tbopt->subControls & SC_TitleBarUnshadeButton && tbopt->titleBarFlags & Qt::WindowShadeButtonHint && tbopt->titleBarState & Qt::WindowMinimized);
drawSysMenuButton = (tbopt->subControls & SC_TitleBarSysMenu && tbopt->titleBarFlags & Qt::WindowSystemMenuHint);
drawCloseButton = (tbopt->subControls & SC_TitleBarCloseButton && tbopt->titleBarFlags & TQt::WindowSystemMenuHint);
drawMaxButton = (tbopt->subControls & SC_TitleBarMaxButton && tbopt->titleBarFlags & TQt::WindowMaximizeButtonHint && !(tbopt->titleBarState & TQt::WindowMaximized));
drawMinButton = (tbopt->subControls & SC_TitleBarMinButton && tbopt->titleBarFlags & TQt::WindowMinimizeButtonHint && !(tbopt->titleBarState & TQt::WindowMinimized));
drawNormalButton = (tbopt->subControls & SC_TitleBarNormalButton) && (((tbopt->titleBarFlags & TQt::WindowMinimizeButtonHint) && (tbopt->titleBarState & TQt::WindowMinimized)) || ((tbopt->titleBarFlags & TQt::WindowMaximizeButtonHint) && (tbopt->titleBarState & TQt::WindowMaximized)));
drawShadeButton = (tbopt->subControls & SC_TitleBarShadeButton && tbopt->titleBarFlags & TQt::WindowShadeButtonHint && !(tbopt->titleBarState & TQt::WindowMinimized));
drawUnshadeButton = (tbopt->subControls & SC_TitleBarUnshadeButton && tbopt->titleBarFlags & TQt::WindowShadeButtonHint && tbopt->titleBarState & TQt::WindowMinimized);
drawSysMenuButton = (tbopt->subControls & SC_TitleBarSysMenu && tbopt->titleBarFlags & TQt::WindowSystemMenuHint);
// End logic taken from Qt4
// FIXME
@ -2368,7 +2368,7 @@ void Qt4TDEStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
if (tbopt->subControls & SC_TitleBarLabel) {
subControl = subControl | TQStyle::SC_TitleBarLabel;
}
if (drawNormalButton && !(tbopt->titleBarState & Qt::WindowMaximized)) {
if (drawNormalButton && !(tbopt->titleBarState & TQt::WindowMaximized)) {
subControl = subControl | TQStyle::SC_TitleBarNormalButton;
}
if (drawShadeButton) {
@ -3116,7 +3116,7 @@ void Qt4TDEStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
BASE_QT4_STYLE_CLASS::drawPrimitive(pe, opt, p, w);
}
else {
p->fillRect(opt->rect, Qt::transparent);
p->fillRect(opt->rect, TQt::transparent);
}
}

Loading…
Cancel
Save