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