diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 02:13:42 -0600 |
commit | 520c05ef06ce203ad32470730f68402bc7719157 (patch) | |
tree | 8d0bb18bbbecb4c837e232848905e5819db84b81 /examples/canvas | |
parent | b82553bf90cb5311cfe8e673b07cf6cffc95fd3c (diff) | |
download | tqt3-520c05ef06ce203ad32470730f68402bc7719157.tar.gz tqt3-520c05ef06ce203ad32470730f68402bc7719157.zip |
Automated update from qt3
Diffstat (limited to 'examples/canvas')
-rw-r--r-- | examples/canvas/blendshadow.cpp | 12 | ||||
-rw-r--r-- | examples/canvas/canvas.cpp | 8 | ||||
-rw-r--r-- | examples/canvas/main.cpp | 2 | ||||
-rw-r--r-- | examples/canvas/makeimg.cpp | 30 |
4 files changed, 26 insertions, 26 deletions
diff --git a/examples/canvas/blendshadow.cpp b/examples/canvas/blendshadow.cpp index e4a498b2c..d2f761db0 100644 --- a/examples/canvas/blendshadow.cpp +++ b/examples/canvas/blendshadow.cpp @@ -9,18 +9,18 @@ static inline int blendComponent( int v, int av, int s, int as ) static inline TQRgb blendShade( TQRgb v, TQRgb s ) { //shadow image is already reduced and blurred - int as = qAlpha(s); - int av = qAlpha(v); + int as = tqAlpha(s); + int av = tqAlpha(v); if ( as == 0 || av == 255 ) return v; int a = as + av -(as*av)/255; - int r = blendComponent( qRed(v),av, qRed(s), as)/a; - int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; - int b = blendComponent( qBlue(v),av, qBlue(s), as)/a; + int r = blendComponent( tqRed(v),av, tqRed(s), as)/a; + int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a; + int b = blendComponent( tqBlue(v),av, tqBlue(s), as)/a; - return qRgba(r,g,b,a); + return tqRgba(r,g,b,a); } diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp index 47bc9b6af..86405b51f 100644 --- a/examples/canvas/canvas.cpp +++ b/examples/canvas/canvas.cpp @@ -79,7 +79,7 @@ bool ImageItem::hit( const TQPoint &p ) const if ( !image.valid( ix , iy ) ) return FALSE; TQRgb pixel = image.pixel( ix, iy ); - return qAlpha( pixel ) != 0; + return tqAlpha( pixel ) != 0; } class NodeItem: public TQCanvasEllipse @@ -319,7 +319,7 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) : file->insertSeparator(); file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P); file->insertSeparator(); - file->insertItem("E&xit", qApp, SLOT(quit()), CTRL+Key_Q); + file->insertItem("E&xit", tqApp, SLOT(quit()), CTRL+Key_Q); menu->insertItem("&File", file); TQPopupMenu* edit = new TQPopupMenu( menu ); @@ -409,9 +409,9 @@ void Main::newView() { // Open a new view... have it delete when closed. Main *m = new Main(canvas, 0, 0, WDestructiveClose); - qApp->setMainWidget(m); + tqApp->setMainWidget(m); m->show(); - qApp->setMainWidget(0); + tqApp->setMainWidget(0); } void Main::clear() diff --git a/examples/canvas/main.cpp b/examples/canvas/main.cpp index 4a4c4eff6..92c720d7b 100644 --- a/examples/canvas/main.cpp +++ b/examples/canvas/main.cpp @@ -36,7 +36,7 @@ int main(int argc, char** argv) else m.showMaximized(); - TQObject::connect( qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()) ); + TQObject::connect( tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()) ); return app.exec(); } diff --git a/examples/canvas/makeimg.cpp b/examples/canvas/makeimg.cpp index bc1da57dd..acb90dbde 100644 --- a/examples/canvas/makeimg.cpp +++ b/examples/canvas/makeimg.cpp @@ -13,19 +13,19 @@ static inline int blendComponent( int v, int av, int s, int as ) static inline TQRgb blendShade( TQRgb v, TQRgb s ) { //pick a number: shadow is 1/3 of object - int as = qAlpha(s)/3; - int av = qAlpha(v); + int as = tqAlpha(s)/3; + int av = tqAlpha(v); if ( as == 0 || av == 255 ) return v; int a = as + av -(as*av)/255; - int r = blendComponent( qRed(v),av, qRed(s), as)/a; - int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; - int b = blendComponent( qBlue(v),av, qBlue(s), as)/a; + int r = blendComponent( tqRed(v),av, tqRed(s), as)/a; + int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a; + int b = blendComponent( tqBlue(v),av, tqBlue(s), as)/a; - return qRgba(r,g,b,a); + return tqRgba(r,g,b,a); } int main( int*, char**) @@ -44,9 +44,9 @@ int main( int*, char**) uint *line = (uint*)img->scanLine( y ); for ( int x = 0; x < w; x++ ) { uint pixel = line[x]; - int r = qRed(pixel); - int g = qGreen(pixel); - int b = qBlue(pixel); + int r = tqRed(pixel); + int g = tqGreen(pixel); + int b = tqBlue(pixel); int min = TQMIN( r, TQMIN( g, b ) ); int max = TQMAX( r, TQMAX( g, b ) ); r -= min; @@ -59,7 +59,7 @@ int main( int*, char**) } int a = 255-min; a -= (max-min)/3; //hack more transparency for colors. - line[x] = qRgba( r, g, b, a ); + line[x] = tqRgba( r, g, b, a ); } } #endif @@ -77,13 +77,13 @@ int main( int*, char**) for ( int x = 0; x < w; x++ ) { TQRgb shader = img->pixel( x, y ); - int as = qAlpha(shader)/3; + int as = tqAlpha(shader)/3; - int r = (qRed(shader)*(255-as))/255; - int g = (qGreen(shader)*(255-as))/255; - int b = (qBlue(shader)*(255-as))/255; + int r = (tqRed(shader)*(255-as))/255; + int g = (tqGreen(shader)*(255-as))/255; + int b = (tqBlue(shader)*(255-as))/255; - img2->setPixel( x, y, qRgba(r,g,b,as) ); + img2->setPixel( x, y, tqRgba(r,g,b,as) ); } } |