summaryrefslogtreecommitdiffstats
path: root/tdefx
diff options
context:
space:
mode:
Diffstat (limited to 'tdefx')
-rw-r--r--tdefx/kcpuinfo.cpp6
-rw-r--r--tdefx/kdrawutil.cpp14
-rw-r--r--tdefx/kdrawutil.h4
-rw-r--r--tdefx/kimageeffect.cpp64
-rw-r--r--tdefx/kimageeffect.h2
-rw-r--r--tdefx/kpixmap.cpp4
-rw-r--r--tdefx/kpixmapsplitter.h2
-rw-r--r--tdefx/tdestyle.cpp92
-rw-r--r--tdefx/tdestyle.h52
9 files changed, 93 insertions, 147 deletions
diff --git a/tdefx/kcpuinfo.cpp b/tdefx/kcpuinfo.cpp
index 97c99f8d9..ff6d3505c 100644
--- a/tdefx/kcpuinfo.cpp
+++ b/tdefx/kcpuinfo.cpp
@@ -48,10 +48,10 @@ static void sighandler( int )
#endif
#ifdef __PPC__
-static sigjmp_buf KDE_NO_EXPORT jmpbuf;
-static sig_atomic_t KDE_NO_EXPORT canjump = 0;
+static sigjmp_buf TDE_NO_EXPORT jmpbuf;
+static sig_atomic_t TDE_NO_EXPORT canjump = 0;
-static void KDE_NO_EXPORT sigill_handler( int sig )
+static void TDE_NO_EXPORT sigill_handler( int sig )
{
if ( !canjump ) {
signal( sig, SIG_DFL );
diff --git a/tdefx/kdrawutil.cpp b/tdefx/kdrawutil.cpp
index 0610865cb..de5946087 100644
--- a/tdefx/kdrawutil.cpp
+++ b/tdefx/kdrawutil.cpp
@@ -27,13 +27,13 @@ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h,
int y2 = y+h-1;
p->fillRect(x+1, y+1, w-2, h-2,
fill ? *fill : g.brush(TQColorGroup::Button));
- p->setPen(sunken ? Qt::black : g.light());
+ p->setPen(sunken ? TQt::black : g.light());
p->drawLine(x, y, x2-1, y);
p->drawLine(x, y, x, y2-1);
p->setPen(sunken ? g.midlight() : g.mid());
p->drawLine(x+1, y2-1, x2-1, y2-1);
p->drawLine(x2-1, y+1, x2-1, y2-1);
- p->setPen(sunken ? g.light() : Qt::black);
+ p->setPen(sunken ? g.light() : TQt::black);
p->drawLine(x, y2, x2, y2);
p->drawLine(x2, y, x2, y2);
p->setPen(oldPen);
@@ -161,10 +161,10 @@ TDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool
3,1,3,2,3,3,3,4,3,0,4,1,4,2,4,3,4,4,4 };
if(clear)
- p->fillRect(x, y, w, h, TQBrush(Qt::color0, Qt::SolidPattern));
+ p->fillRect(x, y, w, h, TQBrush(TQt::color0, TQt::SolidPattern));
- TQBrush fillBrush(Qt::color1, Qt::SolidPattern);
- p->setPen(Qt::color1);
+ TQBrush fillBrush(TQt::color1, TQt::SolidPattern);
+ p->setPen(TQt::color1);
if(w > 16 && h > 16){
int x2 = x+w-1;
int y2 = y+h-1;
@@ -223,7 +223,7 @@ TDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int
blackColor, whiteColor};
TQColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
- Qt::black, Qt::white};
+ TQt::black, TQt::white};
int i;
for(i=0; i < 6; ++i){
@@ -246,7 +246,7 @@ TDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int
blackColor, whiteColor};
TQColor colors[]={g.light(), g.mid(), g.midlight(), g.dark(),
- Qt::black, Qt::white};
+ TQt::black, TQt::white};
int i;
TQBitmap b;
diff --git a/tdefx/kdrawutil.h b/tdefx/kdrawutil.h
index 909792817..bee877e6a 100644
--- a/tdefx/kdrawutil.h
+++ b/tdefx/kdrawutil.h
@@ -125,7 +125,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
* @c \#include @c <kdrawutil.h>
*
* Paints the pixels covered by a round button of the given size with
- * Qt::color1. This function is useful in TQStyle::drawControlMask().
+ * TQt::color1. This function is useful in TQStyle::drawControlMask().
*
* @param p The painter to use for drawing the button.
* @param x The X coordinate of the button.
@@ -133,7 +133,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
* @param w The width of the button.
* @param h The height of the button.
* @param clear Whether to clear the rectangle specified by @p (x, y, w, h) to
- * Qt::color0 before drawing the mask.
+ * TQt::color0 before drawing the mask.
*/
TDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear=false);
diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp
index 277e1cc7f..8968c1b43 100644
--- a/tdefx/kimageeffect.cpp
+++ b/tdefx/kimageeffect.cpp
@@ -58,7 +58,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
//======================================================================
//
-// Utility stuff for effects ported from ImageMagick to QImage
+// Utility stuff for effects ported from ImageMagick to TQImage
//
//======================================================================
#define MaxRGB 255L
@@ -664,7 +664,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.tqcolorTable();
+ (unsigned int *)image.colorTable();
bool brighten = (percent >= 0);
if(percent < 0)
@@ -858,7 +858,7 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent,
int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.tqcolorTable();
+ (unsigned int *)image.colorTable();
bool brighten = (percent >= 0);
if(percent < 0)
percent = -percent;
@@ -958,7 +958,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
if (modImage.depth()<8) modImage = modImage.convertDepth(8);
unsigned int *colorTable2 = (modImage.depth()==8) ?
- modImage.tqcolorTable():0;
+ modImage.colorTable():0;
unsigned int *data1, *data2;
unsigned char *data2b;
unsigned int color1, color2;
@@ -1079,11 +1079,6 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
if (dst.depth() != 32)
dst = dst.convertDepth(32);
-#ifdef USE_QT4
- if (dst.format() != QImage::Format_ARGB32)
- dst = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
-#endif
-
int pixels = dst.width() * dst.height();
#ifdef USE_SSE2_INLINE_ASM
@@ -1334,13 +1329,6 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
if (src.depth() != 32) src = src.convertDepth(32);
if (dst.depth() != 32) dst = dst.convertDepth(32);
-#ifdef USE_QT4
- if (src.format() != QImage::Format_ARGB32)
- src = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
- if (dst.format() != QImage::Format_ARGB32)
- dst = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
-#endif
-
int pixels = src.width() * src.height();
#ifdef USE_SSE2_INLINE_ASM
@@ -1800,7 +1788,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8);
unsigned int *colorTable3 = (blendImage.depth()==8) ?
- blendImage.tqcolorTable():0;
+ blendImage.colorTable():0;
unsigned int *data1 = (unsigned int *)image1.bits();
unsigned int *data2 = (unsigned int *)image2.bits();
@@ -2174,7 +2162,7 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.tqcolorTable();
+ (unsigned int *)img.colorTable();
int val, i;
for(i=0; i < pixels; ++i){
val = tqGray(data[i]);
@@ -2195,7 +2183,7 @@ TQImage& KImageEffect::desaturate(TQImage &img, float desat)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.tqcolorTable();
+ (unsigned int *)img.colorTable();
int h, s, v, i;
TQColor clr; // keep constructor out of loop (mosfet)
for(i=0; i < pixels; ++i){
@@ -2220,7 +2208,7 @@ TQImage& KImageEffect::contrast(TQImage &img, int c)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.tqcolorTable();
+ (unsigned int *)img.colorTable();
int i, r, g, b;
for(i=0; i < pixels; ++i){
r = tqRed(data[i]);
@@ -2791,7 +2779,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
}
else if(depth == 1) {
int r = src.bitOrder() == TQImage::LittleEndian;
- memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb));
+ memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb));
for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]);
@@ -2806,7 +2794,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
}
}
else{ // PseudoClass source image
- memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb));
+ memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb));
for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]);
@@ -2829,10 +2817,10 @@ void KImageEffect::threshold(TQImage &img, unsigned int threshold)
}
else{ // PsudeoClass
count = img.numColors();
- data = (unsigned int *)img.tqcolorTable();
+ data = (unsigned int *)img.colorTable();
}
for(i=0; i < count; ++i)
- data[i] = intensityValue(data[i]) < threshold ? QColor(Qt::black).rgb() : QColor(Qt::white).rgb();
+ data[i] = intensityValue(data[i]) < threshold ? TQColor(TQt::black).rgb() : TQColor(TQt::white).rgb();
}
void KImageEffect::hull(const int x_offset, const int y_offset,
@@ -2963,7 +2951,7 @@ TQImage KImageEffect::despeckle(TQImage &src)
}
else{ // PsudeoClass source image
unsigned char *srcData;
- unsigned int *cTable = src.tqcolorTable();
+ unsigned int *cTable = src.colorTable();
unsigned int pixel;
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
@@ -3142,7 +3130,7 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
}
else{ // PsudeoClass source image
unsigned char *srcData;
- unsigned int *cTable = src.tqcolorTable();
+ unsigned int *cTable = src.colorTable();
unsigned int pixel;
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
@@ -3204,7 +3192,7 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset,
}
}
else{
- unsigned int *colorTable = (unsigned int *)image->tqcolorTable();
+ unsigned int *colorTable = (unsigned int *)image->colorTable();
if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) {
unsigned char *t;
t = (unsigned char *)image->scanLine(y);
@@ -3304,7 +3292,7 @@ TQImage KImageEffect::implode(TQImage &src, double factor,
else{ // PsudeoClass source image
unsigned char *srcData;
unsigned char idx;
- unsigned int *cTable = src.tqcolorTable();
+ unsigned int *cTable = src.colorTable();
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
destData = (unsigned int *)dest.scanLine(y);
@@ -3380,8 +3368,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate90:
dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.tqcolorTable();
- destTable = (unsigned int *)dest.tqcolorTable();
+ srcTable = (unsigned int *)img.colorTable();
+ destTable = (unsigned int *)dest.colorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3395,8 +3383,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate180:
dest.create(img.width(), img.height(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.tqcolorTable();
- destTable = (unsigned int *)dest.tqcolorTable();
+ srcTable = (unsigned int *)img.colorTable();
+ destTable = (unsigned int *)dest.colorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3409,8 +3397,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate270:
dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.tqcolorTable();
- destTable = (unsigned int *)dest.tqcolorTable();
+ srcTable = (unsigned int *)img.colorTable();
+ destTable = (unsigned int *)dest.colorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3438,7 +3426,7 @@ void KImageEffect::solarize(TQImage &img, double factor)
threshold = (int)(factor*(MaxRGB+1)/100.0);
if(img.depth() < 32){
- data = (unsigned int *)img.tqcolorTable();
+ data = (unsigned int *)img.colorTable();
count = img.numColors();
}
else{
@@ -3553,7 +3541,7 @@ TQImage KImageEffect::swirl(TQImage &src, double degrees,
}
else{ // PsudeoClass source image
unsigned char *p;
- unsigned int *cTable = (unsigned int *)src.tqcolorTable();
+ unsigned int *cTable = (unsigned int *)src.colorTable();
for(y=0; y < src.height(); y++){
p = (unsigned char *)src.scanLine(y);
q = (unsigned int *)dest.scanLine(y);
@@ -4566,7 +4554,7 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
else{ // PsudeoClass source image
unsigned char *p, *s0, *s1, *s2;
int scanLineIdx;
- unsigned int *cTable = (unsigned int *)src.tqcolorTable();
+ unsigned int *cTable = (unsigned int *)src.colorTable();
for(y=0; y < src.height(); ++y){
scanLineIdx = TQMIN(TQMAX(y-1,0),src.height()-3);
p = (unsigned char *)src.scanLine(scanLineIdx);
@@ -4644,7 +4632,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
}
else{
count = img.numColors();
- data = (unsigned int *)img.tqcolorTable();
+ data = (unsigned int *)img.colorTable();
}
for(i=0; i < count; ++i){
c.setRgb(data[i]);
diff --git a/tdefx/kimageeffect.h b/tdefx/kimageeffect.h
index cc79533f7..3bfd10944 100644
--- a/tdefx/kimageeffect.h
+++ b/tdefx/kimageeffect.h
@@ -398,7 +398,7 @@ public:
const TQColor &cb, int ncols=0);
/**
- * Build a hash on any given QImage
+ * Build a hash on any given TQImage
*
* @param image The TQImage to process
* @param lite The hash faces the indicated lighting (cardinal poles).
diff --git a/tdefx/kpixmap.cpp b/tdefx/kpixmap.cpp
index 8cc9e384a..30a2de570 100644
--- a/tdefx/kpixmap.cpp
+++ b/tdefx/kpixmap.cpp
@@ -75,7 +75,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
pv[2] = new int[sw];
for ( y=0; y < src->height(); y++ ) {
- // p = (QRgb *)src->scanLine(y);
+ // p = (TQRgb *)src->scanLine(y);
b = dst->scanLine(y);
int endian = (TQImage::systemBitOrder() == TQImage::BigEndian);
int x;
@@ -357,7 +357,7 @@ bool KPixmap::checkColorTable( const TQImage &image )
}
- TQRgb* ctable = image.tqcolorTable();
+ TQRgb* ctable = image.colorTable();
int ncols = image.numColors();
int j;
diff --git a/tdefx/kpixmapsplitter.h b/tdefx/kpixmapsplitter.h
index 3e7a6dfa1..cf96515ce 100644
--- a/tdefx/kpixmapsplitter.h
+++ b/tdefx/kpixmapsplitter.h
@@ -42,7 +42,7 @@ class KPixmapSplitterPrivate;
* splitter.setItemSize( TQSize( 20, 10 ));
*
* TQPixmap item( 20, 10 );
- * item.fill( Qt::white );
+ * item.fill( TQt::white );
* TQRect rect = splitter.coordinates( 4 );
* if ( !rect.isEmpty() )
* bitBlt( &item, TQPoint(0,0), &somePixmap, rect, CopyROP );
diff --git a/tdefx/tdestyle.cpp b/tdefx/tdestyle.cpp
index ded6a2372..6571c2a48 100644
--- a/tdefx/tdestyle.cpp
+++ b/tdefx/tdestyle.cpp
@@ -53,7 +53,7 @@
#include <kpixmapeffect.h>
#include <kimageeffect.h>
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
# include <X11/Xlib.h>
# ifdef HAVE_XRENDER
# include <X11/extensions/Xrender.h> // schroder
@@ -263,11 +263,11 @@ TQString TDEStyle::defaultStyle()
void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
if ( d->useFilledFrameWorkaround )
{
- if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) {
+ if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->installEventFilter(this);
@@ -287,11 +287,11 @@ void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFl
void TDEStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
if ( d->useFilledFrameWorkaround )
{
- if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) {
+ if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
@@ -310,7 +310,7 @@ void TDEStyle::polishPopupMenu( const TQStyleControlElementData &ceData, Control
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
}
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
TQPopupMenu *p = dynamic_cast<TQPopupMenu*>(widget);
if (p) {
@@ -537,7 +537,7 @@ void TDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
break;
default:
- p->fillRect(r, Qt::yellow); // Something really bad happened - highlight.
+ p->fillRect(r, TQt::yellow); // Something really bad happened - highlight.
break;
}
}
@@ -569,29 +569,7 @@ int TDEStyle::kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElement
// -----------------------------------------------------------------------------
-// #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now
-
-//void TDEStyle::drawPrimitive( TQ_ControlElement pe,
-// TQPainter* p,
-// const TQStyleControlElementData &ceData,
-// ControlElementFlags elementFlags,
-// const TQRect &r,
-// const TQColorGroup &cg,
-// SFlags flags,
-// const TQStyleOption& opt ) const
-//{
-// // FIXME:
-// // What should "widget" be in actuality? How should I get it? From where?
-// // Almost certainly it should not be null!
-// TQWidget *widget = 0;
-// drawControl(pe, p, ceData, elementFlags, r, cg, flags, opt, widget);
-//}
-
-// #endif // USE_QT4
-
-// -----------------------------------------------------------------------------
-
-void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe,
+void TDEStyle::drawPrimitive( PrimitiveElement pe,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -615,13 +593,13 @@ void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe,
// Check if we are a normal toolbar or a hidden dockwidget.
if ( parent &&
- (parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || // Normal toolbar
- (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
+ (parent->inherits("TQToolBar") || // Normal toolbar
+ (parent->inherits("TQMainWindow")) )) // Collapsed dock
// Draw a toolbar handle
drawTDEStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
- else if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING))
+ else if (ceData.widgetObjectTypes.contains("TQDockWindowHandle"))
// Draw a dock window handle
drawTDEStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
@@ -686,7 +664,7 @@ void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe,
-void TDEStyle::drawControl( TQ_ControlElement element,
+void TDEStyle::drawControl( ControlElement element,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -875,7 +853,7 @@ void TDEStyle::drawControl( TQ_ControlElement element,
// ------------------------------------------------------------------------
case CE_ProgressBarGroove: {
TQRect fr = subRect(SR_ProgressBarGroove, ceData, elementFlags, widget);
- drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::SO_Default);
+ drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::Default);
break;
}
@@ -1025,9 +1003,9 @@ int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
if (widget
- && !(ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
- && !(ceData.parentWidgetData.widgetObjectTypes.contains(TQMAINWINDOW_OBJECT_NAME_STRING))
- && (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) )
+ && !(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar"))
+ && !(ceData.parentWidgetData.widgetObjectTypes.contains("TQMainWindow"))
+ && (ceData.widgetObjectTypes.contains("TQDockWindowHandle")) )
return widget->fontMetrics().lineSpacing();
else
return TQCommonStyle::pixelMetric(m, ceData, elementFlags, widget);
@@ -1086,7 +1064,7 @@ int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData
// SPLITTER
// ------------------------------------------------------------------------
case PM_SplitterWidth:
- if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWRESIZEHANDLE_OBJECT_NAME_STRING))
+ if (ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
return 8; // ### why do we need 2pix extra?
else
return 6;
@@ -1131,7 +1109,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling;
}
-void TDEStyle::drawComplexControl( TQ_ComplexControl control,
+void TDEStyle::drawComplexControl( ComplexControl control,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -1437,7 +1415,7 @@ void TDEStyle::drawComplexControl( TQ_ComplexControl control,
}
-TQStyle::SubControl TDEStyle::querySubControl( TQ_ComplexControl control,
+TQStyle::SubControl TDEStyle::querySubControl( ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQPoint &pos,
@@ -1455,7 +1433,7 @@ TQStyle::SubControl TDEStyle::querySubControl( TQ_ComplexControl control,
}
-TQRect TDEStyle::querySubControlMetrics( TQ_ComplexControl control,
+TQRect TDEStyle::querySubControlMetrics( ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl sc,
@@ -1875,7 +1853,7 @@ TQPixmap TDEStyle::stylePixmap( StylePixmap stylepixmap,
}
-int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
+int TDEStyle::styleHint( StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQStyleOption &opt, TQStyleHintReturn* shr, const TQWidget* w) const
{
switch (sh)
@@ -1936,7 +1914,7 @@ int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceDat
bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
- if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQObject")) {
TQObject* object = reinterpret_cast<TQObject*>(source);
if ( d->useFilledFrameWorkaround )
{
@@ -1949,17 +1927,17 @@ bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, Cont
// -- Karol.
TQFrame *frame = 0;
if ( event->type() == TQEvent::Paint
- && (frame = ::tqqt_cast<TQFrame*>(object)) )
+ && (frame = ::tqt_cast<TQFrame*>(object)) )
{
if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false;
bool horizontal = true;
TQPaintEvent* pe = (TQPaintEvent*)event;
- TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame );
+ TQToolBar *toolbar = ::tqt_cast< TQToolBar *>( frame );
TQRect r = pe->rect();
- if (toolbar && toolbar->orientation() == Qt::Vertical)
+ if (toolbar && toolbar->orientation() == TQt::Vertical)
horizontal = false;
if (horizontal) {
@@ -2163,7 +2141,7 @@ TQImage TransparencyHandler::handleRealAlpha(TQImage img) {
// Create a shadow of thickness 4.
void TransparencyHandler::createShadowWindows(const TQWidget* p)
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
int x2 = p->x()+p->width();
int y2 = p->y()+p->height();
TQRect shadow1(x2, p->y() + 4, 4, p->height());
@@ -2222,7 +2200,7 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
void TransparencyHandler::removeShadowWindows(const TQWidget* p)
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
ShadowMap::iterator it = shadowMap().find(p);
if (it != shadowMap().end())
{
@@ -2241,7 +2219,7 @@ void TransparencyHandler::removeShadowWindows(const TQWidget* p)
bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
{
-#if !defined Q_WS_MAC && !defined Q_WS_WIN
+#if !defined TQ_WS_MAC && !defined TQ_WS_WIN
// Transparency idea was borrowed from KDE2's "MegaGradient" Style,
// Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
@@ -2339,8 +2317,8 @@ void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQWidget*
return;
// Allow styles to define the blend pixmap - allows for some interesting effects.
- if (::tqqt_cast<TQPopupMenu*>(p))
- tdestyle->renderMenuBlendPixmap( blendPix, cg, ::tqqt_cast<TQPopupMenu*>(p) );
+ if (::tqt_cast<TQPopupMenu*>(p))
+ tdestyle->renderMenuBlendPixmap( blendPix, cg, ::tqt_cast<TQPopupMenu*>(p) );
else
blendPix.fill(cg.button()); // Just tint as the default behavior
@@ -2361,9 +2339,9 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
renderPix.resize( pix.width(), pix.height() );
// Allow styles to define the blend pixmap - allows for some interesting effects.
- if (::tqqt_cast<TQPopupMenu*>(p))
+ if (::tqt_cast<TQPopupMenu*>(p))
tdestyle->renderMenuBlendPixmap( renderPix, p->colorGroup(),
- ::tqqt_cast<TQPopupMenu*>(p) );
+ ::tqt_cast<TQPopupMenu*>(p) );
else
renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior
@@ -2405,13 +2383,9 @@ void TDEStyle::virtual_hook( int, void* )
// HACK for gtk-qt-engine
-extern "C" KDE_EXPORT
+extern "C" TDE_EXPORT
void kde_tdestyle_set_scrollbar_type_windows( void* style )
{
((TDEStyle*)style)->setScrollBarType( TDEStyle::WindowsStyleScrollBar );
}
-
-// vim: set noet ts=4 sw=4:
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
-
#include "tdestyle.moc"
diff --git a/tdefx/tdestyle.h b/tdefx/tdestyle.h
index edcb9eb91..c9cd11f88 100644
--- a/tdefx/tdestyle.h
+++ b/tdefx/tdestyle.h
@@ -56,7 +56,7 @@ struct TDEStylePrivate;
*/
class TDEFX_EXPORT TDEStyle: public TQCommonStyle
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -245,15 +245,15 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::SO_Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
/**
- * This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that
+ * This function is identical to Qt's TQStyle::drawPrimitive(), except that
* it adds one further parameter, 'widget', that can be used to determine
* the widget state of the TDEStylePrimitive in question.
*
* @see TDEStyle::TDEStylePrimitive
- * @see TQStyle::tqdrawPrimitive
+ * @see TQStyle::drawPrimitive
* @see TQStyle::drawComplexControl
*/
virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
@@ -263,7 +263,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
@@ -287,39 +287,26 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
void polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr );
- void drawPrimitive( TQ_PrimitiveElement pe,
+ void drawPrimitive( PrimitiveElement pe,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::SO_Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
-// #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now
-
-// void drawPrimitive( TQ_ControlElement pe,
-// TQPainter* p,
-// const TQStyleControlElementData &ceData,
-// ControlElementFlags elementFlags,
-// const TQRect &r,
-// const TQColorGroup &cg,
-// SFlags flags = Style_Default,
-// const TQStyleOption& = TQStyleOption::SO_Default ) const;
-
-// #endif // USE_QT4
-
- void drawControl( TQ_ControlElement element,
+ void drawControl( ControlElement element,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
- void drawComplexControl( TQ_ComplexControl control,
+ void drawComplexControl( ComplexControl control,
TQPainter *p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -328,21 +315,21 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
- SubControl querySubControl( TQ_ComplexControl control,
+ SubControl querySubControl( ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQPoint &pos,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
- TQRect querySubControlMetrics( TQ_ComplexControl control,
+ TQRect querySubControlMetrics( ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl sc,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
@@ -354,12 +341,12 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
- const TQStyleOption& = TQStyleOption::SO_Default,
+ const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
- int styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData,
+ int styleHint( StyleHint sh, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
- const TQStyleOption &opt = TQStyleOption::SO_Default,
+ const TQStyleOption &opt = TQStyleOption::Default,
TQStyleHintReturn* shr = 0,
const TQWidget* w = 0 ) const;
@@ -376,8 +363,5 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
private:
TDEStylePrivate *d;
};
-
-
-// vim: set noet ts=4 sw=4:
#endif