Automated update from qt3

pull/1/head
Timothy Pearson 12 years ago
parent b82553bf90
commit 520c05ef06

@ -1782,7 +1782,7 @@
excessive invalid QInputContext::unsetFocus(). excessive invalid QInputContext::unsetFocus().
QWidget::deactivateWidgetCleanup() handles QWidget::deactivateWidgetCleanup() handles
unfocusInputContext() appropriately via unfocusInputContext() appropriately via
qApp->setActiveWindow( 0 ). tqApp->setActiveWindow( 0 ).
2004-06-08 YamaKen <yamaken@bp.iij4u.or.jp> 2004-06-08 YamaKen <yamaken@bp.iij4u.or.jp>

@ -336,7 +336,7 @@ feedback as the drag progresses, to start timers, to scroll the
window, or whatever is appropriate (don't forget to stop the scrolling window, or whatever is appropriate (don't forget to stop the scrolling
and timers in a dragLeaveEvent() though). and timers in a dragLeaveEvent() though).
The QApplication object (available as the \c qApp global) also The QApplication object (available as the \c tqApp global) also
provides some drag and drop related functions: provides some drag and drop related functions:
\l{QApplication::setStartDragTime()}, \l{QApplication::setStartDragTime()},
\l{QApplication::setStartDragDistance()}, and their corresponding \l{QApplication::setStartDragDistance()}, and their corresponding

@ -141,7 +141,7 @@ void <a name="f264"></a>ABMainWindow::setupMenuBar()
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P );
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Close", this, SLOT( closeWindow() ), CTRL + Key_W ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Close", this, SLOT( closeWindow() ), CTRL + Key_W );
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", qApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ), CTRL + Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", tqApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ), CTRL + Key_Q );
} }
void <a name="f265"></a>ABMainWindow::setupFileTools() void <a name="f265"></a>ABMainWindow::setupFileTools()

@ -614,7 +614,7 @@ void <a name="f604"></a>ChartForm::fileQuit()
{ {
if ( okToClear() ) { if ( okToClear() ) {
saveOptions(); saveOptions();
<a name="x2875"></a> qApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 ); <a name="x2875"></a> tqApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 );
} }
} }

@ -214,7 +214,7 @@ bool <a name="f624"></a>ImageItem::hit( const <a href="ntqpoint.html">TQPoint</a
<a name="x2934"></a> if ( !image.<a href="ntqimage.html#valid">valid</a>( ix , iy ) ) <a name="x2934"></a> if ( !image.<a href="ntqimage.html#valid">valid</a>( ix , iy ) )
return FALSE; return FALSE;
<a name="x2933"></a> TQRgb pixel = image.<a href="ntqimage.html#pixel">pixel</a>( ix, iy ); <a name="x2933"></a> TQRgb pixel = image.<a href="ntqimage.html#pixel">pixel</a>( ix, iy );
return qAlpha( pixel ) != 0; return tqAlpha( pixel ) != 0;
} }
class NodeItem: public <a href="qcanvasellipse.html">TQCanvasEllipse</a> class NodeItem: public <a href="qcanvasellipse.html">TQCanvasEllipse</a>
@ -454,7 +454,7 @@ static TQImage *logoimg;
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Print...", this, SLOT(print()), CTRL+Key_P); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Print...", this, SLOT(print()), CTRL+Key_P);
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("E&amp;xit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("E&amp;xit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q);
menu-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;File", file); menu-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;File", file);
<a href="ntqpopupmenu.html">TQPopupMenu</a>* edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); <a href="ntqpopupmenu.html">TQPopupMenu</a>* edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu );
@ -544,9 +544,9 @@ void <a name="f627"></a>Main::newView()
{ {
// Open a new view... have it delete when closed. // Open a new view... have it delete when closed.
Main *m = new Main(canvas, 0, 0, WDestructiveClose); Main *m = new Main(canvas, 0, 0, WDestructiveClose);
qApp-&gt;<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(m); tqApp-&gt;<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(m);
m-&gt;<a href="ntqwidget.html#show">show</a>(); m-&gt;<a href="ntqwidget.html#show">show</a>();
qApp-&gt;<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(0); tqApp-&gt;<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(0);
} }
void <a name="f628"></a>Main::clear() void <a name="f628"></a>Main::clear()
@ -922,7 +922,7 @@ int main(int argc, char** argv)
else else
<a name="x2968"></a> m.<a href="ntqwidget.html#showMaximized">showMaximized</a>(); <a name="x2968"></a> m.<a href="ntqwidget.html#showMaximized">showMaximized</a>();
TQObject::<a href="ntqobject.html#connect">connect</a>( qApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); TQObject::<a href="ntqobject.html#connect">connect</a>( tqApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
return app.<a href="ntqapplication.html#exec">exec</a>(); return app.<a href="ntqapplication.html#exec">exec</a>();
} }

@ -402,7 +402,7 @@ void <a name="f156"></a>ChartForm::fileQuit()
{ {
if ( okToClear() ) { if ( okToClear() ) {
saveOptions(); saveOptions();
<a name="x2875"></a> qApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 ); <a name="x2875"></a> tqApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 );
} }
} }

@ -170,7 +170,7 @@ public:
connect( server, SIGNAL(newConnect(ClientSocket*)), connect( server, SIGNAL(newConnect(ClientSocket*)),
SLOT(newConnect(ClientSocket*)) ); SLOT(newConnect(ClientSocket*)) );
connect( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, connect( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp,
SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
} }
@ -249,7 +249,7 @@ public:
<a name="x792"></a> connect( send, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(sendToServer()) ); <a name="x792"></a> connect( send, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(sendToServer()) );
connect( close, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(closeConnection()) ); connect( close, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(closeConnection()) );
connect( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); connect( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
// create the socket and connect various of its signals // create the socket and connect various of its signals
socket = new <a href="ntqsocket.html">TQSocket</a>( this ); socket = new <a href="ntqsocket.html">TQSocket</a>( this );

@ -163,7 +163,7 @@ void rotate()
const int h = 64; const int h = 64;
<a href="ntqimage.html">TQImage</a> image( w, h, 8, 128 ); // create image <a href="ntqimage.html">TQImage</a> image( w, h, 8, 128 ); // create image
for ( i=0; i&lt;128; i++ ) // build color table for ( i=0; i&lt;128; i++ ) // build color table
<a name="x1730"></a> image.<a href="ntqimage.html#setColor">setColor</a>( i, qRgb(i,0,0) ); <a name="x1730"></a> image.<a href="ntqimage.html#setColor">setColor</a>( i, tqRgb(i,0,0) );
for ( int y=0; y&lt;h; y++ ) { // set image pixels for ( int y=0; y&lt;h; y++ ) { // set image pixels
<a name="x1729"></a> uchar *p = image.<a href="ntqimage.html#scanLine">scanLine</a>(y); <a name="x1729"></a> uchar *p = image.<a href="ntqimage.html#scanLine">scanLine</a>(y);
for ( int x=0; x&lt;w; x++ ) for ( int x=0; x&lt;w; x++ )
@ -303,7 +303,7 @@ void desktopWidget( const char *s = "Trolltech" )
{ {
DesktopWidget *t = new DesktopWidget(s); DesktopWidget *t = new DesktopWidget(s);
t-&gt;<a href="ntqwidget.html#update">update</a>(); t-&gt;<a href="ntqwidget.html#update">update</a>();
qApp-&gt;<a href="ntqapplication.html#exec">exec</a>(); tqApp-&gt;<a href="ntqapplication.html#exec">exec</a>();
delete t; delete t;
} }
@ -311,7 +311,7 @@ void desktopText( const char *s = "Trolltech" )
{ {
const int border = 20; const int border = 20;
<a name="x1723"></a> <a href="ntqcolor.html">TQColor</a> c1 = qApp-&gt;<a href="ntqapplication.html#palette">palette</a>().inactive().background(); <a name="x1723"></a> <a href="ntqcolor.html">TQColor</a> c1 = tqApp-&gt;<a href="ntqapplication.html#palette">palette</a>().inactive().background();
<a href="ntqcolor.html">TQColor</a> c2 = c1.<a href="ntqcolor.html#light">light</a>(104); <a href="ntqcolor.html">TQColor</a> c2 = c1.<a href="ntqcolor.html#light">light</a>(104);
<a href="ntqcolor.html">TQColor</a> c3 = c1.<a href="ntqcolor.html#dark">dark</a>(106); <a href="ntqcolor.html">TQColor</a> c3 = c1.<a href="ntqcolor.html#dark">dark</a>(106);
@ -322,8 +322,8 @@ void desktopText( const char *s = "Trolltech" )
<a name="x1738"></a> <a href="ntqrect.html">TQRect</a> r = p.<a href="ntqpainter.html#fontMetrics">fontMetrics</a>().boundingRect( s ); <a name="x1738"></a> <a href="ntqrect.html">TQRect</a> r = p.<a href="ntqpainter.html#fontMetrics">fontMetrics</a>().boundingRect( s );
p.<a href="ntqpainter.html#end">end</a>(); p.<a href="ntqpainter.html#end">end</a>();
int appWidth = qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;width(); int appWidth = tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;width();
int appHeight = qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;height(); int appHeight = tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;height();
if ( r.<a href="ntqrect.html#width">width</a>() &gt; appWidth - border*2 ) if ( r.<a href="ntqrect.html#width">width</a>() &gt; appWidth - border*2 )
<a name="x1753"></a> r.<a href="ntqrect.html#setWidth">setWidth</a>( appWidth - border*2 ); <a name="x1753"></a> r.<a href="ntqrect.html#setWidth">setWidth</a>( appWidth - border*2 );
if ( r.<a href="ntqrect.html#height">height</a>() &gt; appHeight - border*2 ) if ( r.<a href="ntqrect.html#height">height</a>() &gt; appHeight - border*2 )
@ -335,7 +335,7 @@ void desktopText( const char *s = "Trolltech" )
drawShadeText( &amp;p, -r.<a href="ntqrect.html#x">x</a>() + border, -r.<a href="ntqrect.html#y">y</a>() + border, s, c2, c3 ); drawShadeText( &amp;p, -r.<a href="ntqrect.html#x">x</a>() + border, -r.<a href="ntqrect.html#y">y</a>() + border, s, c2, c3 );
p.<a href="ntqpainter.html#end">end</a>(); p.<a href="ntqpainter.html#end">end</a>();
qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;setBackgroundPixmap( pm ); tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;setBackgroundPixmap( pm );
} }
// //

@ -772,7 +772,7 @@ void <a name="f305"></a>TQtFileIconView::newDirectory()
<a name="x849"></a> item-&gt;<a href="qiconviewitem.html#setSelected">setSelected</a>( TRUE, TRUE ); <a name="x849"></a> item-&gt;<a href="qiconviewitem.html#setSelected">setSelected</a>( TRUE, TRUE );
<a href="ntqiconview.html#setCurrentItem">setCurrentItem</a>( item ); <a href="ntqiconview.html#setCurrentItem">setCurrentItem</a>( item );
<a href="ntqiconview.html#repaintItem">repaintItem</a>( item ); <a href="ntqiconview.html#repaintItem">repaintItem</a>( item );
<a name="x808"></a> qApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>(); <a name="x808"></a> tqApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>();
<a name="x845"></a> item-&gt;<a href="qiconviewitem.html#rename">rename</a>(); <a name="x845"></a> item-&gt;<a href="qiconviewitem.html#rename">rename</a>();
} }
<a href="ntqiconview.html#setAutoArrange">setAutoArrange</a>( TRUE ); <a href="ntqiconview.html#setAutoArrange">setAutoArrange</a>( TRUE );

@ -174,7 +174,7 @@ private:
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Print"), this, SLOT( print() ), CTRL+Key_P ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Print"), this, SLOT( print() ), CTRL+Key_P );
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Close"), this, SLOT( <a href="ntqwidget.html#close">close</a>() ), CTRL+Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Close"), this, SLOT( <a href="ntqwidget.html#close">close</a>() ), CTRL+Key_Q );
<a name="x980"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), qApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_X ); <a name="x980"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), tqApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_X );
// The same three icons are used twice each. // The same three icons are used twice each.
<a href="ntqiconset.html">TQIconSet</a> icon_back( TQPixmap("back.xpm") ); <a href="ntqiconset.html">TQIconSet</a> icon_back( TQPixmap("back.xpm") );

@ -145,7 +145,7 @@ public:
connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) ); connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) );
connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) ); connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) );
connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) ); connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) );
<a name="x724"></a> connect( quit, SIGNAL(<a href="ntqbutton.html#pressed">pressed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a name="x724"></a> connect( quit, SIGNAL(<a href="ntqbutton.html#pressed">pressed</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
} }
~HttpInfo() ~HttpInfo()

@ -112,7 +112,7 @@ private:
<a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>(central); <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>(central);
<a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>(this); <a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>(this);
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()),
<a name="x1921"></a> TQAccel::<a href="ntqaccel.html#stringToKey">stringToKey</a>(<a href="ntqobject.html#tr">tr</a>("Ctrl+Q")) ); <a name="x1921"></a> TQAccel::<a href="ntqaccel.html#stringToKey">stringToKey</a>(<a href="ntqobject.html#tr">tr</a>("Ctrl+Q")) );
<a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem( <a href="ntqobject.html#tr">tr</a>("&amp;File"), file ); <a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem( <a href="ntqobject.html#tr">tr</a>("&amp;File"), file );
@ -229,7 +229,7 @@ MyWidget* showLang(TQString lang)
static TQTranslator *translator = 0; static TQTranslator *translator = 0;
<a name="x1934"></a> qApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); <a name="x1934"></a> tqApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64)));
lang = "mywidget_" + lang + ".qm"; lang = "mywidget_" + lang + ".qm";
<a href="ntqfileinfo.html">TQFileInfo</a> fi( lang ); <a href="ntqfileinfo.html">TQFileInfo</a> fi( lang );
@ -241,12 +241,12 @@ MyWidget* showLang(TQString lang)
return 0; return 0;
} }
if ( translator ) { if ( translator ) {
<a name="x1932"></a> qApp-&gt;<a href="ntqapplication.html#removeTranslator">removeTranslator</a>( translator ); <a name="x1932"></a> tqApp-&gt;<a href="ntqapplication.html#removeTranslator">removeTranslator</a>( translator );
delete translator; delete translator;
} }
translator = new <a href="ntqtranslator.html">TQTranslator</a>( 0 ); translator = new <a href="ntqtranslator.html">TQTranslator</a>( 0 );
<a name="x1950"></a> translator-&gt;<a href="ntqtranslator.html#load">load</a>( lang, "." ); <a name="x1950"></a> translator-&gt;<a href="ntqtranslator.html#load">load</a>( lang, "." );
<a name="x1930"></a> qApp-&gt;<a href="ntqapplication.html#installTranslator">installTranslator</a>( translator ); <a name="x1930"></a> tqApp-&gt;<a href="ntqapplication.html#installTranslator">installTranslator</a>( translator );
MyWidget *m = new MyWidget; MyWidget *m = new MyWidget;
<a name="x1951"></a> m-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - <a href="i18n.html#i18n">i18n</a> - " + m-&gt;<a href="ntqwidget.html#caption">caption</a>() ); <a name="x1951"></a> m-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - <a href="i18n.html#i18n">i18n</a> - " + m-&gt;<a href="ntqwidget.html#caption">caption</a>() );
return m; return m;
@ -284,7 +284,7 @@ int main( int argc, char** argv )
<a name="x1936"></a> r = dlg.<a href="ntqdialog.html#exec">exec</a>(); <a name="x1936"></a> r = dlg.<a href="ntqdialog.html#exec">exec</a>();
} }
if ( r ) { if ( r ) {
<a name="x1928"></a> <a href="ntqrect.html">TQRect</a> screen = qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;availableGeometry(); <a name="x1928"></a> <a href="ntqrect.html">TQRect</a> screen = tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;availableGeometry();
bool tight = screen.<a href="ntqrect.html#width">width</a>() &lt; 1024; bool tight = screen.<a href="ntqrect.html#width">width</a>() &lt; 1024;
<a name="x1942"></a> int x=screen.<a href="ntqrect.html#left">left</a>()+5; <a name="x1942"></a> int x=screen.<a href="ntqrect.html#left">left</a>()+5;
int y=screen.<a href="ntqrect.html#top">top</a>()+25; int y=screen.<a href="ntqrect.html#top">top</a>()+25;
@ -293,7 +293,7 @@ int main( int argc, char** argv )
MyWidget* w = showLang((const char*)qm[i]); MyWidget* w = showLang((const char*)qm[i]);
if( w == 0 ) exit( 0 ); if( w == 0 ) exit( 0 );
TQObject::<a href="ntqobject.html#connect">connect</a>(w, SIGNAL(closed()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); TQObject::<a href="ntqobject.html#connect">connect</a>(w, SIGNAL(closed()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
<a name="x1953"></a> w-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>(x,y,197,356); <a name="x1953"></a> w-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>(x,y,197,356);
w-&gt;<a href="ntqwidget.html#show">show</a>(); w-&gt;<a href="ntqwidget.html#show">show</a>();
if ( tight ) { if ( tight ) {

@ -204,7 +204,7 @@ directly:
void same_global_function( LoginWidget *logwid ) void same_global_function( LoginWidget *logwid )
{ {
<a href="ntqlabel.html">TQLabel</a> *label = new <a href="ntqlabel.html">TQLabel</a>( <a href="ntqlabel.html">TQLabel</a> *label = new <a href="ntqlabel.html">TQLabel</a>(
qApp-&gt;<a href="ntqapplication.html#translate">translate</a>("LoginWidget", "Password:"), tqApp-&gt;<a href="ntqapplication.html#translate">translate</a>("LoginWidget", "Password:"),
logwid ); logwid );
} }
</pre> </pre>
@ -240,7 +240,7 @@ The macros expand to just the text (without the context).
<a href="ntqstring.html">TQString</a> global_greeting( int greet_type ) <a href="ntqstring.html">TQString</a> global_greeting( int greet_type )
{ {
return qApp-&gt;<a href="ntqapplication.html#translate">translate</a>( "FriendlyConversation", return tqApp-&gt;<a href="ntqapplication.html#translate">translate</a>( "FriendlyConversation",
greeting_strings[greet_type] ); greeting_strings[greet_type] );
} }
</pre> </pre>

@ -76,7 +76,7 @@ public:
<a name="x540"></a> menubar-&gt;<a href="ntqmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle ); <a name="x540"></a> menubar-&gt;<a href="ntqmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle );
<a href="ntqpopupmenu.html">TQPopupMenu</a>* popup; <a href="ntqpopupmenu.html">TQPopupMenu</a>* popup;
popup = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); popup = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
popup-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); popup-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;File", popup ); menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;File", popup );
// ...and tell the layout about it. // ...and tell the layout about it.

@ -102,7 +102,7 @@ body { background: #ffffff; color: black; }
rbh = new TQRadioButton( tr("Enabled", "Hue frame"), this ); rbh = new TQRadioButton( tr("Enabled", "Hue frame"), this );
</pre> </pre>
<!-- index Ctrl Key --><p>Ctrl key accelerators are also translatable:</p> <!-- index Ctrl Key --><p>Ctrl key accelerators are also translatable:</p>
<pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), <pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()),
<a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") ); <a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") );
</pre> </pre>
<p>It is strongly recommended that the two argument form of <tt>tr()</tt> is used for Ctrl key accelerators. The second argument is the only clue the translator has as to the function performed by the accelerator.</p> <p>It is strongly recommended that the two argument form of <tt>tr()</tt> is used for Ctrl key accelerators. The second argument is the only clue the translator has as to the function performed by the accelerator.</p>
@ -136,7 +136,7 @@ body { background: #ffffff; color: black; }
void same_global_function( LoginWidget *logwid ) void same_global_function( LoginWidget *logwid )
{ {
TQLabel *label = new TQLabel( TQLabel *label = new TQLabel(
qApp-&gt;translate("LoginWidget", "Password:"), tqApp-&gt;translate("LoginWidget", "Password:"),
logwid ); logwid );
} }
</pre> </pre>
@ -167,7 +167,7 @@ body { background: #ffffff; color: black; }
TQString global_greeting( int greet_type ) TQString global_greeting( int greet_type )
{ {
return qApp-&gt;translate( "FriendlyConversation", return tqApp-&gt;translate( "FriendlyConversation",
greeting_strings[greet_type] ); greeting_strings[greet_type] );
} }
</pre> </pre>
@ -317,7 +317,7 @@ TRANSLATIONS = tt2_fr.ts \
</pre> </pre>
<!-- index TQ_OBJECT --><!-- index tr() --><!-- index TQObject!tr() --><!-- index Translation Contexts --><!-- index Contexts!for Translation --> <p>When <a href="linguist-manual-2.html#2">lupdate</a> is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the <tt>ArrowPad</tt> class. The <tt>TQ_OBJECT</tt> macro defines <tt>tr(x)</tt> in <tt>ArrowPad</tt> like this</p> <!-- index TQ_OBJECT --><!-- index tr() --><!-- index TQObject!tr() --><!-- index Translation Contexts --><!-- index Contexts!for Translation --> <p>When <a href="linguist-manual-2.html#2">lupdate</a> is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the <tt>ArrowPad</tt> class. The <tt>TQ_OBJECT</tt> macro defines <tt>tr(x)</tt> in <tt>ArrowPad</tt> like this</p>
<!-- index TQApplication!translate() --><!-- index translate()!TQApplication --><pre> <!-- index TQApplication!translate() --><!-- index translate()!TQApplication --><pre>
qApp-&gt;translate( "ArrowPad", x ) tqApp-&gt;translate( "ArrowPad", x )
</pre> </pre>
<p>Knowing which class each source text appears in enables <em>TQt Linguist</em> to group texts that are logically related together, e.g. all the text in a dialog will have the context of the dialog's class name and will be shown together. This provides useful information for the translator since the context in which text appears may influence how it should be translated. For some translations keyboard accelerators may need to be changed and having all the source texts in a particular context (class) grouped together makes it easier for the translator to perform any accelerator changes without introducing conflicts.</p> <p>Knowing which class each source text appears in enables <em>TQt Linguist</em> to group texts that are logically related together, e.g. all the text in a dialog will have the context of the dialog's class name and will be shown together. This provides useful information for the translator since the context in which text appears may influence how it should be translated. For some translations keyboard accelerators may need to be changed and having all the source texts in a particular context (class) grouped together makes it easier for the translator to perform any accelerator changes without introducing conflicts.</p>
<p>In <tt>arrowpad.cpp</tt> we implement the <tt>ArrowPad</tt> class.</p> <p>In <tt>arrowpad.cpp</tt> we implement the <tt>ArrowPad</tt> class.</p>
@ -336,7 +336,7 @@ TRANSLATIONS = tt2_fr.ts \
<pre> ArrowPad *ap = new ArrowPad( this, "arrow pad" ); <pre> ArrowPad *ap = new ArrowPad( this, "arrow pad" );
</pre> </pre>
<p>We also call <tt>MainWindow::tr()</tt> twice, once for the menu item and once for the accelerator.</p> <p>We also call <tt>MainWindow::tr()</tt> twice, once for the menu item and once for the accelerator.</p>
<!-- index Ctrl Key --><!-- index Alt Key --><pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), <!-- index Ctrl Key --><!-- index Alt Key --><pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()),
<a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") ); <a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") );
</pre> </pre>
<p>Note the use of <tt>tr()</tt> to support different keys in other languages. "Ctrl+Q" is a good choice for Quit in English, but a Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a German translator "Strg+E" (for Beenden). When using <tt>tr()</tt> for Ctrl key accelerators, the two argument form should be used with the second argument describing the function that the accelerator performs.</p> <p>Note the use of <tt>tr()</tt> to support different keys in other languages. "Ctrl+Q" is a good choice for Quit in English, but a Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a German translator "Strg+E" (for Beenden). When using <tt>tr()</tt> for Ctrl key accelerators, the two argument form should be used with the second argument describing the function that the accelerator performs.</p>
@ -452,7 +452,7 @@ TRANSLATIONS = tt3_pt.ts
<pre> <a href="ntqwidget.html#setCaption">setCaption</a>( <a href="ntqobject.html#tr">tr</a>("Troll Print 1.0") ); <pre> <a href="ntqwidget.html#setCaption">setCaption</a>( <a href="ntqobject.html#tr">tr</a>("Troll Print 1.0") );
</pre> </pre>
<p>We must translate the window's caption.</p> <p>We must translate the window's caption.</p>
<pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), <pre> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("E&amp;xit"), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()),
<a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") ); <a href="ntqobject.html#tr">tr</a>("Ctrl+Q", "Quit") );
<a href="ntqpopupmenu.html">TQPopupMenu</a> *help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); <a href="ntqpopupmenu.html">TQPopupMenu</a> *help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
help-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;About"), this, SLOT(about()), Key_F1 ); help-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;About"), this, SLOT(about()), Key_F1 );

@ -220,7 +220,7 @@ void <a name="f300"></a>Smtp::readyRead()
return; return;
} else { } else {
// something broke. // something broke.
<a name="x708"></a><a name="x704"></a> TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( qApp-&gt;<a href="ntqapplication.html#activeWindow">activeWindow</a>(), <a name="x708"></a><a name="x704"></a> TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( tqApp-&gt;<a href="ntqapplication.html#activeWindow">activeWindow</a>(),
<a href="ntqobject.html#tr">tr</a>( "TQt Mail Example" ), <a href="ntqobject.html#tr">tr</a>( "TQt Mail Example" ),
<a href="ntqobject.html#tr">tr</a>( "Unexpected reply from SMTP server:\n\n" ) + <a href="ntqobject.html#tr">tr</a>( "Unexpected reply from SMTP server:\n\n" ) +
response ); response );

@ -233,7 +233,7 @@ const char * filePrintText = "Click this button to print the file you "
#endif #endif
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(closeWindow()), CTRL+Key_W ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(closeWindow()), CTRL+Key_W );
<a name="x2020"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q ); <a name="x2020"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q );
windowsMenu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); windowsMenu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
<a name="x2049"></a> windowsMenu-&gt;<a href="ntqpopupmenu.html#setCheckable">setCheckable</a>( TRUE ); <a name="x2049"></a> windowsMenu-&gt;<a href="ntqpopupmenu.html#setCheckable">setCheckable</a>( TRUE );

@ -242,7 +242,7 @@ private:
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Print", print, CTRL+Key_P ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Print", print, CTRL+Key_P );
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "E&amp;xit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "E&amp;xit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q );
<a href="ntqpopupmenu.html">TQPopupMenu</a> *edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); <a href="ntqpopupmenu.html">TQPopupMenu</a> *edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
<a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( edit ); <a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( edit );

@ -97,7 +97,7 @@ int main( int argc, char **argv )
: <a href="ntqmainwindow.html">TQMainWindow</a>( 0, "mainwindow" ) : <a href="ntqmainwindow.html">TQMainWindow</a>( 0, "mainwindow" )
{ {
<a href="ntqpopupmenu.html">TQPopupMenu</a> *filemenu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); <a href="ntqpopupmenu.html">TQPopupMenu</a> *filemenu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
filemenu-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Quit"), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); filemenu-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( <a href="ntqobject.html#tr">tr</a>("&amp;Quit"), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem( <a href="ntqobject.html#tr">tr</a>("&amp;File"), filemenu ); <a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem( <a href="ntqobject.html#tr">tr</a>("&amp;File"), filemenu );
<a href="ntqmainwindow.html#statusBar">statusBar</a>()-&gt;message( <a href="ntqobject.html#tr">tr</a>("This is a TQMainWindow with an XmText widget.") ); <a href="ntqmainwindow.html#statusBar">statusBar</a>()-&gt;message( <a href="ntqobject.html#tr">tr</a>("This is a TQMainWindow with an XmText widget.") );

@ -292,7 +292,7 @@ void <a name="f259"></a>MovieStarter::startMovie(const <a href="ntqstring.html">
<a name="x495"></a>void MovieStarter::<a href="ntqdialog.html#done">done</a>( int r ) <a name="x495"></a>void MovieStarter::<a href="ntqdialog.html#done">done</a>( int r )
{ {
if (r != Accepted) if (r != Accepted)
qApp-&gt;<a href="ntqapplication.html#quit">quit</a>(); // end on Cancel tqApp-&gt;<a href="ntqapplication.html#quit">quit</a>(); // end on Cancel
<a href="ntqdialog.html#setResult">setResult</a>( r ); <a href="ntqdialog.html#setResult">setResult</a>( r );
// And don't hide. // And don't hide.
@ -317,7 +317,7 @@ int main(int argc, char **argv)
(void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0, (void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0,
TQt::WDestructiveClose); TQt::WDestructiveClose);
} }
TQObject::<a href="ntqobject.html#connect">connect</a>(qApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); TQObject::<a href="ntqobject.html#connect">connect</a>(tqApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
} else { } else {
// "GUI" mode - open a chooser for movies // "GUI" mode - open a chooser for movies
// //

@ -696,10 +696,10 @@ entry in the file menu as shown in the following code example:
<p> <pre> <p> <pre>
// the "Quit" menu entry should try to close all windows // the "Quit" menu entry should try to close all windows
<a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); <a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT(<a href="#closeAllWindows">closeAllWindows</a>()), CTRL+Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT(<a href="#closeAllWindows">closeAllWindows</a>()), CTRL+Key_Q );
// when the last window is closed, the application should quit // when the last window is closed, the application should quit
<a href="ntqobject.html#connect">connect</a>( qApp, SIGNAL( <a href="#lastWindowClosed">lastWindowClosed</a>() ), qApp, SLOT( <a href="#quit">quit</a>() ) ); <a href="ntqobject.html#connect">connect</a>( tqApp, SIGNAL( <a href="#lastWindowClosed">lastWindowClosed</a>() ), tqApp, SLOT( <a href="#quit">quit</a>() ) );
</pre> </pre>
<p> The windows are closed in random order, until one window does not <p> The windows are closed in random order, until one window does not
@ -1027,8 +1027,8 @@ reimplementing this virtual function is just one of them. All five
approaches are listed below: approaches are listed below:
<ol type=1> <ol type=1>
<li> Reimplementing this function. This is very powerful, providing <li> Reimplementing this function. This is very powerful, providing
complete control; but only one subclass can be qApp. complete control; but only one subclass can be tqApp.
<p> <li> Installing an event filter on qApp. Such an event filter is able <p> <li> Installing an event filter on tqApp. Such an event filter is able
to process all events for all widgets, so it's just as powerful as to process all events for all widgets, so it's just as powerful as
reimplementing <a href="#notify">notify</a>(); furthermore, it's possible to have more reimplementing <a href="#notify">notify</a>(); furthermore, it's possible to have more
than one application-global event filter. Global event filters even than one application-global event filter. Global event filters even
@ -1126,7 +1126,7 @@ you also often connect e.g. <a href="ntqbutton.html#clicked">TQButton::clicked</
<p> Example: <p> Example:
<pre> <pre>
<a href="ntqpushbutton.html">TQPushButton</a> *quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit" );
<a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="#quit">quit</a>()) );
</pre> </pre>
<p> <p>See also <a href="#exit">exit</a>(), <a href="#aboutToQuit">aboutToQuit</a>(), <a href="#lastWindowClosed">lastWindowClosed</a>(), and <a href="ntqaction.html">TQAction</a>. <p> <p>See also <a href="#exit">exit</a>(), <a href="#aboutToQuit">aboutToQuit</a>(), <a href="#lastWindowClosed">lastWindowClosed</a>(), and <a href="ntqaction.html">TQAction</a>.

@ -92,7 +92,7 @@ body { background: #ffffff; color: black; }
<li class=fn>TQRgb <a href="#qRgb"><b>qRgb</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li> <li class=fn>TQRgb <a href="#qRgb"><b>qRgb</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>TQRgb <a href="#qRgba"><b>qRgba</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )</li> <li class=fn>TQRgb <a href="#qRgba"><b>qRgba</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )</li>
<li class=fn>int <a href="#qGray"><b>qGray</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li> <li class=fn>int <a href="#qGray"><b>qGray</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>int <a href="#qGray-2"><b>qGray</b></a> ( qRgb&nbsp;rgb )</li> <li class=fn>int <a href="#qGray-2"><b>qGray</b></a> ( tqRgb&nbsp;rgb )</li>
</ul> </ul>
<hr><a name="details"></a><h2>Detailed Description</h2> <hr><a name="details"></a><h2>Detailed Description</h2>
@ -569,7 +569,7 @@ Reads a color object, <em>c</em>, from the stream, <em>s</em>.
<p> The gray value is calculated using the formula (r*11 + g*16 + <p> The gray value is calculated using the formula (r*11 + g*16 +
b*5)/32. b*5)/32.
<h3 class=fn>int <a name="qGray-2"></a>qGray ( qRgb&nbsp;rgb ) <h3 class=fn>int <a name="qGray-2"></a>qGray ( tqRgb&nbsp;rgb )
</h3> </h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> <p>

@ -229,7 +229,7 @@ should translate it first, for example:
TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>( TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>(
this, this,
tr("Open failed"), tr("Open failed"),
tr("Could not open file for reading: %1").arg( qApp-&gt;<a href="ntqapplication.html#translate">translate</a>("TQFile",f.<a href="#errorString">errorString</a>()) ) tr("Could not open file for reading: %1").arg( tqApp-&gt;<a href="ntqapplication.html#translate">translate</a>("TQFile",f.<a href="#errorString">errorString</a>()) )
); );
return; return;
} }

@ -92,7 +92,7 @@ in child widgets.
// This will fill the colormap with colors ranging from // This will fill the colormap with colors ranging from
// black to white. // black to white.
for ( int i = 0; i &lt; colormap.<a href="#size">size</a>(); i++ ) for ( int i = 0; i &lt; colormap.<a href="#size">size</a>(); i++ )
colormap.<a href="#setEntry">setEntry</a>( i, qRgb( i, i, i ) ); colormap.<a href="#setEntry">setEntry</a>( i, tqRgb( i, i, i ) );
widget.setColormap( colormap ); widget.setColormap( colormap );
widget.show(); widget.show();

@ -182,7 +182,7 @@ because they have a single byte per pixel:
<p> <pre> <p> <pre>
TQImage image; TQImage image;
// set entry 19 in the color table to yellow // set entry 19 in the color table to yellow
image.<a href="#setColor">setColor</a>( 19, qRgb(255,255,0) ); image.<a href="#setColor">setColor</a>( 19, tqRgb(255,255,0) );
// set 8 bit pixel at (x,y) to value yellow (in color table) // set 8 bit pixel at (x,y) to value yellow (in color table)
*(image.<a href="#scanLine">scanLine</a>(y) + x) = 19; *(image.<a href="#scanLine">scanLine</a>(y) + x) = 19;
</pre> </pre>

@ -126,7 +126,7 @@ TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
this, "progress", TRUE ); this, "progress", TRUE );
for ( int i = 0; i &lt; numFiles; i++ ) { for ( int i = 0; i &lt; numFiles; i++ ) {
progress.setProgress( i ); progress.setProgress( i );
qApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>(); tqApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>();
if ( progress.wasCanceled() ) if ( progress.wasCanceled() )
break; break;

@ -114,10 +114,10 @@ call <a href="ntqapplication.html#processEvents">TQApplication::processEvents</a
splash-&gt;<a href="ntqwidget.html#show">show</a>(); splash-&gt;<a href="ntqwidget.html#show">show</a>();
... // Loading some items ... // Loading some items
splash-&gt;<a href="#message">message</a>( "Loaded modules" ); splash-&gt;<a href="#message">message</a>( "Loaded modules" );
qApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>(); tqApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>();
... // Establishing connections ... // Establishing connections
splash-&gt;<a href="#message">message</a>( "Established connections" ); splash-&gt;<a href="#message">message</a>( "Established connections" );
qApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>(); tqApp-&gt;<a href="ntqapplication.html#processEvents">processEvents</a>();
</pre> </pre>
<p> <p>See also <a href="misc.html">Miscellaneous Classes</a>. <p> <p>See also <a href="misc.html">Miscellaneous Classes</a>.

@ -83,7 +83,7 @@ private:
output = new <a href="ntqtextview.html">TQTextView</a>( this ); output = new <a href="ntqtextview.html">TQTextView</a>( this );
quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( <a href="ntqobject.html#tr">tr</a>("Quit"), this ); quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( <a href="ntqobject.html#tr">tr</a>("Quit"), this );
<a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), <a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()),
qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="ntqwidget.html#resize">resize</a>( 500, 500 ); <a href="ntqwidget.html#resize">resize</a>( 500, 500 );
// TQProcess related code // TQProcess related code

@ -192,7 +192,7 @@ public:
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( drawItemText(i), i ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( drawItemText(i), i );
<a name="x67"></a> connect( menubar, SIGNAL(<a href="ntqmenubar.html#activated">activated</a>(int)), this, SLOT(doMenuItem(int)) ); <a name="x67"></a> connect( menubar, SIGNAL(<a href="ntqmenubar.html#activated">activated</a>(int)), this, SLOT(doMenuItem(int)) );
<a name="x69"></a> file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); <a name="x69"></a> file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>(); options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>();
<a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( options ); <a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( options );

@ -189,7 +189,7 @@ private:
fileQuitAction = new <a href="ntqaction.html">TQAction</a>( "Quit", "&amp;Quit", CTRL+Key_Q, this, fileQuitAction = new <a href="ntqaction.html">TQAction</a>( "Quit", "&amp;Quit", CTRL+Key_Q, this,
"quit" ); "quit" );
<a name="x1127"></a> <a href="ntqobject.html#connect">connect</a>( fileQuitAction, SIGNAL( <a href="ntqaction.html#activated">activated</a>() ) , qApp, <a name="x1127"></a> <a href="ntqobject.html#connect">connect</a>( fileQuitAction, SIGNAL( <a href="ntqaction.html#activated">activated</a>() ) , tqApp,
SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ) ); SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ) );
// populate a tool bar with some actions // populate a tool bar with some actions

@ -100,7 +100,7 @@ class TQMutex;
class TQApplication; class TQApplication;
extern Q_EXPORT TQApplication *qApp; // global application object extern Q_EXPORT TQApplication *tqApp; // global application object
class Q_EXPORT TQApplication : public TQObject class Q_EXPORT TQApplication : public TQObject
@ -532,10 +532,10 @@ inline TQSize TQApplication::globalStrut()
} }
inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event )
{ if ( event ) event-&gt;spont = FALSE; return qApp ? qApp-&gt;notify( receiver, event ) : FALSE; } { if ( event ) event-&gt;spont = FALSE; return tqApp ? tqApp-&gt;notify( receiver, event ) : FALSE; }
inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event )
{ if ( event ) event-&gt;spont = TRUE; return qApp ? qApp-&gt;notify( receiver, event ) : FALSE; } { if ( event ) event-&gt;spont = TRUE; return tqApp ? tqApp-&gt;notify( receiver, event ) : FALSE; }
#ifdef QT_NO_TRANSLATION #ifdef QT_NO_TRANSLATION
// Simple versions // Simple versions

@ -82,31 +82,31 @@ body { background: #ffffff; color: black; }
#include "ntqstringlist.h" #include "ntqstringlist.h"
#endif // QT_H #endif // QT_H
const TQRgb RGB_MASK = 0x00ffffff; // masks RGB values const TQRgb TQT_RGB_MASK = 0x00ffffff; // masks RGB values
Q_EXPORT inline int qRed( TQRgb rgb ) // get red part of RGB Q_EXPORT inline int tqRed( TQRgb rgb ) // get red part of RGB
{ return (int)((rgb &gt;&gt; 16) &amp; 0xff); } { return (int)((rgb &gt;&gt; 16) &amp; 0xff); }
Q_EXPORT inline int qGreen( TQRgb rgb ) // get green part of RGB Q_EXPORT inline int tqGreen( TQRgb rgb ) // get green part of RGB
{ return (int)((rgb &gt;&gt; 8) &amp; 0xff); } { return (int)((rgb &gt;&gt; 8) &amp; 0xff); }
Q_EXPORT inline int qBlue( TQRgb rgb ) // get blue part of RGB Q_EXPORT inline int tqBlue( TQRgb rgb ) // get blue part of RGB
{ return (int)(rgb &amp; 0xff); } { return (int)(rgb &amp; 0xff); }
Q_EXPORT inline int qAlpha( TQRgb rgb ) // get alpha part of RGBA Q_EXPORT inline int tqAlpha( TQRgb rgb ) // get alpha part of RGBA
{ return (int)((rgb &gt;&gt; 24) &amp; 0xff); } { return (int)((rgb &gt;&gt; 24) &amp; 0xff); }
Q_EXPORT inline TQRgb qRgb( int r, int g, int b )// set RGB value Q_EXPORT inline TQRgb tqRgb( int r, int g, int b )// set RGB value
{ return (0xff &lt;&lt; 24) | ((r &amp; 0xff) &lt;&lt; 16) | ((g &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff); } { return (0xff &lt;&lt; 24) | ((r &amp; 0xff) &lt;&lt; 16) | ((g &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff); }
Q_EXPORT inline TQRgb qRgba( int r, int g, int b, int a )// set RGBA value Q_EXPORT inline TQRgb tqRgba( int r, int g, int b, int a )// set RGBA value
{ return ((a &amp; 0xff) &lt;&lt; 24) | ((r &amp; 0xff) &lt;&lt; 16) | ((g &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff); } { return ((a &amp; 0xff) &lt;&lt; 24) | ((r &amp; 0xff) &lt;&lt; 16) | ((g &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff); }
Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 Q_EXPORT inline int tqGray( int r, int g, int b )// convert R,G,B to gray 0..255
{ return (r*11+g*16+b*5)/32; } { return (r*11+g*16+b*5)/32; }
Q_EXPORT inline int qGray( TQRgb rgb ) // convert RGB to gray 0..255 Q_EXPORT inline int tqGray( TQRgb rgb ) // convert RGB to gray 0..255
{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); } { return tqGray( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) ); }
class Q_EXPORT TQColor class Q_EXPORT TQColor
@ -226,13 +226,13 @@ inline TQRgb TQColor::rgb() const
{ return d.argb; } { return d.argb; }
inline int TQColor::red() const inline int TQColor::red() const
{ return qRed(d.argb); } { return tqRed(d.argb); }
inline int TQColor::green() const inline int TQColor::green() const
{ return qGreen(d.argb); } { return tqGreen(d.argb); }
inline int TQColor::blue() const inline int TQColor::blue() const
{ return qBlue(d.argb); } { return tqBlue(d.argb); }
inline bool TQColor::isValid() const inline bool TQColor::isValid() const
{ {

@ -113,9 +113,9 @@ inline ushort qt_convRgbTo16( const int r, const int g, const int b )
inline ushort qt_convRgbTo16( TQRgb c ) inline ushort qt_convRgbTo16( TQRgb c )
{ {
const int tr = qRed(c) &lt;&lt; qt_red_shift; const int tr = tqRed(c) &lt;&lt; qt_red_shift;
const int tg = qGreen(c) &lt;&lt; qt_green_shift; const int tg = tqGreen(c) &lt;&lt; qt_green_shift;
const int tb = qBlue(c) &gt;&gt; qt_neg_blue_shift; const int tb = tqBlue(c) &gt;&gt; qt_neg_blue_shift;
return (tb &amp; qt_blue_mask) | (tg &amp; qt_green_mask) | (tr &amp; qt_red_mask); return (tb &amp; qt_blue_mask) | (tg &amp; qt_green_mask) | (tr &amp; qt_red_mask);
} }
@ -129,7 +129,7 @@ inline TQRgb qt_conv16ToRgb( ushort c )
const int tg = g &gt;&gt; qt_green_shift; const int tg = g &gt;&gt; qt_green_shift;
const int tb = b &lt;&lt; qt_neg_blue_shift; const int tb = b &lt;&lt; qt_neg_blue_shift;
return qRgb(tr,tg,tb); return tqRgb(tr,tg,tb);
} }
inline void qt_conv16ToRgb( ushort c, int&amp; r, int&amp; g, int&amp; b ) inline void qt_conv16ToRgb( ushort c, int&amp; r, int&amp; g, int&amp; b )

@ -173,7 +173,7 @@ static const int timer[] = {
quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( this ); quitButton = new <a href="ntqpushbutton.html">TQPushButton</a>( this );
<a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>(quitButton); <a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>(quitButton);
<a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quitButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
quitButton-&gt;<a href="ntqbutton.html#setText">setText</a>( "Quit" ); quitButton-&gt;<a href="ntqbutton.html#setText">setText</a>( "Quit" );
quitButton-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>( multiSaveButton-&gt;<a href="ntqwidget.html#geometry">geometry</a>().right() + 2, 2, quitButton-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>( multiSaveButton-&gt;<a href="ntqwidget.html#geometry">geometry</a>().right() + 2, 2,
10+quitButton-&gt;<a href="ntqwidget.html#fontMetrics">fontMetrics</a>().width("Quit"), 20 ); 10+quitButton-&gt;<a href="ntqwidget.html#fontMetrics">fontMetrics</a>().width("Quit"), 20 );
@ -379,8 +379,8 @@ void <a name="f490"></a>MagWidget::grabAround(TQPoint pos)
{ {
<a name="x1776"></a> TQRgb px = image.<a href="ntqimage.html#pixel">pixel</a>(x,y); <a name="x1776"></a> TQRgb px = image.<a href="ntqimage.html#pixel">pixel</a>(x,y);
<a name="x1795"></a> pixelinfo.<a href="ntqstring.html#sprintf">sprintf</a>(" %3d,%3d,%3d #%02x%02x%02x", <a name="x1795"></a> pixelinfo.<a href="ntqstring.html#sprintf">sprintf</a>(" %3d,%3d,%3d #%02x%02x%02x",
<a href="ntqcolor.html#qRed">qRed</a>(px), qGreen(px), qBlue(px), <a href="ntqcolor.html#qRed">qRed</a>(px), tqGreen(px), tqBlue(px),
<a href="ntqcolor.html#qRed">qRed</a>(px), qGreen(px), qBlue(px)); <a href="ntqcolor.html#qRed">qRed</a>(px), tqGreen(px), tqBlue(px));
} }
<a href="ntqstring.html">TQString</a> label; <a href="ntqstring.html">TQString</a> label;
label.<a href="ntqstring.html#sprintf">sprintf</a>( "x=%d, y=%d %s", label.<a href="ntqstring.html#sprintf">sprintf</a>( "x=%d, y=%d %s",

@ -247,7 +247,7 @@ private: // Disabled copy constructor and operator=
#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ #define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\
TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()&lt;&lt;16)+\ TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()&lt;&lt;16)+\
(sq.section('.',1,1).toInt()&lt;&lt;8)+sq.section('.',2,2).toInt()&lt;(s.section('.',0,0).toInt()&lt;&lt;16)+\ (sq.section('.',1,1).toInt()&lt;&lt;8)+sq.section('.',2,2).toInt()&lt;(s.section('.',0,0).toInt()&lt;&lt;16)+\
(s.section('.',1,1).toInt()&lt;&lt;8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ (s.section('.',1,1).toInt()&lt;&lt;8)+s.section('.',2,2).toInt() ){if ( !tqApp){ int c=0; new \
TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\
"%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\
str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\

@ -153,7 +153,7 @@ enum { Uni = 0, MBug = 1, Lat1 = 2, Local = 3, Guess = 4, Codec = 5 };
#endif #endif
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()),ALT+Key_W ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()),ALT+Key_W );
<a name="x358"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT(<a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>()), ALT+Key_Q ); <a name="x358"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT(<a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>()), ALT+Key_Q );
<a name="x386"></a> <a href="ntqobject.html#connect">connect</a>( save_as, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(saveAsEncoding(int)) ); <a name="x386"></a> <a href="ntqobject.html#connect">connect</a>( save_as, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(saveAsEncoding(int)) );
<a href="ntqobject.html#connect">connect</a>( open_as, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(openAsEncoding(int)) ); <a href="ntqobject.html#connect">connect</a>( open_as, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(openAsEncoding(int)) );
@ -231,8 +231,8 @@ void <a name="f236"></a>Editor::rebuildCodecList()
void <a name="f237"></a>Editor::newDoc() void <a name="f237"></a>Editor::newDoc()
{ {
Editor *ed = new Editor; Editor *ed = new Editor;
if ( qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().width() &lt; 450 if ( tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().width() &lt; 450
|| qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().height() &lt; 450 ) { || tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().height() &lt; 450 ) {
<a name="x413"></a> ed-&gt;<a href="ntqwidget.html#showMaximized">showMaximized</a>(); <a name="x413"></a> ed-&gt;<a href="ntqwidget.html#showMaximized">showMaximized</a>();
} else { } else {
ed-&gt;<a href="ntqwidget.html#resize">resize</a>( 400, 400 ); ed-&gt;<a href="ntqwidget.html#resize">resize</a>( 400, 400 );
@ -476,8 +476,8 @@ int main( int argc, char **argv )
<a href="ntqapplication.html">TQApplication</a> a( argc, argv ); <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
<a name="x414"></a> bool isSmall = qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().width() &lt; 450 <a name="x414"></a> bool isSmall = tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().width() &lt; 450
|| qApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().height() &lt; 450; || tqApp-&gt;<a href="ntqapplication.html#desktop">desktop</a>()-&gt;size().height() &lt; 450;
int i; int i;
for ( i= argc &lt;= 1 ? 0 : 1; i&lt;argc; i++ ) { for ( i= argc &lt;= 1 ? 0 : 1; i&lt;argc; i++ ) {

@ -190,7 +190,7 @@ Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome );
Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome );
Q_EXPORT const char *qAppClass(); // get application class Q_EXPORT const char *tqAppClass(); // get application class
#endif // Q_WS_X11 #endif // Q_WS_X11

@ -182,7 +182,7 @@ static const char* sayings[] = {
<a name="x466"></a> bPrev-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE ); <a name="x466"></a> bPrev-&gt;<a href="ntqwidget.html#setEnabled">setEnabled</a>( FALSE );
<a name="x462"></a> <a href="ntqobject.html#connect">connect</a>( bClose, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), qApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ) ); <a name="x462"></a> <a href="ntqobject.html#connect">connect</a>( bClose, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), tqApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ) );
<a href="ntqobject.html#connect">connect</a>( bPrev, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( prev() ) ); <a href="ntqobject.html#connect">connect</a>( bPrev, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( prev() ) );
<a href="ntqobject.html#connect">connect</a>( bNext, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( next() ) ); <a href="ntqobject.html#connect">connect</a>( bNext, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( next() ) );

@ -105,7 +105,7 @@ private:
<a href="ntqpushbutton.html">TQPushButton</a> * quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this ); <a href="ntqpushbutton.html">TQPushButton</a> * quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this );
<a name="x1379"></a> quit-&gt;<a href="ntqwidget.html#setFocusPolicy">setFocusPolicy</a>( NoFocus ); <a name="x1379"></a> quit-&gt;<a href="ntqwidget.html#setFocusPolicy">setFocusPolicy</a>( NoFocus );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="qgridlayout.html">TQGridLayout</a> * l = new <a href="qgridlayout.html">TQGridLayout</a>( this, 2, 2, 5 ); <a href="qgridlayout.html">TQGridLayout</a> * l = new <a href="qgridlayout.html">TQGridLayout</a>( this, 2, 2, 5 );
<a name="x1370"></a> l-&gt;<a href="qgridlayout.html#addWidget">addWidget</a>( left, 0, 0 ); <a name="x1370"></a> l-&gt;<a href="qgridlayout.html#addWidget">addWidget</a>( left, 0, 0 );

@ -165,7 +165,7 @@ const bool no_writing = FALSE;
mousePressed( FALSE ), buffer( <a href="ntqwidget.html#width">width</a>(), height() ) mousePressed( FALSE ), buffer( <a href="ntqwidget.html#width">width</a>(), height() )
{ {
<a name="x907"></a><a name="x906"></a> if ((qApp-&gt;<a href="ntqapplication.html#argc">argc</a>() &gt; 0) &amp;&amp; !buffer.load(qApp-&gt;<a href="ntqapplication.html#argv">argv</a>()[1])) <a name="x907"></a><a name="x906"></a> if ((tqApp-&gt;<a href="ntqapplication.html#argc">argc</a>() &gt; 0) &amp;&amp; !buffer.load(tqApp-&gt;<a href="ntqapplication.html#argv">argv</a>()[1]))
buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() ); buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() );
<a href="ntqwidget.html#setBackgroundMode">setBackgroundMode</a>( TQWidget::PaletteBase ); <a href="ntqwidget.html#setBackgroundMode">setBackgroundMode</a>( TQWidget::PaletteBase );
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR

@ -83,7 +83,7 @@ public:
for (int y=0; y&lt;2000-h; y+=h+10) { for (int y=0; y&lt;2000-h; y+=h+10) {
if (y == 0) { if (y == 0) {
<a href="ntqbutton.html">TQButton</a>* q=new <a href="ntqpushbutton.html">TQPushButton</a>("Quit", this); <a href="ntqbutton.html">TQButton</a>* q=new <a href="ntqpushbutton.html">TQPushButton</a>("Quit", this);
connect(q, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); connect(q, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
} else { } else {
<a href="ntqstring.html">TQString</a> str; <a href="ntqstring.html">TQString</a> str;
if ( b &gt; 0 ) { if ( b &gt; 0 ) {
@ -247,7 +247,7 @@ public:
<a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar ); <a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
<a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( file ); <a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( file );
<a name="x634"></a> menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;File", file ); <a name="x634"></a> menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;File", file );
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Quit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
vp_options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar ); vp_options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
<a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( vp_options ); <a href="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( vp_options );
@ -473,7 +473,7 @@ int main( int argc, char **argv )
ve3.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Scrollviews"); ve3.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Scrollviews");
ve3.<a href="ntqwidget.html#show">show</a>(); ve3.<a href="ntqwidget.html#show">show</a>();
TQObject::<a href="ntqobject.html#connect">connect</a>(qApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); TQObject::<a href="ntqobject.html#connect">connect</a>(tqApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
return a.<a href="ntqapplication.html#exec">exec</a>(); return a.<a href="ntqapplication.html#exec">exec</a>();
} }

@ -195,7 +195,7 @@ private slots:
si = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save image", saveimage ); si = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save image", saveimage );
sp = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save pixmap", savepixmap ); sp = file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "Save pixmap", savepixmap );
<a name="x1328"></a> file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); <a name="x1328"></a> file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "E&amp;xit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "E&amp;xit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q );
edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar ); edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menubar );
menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Edit", edit ); menubar-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Edit", edit );
@ -865,7 +865,7 @@ int main( int argc, char **argv )
} }
} }
TQObject::<a href="ntqobject.html#connect">connect</a>(qApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); TQObject::<a href="ntqobject.html#connect">connect</a>(tqApp, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
return a.<a href="ntqapplication.html#exec">exec</a>(); return a.<a href="ntqapplication.html#exec">exec</a>();
} }

@ -206,7 +206,7 @@ private:
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()), CTRL+Key_W ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()), CTRL+Key_W );
<a name="x1544"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q ); <a name="x1544"></a> file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q );
<a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertSeparator(); <a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertSeparator();

@ -292,7 +292,7 @@ example for a shorter and easier approach.)
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()), CTRL+Key_W ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Close", this, SLOT(<a href="ntqwidget.html#close">close</a>()), CTRL+Key_W );
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", qApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q ); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "&amp;Quit", tqApp, SLOT( <a href="ntqapplication.html#closeAllWindows">closeAllWindows</a>() ), CTRL+Key_Q );
</pre> </pre>
<p> ... the <em>Print</em> command with "What's This?" help, another separator and <p> ... the <em>Print</em> command with "What's This?" help, another separator and
two more commands (<em>Close</em> and <em>Quit</em>) without "What's This?" and pixmaps. two more commands (<em>Close</em> and <em>Quit</em>) without "What's This?" and pixmaps.

@ -128,7 +128,7 @@ private:
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("Play 3 and 4 together", this, SLOT(doPlay34())); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("Play 3 and 4 together", this, SLOT(doPlay34()));
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("Play all together", this, SLOT(doPlay1234())); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("Play all together", this, SLOT(doPlay1234()));
file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); file-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("E&amp;xit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>())); file-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("E&amp;xit", tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
<a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem("&amp;File", file); <a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertItem("&amp;File", file);
} }

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -56,7 +56,7 @@ body { background: #ffffff; color: black; }
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -58,7 +58,7 @@ body { background: #ffffff; color: black; }
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );
@ -112,7 +112,7 @@ body { background: #ffffff; color: black; }
accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( Key_Return ), accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( Key_Return ),
this, SLOT(fire()) ); this, SLOT(fire()) );
accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( CTRL+Key_Q ), accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( CTRL+Key_Q ),
qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="qgridlayout.html">TQGridLayout</a> *grid = new <a href="qgridlayout.html">TQGridLayout</a>( this, 2, 2, 10 ); <a href="qgridlayout.html">TQGridLayout</a> *grid = new <a href="qgridlayout.html">TQGridLayout</a>( this, 2, 2, 10 );
grid-&gt;<a href="qgridlayout.html#addWidget">addWidget</a>( quit, 0, 0 ); grid-&gt;<a href="qgridlayout.html#addWidget">addWidget</a>( quit, 0, 0 );

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this ); <a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this );

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -61,7 +61,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle-&gt;setRange( 5, 70 ); angle-&gt;setRange( 5, 70 );

@ -106,7 +106,7 @@ protected:
setupTab2(); setupTab2();
setupTab3(); setupTab3();
<a href="ntqobject.html#connect">connect</a>( this, SIGNAL( <a href="ntqtabdialog.html#applyButtonPressed">applyButtonPressed</a>() ), qApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ) ); <a href="ntqobject.html#connect">connect</a>( this, SIGNAL( <a href="ntqtabdialog.html#applyButtonPressed">applyButtonPressed</a>() ), tqApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ) );
} }
void <a name="f201"></a>TabDialog::setupTab1() void <a name="f201"></a>TabDialog::setupTab1()

@ -2253,7 +2253,7 @@ private:
} }
<a name="x318"></a> ag-&gt;<a href="qactiongroup.html#addTo">addTo</a>(style); <a name="x318"></a> ag-&gt;<a href="qactiongroup.html#addTo">addTo</a>(style);
style-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); style-&gt;<a href="ntqmenudata.html#insertSeparator">insertSeparator</a>();
style-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Quit", qApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ), CTRL | Key_Q ); style-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>("&amp;Quit", tqApp, SLOT( <a href="ntqapplication.html#quit">quit</a>() ), CTRL | Key_Q );
<a href="ntqpopupmenu.html">TQPopupMenu</a> * help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); <a href="ntqpopupmenu.html">TQPopupMenu</a> * help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this );
<a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertSeparator(); <a href="ntqmainwindow.html#menuBar">menuBar</a>()-&gt;insertSeparator();
@ -2262,7 +2262,7 @@ private:
help-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "About &amp;TQt", this, SLOT(aboutTQt())); help-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( "About &amp;TQt", this, SLOT(aboutTQt()));
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
<a name="x325"></a> qApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new NorwegianWoodStyle ); <a name="x325"></a> tqApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new NorwegianWoodStyle );
#endif #endif
} }
@ -2270,20 +2270,20 @@ void <a name="f232"></a>Themes::makeStyle(const <a href="ntqstring.html">TQStrin
{ {
if(style == "Norwegian Wood") { if(style == "Norwegian Wood") {
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
qApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new NorwegianWoodStyle ); tqApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new NorwegianWoodStyle );
#endif #endif
} else if( style == "Metal" ) { } else if( style == "Metal" ) {
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
qApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new MetalStyle ); tqApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>( new MetalStyle );
#endif #endif
} else { } else {
qApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>(style); tqApp-&gt;<a href="ntqapplication.html#setStyle">setStyle</a>(style);
if(style == "Platinum") { if(style == "Platinum") {
<a href="ntqpalette.html">TQPalette</a> p( TQColor( 239, 239, 239 ) ); <a href="ntqpalette.html">TQPalette</a> p( TQColor( 239, 239, 239 ) );
<a name="x324"></a> qApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE ); <a name="x324"></a> tqApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE );
<a name="x323"></a> qApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE ); <a name="x323"></a> tqApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE );
} else if(style == "Windows") { } else if(style == "Windows") {
qApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE ); tqApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE );
} else if(style == "CDE") { } else if(style == "CDE") {
<a href="ntqpalette.html">TQPalette</a> p( TQColor( 75, 123, 130 ) ); <a href="ntqpalette.html">TQPalette</a> p( TQColor( 75, 123, 130 ) );
<a name="x332"></a> p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); <a name="x332"></a> p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
@ -2304,12 +2304,12 @@ void <a name="f232"></a>Themes::makeStyle(const <a href="ntqstring.html">TQStrin
p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray );
p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray );
p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); p.<a href="ntqpalette.html#setColor">setColor</a>( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray );
qApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE ); tqApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE );
qApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( TQFont( "times", appFont.pointSize() ), TRUE ); tqApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( TQFont( "times", appFont.pointSize() ), TRUE );
} else if(style == "Motif" || style == "MotifPlus") { } else if(style == "Motif" || style == "MotifPlus") {
<a href="ntqpalette.html">TQPalette</a> p( TQColor( 192, 192, 192 ) ); <a href="ntqpalette.html">TQPalette</a> p( TQColor( 192, 192, 192 ) );
qApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE ); tqApp-&gt;<a href="ntqapplication.html#setPalette">setPalette</a>( p, TRUE );
qApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE ); tqApp-&gt;<a href="ntqapplication.html#setFont">setFont</a>( appFont, TRUE );
} }
} }
} }

@ -239,7 +239,7 @@ operations. Operations such as creating a <a href="ntqpainter.html">TQPainter</
are examples of simple GUI operations: are examples of simple GUI operations:
<p> <pre> <p> <pre>
... ...
qApp-&gt;<a href="ntqapplication.html#lock">lock</a>(); tqApp-&gt;<a href="ntqapplication.html#lock">lock</a>();
<a href="ntqpainter.html">TQPainter</a> p; <a href="ntqpainter.html">TQPainter</a> p;
p.<a href="ntqpainter.html#begin">begin</a>( mywidget ); p.<a href="ntqpainter.html#begin">begin</a>( mywidget );
@ -247,7 +247,7 @@ are examples of simple GUI operations:
p.<a href="ntqpainter.html#drawLine">drawLine</a>( 0,0,100,100 ); p.<a href="ntqpainter.html#drawLine">drawLine</a>( 0,0,100,100 );
p.<a href="ntqpainter.html#end">end</a>(); p.<a href="ntqpainter.html#end">end</a>();
qApp-&gt;<a href="ntqapplication.html#unlock">unlock</a>(); tqApp-&gt;<a href="ntqapplication.html#unlock">unlock</a>();
... ...
</pre> </pre>

@ -479,7 +479,7 @@ void <a name="f195"></a>TicTacGameBoard::computerMove()
newGame = new <a href="ntqpushbutton.html">TQPushButton</a>( "Play!", this ); newGame = new <a href="ntqpushbutton.html">TQPushButton</a>( "Play!", this );
<a href="ntqobject.html#connect">connect</a>( newGame, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(newGameClicked()) ); <a href="ntqobject.html#connect">connect</a>( newGame, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), SLOT(newGameClicked()) );
quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this ); quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="qhboxlayout.html">TQHBoxLayout</a> * b = new <a href="qhboxlayout.html">TQHBoxLayout</a>; <a href="qhboxlayout.html">TQHBoxLayout</a> * b = new <a href="qhboxlayout.html">TQHBoxLayout</a>;
<a name="x19"></a> l-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( b ); <a name="x19"></a> l-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( b );
b-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( newGame ); b-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( newGame );

@ -63,7 +63,7 @@ public:
quit-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>( 62, 40, 75, 30 ); quit-&gt;<a href="ntqwidget.html#setGeometry">setGeometry</a>( 62, 40, 75, 30 );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
} }
@ -132,7 +132,7 @@ when you choose to, the child will automatically tell TQt about its
imminent death.) imminent death.)
<p> The setGeometry() call does the same as move() and resize() did in the <p> The setGeometry() call does the same as move() and resize() did in the
previous chapters. previous chapters.
<p> <pre> <a name="x2306"></a><a name="x2304"></a> <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <p> <pre> <a name="x2306"></a><a name="x2304"></a> <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
} }
</pre> </pre>
<p> Because the MyWidget class doesn't know about the application object, it <p> Because the MyWidget class doesn't know about the application object, it
@ -141,7 +141,7 @@ has to connect to TQt's pointer to it, <tt>qApp</tt>.
about its environment in order to be as general and reusable as about its environment in order to be as general and reusable as
possible. possible.
<p> Knowing the name of the application object would break this principle, <p> Knowing the name of the application object would break this principle,
so TQt offers an alias, qApp, for the cases in which a component such as so TQt offers an alias, tqApp, for the cases in which a component such as
MyWidget needs to talk to the application object. MyWidget needs to talk to the application object.
<p> <pre> int main( int argc, char **argv ) <p> <pre> int main( int argc, char **argv )
{ {

@ -62,7 +62,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="ntqlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="ntqlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" ); <a href="ntqlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="ntqlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" );

@ -80,7 +80,7 @@ public:
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" );
quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
<a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this ); <a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this );
@ -139,7 +139,7 @@ is renamed.
<a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" );
<a name="x2328"></a> quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); <a name="x2328"></a> quit-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) );
<a name="x2321"></a> <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); <a name="x2321"></a> <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
</pre> </pre>
<p> The push button that used to be in what is now LCDRange has been <p> The push button that used to be in what is now LCDRange has been
separated so that we can have one "Quit" button and many LCDRange separated so that we can have one "Quit" button and many LCDRange

@ -226,7 +226,7 @@ key Ctrl+Q is pressed. Because Enter is sometimes Return and there
are even keyboards with <em>both</em> keys, we make both Enter and Return are even keyboards with <em>both</em> keys, we make both Enter and Return
invoke fire(). invoke fire().
<p> <pre> accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( CTRL+Key_Q ), <p> <pre> accel-&gt;<a href="ntqaccel.html#connectItem">connectItem</a>( accel-&gt;<a href="ntqaccel.html#insertItem">insertItem</a>( CTRL+Key_Q ),
qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); tqApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
</pre> </pre>
<p> And then we set up Ctrl+Q to do the same thing as Alt+Q. Some <p> And then we set up Ctrl+Q to do the same thing as Alt+Q. Some
people are more used to Ctrl+Q (and anyway it shows how do do it). people are more used to Ctrl+Q (and anyway it shows how do do it).

@ -499,7 +499,7 @@ item id.
{ {
if ( okToClear() ) { if ( okToClear() ) {
saveOptions(); saveOptions();
qApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 ); tqApp-&gt;<a href="ntqapplication.html#exit">exit</a>( 0 );
} }
} }
</pre> </pre>

@ -327,7 +327,7 @@ void <a name="f403"></a>XFormControl::changeMode(int m)
else else
rb_pic-&gt;<a href="ntqradiobutton.html#setChecked">setChecked</a>(TRUE); rb_pic-&gt;<a href="ntqradiobutton.html#setChecked">setChecked</a>(TRUE);
} }
<a name="x1217"></a> qApp-&gt;<a href="ntqapplication.html#flushX">flushX</a>(); <a name="x1217"></a> tqApp-&gt;<a href="ntqapplication.html#flushX">flushX</a>();
} }
<a name="f388"></a>ShowXForm::ShowXForm( const <a href="ntqfont.html">TQFont</a> &amp;initialFont, <a name="f388"></a>ShowXForm::ShowXForm( const <a href="ntqfont.html">TQFont</a> &amp;initialFont,

@ -208,7 +208,7 @@ directly:
void same_global_function( LoginWidget *logwid ) void same_global_function( LoginWidget *logwid )
{ {
QLabel *label = new QLabel( QLabel *label = new QLabel(
qApp->translate("LoginWidget", "Password:"), tqApp->translate("LoginWidget", "Password:"),
logwid ); logwid );
} }
\endcode \endcode
@ -245,7 +245,7 @@ Example of QT_TRANSLATE_NOOP():
QString global_greeting( int greet_type ) QString global_greeting( int greet_type )
{ {
return qApp->translate( "FriendlyConversation", return tqApp->translate( "FriendlyConversation",
greeting_strings[greet_type] ); greeting_strings[greet_type] );
} }
\endcode \endcode

@ -792,12 +792,12 @@ This function is particularly useful for applications with many top-level window
.br .br
QPopupMenu* file = new QPopupMenu( this ); QPopupMenu* file = new QPopupMenu( this );
.br .br
file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q ); file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), CTRL+Key_Q );
.br .br
.br .br
// when the last window is closed, the application should quit // when the last window is closed, the application should quit
.br .br
connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) ); connect( tqApp, SIGNAL( lastWindowClosed() ), tqApp, SLOT( quit() ) );
.br .br
.fi .fi
.PP .PP
@ -1047,10 +1047,10 @@ For certain types of events (e.g. mouse and key events), the event will be propa
.PP .PP
There are five different ways that events can be processed; reimplementing this virtual function is just one of them. All five approaches are listed below: <ol type=1> There are five different ways that events can be processed; reimplementing this virtual function is just one of them. All five approaches are listed below: <ol type=1>
.TP .TP
Reimplementing this function. This is very powerful, providing complete control; but only one subclass can be qApp. Reimplementing this function. This is very powerful, providing complete control; but only one subclass can be tqApp.
.IP .IP
.TP .TP
Installing an event filter on qApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even see mouse events for disabled widgets, and if global mouse tracking is enabled, as well as mouse move events for all widgets. Installing an event filter on tqApp. Such an event filter is able to process all events for all widgets, so it's just as powerful as reimplementing notify(); furthermore, it's possible to have more than one application-global event filter. Global event filters even see mouse events for disabled widgets, and if global mouse tracking is enabled, as well as mouse move events for all widgets.
.IP .IP
.TP .TP
Reimplementing QObject::event() (as QWidget does). If you do this you get Tab key presses, and you get to see the events before any widget-specific event filters. Reimplementing QObject::event() (as QWidget does). If you do this you get Tab key presses, and you get to see the events before any widget-specific event filters.
@ -1131,7 +1131,7 @@ Example:
.br .br
QPushButton *quitButton = new QPushButton( "Quit" ); QPushButton *quitButton = new QPushButton( "Quit" );
.br .br
connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) );
.br .br
.fi .fi
.PP .PP

@ -167,7 +167,7 @@ QColor \- Colors based on RGB or HSV values
.BI "int \fBqGray\fR ( int r, int g, int b )" .BI "int \fBqGray\fR ( int r, int g, int b )"
.br .br
.ti -1c .ti -1c
.BI "int \fBqGray\fR ( qRgb rgb )" .BI "int \fBqGray\fR ( tqRgb rgb )"
.br .br
.in -1c .in -1c
.SH DESCRIPTION .SH DESCRIPTION
@ -482,7 +482,7 @@ The return type \fIQRgb\fR is equivalent to \fCunsigned\fR \fCint\fR.
.PP .PP
For an invalid color, the alpha value of the returned color is unspecified. For an invalid color, the alpha value of the returned color is unspecified.
.PP .PP
See also setRgb(), hsv(), qRed(), qBlue(), qGreen(), and isValid(). See also setRgb(), hsv(), tqRed(), tqBlue(), tqGreen(), and isValid().
.SH "void QColor::rgb ( int * r, int * g, int * b ) const" .SH "void QColor::rgb ( int * r, int * g, int * b ) const"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. Use getRgb() instead \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. Use getRgb() instead
.SH "void QColor::setHsv ( int h, int s, int v )" .SH "void QColor::setHsv ( int h, int s, int v )"
@ -531,40 +531,40 @@ See also Format of the QDataStream operators.
Reads a color object, \fIc\fR, from the stream, \fIs\fR. Reads a color object, \fIc\fR, from the stream, \fIs\fR.
.PP .PP
See also Format of the QDataStream operators. See also Format of the QDataStream operators.
.SH "int qAlpha ( QRgb rgba )" .SH "int tqAlpha ( QRgb rgba )"
Returns the alpha component of the RGBA quadruplet \fIrgba\fR. Returns the alpha component of the RGBA quadruplet \fIrgba\fR.
.SH "int qBlue ( QRgb rgb )" .SH "int tqBlue ( QRgb rgb )"
Returns the blue component of the RGB triplet \fIrgb\fR. Returns the blue component of the RGB triplet \fIrgb\fR.
.PP .PP
See also qRgb() and QColor::blue(). See also tqRgb() and QColor::blue().
.SH "int qGray ( int r, int g, int b )" .SH "int tqGray ( int r, int g, int b )"
Returns a gray value 0..255 from the (\fIr\fR, \fIg\fR, \fIb\fR) triplet. Returns a gray value 0..255 from the (\fIr\fR, \fIg\fR, \fIb\fR) triplet.
.PP .PP
The gray value is calculated using the formula (r*11 + g*16 + b*5)/32. The gray value is calculated using the formula (r*11 + g*16 + b*5)/32.
.SH "int qGray ( qRgb rgb )" .SH "int tqGray ( tqRgb rgb )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP .PP
Returns a gray value 0..255 from the given \fIrgb\fR colour. Returns a gray value 0..255 from the given \fIrgb\fR colour.
.SH "int qGreen ( QRgb rgb )" .SH "int tqGreen ( QRgb rgb )"
Returns the green component of the RGB triplet \fIrgb\fR. Returns the green component of the RGB triplet \fIrgb\fR.
.PP .PP
See also qRgb() and QColor::green(). See also tqRgb() and QColor::green().
.SH "int qRed ( QRgb rgb )" .SH "int tqRed ( QRgb rgb )"
Returns the red component of the RGB triplet \fIrgb\fR. Returns the red component of the RGB triplet \fIrgb\fR.
.PP .PP
See also qRgb() and QColor::red(). See also tqRgb() and QColor::red().
.SH "QRgb qRgb ( int r, int g, int b )" .SH "QRgb tqRgb ( int r, int g, int b )"
Returns the RGB triplet \fI(r,g,b)\fR. Returns the RGB triplet \fI(r,g,b)\fR.
.PP .PP
The return type QRgb is equivalent to \fCunsigned\fR \fCint\fR. The return type QRgb is equivalent to \fCunsigned\fR \fCint\fR.
.PP .PP
See also qRgba(), qRed(), qGreen(), and qBlue(). See also tqRgba(), tqRed(), tqGreen(), and tqBlue().
.SH "QRgb qRgba ( int r, int g, int b, int a )" .SH "QRgb tqRgba ( int r, int g, int b, int a )"
Returns the RGBA quadruplet \fI(r,g,b,a)\fR. Returns the RGBA quadruplet \fI(r,g,b,a)\fR.
.PP .PP
The return type QRgba is equivalent to \fCunsigned\fR \fCint\fR. The return type QRgba is equivalent to \fCunsigned\fR \fCint\fR.
.PP .PP
See also qRgb(), qRed(), qGreen(), and qBlue(). See also tqRgb(), tqRed(), tqGreen(), and tqBlue().
.SH "SEE ALSO" .SH "SEE ALSO"
.BR http://doc.trolltech.com/ntqcolor.html .BR http://doc.trolltech.com/ntqcolor.html

@ -258,7 +258,7 @@ The returned strings are not translated with the QObject::tr() or QApplication::
.br .br
tr("Open failed"), tr("Open failed"),
.br .br
tr("Could not open file for reading: %1").arg( qApp->translate("QFile",f.errorString()) ) tr("Could not open file for reading: %1").arg( tqApp->translate("QFile",f.errorString()) )
.br .br
); );
.br .br

@ -94,7 +94,7 @@ Example of use:
.br .br
for ( int i = 0; i < colormap.size(); i++ ) for ( int i = 0; i < colormap.size(); i++ )
.br .br
colormap.setEntry( i, qRgb( i, i, i ) ); colormap.setEntry( i, tqRgb( i, i, i ) );
.br .br
.br .br
widget.setColormap( colormap ); widget.setColormap( colormap );

@ -311,7 +311,7 @@ An image has the parameters width, height and depth (bits per pixel, bpp), a col
.PP .PP
32-bpp images encode an RGB value in 24 bits and ignore the color table. The most significant byte is used for the alpha buffer. 32-bpp images encode an RGB value in 24 bits and ignore the color table. The most significant byte is used for the alpha buffer.
.PP .PP
An entry in the color table is an RGB triplet encoded as a \fCuint\fR. Use the qRed(), qGreen() and qBlue() functions (ntqcolor.h) to access the components, and qRgb to make an RGB triplet (see the QColor class documentation). An entry in the color table is an RGB triplet encoded as a \fCuint\fR. Use the tqRed(), tqGreen() and tqBlue() functions (ntqcolor.h) to access the components, and tqRgb to make an RGB triplet (see the QColor class documentation).
.PP .PP
1-bpp (monochrome) images have a color table with a most two colors. There are two different formats: big endian (MSB first) or little endian (LSB first) bit order. To access a single bit you will must do some bit shifts: 1-bpp (monochrome) images have a color table with a most two colors. There are two different formats: big endian (MSB first) or little endian (LSB first) bit order. To access a single bit you will must do some bit shifts:
.PP .PP
@ -341,7 +341,7 @@ If this looks complicated, it might be a good idea to convert the 1-bpp image to
.br .br
// set entry 19 in the color table to yellow // set entry 19 in the color table to yellow
.br .br
image.setColor( 19, qRgb(255,255,0) ); image.setColor( 19, tqRgb(255,255,0) );
.br .br
// set 8 bit pixel at (x,y) to value yellow (in color table) // set 8 bit pixel at (x,y) to value yellow (in color table)
.br .br
@ -359,7 +359,7 @@ If this looks complicated, it might be a good idea to convert the 1-bpp image to
.br .br
uint *p = (uint *)image.scanLine(y) + x; uint *p = (uint *)image.scanLine(y) + x;
.br .br
*p = qRgb(255,255,0); *p = tqRgb(255,255,0);
.br .br
.fi .fi
.PP .PP
@ -503,7 +503,7 @@ See also numBytes() and scanLine().
.SH "QRgb QImage::color ( int i ) const" .SH "QRgb QImage::color ( int i ) const"
Returns the color in the color table at index \fIi\fR. The first color is at index 0. Returns the color in the color table at index \fIi\fR. The first color is at index 0.
.PP .PP
A color value is an RGB triplet. Use the qRed(), qGreen() and qBlue() functions (defined in ntqcolor.h) to get the color value components. A color value is an RGB triplet. Use the tqRed(), tqGreen() and tqBlue() functions (defined in ntqcolor.h) to get the color value components.
.PP .PP
See also setColor(), numColors(), and QColor. See also setColor(), numColors(), and QColor.
.PP .PP
@ -798,7 +798,7 @@ Returns the color of the pixel at the coordinates (\fIx\fR, \fIy\fR).
.PP .PP
If (\fIx\fR, \fIy\fR) is not on the image, the results are undefined. If (\fIx\fR, \fIy\fR) is not on the image, the results are undefined.
.PP .PP
See also setPixel(), qRed(), qGreen(), qBlue(), and valid(). See also setPixel(), tqRed(), tqGreen(), tqBlue(), and valid().
.PP .PP
Examples: Examples:
.)l canvas/canvas.cpp and qmag/qmag.cpp. .)l canvas/canvas.cpp and qmag/qmag.cpp.
@ -875,7 +875,7 @@ Returns a pointer to the pixel data at the scanline with index \fIi\fR. The firs
.PP .PP
The scanline data is aligned on a 32-bit boundary. The scanline data is aligned on a 32-bit boundary.
.PP .PP
\fBWarning:\fR If you are accessing 32-bpp image data, cast the returned pointer to \fCQRgb*\fR (QRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the \fCuchar*\fR pointer directly, because the pixel format depends on the byte order on the underlying platform. Hint: use qRed(), qGreen() and qBlue(), etc. (ntqcolor.h) to access the pixels. \fBWarning:\fR If you are accessing 32-bpp image data, cast the returned pointer to \fCQRgb*\fR (QRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the \fCuchar*\fR pointer directly, because the pixel format depends on the byte order on the underlying platform. Hint: use tqRed(), tqGreen() and tqBlue(), etc. (ntqcolor.h) to access the pixels.
.PP .PP
\fBWarning:\fR If you are accessing 16-bpp image data, you must handle endianness yourself. (Qt/Embedded only) \fBWarning:\fR If you are accessing 16-bpp image data, you must handle endianness yourself. (Qt/Embedded only)
.PP .PP
@ -897,7 +897,7 @@ See also hasAlphaBuffer() and createAlphaMask().
.SH "void QImage::setColor ( int i, QRgb c )" .SH "void QImage::setColor ( int i, QRgb c )"
Sets a color in the color table at index \fIi\fR to \fIc\fR. Sets a color in the color table at index \fIi\fR to \fIc\fR.
.PP .PP
A color value is an RGB triplet. Use the qRgb() function (defined in ntqcolor.h) to make RGB triplets. A color value is an RGB triplet. Use the tqRgb() function (defined in ntqcolor.h) to make RGB triplets.
.PP .PP
See also color(), setNumColors(), and numColors(). See also color(), setNumColors(), and numColors().
.PP .PP
@ -922,7 +922,7 @@ If (\fIx\fR, \fIy\fR) is not valid, the result is undefined.
.PP .PP
If the image is a paletted image (depth() <= 8) and \fIindex_or_rgb\fR >= numColors(), the result is undefined. If the image is a paletted image (depth() <= 8) and \fIindex_or_rgb\fR >= numColors(), the result is undefined.
.PP .PP
See also pixelIndex(), pixel(), qRgb(), qRgba(), and valid(). See also pixelIndex(), pixel(), tqRgb(), tqRgba(), and valid().
.SH "void QImage::setText ( const char * key, const char * lang, const QString & s )" .SH "void QImage::setText ( const char * key, const char * lang, const QString & s )"
Records string \fIs\fR for the keyword \fIkey\fR. The \fIkey\fR should be a portable keyword recognizable by other software - some suggested values can be found in the PNG specification. \fIs\fR can be any text. \fIlang\fR should specify the language code (see RFC 1766) or 0. Records string \fIs\fR for the keyword \fIkey\fR. The \fIkey\fR should be a portable keyword recognizable by other software - some suggested values can be found in the PNG specification. \fIs\fR can be any text. \fIlang\fR should specify the language code (see RFC 1766) or 0.
.SH "QSize QImage::size () const" .SH "QSize QImage::size () const"

@ -161,7 +161,7 @@ for ( int i = 0; i < numFiles; i++ ) {
.br .br
progress.setProgress( i ); progress.setProgress( i );
.br .br
qApp->processEvents(); tqApp->processEvents();
.br .br
.br .br
if ( progress.wasCanceled() ) if ( progress.wasCanceled() )

@ -114,13 +114,13 @@ The user can hide the splash screen by clicking on it with the mouse. Since the
.br .br
splash->message( "Loaded modules" ); splash->message( "Loaded modules" );
.br .br
qApp->processEvents(); tqApp->processEvents();
.br .br
... // Establishing connections ... // Establishing connections
.br .br
splash->message( "Established connections" ); splash->message( "Established connections" );
.br .br
qApp->processEvents(); tqApp->processEvents();
.br .br
.fi .fi
.PP .PP

@ -576,10 +576,10 @@ be in the more efficient order (for typical contemporary hardware). If your
code made assumptions about the order, you will get blue where you expect code made assumptions about the order, you will get blue where you expect
red and vice versa (you'll not notice the problem if you use shades of red and vice versa (you'll not notice the problem if you use shades of
gray, green, or magenta). You should port your code to use the gray, green, or magenta). You should port your code to use the
creator function qRgb(int r,int g,int b) and the creator function tqRgb(int r,int g,int b) and the
access functions qRed(QRgb), qBlue(QRgb), and qGreen(QRgb). access functions tqRed(QRgb), tqBlue(QRgb), and tqGreen(QRgb).
If you are using the alpha channel, it hasn't moved, but you should use If you are using the alpha channel, it hasn't moved, but you should use
the functions qRgba(int,int,int,int) and qAlpha(QRgb). Note also that the functions tqRgba(int,int,int,int) and tqAlpha(QRgb). Note also that
QColor::pixel() does <i>not</i> return a QRgb (it never did on all platforms, QColor::pixel() does <i>not</i> return a QRgb (it never did on all platforms,
but your code may have assumed so on your platform) - this may also produce but your code may have assumed so on your platform) - this may also produce
strange color results - use QColor::rgb() if you want a QRgb. strange color results - use QColor::rgb() if you want a QRgb.

@ -255,7 +255,7 @@ are examples of simple GUI operations:
\code \code
... ...
qApp->lock(); tqApp->lock();
QPainter p; QPainter p;
p.begin( mywidget ); p.begin( mywidget );
@ -263,7 +263,7 @@ are examples of simple GUI operations:
p.drawLine( 0,0,100,100 ); p.drawLine( 0,0,100,100 );
p.end(); p.end();
qApp->unlock(); tqApp->unlock();
... ...
\endcode \endcode

@ -445,18 +445,18 @@ imminent death.)
The setGeometry() call does the same as move() and resize() did in the The setGeometry() call does the same as move() and resize() did in the
previous chapters. previous chapters.
\printline qApp \printline tqApp
\printline } \printline }
Because the MyWidget class doesn't know about the application object, it Because the MyWidget class doesn't know about the application object, it
has to connect to Qt's pointer to it, \c qApp. has to connect to Qt's pointer to it, \c tqApp.
A widget is a software component and should know as little as possible A widget is a software component and should know as little as possible
about its environment in order to be as general and reusable as about its environment in order to be as general and reusable as
possible. possible.
Knowing the name of the application object would break this principle, Knowing the name of the application object would break this principle,
so Qt offers an alias, qApp, for the cases in which a component such as so Qt offers an alias, tqApp, for the cases in which a component such as
MyWidget needs to talk to the application object. MyWidget needs to talk to the application object.
\printuntil } \printuntil }

@ -94,7 +94,7 @@ ApplicationWindow::ApplicationWindow()
fileQuitAction = new TQAction( "Quit", "&Quit", CTRL+Key_Q, this, fileQuitAction = new TQAction( "Quit", "&Quit", CTRL+Key_Q, this,
"quit" ); "quit" );
connect( fileQuitAction, SIGNAL( activated() ) , qApp, connect( fileQuitAction, SIGNAL( activated() ) , tqApp,
SLOT( closeAllWindows() ) ); SLOT( closeAllWindows() ) );
// populate a tool bar with some actions // populate a tool bar with some actions

@ -47,7 +47,7 @@ void ABMainWindow::setupMenuBar()
file->insertItem( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P ); file->insertItem( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "Close", this, SLOT( closeWindow() ), CTRL + Key_W ); file->insertItem( "Close", this, SLOT( closeWindow() ), CTRL + Key_W );
file->insertItem( "Quit", qApp, SLOT( quit() ), CTRL + Key_Q ); file->insertItem( "Quit", tqApp, SLOT( quit() ), CTRL + Key_Q );
} }
void ABMainWindow::setupFileTools() void ABMainWindow::setupFileTools()

@ -112,7 +112,7 @@ ApplicationWindow::ApplicationWindow()
file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W ); file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W );
file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
menuBar()->insertSeparator(); menuBar()->insertSeparator();

@ -9,18 +9,18 @@ static inline int blendComponent( int v, int av, int s, int as )
static inline TQRgb blendShade( TQRgb v, TQRgb s ) static inline TQRgb blendShade( TQRgb v, TQRgb s )
{ {
//shadow image is already reduced and blurred //shadow image is already reduced and blurred
int as = qAlpha(s); int as = tqAlpha(s);
int av = qAlpha(v); int av = tqAlpha(v);
if ( as == 0 || av == 255 ) if ( as == 0 || av == 255 )
return v; return v;
int a = as + av -(as*av)/255; int a = as + av -(as*av)/255;
int r = blendComponent( qRed(v),av, qRed(s), as)/a; int r = blendComponent( tqRed(v),av, tqRed(s), as)/a;
int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a;
int b = blendComponent( qBlue(v),av, qBlue(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);
} }

@ -79,7 +79,7 @@ bool ImageItem::hit( const TQPoint &p ) const
if ( !image.valid( ix , iy ) ) if ( !image.valid( ix , iy ) )
return FALSE; return FALSE;
TQRgb pixel = image.pixel( ix, iy ); TQRgb pixel = image.pixel( ix, iy );
return qAlpha( pixel ) != 0; return tqAlpha( pixel ) != 0;
} }
class NodeItem: public TQCanvasEllipse class NodeItem: public TQCanvasEllipse
@ -319,7 +319,7 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) :
file->insertSeparator(); file->insertSeparator();
file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P); file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P);
file->insertSeparator(); 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); menu->insertItem("&File", file);
TQPopupMenu* edit = new TQPopupMenu( menu ); TQPopupMenu* edit = new TQPopupMenu( menu );
@ -409,9 +409,9 @@ void Main::newView()
{ {
// Open a new view... have it delete when closed. // Open a new view... have it delete when closed.
Main *m = new Main(canvas, 0, 0, WDestructiveClose); Main *m = new Main(canvas, 0, 0, WDestructiveClose);
qApp->setMainWidget(m); tqApp->setMainWidget(m);
m->show(); m->show();
qApp->setMainWidget(0); tqApp->setMainWidget(0);
} }
void Main::clear() void Main::clear()

@ -36,7 +36,7 @@ int main(int argc, char** argv)
else else
m.showMaximized(); m.showMaximized();
TQObject::connect( qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()) ); TQObject::connect( tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()) );
return app.exec(); return app.exec();
} }

@ -13,19 +13,19 @@ static inline int blendComponent( int v, int av, int s, int as )
static inline TQRgb blendShade( TQRgb v, TQRgb s ) static inline TQRgb blendShade( TQRgb v, TQRgb s )
{ {
//pick a number: shadow is 1/3 of object //pick a number: shadow is 1/3 of object
int as = qAlpha(s)/3; int as = tqAlpha(s)/3;
int av = qAlpha(v); int av = tqAlpha(v);
if ( as == 0 || av == 255 ) if ( as == 0 || av == 255 )
return v; return v;
int a = as + av -(as*av)/255; int a = as + av -(as*av)/255;
int r = blendComponent( qRed(v),av, qRed(s), as)/a; int r = blendComponent( tqRed(v),av, tqRed(s), as)/a;
int g = blendComponent( qGreen(v),av, qGreen(s), as)/a; int g = blendComponent( tqGreen(v),av, tqGreen(s), as)/a;
int b = blendComponent( qBlue(v),av, qBlue(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**) int main( int*, char**)
@ -44,9 +44,9 @@ int main( int*, char**)
uint *line = (uint*)img->scanLine( y ); uint *line = (uint*)img->scanLine( y );
for ( int x = 0; x < w; x++ ) { for ( int x = 0; x < w; x++ ) {
uint pixel = line[x]; uint pixel = line[x];
int r = qRed(pixel); int r = tqRed(pixel);
int g = qGreen(pixel); int g = tqGreen(pixel);
int b = qBlue(pixel); int b = tqBlue(pixel);
int min = TQMIN( r, TQMIN( g, b ) ); int min = TQMIN( r, TQMIN( g, b ) );
int max = TQMAX( r, TQMAX( g, b ) ); int max = TQMAX( r, TQMAX( g, b ) );
r -= min; r -= min;
@ -59,7 +59,7 @@ int main( int*, char**)
} }
int a = 255-min; int a = 255-min;
a -= (max-min)/3; //hack more transparency for colors. a -= (max-min)/3; //hack more transparency for colors.
line[x] = qRgba( r, g, b, a ); line[x] = tqRgba( r, g, b, a );
} }
} }
#endif #endif
@ -77,13 +77,13 @@ int main( int*, char**)
for ( int x = 0; x < w; x++ ) { for ( int x = 0; x < w; x++ ) {
TQRgb shader = img->pixel( x, y ); TQRgb shader = img->pixel( x, y );
int as = qAlpha(shader)/3; int as = tqAlpha(shader)/3;
int r = (qRed(shader)*(255-as))/255; int r = (tqRed(shader)*(255-as))/255;
int g = (qGreen(shader)*(255-as))/255; int g = (tqGreen(shader)*(255-as))/255;
int b = (qBlue(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) );
} }
} }

@ -368,7 +368,7 @@ void ChartForm::fileQuit()
{ {
if ( okToClear() ) { if ( okToClear() ) {
saveOptions(); saveOptions();
qApp->exit( 0 ); tqApp->exit( 0 );
} }
} }

@ -132,10 +132,10 @@ void Frame::setStyle( const TQString& style )
void Frame::updateTranslators() void Frame::updateTranslators()
{ {
if ( !qt_translator ) { if ( !qt_translator ) {
qt_translator = new TQTranslator( qApp ); qt_translator = new TQTranslator( tqApp );
translator = new TQTranslator( qApp ); translator = new TQTranslator( tqApp );
qApp->installTranslator( qt_translator ); tqApp->installTranslator( qt_translator );
qApp->installTranslator( translator ); tqApp->installTranslator( translator );
} }
TQString base = TQDir("../../translations").absPath(); TQString base = TQDir("../../translations").absPath();

@ -114,14 +114,14 @@ void I18nDemo::newSlot(int id)
} }
if (lastwrapper) { if (lastwrapper) {
qApp->removeTranslator(&lastwrapper->translator); tqApp->removeTranslator(&lastwrapper->translator);
lastwrapper = 0; lastwrapper = 0;
} }
Wrapper *wrapper = new Wrapper(workspace, windowIdNumber); Wrapper *wrapper = new Wrapper(workspace, windowIdNumber);
wrapper->translator.load(qmfile, "."); wrapper->translator.load(qmfile, ".");
qApp->installTranslator(&wrapper->translator); tqApp->installTranslator(&wrapper->translator);
connect(wrapper, SIGNAL(destroyed()), SLOT(wrapperDead())); connect(wrapper, SIGNAL(destroyed()), SLOT(wrapperDead()));
wrapper->setCaption(tr("--language--")); wrapper->setCaption(tr("--language--"));
@ -139,7 +139,7 @@ void I18nDemo::newSlot(int id)
"<p>See <tt>http://www.trolltech.com/qt/</tt> for more " "<p>See <tt>http://www.trolltech.com/qt/</tt> for more "
"information.</p>").arg(TQT_VERSION_STR)); "information.</p>").arg(TQT_VERSION_STR));
qApp->removeTranslator(&wrapper->translator); tqApp->removeTranslator(&wrapper->translator);
te->show(); te->show();
wrapper->show(); wrapper->show();
@ -173,7 +173,7 @@ void I18nDemo::windowSlot(int id)
void I18nDemo::windowActivated(TQWidget *w) void I18nDemo::windowActivated(TQWidget *w)
{ {
if (lastwrapper) { if (lastwrapper) {
qApp->removeTranslator(&lastwrapper->translator); tqApp->removeTranslator(&lastwrapper->translator);
windowMenu->setItemChecked(lastwrapper->id, FALSE); windowMenu->setItemChecked(lastwrapper->id, FALSE);
} }
@ -221,7 +221,7 @@ void I18nDemo::wrapperDead()
Wrapper *w = (Wrapper *) sender(); Wrapper *w = (Wrapper *) sender();
if (w == lastwrapper) { if (w == lastwrapper) {
qApp->removeTranslator(&w->translator); tqApp->removeTranslator(&w->translator);
lastwrapper = 0; lastwrapper = 0;
} }
@ -240,7 +240,7 @@ void I18nDemo::showEvent(TQShowEvent *)
if (! lastwrapper) if (! lastwrapper)
return; return;
qApp->installTranslator(&lastwrapper->translator); tqApp->installTranslator(&lastwrapper->translator);
} }
@ -249,5 +249,5 @@ void I18nDemo::hideEvent(TQHideEvent *)
if (! lastwrapper) if (! lastwrapper)
return; return;
qApp->removeTranslator(&lastwrapper->translator); tqApp->removeTranslator(&lastwrapper->translator);
} }

@ -59,7 +59,7 @@
static void qdemo_set_caption( CategoryInterface *c, int i ) static void qdemo_set_caption( CategoryInterface *c, int i )
{ {
TQWidget *w = qApp->mainWidget(); TQWidget *w = tqApp->mainWidget();
if ( !w ) if ( !w )
return; return;
TQString title = Frame::tr( "TQt Demo Collection" ); TQString title = Frame::tr( "TQt Demo Collection" );

@ -316,7 +316,7 @@ void TextEdit::fileClose()
void TextEdit::fileExit() void TextEdit::fileExit()
{ {
qApp->quit(); tqApp->quit();
} }
void TextEdit::editUndo() void TextEdit::editUndo()

@ -121,7 +121,7 @@ void rotate()
const int h = 64; const int h = 64;
TQImage image( w, h, 8, 128 ); // create image TQImage image( w, h, 8, 128 ); // create image
for ( i=0; i<128; i++ ) // build color table for ( i=0; i<128; i++ ) // build color table
image.setColor( i, qRgb(i,0,0) ); image.setColor( i, tqRgb(i,0,0) );
for ( int y=0; y<h; y++ ) { // set image pixels for ( int y=0; y<h; y++ ) { // set image pixels
uchar *p = image.scanLine(y); uchar *p = image.scanLine(y);
for ( int x=0; x<w; x++ ) for ( int x=0; x<w; x++ )
@ -261,7 +261,7 @@ void desktopWidget( const char *s = "Trolltech" )
{ {
DesktopWidget *t = new DesktopWidget(s); DesktopWidget *t = new DesktopWidget(s);
t->update(); t->update();
qApp->exec(); tqApp->exec();
delete t; delete t;
} }
@ -269,7 +269,7 @@ void desktopText( const char *s = "Trolltech" )
{ {
const int border = 20; const int border = 20;
TQColor c1 = qApp->palette().inactive().background(); TQColor c1 = tqApp->palette().inactive().background();
TQColor c2 = c1.light(104); TQColor c2 = c1.light(104);
TQColor c3 = c1.dark(106); TQColor c3 = c1.dark(106);
@ -280,8 +280,8 @@ void desktopText( const char *s = "Trolltech" )
TQRect r = p.fontMetrics().boundingRect( s ); TQRect r = p.fontMetrics().boundingRect( s );
p.end(); p.end();
int appWidth = qApp->desktop()->width(); int appWidth = tqApp->desktop()->width();
int appHeight = qApp->desktop()->height(); int appHeight = tqApp->desktop()->height();
if ( r.width() > appWidth - border*2 ) if ( r.width() > appWidth - border*2 )
r.setWidth( appWidth - border*2 ); r.setWidth( appWidth - border*2 );
if ( r.height() > appHeight - border*2 ) if ( r.height() > appHeight - border*2 )
@ -293,7 +293,7 @@ void desktopText( const char *s = "Trolltech" )
drawShadeText( &p, -r.x() + border, -r.y() + border, s, c2, c3 ); drawShadeText( &p, -r.x() + border, -r.y() + border, s, c2, c3 );
p.end(); p.end();
qApp->desktop()->setBackgroundPixmap( pm ); tqApp->desktop()->setBackgroundPixmap( pm );
} }
// //

@ -68,6 +68,6 @@ int main( int argc, char ** argv )
mw3.setCaption( "TQt Example - Drag and Drop" ); mw3.setCaption( "TQt Example - Drag and Drop" );
mw3.show(); mw3.show();
TQObject::connect(qApp,SIGNAL(lastWindowClosed()),qApp,SLOT(quit())); TQObject::connect(tqApp,SIGNAL(lastWindowClosed()),tqApp,SLOT(quit()));
return a.exec(); return a.exec();
} }

@ -554,7 +554,7 @@ void TQtFileIconView::newDirectory()
item->setSelected( TRUE, TRUE ); item->setSelected( TRUE, TRUE );
setCurrentItem( item ); setCurrentItem( item );
repaintItem( item ); repaintItem( item );
qApp->processEvents(); tqApp->processEvents();
item->rename(); item->rename();
} }
setAutoArrange( TRUE ); setAutoArrange( TRUE );

@ -66,7 +66,7 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
file->insertItem( tr("&Print"), this, SLOT( print() ), CTRL+Key_P ); file->insertItem( tr("&Print"), this, SLOT( print() ), CTRL+Key_P );
file->insertSeparator(); file->insertSeparator();
file->insertItem( tr("&Close"), this, SLOT( close() ), CTRL+Key_Q ); file->insertItem( tr("&Close"), this, SLOT( close() ), CTRL+Key_Q );
file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), CTRL+Key_X ); file->insertItem( tr("E&xit"), tqApp, SLOT( closeAllWindows() ), CTRL+Key_X );
// The same three icons are used twice each. // The same three icons are used twice each.
TQIconSet icon_back( TQPixmap("back.xpm") ); TQIconSet icon_back( TQPixmap("back.xpm") );

@ -71,7 +71,7 @@ MyWidget* showLang(TQString lang)
static TQTranslator *translator = 0; static TQTranslator *translator = 0;
qApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64))); tqApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64)));
lang = "mywidget_" + lang + ".qm"; lang = "mywidget_" + lang + ".qm";
TQFileInfo fi( lang ); TQFileInfo fi( lang );
@ -83,12 +83,12 @@ MyWidget* showLang(TQString lang)
return 0; return 0;
} }
if ( translator ) { if ( translator ) {
qApp->removeTranslator( translator ); tqApp->removeTranslator( translator );
delete translator; delete translator;
} }
translator = new TQTranslator( 0 ); translator = new TQTranslator( 0 );
translator->load( lang, "." ); translator->load( lang, "." );
qApp->installTranslator( translator ); tqApp->installTranslator( translator );
MyWidget *m = new MyWidget; MyWidget *m = new MyWidget;
m->setCaption("TQt Example - i18n - " + m->caption() ); m->setCaption("TQt Example - i18n - " + m->caption() );
return m; return m;
@ -126,7 +126,7 @@ int main( int argc, char** argv )
r = dlg.exec(); r = dlg.exec();
} }
if ( r ) { if ( r ) {
TQRect screen = qApp->desktop()->availableGeometry(); TQRect screen = tqApp->desktop()->availableGeometry();
bool tight = screen.width() < 1024; bool tight = screen.width() < 1024;
int x=screen.left()+5; int x=screen.left()+5;
int y=screen.top()+25; int y=screen.top()+25;
@ -135,7 +135,7 @@ int main( int argc, char** argv )
MyWidget* w = showLang((const char*)qm[i]); MyWidget* w = showLang((const char*)qm[i]);
if( w == 0 ) exit( 0 ); if( w == 0 ) exit( 0 );
TQObject::connect(w, SIGNAL(closed()), qApp, SLOT(quit())); TQObject::connect(w, SIGNAL(closed()), tqApp, SLOT(quit()));
w->setGeometry(x,y,197,356); w->setGeometry(x,y,197,356);
w->show(); w->show();
if ( tight ) { if ( tight ) {

@ -32,7 +32,7 @@ MyWidget::MyWidget( TQWidget* parent, const char* name )
setCentralWidget(central); setCentralWidget(central);
TQPopupMenu* file = new TQPopupMenu(this); TQPopupMenu* file = new TQPopupMenu(this);
file->insertItem( tr("E&xit"), qApp, SLOT(quit()), file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
TQAccel::stringToKey(tr("Ctrl+Q")) ); TQAccel::stringToKey(tr("Ctrl+Q")) );
menuBar()->insertItem( tr("&File"), file ); menuBar()->insertItem( tr("&File"), file );

@ -36,7 +36,7 @@ ExampleWidget::ExampleWidget( TQWidget *parent, const char *name )
menubar->setSeparator( TQMenuBar::InWindowsStyle ); menubar->setSeparator( TQMenuBar::InWindowsStyle );
TQPopupMenu* popup; TQPopupMenu* popup;
popup = new TQPopupMenu( this ); popup = new TQPopupMenu( this );
popup->insertItem( "&Quit", qApp, SLOT(quit()) ); popup->insertItem( "&Quit", tqApp, SLOT(quit()) );
menubar->insertItem( "&File", popup ); menubar->insertItem( "&File", popup );
// ...and tell the layout about it. // ...and tell the layout about it.

@ -55,7 +55,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
life->move( SIDEBORDER, TOPBORDER ); life->move( SIDEBORDER, TOPBORDER );
connect( qb, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( qb, SIGNAL(clicked()), tqApp, SLOT(quit()) );
qb->setGeometry( SIDEBORDER, SIDEBORDER, qb->sizeHint().width(), 25 ); qb->setGeometry( SIDEBORDER, SIDEBORDER, qb->sizeHint().width(), 25 );
timer = new LifeTimer( this ); timer = new LifeTimer( this );
@ -130,8 +130,8 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
s = life->sizeIncrement(); s = life->sizeIncrement();
setSizeIncrement( s.width(), s.height() ); setSizeIncrement( s.width(), s.height() );
resize( TQMIN(512, qApp->desktop()->width()), resize( TQMIN(512, tqApp->desktop()->width()),
TQMIN(480, qApp->desktop()->height()) ); TQMIN(480, tqApp->desktop()->height()) );
} }

@ -107,7 +107,7 @@ ApplicationWindow::ApplicationWindow()
#endif #endif
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Close", this, SLOT(closeWindow()), CTRL+Key_W ); file->insertItem( "&Close", this, SLOT(closeWindow()), CTRL+Key_W );
file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); file->insertItem( "&Quit", tqApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
windowsMenu = new TQPopupMenu( this ); windowsMenu = new TQPopupMenu( this );
windowsMenu->setCheckable( TRUE ); windowsMenu->setCheckable( TRUE );

@ -137,7 +137,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Print", print, CTRL+Key_P ); file->insertItem( "&Print", print, CTRL+Key_P );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q );
TQPopupMenu *edit = new TQPopupMenu( this ); TQPopupMenu *edit = new TQPopupMenu( this );
TQ_CHECK_PTR( edit ); TQ_CHECK_PTR( edit );

@ -251,7 +251,7 @@ void MovieStarter::startMovie(const TQString& filename)
void MovieStarter::done( int r ) void MovieStarter::done( int r )
{ {
if (r != Accepted) if (r != Accepted)
qApp->quit(); // end on Cancel tqApp->quit(); // end on Cancel
setResult( r ); setResult( r );
// And don't hide. // And don't hide.
@ -276,7 +276,7 @@ int main(int argc, char **argv)
(void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0, (void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0,
TQt::WDestructiveClose); TQt::WDestructiveClose);
} }
TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
} else { } else {
// "GUI" mode - open a chooser for movies // "GUI" mode - open a chooser for movies
// //

@ -34,7 +34,7 @@ public:
connect( send, SIGNAL(clicked()), SLOT(sendToServer()) ); connect( send, SIGNAL(clicked()), SLOT(sendToServer()) );
connect( close, SIGNAL(clicked()), SLOT(closeConnection()) ); connect( close, SIGNAL(clicked()), SLOT(closeConnection()) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
// create the socket and connect various of its signals // create the socket and connect various of its signals
socket = new TQSocket( this ); socket = new TQSocket( this );

@ -122,7 +122,7 @@ public:
connect( server, SIGNAL(newConnect(ClientSocket*)), connect( server, SIGNAL(newConnect(ClientSocket*)),
SLOT(newConnect(ClientSocket*)) ); SLOT(newConnect(ClientSocket*)) );
connect( quit, SIGNAL(clicked()), qApp, connect( quit, SIGNAL(clicked()), tqApp,
SLOT(quit()) ); SLOT(quit()) );
} }

@ -103,7 +103,7 @@ public:
connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) ); connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) );
connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) ); connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) );
connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) ); connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) );
connect( quit, SIGNAL(pressed()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(pressed()), tqApp, SLOT(quit()) );
} }
~HttpInfo() ~HttpInfo()

@ -28,7 +28,7 @@ ClientInfo::ClientInfo( TQWidget *parent, const char *name ) :
connect( infoList, SIGNAL(selected(const TQString&)), SLOT(selectItem(const TQString&)) ); connect( infoList, SIGNAL(selected(const TQString&)), SLOT(selectItem(const TQString&)) );
connect( btnConnect, SIGNAL(clicked()), SLOT(connectToServer()) ); connect( btnConnect, SIGNAL(clicked()), SLOT(connectToServer()) );
connect( btnBack, SIGNAL(clicked()), SLOT(stepBack()) ); connect( btnBack, SIGNAL(clicked()), SLOT(stepBack()) );
connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
} }

@ -23,7 +23,7 @@ ServerInfo::ServerInfo( Q_UINT16 port, TQWidget *parent, const char *name ) :
{ {
SimpleServer *server = new SimpleServer( port, this, "simple server" ); SimpleServer *server = new SimpleServer( port, this, "simple server" );
connect( server, SIGNAL(newConnect()), SLOT(newConnect()) ); connect( server, SIGNAL(newConnect()), SLOT(newConnect()) );
connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
} }
void ServerInfo::newConnect() void ServerInfo::newConnect()

@ -22,7 +22,7 @@ ClientInfo::ClientInfo( TQWidget *parent, const char *name ) :
ClientInfoBase( parent, name ) ClientInfoBase( parent, name )
{ {
connect( btnOpen, SIGNAL(clicked()), SLOT(downloadFile()) ); connect( btnOpen, SIGNAL(clicked()), SLOT(downloadFile()) );
connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( btnQuit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
connect( &op, SIGNAL( data( const TQByteArray &, TQNetworkOperation * ) ), connect( &op, SIGNAL( data( const TQByteArray &, TQNetworkOperation * ) ),
this, SLOT( newData( const TQByteArray & ) ) ); this, SLOT( newData( const TQByteArray & ) ) );
} }

@ -116,7 +116,7 @@ void Smtp::readyRead()
return; return;
} else { } else {
// something broke. // something broke.
TQMessageBox::warning( qApp->activeWindow(), TQMessageBox::warning( tqApp->activeWindow(),
tr( "TQt Mail Example" ), tr( "TQt Mail Example" ),
tr( "Unexpected reply from SMTP server:\n\n" ) + tr( "Unexpected reply from SMTP server:\n\n" ) +
response ); response );

@ -25,7 +25,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
// Create a menu // Create a menu
TQPopupMenu *file = new TQPopupMenu( this ); TQPopupMenu *file = new TQPopupMenu( this );
file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q );
// Create a menu bar // Create a menu bar
TQMenuBar *m = new TQMenuBar( this ); TQMenuBar *m = new TQMenuBar( this );

@ -46,7 +46,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
insertMenuItemId = file->insertItem( "Insert Pixmap Here", this, insertMenuItemId = file->insertItem( "Insert Pixmap Here", this,
SLOT(makePixmapForMenu()) ); SLOT(makePixmapForMenu()) );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q );
// Create a menu bar // Create a menu bar
TQMenuBar *m = new TQMenuBar( this ); TQMenuBar *m = new TQMenuBar( this );

@ -22,7 +22,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
{ {
// Create a menu // Create a menu
TQPopupMenu *file = new TQPopupMenu( this ); TQPopupMenu *file = new TQPopupMenu( this );
file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q );
// Create a menu bar // Create a menu bar
TQMenuBar *m = new TQMenuBar( this ); TQMenuBar *m = new TQMenuBar( this );
@ -39,7 +39,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
// Check if we obtained an overlay // Check if we obtained an overlay
if ( !c->format().hasOverlay() ) { if ( !c->format().hasOverlay() ) {
TQMessageBox::warning( 0, qApp->argv()[0], TQMessageBox::warning( 0, tqApp->argv()[0],
"Failed to get an OpenGL overlay", "Failed to get an OpenGL overlay",
"OK" ); "OK" );
} }

@ -37,7 +37,7 @@ int main( int argc, char **argv )
// Check for existence of overlays // Check for existence of overlays
if ( !TQGLFormat::hasOpenGLOverlays() ) { if ( !TQGLFormat::hasOpenGLOverlays() ) {
TQMessageBox::critical( 0, qApp->argv()[0], TQMessageBox::critical( 0, tqApp->argv()[0],
"This system does not support OpenGL overlays", "This system does not support OpenGL overlays",
"Exit" ); "Exit" );
return 1; return 1;

@ -77,7 +77,7 @@ TQColor findOverlayTransparentColor()
for ( uint i = 0; i < nItems/4; i++ ) { for ( uint i = 0; i < nItems/4; i++ ) {
if ( (VisualID)overlayProp[i].visual == XVisualIDFromVisual(appVisual) if ( (VisualID)overlayProp[i].visual == XVisualIDFromVisual(appVisual)
&& overlayProp[i].type == 1 ) && overlayProp[i].type == 1 )
return TQColor( qRgb( 1, 2, 3 ), overlayProp[i].value ); return TQColor( tqRgb( 1, 2, 3 ), overlayProp[i].value );
} }
qWarning( "Default visual is not in overlay plane" ); qWarning( "Default visual is not in overlay plane" );

@ -26,7 +26,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
TQPopupMenu *file = new TQPopupMenu( this ); TQPopupMenu *file = new TQPopupMenu( this );
file->insertItem( "Delete Left TQGLWidget", this, file->insertItem( "Delete Left TQGLWidget", this,
SLOT(deleteFirstWidget()) ); SLOT(deleteFirstWidget()) );
file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q );
// Create a menu bar // Create a menu bar
TQMenuBar *m = new TQMenuBar( this ); TQMenuBar *m = new TQMenuBar( this );

@ -36,7 +36,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
file->insertItem( "Toggle Animation", c, SLOT(toggleAnimation()), file->insertItem( "Toggle Animation", c, SLOT(toggleAnimation()),
CTRL+Key_A ); CTRL+Key_A );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "Exit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "Exit", tqApp, SLOT(quit()), CTRL+Key_Q );
// Create a menu bar // Create a menu bar
TQMenuBar *m = new TQMenuBar( this ); TQMenuBar *m = new TQMenuBar( this );

@ -41,7 +41,7 @@ UicManager::UicManager()
output = new TQTextView( this ); output = new TQTextView( this );
quitButton = new TQPushButton( tr("Quit"), this ); quitButton = new TQPushButton( tr("Quit"), this );
connect( quitButton, SIGNAL(clicked()), connect( quitButton, SIGNAL(clicked()),
qApp, SLOT(quit()) ); tqApp, SLOT(quit()) );
resize( 500, 500 ); resize( 500, 500 );
// TQProcess related code // TQProcess related code

@ -151,7 +151,7 @@ public:
file->insertItem( drawItemText(i), i ); file->insertItem( drawItemText(i), i );
connect( menubar, SIGNAL(activated(int)), this, SLOT(doMenuItem(int)) ); connect( menubar, SIGNAL(activated(int)), this, SLOT(doMenuItem(int)) );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "Quit", qApp, SLOT(quit()) ); file->insertItem( "Quit", tqApp, SLOT(quit()) );
options = new TQPopupMenu(); options = new TQPopupMenu();
TQ_CHECK_PTR( options ); TQ_CHECK_PTR( options );

@ -128,7 +128,7 @@ MagWidget::MagWidget( TQWidget *parent, const char *name )
quitButton = new TQPushButton( this ); quitButton = new TQPushButton( this );
TQ_CHECK_PTR(quitButton); TQ_CHECK_PTR(quitButton);
connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) );
quitButton->setText( "Quit" ); quitButton->setText( "Quit" );
quitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2, quitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2,
10+quitButton->fontMetrics().width("Quit"), 20 ); 10+quitButton->fontMetrics().width("Quit"), 20 );
@ -334,8 +334,8 @@ void MagWidget::mouseMoveEvent( TQMouseEvent *e )
{ {
TQRgb px = image.pixel(x,y); TQRgb px = image.pixel(x,y);
pixelinfo.sprintf(" %3d,%3d,%3d #%02x%02x%02x", pixelinfo.sprintf(" %3d,%3d,%3d #%02x%02x%02x",
qRed(px), qGreen(px), qBlue(px), tqRed(px), tqGreen(px), tqBlue(px),
qRed(px), qGreen(px), qBlue(px)); tqRed(px), tqGreen(px), tqBlue(px));
} }
TQString label; TQString label;
label.sprintf( "x=%d, y=%d %s", label.sprintf( "x=%d, y=%d %s",

@ -16,8 +16,8 @@ int main( int argc, char **argv )
TQApplication a( argc, argv ); TQApplication a( argc, argv );
bool isSmall = qApp->desktop()->size().width() < 450 bool isSmall = tqApp->desktop()->size().width() < 450
|| qApp->desktop()->size().height() < 450; || tqApp->desktop()->size().height() < 450;
int i; int i;
for ( i= argc <= 1 ? 0 : 1; i<argc; i++ ) { for ( i= argc <= 1 ? 0 : 1; i<argc; i++ ) {

@ -52,7 +52,7 @@ Editor::Editor( TQWidget * parent , const char * name )
#endif #endif
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W ); file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W );
file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), ALT+Key_Q ); file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), ALT+Key_Q );
connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) ); connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) );
connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) ); connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) );
@ -130,8 +130,8 @@ void Editor::rebuildCodecList()
void Editor::newDoc() void Editor::newDoc()
{ {
Editor *ed = new Editor; Editor *ed = new Editor;
if ( qApp->desktop()->size().width() < 450 if ( tqApp->desktop()->size().width() < 450
|| qApp->desktop()->size().height() < 450 ) { || tqApp->desktop()->size().height() < 450 ) {
ed->showMaximized(); ed->showMaximized();
} else { } else {
ed->resize( 400, 400 ); ed->resize( 400, 400 );

@ -100,7 +100,7 @@ MyRichText::MyRichText( TQWidget *parent, const char *name )
bPrev->setEnabled( FALSE ); bPrev->setEnabled( FALSE );
connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); connect( bClose, SIGNAL( clicked() ), tqApp, SLOT( quit() ) );
connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) );
connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) );

@ -23,7 +23,7 @@ Rot13::Rot13()
TQPushButton * quit = new TQPushButton( "&Quit", this ); TQPushButton * quit = new TQPushButton( "&Quit", this );
quit->setFocusPolicy( NoFocus ); quit->setFocusPolicy( NoFocus );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
TQGridLayout * l = new TQGridLayout( this, 2, 2, 5 ); TQGridLayout * l = new TQGridLayout( this, 2, 2, 5 );
l->addWidget( left, 0, 0 ); l->addWidget( left, 0, 0 );

@ -33,7 +33,7 @@ Canvas::Canvas( TQWidget *parent, const char *name )
mousePressed( FALSE ), buffer( width(), height() ) mousePressed( FALSE ), buffer( width(), height() )
{ {
if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1])) if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1]))
buffer.fill( colorGroup().base() ); buffer.fill( colorGroup().base() );
setBackgroundMode( TQWidget::PaletteBase ); setBackgroundMode( TQWidget::PaletteBase );
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR

@ -43,7 +43,7 @@ public:
for (int y=0; y<2000-h; y+=h+10) { for (int y=0; y<2000-h; y+=h+10) {
if (y == 0) { if (y == 0) {
TQButton* q=new TQPushButton("Quit", this); TQButton* q=new TQPushButton("Quit", this);
connect(q, SIGNAL(clicked()), qApp, SLOT(quit())); connect(q, SIGNAL(clicked()), tqApp, SLOT(quit()));
} else { } else {
TQString str; TQString str;
if ( b > 0 ) { if ( b > 0 ) {
@ -207,7 +207,7 @@ public:
TQPopupMenu* file = new TQPopupMenu( menubar ); TQPopupMenu* file = new TQPopupMenu( menubar );
TQ_CHECK_PTR( file ); TQ_CHECK_PTR( file );
menubar->insertItem( "&File", file ); menubar->insertItem( "&File", file );
file->insertItem( "Quit", qApp, SLOT(quit()) ); file->insertItem( "Quit", tqApp, SLOT(quit()) );
vp_options = new TQPopupMenu( menubar ); vp_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( vp_options ); TQ_CHECK_PTR( vp_options );
@ -433,7 +433,7 @@ int main( int argc, char **argv )
ve3.setCaption("TQt Example - Scrollviews"); ve3.setCaption("TQt Example - Scrollviews");
ve3.show(); ve3.show();
TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
return a.exec(); return a.exec();
} }

@ -50,7 +50,7 @@ int main( int argc, char **argv )
} }
} }
TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
return a.exec(); return a.exec();
} }

@ -57,7 +57,7 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags )
si = file->insertItem( "Save image", saveimage ); si = file->insertItem( "Save image", saveimage );
sp = file->insertItem( "Save pixmap", savepixmap ); sp = file->insertItem( "Save pixmap", savepixmap );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q );
edit = new TQPopupMenu( menubar ); edit = new TQPopupMenu( menubar );
menubar->insertItem( "&Edit", edit ); menubar->insertItem( "&Edit", edit );

@ -50,7 +50,7 @@ SoundPlayer::SoundPlayer() :
file->insertItem("Play 3 and 4 together", this, SLOT(doPlay34())); file->insertItem("Play 3 and 4 together", this, SLOT(doPlay34()));
file->insertItem("Play all together", this, SLOT(doPlay1234())); file->insertItem("Play all together", this, SLOT(doPlay1234()));
file->insertSeparator(); file->insertSeparator();
file->insertItem("E&xit", qApp, SLOT(quit())); file->insertItem("E&xit", tqApp, SLOT(quit()));
menuBar()->insertItem("&File", file); menuBar()->insertItem("&File", file);
} }

@ -25,7 +25,7 @@ TabDialog::TabDialog( TQWidget *parent, const char *name, const TQString &_filen
setupTab2(); setupTab2();
setupTab3(); setupTab3();
connect( this, SIGNAL( applyButtonPressed() ), qApp, SLOT( quit() ) ); connect( this, SIGNAL( applyButtonPressed() ), tqApp, SLOT( quit() ) );
} }
void TabDialog::setupTab1() void TabDialog::setupTab1()

@ -23,7 +23,7 @@ Canvas::Canvas( TQWidget *parent, const char *name, WFlags fl )
buffer( width(), height() ) buffer( width(), height() )
{ {
if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1])) if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1]))
buffer.fill( colorGroup().base() ); buffer.fill( colorGroup().base() );
setBackgroundMode( TQWidget::PaletteBase ); setBackgroundMode( TQWidget::PaletteBase );
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR

@ -172,5 +172,5 @@ void TQTetrix::gameOver()
void TQTetrix::quit() void TQTetrix::quit()
{ {
qApp->quit(); tqApp->quit();
} }

@ -40,11 +40,11 @@ TextEdit::TextEdit( TQWidget *parent, const char *name )
this, SLOT( editorChanged( TQWidget * ) ) ); this, SLOT( editorChanged( TQWidget * ) ) );
setCentralWidget( tabWidget ); setCentralWidget( tabWidget );
if ( qApp->argc() == 1 ) { if ( tqApp->argc() == 1 ) {
load( "example.html" ); load( "example.html" );
} else { } else {
for ( int i = 1; i < qApp->argc(); ++i ) for ( int i = 1; i < tqApp->argc(); ++i )
load( qApp->argv()[ i ] ); load( tqApp->argv()[ i ] );
} }
} }
@ -315,7 +315,7 @@ void TextEdit::fileClose()
void TextEdit::fileExit() void TextEdit::fileExit()
{ {
qApp->quit(); tqApp->quit();
} }
void TextEdit::editUndo() void TextEdit::editUndo()

@ -86,7 +86,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
} }
ag->addTo(style); ag->addTo(style);
style->insertSeparator(); style->insertSeparator();
style->insertItem("&Quit", qApp, SLOT( quit() ), CTRL | Key_Q ); style->insertItem("&Quit", tqApp, SLOT( quit() ), CTRL | Key_Q );
TQPopupMenu * help = new TQPopupMenu( this ); TQPopupMenu * help = new TQPopupMenu( this );
menuBar()->insertSeparator(); menuBar()->insertSeparator();
@ -95,7 +95,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
help->insertItem( "About &TQt", this, SLOT(aboutTQt())); help->insertItem( "About &TQt", this, SLOT(aboutTQt()));
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
qApp->setStyle( new NorwegianWoodStyle ); tqApp->setStyle( new NorwegianWoodStyle );
#endif #endif
} }
@ -103,20 +103,20 @@ void Themes::makeStyle(const TQString &style)
{ {
if(style == "Norwegian Wood") { if(style == "Norwegian Wood") {
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
qApp->setStyle( new NorwegianWoodStyle ); tqApp->setStyle( new NorwegianWoodStyle );
#endif #endif
} else if( style == "Metal" ) { } else if( style == "Metal" ) {
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
qApp->setStyle( new MetalStyle ); tqApp->setStyle( new MetalStyle );
#endif #endif
} else { } else {
qApp->setStyle(style); tqApp->setStyle(style);
if(style == "Platinum") { if(style == "Platinum") {
TQPalette p( TQColor( 239, 239, 239 ) ); TQPalette p( TQColor( 239, 239, 239 ) );
qApp->setPalette( p, TRUE ); tqApp->setPalette( p, TRUE );
qApp->setFont( appFont, TRUE ); tqApp->setFont( appFont, TRUE );
} else if(style == "Windows") { } else if(style == "Windows") {
qApp->setFont( appFont, TRUE ); tqApp->setFont( appFont, TRUE );
} else if(style == "CDE") { } else if(style == "CDE") {
TQPalette p( TQColor( 75, 123, 130 ) ); TQPalette p( TQColor( 75, 123, 130 ) );
p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
@ -137,12 +137,12 @@ void Themes::makeStyle(const TQString &style)
p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray );
p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray );
p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray );
qApp->setPalette( p, TRUE ); tqApp->setPalette( p, TRUE );
qApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE );
} else if(style == "Motif" || style == "MotifPlus") { } else if(style == "Motif" || style == "MotifPlus") {
TQPalette p( TQColor( 192, 192, 192 ) ); TQPalette p( TQColor( 192, 192, 192 ) );
qApp->setPalette( p, TRUE ); tqApp->setPalette( p, TRUE );
qApp->setFont( appFont, TRUE ); tqApp->setFont( appFont, TRUE );
} }
} }
} }

@ -324,7 +324,7 @@ TicTacToe::TicTacToe( int boardSize, TQWidget *parent, const char *name )
newGame = new TQPushButton( "Play!", this ); newGame = new TQPushButton( "Play!", this );
connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) ); connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) );
quit = new TQPushButton( "Quit", this ); quit = new TQPushButton( "Quit", this );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
TQHBoxLayout * b = new TQHBoxLayout; TQHBoxLayout * b = new TQHBoxLayout;
l->addLayout( b ); l->addLayout( b );
b->addWidget( newGame ); b->addWidget( newGame );

@ -26,7 +26,7 @@ public:
TQStringList styles = TQStyleFactory::keys(); TQStringList styles = TQStyleFactory::keys();
s = (++s)%styles.count(); s = (++s)%styles.count();
qApp->setStyle( styles[ s] ); tqApp->setStyle( styles[ s] );
WidgetView::button1Clicked(); WidgetView::button1Clicked();
} }
}; };

@ -156,7 +156,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
"about widgets on the screen."); "about widgets on the screen.");
// Install an application-global event filter to catch control+leftbutton // Install an application-global event filter to catch control+leftbutton
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
//make a central widget to contain the other widgets //make a central widget to contain the other widgets
central = new TQWidget( this ); central = new TQWidget( this );
@ -181,7 +181,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
id = popup->insertItem( openIcon, "&Open...", this, SLOT( open() ) ); id = popup->insertItem( openIcon, "&Open...", this, SLOT( open() ) );
popup->insertSeparator(); popup->insertSeparator();
popup->insertItem( "Quit", qApp, SLOT(quit()), CTRL+Key_Q ); popup->insertItem( "Quit", tqApp, SLOT(quit()), CTRL+Key_Q );
textStylePopup = popup = new TQPopupMenu( this ); textStylePopup = popup = new TQPopupMenu( this );
menuBar()->insertItem( "&Edit", popup ); menuBar()->insertItem( "&Edit", popup );
@ -733,15 +733,15 @@ void WidgetView::mySelectionChanged( TQListViewItem* /*item*/ )
void WidgetView::showProperties() void WidgetView::showProperties()
{ {
if ( !qApp->focusWidget() ) if ( !tqApp->focusWidget() )
return; return;
TQCString output; TQCString output;
output.sprintf( "Properties for class '%s'", output.sprintf( "Properties for class '%s'",
qApp->focusWidget()->className() ); tqApp->focusWidget()->className() );
int i = 0; int i = 0;
while( i < (int) qApp->focusWidget()->metaObject()->numProperties( TRUE ) ) { while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( TRUE ) ) {
const TQMetaProperty* p const TQMetaProperty* p
= qApp->focusWidget()->metaObject()->property( i, TRUE ); = tqApp->focusWidget()->metaObject()->property( i, TRUE );
TQCString tmp; TQCString tmp;
tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(), tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(),
p->writable() ? "write" : "only", p->type() ); p->writable() ? "write" : "only", p->type() );

@ -287,7 +287,7 @@ void XFormControl::changeMode(int m)
else else
rb_pic->setChecked(TRUE); rb_pic->setChecked(TRUE);
} }
qApp->flushX(); tqApp->flushX();
} }
ShowXForm::ShowXForm( const TQFont &initialFont, ShowXForm::ShowXForm( const TQFont &initialFont,

@ -218,9 +218,9 @@ static HHOOK hhook = 0;
LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam ) LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam )
{ {
if ( qApp ) { if ( tqApp ) {
qApp->sendPostedEvents(); tqApp->sendPostedEvents();
qApp->eventLoop()->activateSocketNotifiers(); tqApp->eventLoop()->activateSocketNotifiers();
qWinProcessConfigRequests(); qWinProcessConfigRequests();
} }
@ -326,7 +326,7 @@ NPP_Shutdown(void)
if ( original_x_errhandler ) if ( original_x_errhandler )
XSetErrorHandler( original_x_errhandler ); XSetErrorHandler( original_x_errhandler );
#endif #endif
if ( qApp) { if ( tqApp) {
#ifdef Q_WS_WIN32 #ifdef Q_WS_WIN32
if ( hhook ) if ( hhook )
UnhookWindowsHookEx( hhook ); UnhookWindowsHookEx( hhook );
@ -469,7 +469,7 @@ NPP_SetWindow(NPP instance, NPWindow* window)
This->height = window->height; This->height = window->height;
if (!qApp) { if (!tqApp) {
#ifdef Q_WS_X11 #ifdef Q_WS_X11
// We are the first TQt-based plugin to arrive // We are the first TQt-based plugin to arrive
event_loop = new TQNPXt( "qnp", XtDisplayToApplicationContext(This->display) ); event_loop = new TQNPXt( "qnp", XtDisplayToApplicationContext(This->display) );
@ -1734,7 +1734,7 @@ Boolean qnpxt_event_dispatcher( XEvent *event )
do_deliver = FALSE; do_deliver = FALSE;
last_xevent = event; last_xevent = event;
bool delivered = do_deliver && ( qApp->x11ProcessEvent( event ) != -1 ); bool delivered = do_deliver && ( tqApp->x11ProcessEvent( event ) != -1 );
last_xevent = 0; last_xevent = 0;
if ( qnpxt ) { if ( qnpxt ) {
switch ( event->type ) { switch ( event->type ) {
@ -1887,15 +1887,15 @@ void TQNPXt::appStartingUp()
XtFree( (char *) displays ); XtFree( (char *) displays );
if ( ! display_found ) { if ( ! display_found ) {
int argc = qApp->argc(); int argc = tqApp->argc();
XtDisplayInitialize( d->appContext, XtDisplayInitialize( d->appContext,
TQPaintDevice::x11AppDisplay(), TQPaintDevice::x11AppDisplay(),
qApp->name(), tqApp->name(),
d->applicationClass, d->applicationClass,
d->options, d->options,
d->numOptions, d->numOptions,
&argc, &argc,
qApp->argv() ); tqApp->argv() );
} }
d->hookMeUp(); d->hookMeUp();

@ -628,8 +628,8 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
if ( focus_widget ) if ( focus_widget )
keywidget = (TQETWidget*)focus_widget; keywidget = (TQETWidget*)focus_widget;
if ( !keywidget ) { if ( !keywidget ) {
if ( qApp->inPopupMode() ) // no focus widget, see if we have a popup if ( tqApp->inPopupMode() ) // no focus widget, see if we have a popup
keywidget = (TQETWidget*) qApp->activePopupWidget(); keywidget = (TQETWidget*) tqApp->activePopupWidget();
else if ( widget ) else if ( widget )
keywidget = (TQETWidget*)widget->topLevelWidget(); keywidget = (TQETWidget*)widget->topLevelWidget();
} }

@ -211,7 +211,7 @@ private: // Disabled copy constructor and operator=
#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ #define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\
TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\ TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\
(sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\ (sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\
(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ (s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !tqApp){ int c=0; new \
TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\
"%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\ "%2, found TQt %3.").arg(TQString::fromLatin1(tqAppName())).arg(TQString::fromLatin1(\
str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\

@ -448,10 +448,10 @@ static void initRGB()
for ( int g = 0; g < 4; g++ ) for ( int g = 0; g < 4; g++ )
for ( int r = 0; r < 4; r++ ) for ( int r = 0; r < 4; r++ )
for ( int b = 0; b < 3; b++ ) for ( int b = 0; b < 3; b++ )
stdrgb[i++] = qRgb( r*255/3, g*255/3, b*255/2 ); stdrgb[i++] = tqRgb( r*255/3, g*255/3, b*255/2 );
for ( i = 0; i < 2*8; i++ ) for ( i = 0; i < 2*8; i++ )
cusrgb[i] = qRgb(0xff,0xff,0xff); cusrgb[i] = tqRgb(0xff,0xff,0xff);
} }
/*! /*!
@ -1077,7 +1077,7 @@ void TQColorShowLabel::mouseReleaseEvent( TQMouseEvent * )
TQColorShower::TQColorShower( TQWidget *parent, const char *name ) TQColorShower::TQColorShower( TQWidget *parent, const char *name )
:TQWidget( parent, name) :TQWidget( parent, name)
{ {
curCol = qRgb( -1, -1, -1 ); curCol = tqRgb( -1, -1, -1 );
TQColIntValidator *val256 = new TQColIntValidator( 0, 255, this ); TQColIntValidator *val256 = new TQColIntValidator( 0, 255, this );
TQColIntValidator *val360 = new TQColIntValidator( 0, 360, this ); TQColIntValidator *val360 = new TQColIntValidator( 0, 360, this );
@ -1161,9 +1161,9 @@ void TQColorShower::rgbEd()
{ {
rgbOriginal = TRUE; rgbOriginal = TRUE;
if ( alphaEd->isVisible() ) if ( alphaEd->isVisible() )
curCol = qRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() ); curCol = tqRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() );
else else
curCol = qRgb( rEd->val(), gEd->val(), bEd->val() ); curCol = tqRgb( rEd->val(), gEd->val(), bEd->val() );
rgb2hsv(currentColor(), hue, sat, val ); rgb2hsv(currentColor(), hue, sat, val );
@ -1184,9 +1184,9 @@ void TQColorShower::hsvEd()
curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb(); curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb();
rEd->setNum( qRed(currentColor()) ); rEd->setNum( tqRed(currentColor()) );
gEd->setNum( qGreen(currentColor()) ); gEd->setNum( tqGreen(currentColor()) );
bEd->setNum( qBlue(currentColor()) ); bEd->setNum( tqBlue(currentColor()) );
showCurrentColor(); showCurrentColor();
emit newCol( currentColor() ); emit newCol( currentColor() );
@ -1203,9 +1203,9 @@ void TQColorShower::setRgb( TQRgb rgb )
sEd->setNum( sat ); sEd->setNum( sat );
vEd->setNum( val ); vEd->setNum( val );
rEd->setNum( qRed(currentColor()) ); rEd->setNum( tqRed(currentColor()) );
gEd->setNum( qGreen(currentColor()) ); gEd->setNum( tqGreen(currentColor()) );
bEd->setNum( qBlue(currentColor()) ); bEd->setNum( tqBlue(currentColor()) );
showCurrentColor(); showCurrentColor();
} }
@ -1220,9 +1220,9 @@ void TQColorShower::setHsv( int h, int s, int v )
sEd->setNum( sat ); sEd->setNum( sat );
vEd->setNum( val ); vEd->setNum( val );
rEd->setNum( qRed(currentColor()) ); rEd->setNum( tqRed(currentColor()) );
gEd->setNum( qGreen(currentColor()) ); gEd->setNum( tqGreen(currentColor()) );
bEd->setNum( qBlue(currentColor()) ); bEd->setNum( tqBlue(currentColor()) );
showCurrentColor(); showCurrentColor();
} }
@ -1303,7 +1303,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
compact = FALSE; compact = FALSE;
// small displays (e.g. PDAs cannot fit the full color dialog, // small displays (e.g. PDAs cannot fit the full color dialog,
// so just use the color picker. // so just use the color picker.
if ( qApp->desktop()->width() < 480 || qApp->desktop()->height() < 350 ) if ( tqApp->desktop()->width() < 480 || tqApp->desktop()->height() < 350 )
compact = TRUE; compact = TRUE;
nextCust = 0; nextCust = 0;
@ -1545,14 +1545,14 @@ TQRgb TQColorDialog::getRgba( TQRgb initial, bool *ok,
#endif #endif
dlg->setColor( initial ); dlg->setColor( initial );
dlg->selectColor( initial ); dlg->selectColor( initial );
dlg->setSelectedAlpha( qAlpha(initial) ); dlg->setSelectedAlpha( tqAlpha(initial) );
int resultCode = dlg->exec(); int resultCode = dlg->exec();
TQColor::leaveAllocContext(); TQColor::leaveAllocContext();
TQRgb result = initial; TQRgb result = initial;
if ( resultCode == TQDialog::Accepted ) { if ( resultCode == TQDialog::Accepted ) {
TQRgb c = dlg->color().rgb(); TQRgb c = dlg->color().rgb();
int alpha = dlg->selectedAlpha(); int alpha = dlg->selectedAlpha();
result = qRgba( qRed(c), qGreen(c), qBlue(c), alpha ); result = tqRgba( tqRed(c), tqGreen(c), tqBlue(c), alpha );
} }
if ( ok ) if ( ok )
*ok = resultCode == TQDialog::Accepted; *ok = resultCode == TQDialog::Accepted;

@ -359,15 +359,15 @@ void TQDialog::hideSpecial()
TQPushButton *pb; TQPushButton *pb;
while ( (pb = (TQPushButton*)it.current()) ) { while ( (pb = (TQPushButton*)it.current()) ) {
if ( !showOK && if ( !showOK &&
pb->text() == qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) { pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) {
pb->hide(); pb->hide();
showOK = TRUE; showOK = TRUE;
} else if ( !showX && } else if ( !showX &&
pb->text() == qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) { pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) {
pb->hide(); pb->hide();
showX = TRUE; showX = TRUE;
} else if ( !showQ && } else if ( !showQ &&
pb->text() == qApp->tr("Help") ) { pb->text() == tqApp->tr("Help") ) {
pb->hide(); pb->hide();
showQ = TRUE; showQ = TRUE;
} }
@ -432,7 +432,7 @@ int TQDialog::exec()
show(); show();
in_loop = TRUE; in_loop = TRUE;
qApp->enter_loop(); tqApp->enter_loop();
if ( !wasShowModal ) if ( !wasShowModal )
clearWFlags( WShowModal ); clearWFlags( WShowModal );
@ -465,14 +465,14 @@ void TQDialog::done( int r )
setResult( r ); setResult( r );
// emulate TQWidget::close() // emulate TQWidget::close()
bool isMain = qApp->mainWidget() == this; bool isMain = tqApp->mainWidget() == this;
bool checkLastWindowClosed = isTopLevel() && !isPopup(); bool checkLastWindowClosed = isTopLevel() && !isPopup();
if ( checkLastWindowClosed if ( checkLastWindowClosed
&& qApp->receivers(SIGNAL(lastWindowClosed())) ) { && tqApp->receivers(SIGNAL(lastWindowClosed())) ) {
/* if there is no non-withdrawn top level window left (except /* if there is no non-withdrawn top level window left (except
the desktop, popups, or dialogs with parents), we emit the the desktop, popups, or dialogs with parents), we emit the
lastWindowClosed signal */ lastWindowClosed signal */
TQWidgetList *list = qApp->topLevelWidgets(); TQWidgetList *list = tqApp->topLevelWidgets();
TQWidget *widget = list->first(); TQWidget *widget = list->first();
while ( widget ) { while ( widget ) {
if ( !widget->isHidden() if ( !widget->isHidden()
@ -484,10 +484,10 @@ void TQDialog::done( int r )
} }
delete list; delete list;
if ( widget == 0 ) if ( widget == 0 )
emit qApp->lastWindowClosed(); emit tqApp->lastWindowClosed();
} }
if ( isMain ) if ( isMain )
qApp->quit(); tqApp->quit();
else if ( testWFlags(WDestructiveClose) ) { else if ( testWFlags(WDestructiveClose) ) {
clearWFlags(WDestructiveClose); clearWFlags(WDestructiveClose);
deleteLater(); deleteLater();
@ -644,8 +644,8 @@ bool TQDialog::event( TQEvent *e )
{ {
TQString bName = TQString bName =
(e->type() == TQEvent::OkRequest) (e->type() == TQEvent::OkRequest)
? qApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ? tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] )
: qApp->tr( "Help" ); : tqApp->tr( "Help" );
TQObjectList *list = queryList( "TQPushButton" ); TQObjectList *list = queryList( "TQPushButton" );
TQObjectListIt it( *list ); TQObjectListIt it( *list );
@ -712,10 +712,10 @@ void TQDialog::show()
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
if (!parentWidget() && testWFlags(WShowModal) if (!parentWidget() && testWFlags(WShowModal)
&& qApp->mainWidget() && qApp->mainWidget()->isVisible() && tqApp->mainWidget() && tqApp->mainWidget()->isVisible()
&& !qApp->mainWidget()->isMinimized()) { && !tqApp->mainWidget()->isMinimized()) {
// make sure the transient for hint is set properly for modal dialogs // make sure the transient for hint is set properly for modal dialogs
x11SetWindowTransient( qApp->mainWidget()); x11SetWindowTransient( tqApp->mainWidget());
} }
#endif // Q_WS_X11 #endif // Q_WS_X11
@ -900,7 +900,7 @@ void TQDialog::hide()
TQWidget::hide(); TQWidget::hide();
if ( in_loop ) { if ( in_loop ) {
in_loop = FALSE; in_loop = FALSE;
qApp->exit_loop(); tqApp->exit_loop();
} }
} }

@ -226,8 +226,8 @@ TQErrorMessage * TQErrorMessage::qtHandler()
qtMessageHandler = new TQErrorMessage( 0, "automatic message handler" ); qtMessageHandler = new TQErrorMessage( 0, "automatic message handler" );
qAddPostRoutine( deleteStaticcTQErrorMessage ); // clean up qAddPostRoutine( deleteStaticcTQErrorMessage ); // clean up
#ifndef QT_NO_WIDGET_TOPEXTRA #ifndef QT_NO_WIDGET_TOPEXTRA
if ( qApp->mainWidget() ) if ( tqApp->mainWidget() )
qtMessageHandler->setCaption( qApp->mainWidget()->caption() ); qtMessageHandler->setCaption( tqApp->mainWidget()->caption() );
#endif #endif
qInstallMsgHandler( jump ); qInstallMsgHandler( jump );
} }

@ -616,7 +616,7 @@ static void makeVariables() {
detailViewMode = FALSE; detailViewMode = FALSE;
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
if ( !fileIconProvider ) if ( !fileIconProvider )
fileIconProvider = new TQWindowsIconProvider( qApp ); fileIconProvider = new TQWindowsIconProvider( tqApp );
#endif #endif
} }
} }
@ -3498,12 +3498,12 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name,
caption, selectedFilter, false ).first(); caption, selectedFilter, false ).first();
#elif defined(Q_WS_WIN) #elif defined(Q_WS_WIN)
if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetOpenFileName( initialSelection, filter, workingDirectory, return winGetOpenFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter ); parent, name, caption, selectedFilter );
#elif defined(Q_WS_MAC) #elif defined(Q_WS_MAC)
if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| qApp->style().inherits("TQMacStyle"))) || tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames(filter, return qt_mac_precomposeFileName(macGetOpenFileNames(filter,
startWith.isEmpty() ? 0 : workingDirectory, startWith.isEmpty() ? 0 : workingDirectory,
parent, name, caption, selectedFilter, FALSE).first()); parent, name, caption, selectedFilter, FALSE).first());
@ -3623,12 +3623,12 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith,
return TQKDEIntegration::getSaveFileName( initialSelection, filter, workingDirectory, return TQKDEIntegration::getSaveFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter ); parent, name, caption, selectedFilter );
#elif defined(Q_WS_WIN) #elif defined(Q_WS_WIN)
if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetSaveFileName( initialSelection, filter, workingDirectory, return winGetSaveFileName( initialSelection, filter, workingDirectory,
parent, name, caption, selectedFilter ); parent, name, caption, selectedFilter );
#elif defined(Q_WS_MAC) #elif defined(Q_WS_MAC)
if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| qApp->style().inherits("TQMacStyle"))) || tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetSaveFileName(initialSelection, filter, return qt_mac_precomposeFileName(macGetSaveFileName(initialSelection, filter,
startWith.isEmpty() ? 0 : workingDirectory, parent, name, startWith.isEmpty() ? 0 : workingDirectory, parent, name,
caption, selectedFilter)); caption, selectedFilter));
@ -4530,7 +4530,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
initialDir = dir; initialDir = dir;
} else } else
initialDir = TQString::null; initialDir = TQString::null;
if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly ) if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly )
return winGetExistingDirectory( initialDir, parent, name, caption ); return winGetExistingDirectory( initialDir, parent, name, caption );
#endif #endif
#if defined(Q_WS_MAC) #if defined(Q_WS_MAC)
@ -4540,8 +4540,8 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if (TQFileInfo(u.path()).isDir()) if (TQFileInfo(u.path()).isDir())
initialDir = (TQString *)&dir; initialDir = (TQString *)&dir;
} }
if( qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) if( qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| qApp->style().inherits("TQMacStyle"))) || tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name, return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name,
caption, 0, FALSE, TRUE).first()); caption, 0, FALSE, TRUE).first());
#endif #endif
@ -5690,11 +5690,11 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter,
if ( qt_use_native_dialogs && TQKDEIntegration::enabled()) if ( qt_use_native_dialogs && TQKDEIntegration::enabled())
return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, true ); return TQKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, true );
#elif defined(Q_WS_WIN) #elif defined(Q_WS_WIN)
if ( qt_use_native_dialogs && qApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) if ( qt_use_native_dialogs && tqApp->style().styleHint( TQStyle::SH_GUIStyle ) == WindowsStyle )
return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter ); return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter );
#elif defined(Q_WS_MAC) #elif defined(Q_WS_MAC)
if (qt_use_native_dialogs && (qApp->style().inherits(TQMAC_DEFAULT_STYLE) if (qt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| qApp->style().inherits("TQMacStyle"))) { || tqApp->style().inherits("TQMacStyle"))) {
TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, parent, TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, parent,
name, caption, selectedFilter); name, caption, selectedFilter);
TQStringList::iterator it = sl.begin(); TQStringList::iterator it = sl.begin();
@ -6375,7 +6375,7 @@ void TQFileDialog::doMimeTypeLookup()
// evil hack to avoid much too much repaints! // evil hack to avoid much too much repaints!
TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler
qApp->processEvents(); tqApp->processEvents();
if ( that.isNull() ) if ( that.isNull() )
return; return;
files->setUpdatesEnabled( FALSE ); files->setUpdatesEnabled( FALSE );
@ -6383,7 +6383,7 @@ void TQFileDialog::doMimeTypeLookup()
if ( item != d->pendingItems.first() ) if ( item != d->pendingItems.first() )
return; return;
item->setPixmap( 0, *p ); item->setPixmap( 0, *p );
qApp->processEvents(); tqApp->processEvents();
if ( that.isNull() ) if ( that.isNull() )
return; return;
files->setUpdatesEnabled( TRUE ); files->setUpdatesEnabled( TRUE );

@ -1324,7 +1324,7 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption,
if ( pm && !pm->isNull() ) if ( pm && !pm->isNull() )
mb->setIconPixmap( *pm ); mb->setIconPixmap( *pm );
else { else {
pm = qApp && qApp->mainWidget() ? qApp->mainWidget()->icon() : 0; pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : 0;
if ( pm && !pm->isNull() ) if ( pm && !pm->isNull() )
mb->setIconPixmap( *pm ); mb->setIconPixmap( *pm );
} }
@ -1607,8 +1607,8 @@ void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption )
#ifndef QT_NO_IMAGEIO #ifndef QT_NO_IMAGEIO
TQPixmap pm; TQPixmap pm;
TQImage logo( (const char **)qtlogo_xpm); TQImage logo( (const char **)qtlogo_xpm);
if ( qGray(mb->palette().active().text().rgb()) > if ( tqGray(mb->palette().active().text().rgb()) >
qGray(mb->palette().active().base().rgb()) ) tqGray(mb->palette().active().base().rgb()) )
{ {
// light on dark, adjust some colors (where's 10?) // light on dark, adjust some colors (where's 10?)
logo.setColor( 0, 0xffffffff ); logo.setColor( 0, 0xffffffff );

@ -143,7 +143,7 @@ TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
this, "progress", TRUE ); this, "progress", TRUE );
for ( int i = 0; i < numFiles; i++ ) { for ( int i = 0; i < numFiles; i++ ) {
progress.setProgress( i ); progress.setProgress( i );
qApp->processEvents(); tqApp->processEvents();
if ( progress.wasCanceled() ) if ( progress.wasCanceled() )
break; break;
@ -580,7 +580,7 @@ void TQProgressDialog::setProgress( int progress )
if ( d->shown_once ) { if ( d->shown_once ) {
if (testWFlags(WShowModal)) if (testWFlags(WShowModal))
qApp->processEvents(); tqApp->processEvents();
} else { } else {
if ( progress == 0 ) { if ( progress == 0 ) {
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR

@ -5434,7 +5434,7 @@ void TQIconView::focusOutEvent( TQFocusEvent* )
if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) {
d->inMenuMode = d->inMenuMode =
TQFocusEvent::reason() == TQFocusEvent::Popup || TQFocusEvent::reason() == TQFocusEvent::Popup ||
(qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar"));
if ( !d->inMenuMode ) if ( !d->inMenuMode )
repaintSelectedItems(); repaintSelectedItems();
} }

@ -67,7 +67,7 @@ class TQMutex;
class TQApplication; class TQApplication;
extern Q_EXPORT TQApplication *qApp; // global application object extern Q_EXPORT TQApplication *tqApp; // global application object
class Q_EXPORT TQApplication : public TQObject class Q_EXPORT TQApplication : public TQObject
@ -520,10 +520,10 @@ inline TQSize TQApplication::globalStrut()
} }
inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event )
{ if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; } { if ( event ) event->spont = FALSE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; }
inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event )
{ if ( event ) event->spont = TRUE; return qApp ? qApp->notify( receiver, event ) : FALSE; } { if ( event ) event->spont = TRUE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; }
#ifdef QT_NO_TRANSLATION #ifdef QT_NO_TRANSLATION
// Simple versions // Simple versions

@ -46,31 +46,31 @@
#include "ntqstringlist.h" #include "ntqstringlist.h"
#endif // QT_H #endif // QT_H
const TQRgb RGB_MASK = 0x00ffffff; // masks RGB values const TQRgb TQT_RGB_MASK = 0x00ffffff; // masks RGB values
Q_EXPORT inline int qRed( TQRgb rgb ) // get red part of RGB Q_EXPORT inline int tqRed( TQRgb rgb ) // get red part of RGB
{ return (int)((rgb >> 16) & 0xff); } { return (int)((rgb >> 16) & 0xff); }
Q_EXPORT inline int qGreen( TQRgb rgb ) // get green part of RGB Q_EXPORT inline int tqGreen( TQRgb rgb ) // get green part of RGB
{ return (int)((rgb >> 8) & 0xff); } { return (int)((rgb >> 8) & 0xff); }
Q_EXPORT inline int qBlue( TQRgb rgb ) // get blue part of RGB Q_EXPORT inline int tqBlue( TQRgb rgb ) // get blue part of RGB
{ return (int)(rgb & 0xff); } { return (int)(rgb & 0xff); }
Q_EXPORT inline int qAlpha( TQRgb rgb ) // get alpha part of RGBA Q_EXPORT inline int tqAlpha( TQRgb rgb ) // get alpha part of RGBA
{ return (int)((rgb >> 24) & 0xff); } { return (int)((rgb >> 24) & 0xff); }
Q_EXPORT inline TQRgb qRgb( int r, int g, int b )// set RGB value Q_EXPORT inline TQRgb tqRgb( int r, int g, int b )// set RGB value
{ return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } { return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
Q_EXPORT inline TQRgb qRgba( int r, int g, int b, int a )// set RGBA value Q_EXPORT inline TQRgb tqRgba( int r, int g, int b, int a )// set RGBA value
{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 Q_EXPORT inline int tqGray( int r, int g, int b )// convert R,G,B to gray 0..255
{ return (r*11+g*16+b*5)/32; } { return (r*11+g*16+b*5)/32; }
Q_EXPORT inline int qGray( TQRgb rgb ) // convert RGB to gray 0..255 Q_EXPORT inline int tqGray( TQRgb rgb ) // convert RGB to gray 0..255
{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); } { return tqGray( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) ); }
class Q_EXPORT TQColor class Q_EXPORT TQColor
@ -190,13 +190,13 @@ inline TQRgb TQColor::rgb() const
{ return d.argb; } { return d.argb; }
inline int TQColor::red() const inline int TQColor::red() const
{ return qRed(d.argb); } { return tqRed(d.argb); }
inline int TQColor::green() const inline int TQColor::green() const
{ return qGreen(d.argb); } { return tqGreen(d.argb); }
inline int TQColor::blue() const inline int TQColor::blue() const
{ return qBlue(d.argb); } { return tqBlue(d.argb); }
inline bool TQColor::isValid() const inline bool TQColor::isValid() const
{ {

@ -154,7 +154,7 @@ Q_EXPORT WId qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_readonly_gc( int scrn, bool monochrome );
Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome ); Q_EXPORT GC qt_xget_temp_gc( int scrn, bool monochrome );
Q_EXPORT const char *qAppClass(); // get application class Q_EXPORT const char *tqAppClass(); // get application class
#endif // Q_WS_X11 #endif // Q_WS_X11

@ -95,7 +95,7 @@
or more windows at any time. or more windows at any time.
The TQApplication object is accessible through the global pointer \c The TQApplication object is accessible through the global pointer \c
qApp. Its main areas of responsibility are: tqApp. Its main areas of responsibility are:
\list \list
\i It initializes the application with the user's desktop settings \i It initializes the application with the user's desktop settings
@ -323,7 +323,7 @@ void qt_init( Display* dpy, TQt::HANDLE, TQt::HANDLE );
#endif #endif
Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ); Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
TQApplication *qApp = 0; // global application object TQApplication *tqApp = 0; // global application object
TQStyle *TQApplication::app_style = 0; // default application style TQStyle *TQApplication::app_style = 0; // default application style
bool qt_explicit_app_style = FALSE; // style explicitly set by programmer bool qt_explicit_app_style = FALSE; // style explicitly set by programmer
@ -654,7 +654,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
Initializes the window system and constructs an application object Initializes the window system and constructs an application object
with \a argc command line arguments in \a argv. with \a argc command line arguments in \a argv.
The global \c qApp pointer refers to this application object. Only The global \c tqApp pointer refers to this application object. Only
one application object should be created. one application object should be created.
This application object must be constructed before any \link This application object must be constructed before any \link
@ -663,7 +663,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
Note that \a argc and \a argv might be changed. TQt removes command Note that \a argc and \a argv might be changed. TQt removes command
line arguments that it recognizes. The modified \a argc and \a argv line arguments that it recognizes. The modified \a argc and \a argv
can also be accessed later with \c qApp->argc() and \c qApp->argv(). can also be accessed later with \c tqApp->argc() and \c tqApp->argv().
The documentation for argv() contains a detailed description of how The documentation for argv() contains a detailed description of how
to process command line arguments. to process command line arguments.
@ -791,13 +791,13 @@ TQApplication::TQApplication( int &argc, char **argv, Type type )
Q_EXPORT void qt_ucm_initialize( TQApplication *theApp ) Q_EXPORT void qt_ucm_initialize( TQApplication *theApp )
{ {
if ( qApp ) if ( tqApp )
return; return;
int argc = theApp->argc(); int argc = theApp->argc();
char **argv = theApp->argv(); char **argv = theApp->argv();
theApp->construct( argc, argv, qApp->type() ); theApp->construct( argc, argv, tqApp->type() );
Q_ASSERT( qApp == theApp ); Q_ASSERT( tqApp == theApp );
} }
void TQApplication::construct( int &argc, char **argv, Type type ) void TQApplication::construct( int &argc, char **argv, Type type )
@ -932,10 +932,10 @@ void TQApplication::init_precmdline()
is_session_restored = FALSE; is_session_restored = FALSE;
#endif #endif
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
if ( qApp ) if ( tqApp )
qWarning( "TQApplication: There should be max one application object" ); qWarning( "TQApplication: There should be max one application object" );
#endif #endif
qApp = (TQApplication*)this; tqApp = (TQApplication*)this;
} }
/*! /*!
@ -964,7 +964,7 @@ void TQApplication::initialize( int argc, char **argv )
// connect to the session manager // connect to the session manager
if ( !session_key ) if ( !session_key )
session_key = new TQString; session_key = new TQString;
session_manager = new TQSessionManager( qApp, session_id, *session_key ); session_manager = new TQSessionManager( tqApp, session_id, *session_key );
#endif #endif
} }
@ -1017,7 +1017,7 @@ TQWidget *TQApplication::activeModalWidget()
/*! /*!
Cleans up any window system resources that were allocated by this Cleans up any window system resources that were allocated by this
application. Sets the global variable \c qApp to 0. application. Sets the global variable \c tqApp to 0.
*/ */
TQApplication::~TQApplication() TQApplication::~TQApplication()
@ -1098,10 +1098,10 @@ TQApplication::~TQApplication()
postevent_mutex = 0; postevent_mutex = 0;
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
if( qApp == this ) { if( tqApp == this ) {
if ( postedEvents ) if ( postedEvents )
removePostedEvents( this ); removePostedEvents( this );
qApp = 0; tqApp = 0;
} }
is_app_running = FALSE; is_app_running = FALSE;
@ -1186,7 +1186,7 @@ TQApplication::~TQApplication()
under X11, the list box contains the three strings "showargs", under X11, the list box contains the three strings "showargs",
"hello" and "world". "hello" and "world".
TQt provides a global pointer, \c qApp, that points to the TQt provides a global pointer, \c tqApp, that points to the
TQApplication object, and through which you can access argc() and TQApplication object, and through which you can access argc() and
argv() in functions other than main(). argv() in functions other than main().
@ -1278,7 +1278,7 @@ TQStyle& TQApplication::style()
} }
} }
app_style->polish( qApp ); app_style->polish( tqApp );
#endif #endif
return *app_style; return *app_style;
} }
@ -1326,7 +1326,7 @@ void TQApplication::setStyle( TQStyle *style )
} }
} }
} }
old->unPolish( qApp ); old->unPolish( tqApp );
} }
// take care of possible palette requirements of certain gui // take care of possible palette requirements of certain gui
@ -1338,7 +1338,7 @@ void TQApplication::setStyle( TQStyle *style )
setPalette( tmpPal, TRUE ); setPalette( tmpPal, TRUE );
// initialize the application with the new style // initialize the application with the new style
app_style->polish( qApp ); app_style->polish( tqApp );
// re-polish existing widgets if necessary // re-polish existing widgets if necessary
if (old) { if (old) {
@ -1499,7 +1499,7 @@ int TQApplication::colorSpec()
void TQApplication::setColorSpec( int spec ) void TQApplication::setColorSpec( int spec )
{ {
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
if ( qApp ) { if ( tqApp ) {
qWarning( "TQApplication::setColorSpec: This function must be " qWarning( "TQApplication::setColorSpec: This function must be "
"called before the TQApplication object is created" ); "called before the TQApplication object is created" );
} }
@ -1546,7 +1546,7 @@ void TQApplication::setGlobalStrut( const TQSize& strut )
} }
#if defined( Q_WS_WIN ) || defined( Q_WS_MAC ) #if defined( Q_WS_WIN ) || defined( Q_WS_MAC )
extern const char *qAppFileName(); extern const char *tqAppFileName();
#endif #endif
#ifndef QT_NO_DIR #ifndef QT_NO_DIR
@ -1647,7 +1647,7 @@ TQString TQApplication::applicationFilePath()
return filePath.filePath(); return filePath.filePath();
#elif defined( Q_WS_MAC ) #elif defined( Q_WS_MAC )
return TQDir::cleanDirPath( TQFile::decodeName( qAppFileName() ) ); return TQDir::cleanDirPath( TQFile::decodeName( tqAppFileName() ) );
#else #else
TQString argv0 = TQFile::decodeName( argv()[0] ); TQString argv0 = TQFile::decodeName( argv()[0] );
TQString absPath; TQString absPath;
@ -1732,11 +1732,11 @@ TQStringList TQApplication::libraryPaths()
} }
TQString app_location; TQString app_location;
if (qApp) if (tqApp)
app_location = qApp->applicationFilePath(); app_location = tqApp->applicationFilePath();
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
else { else {
app_location = TQString(qAppFileName()); app_location = TQString(tqAppFileName());
app_location.replace('\\', '/'); app_location.replace('\\', '/');
} }
#endif #endif
@ -1821,7 +1821,7 @@ void TQApplication::removeLibraryPath( const TQString &path )
TQPalette TQApplication::palette(const TQWidget* w) TQPalette TQApplication::palette(const TQWidget* w)
{ {
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
if ( !qApp ) if ( !tqApp )
qWarning( "TQApplication::palette: This function can only be " qWarning( "TQApplication::palette: This function can only be "
"called after the TQApplication object has been created" ); "called after the TQApplication object has been created" );
#endif #endif
@ -1872,7 +1872,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
TQPalette *oldpal = 0; TQPalette *oldpal = 0;
#ifndef QT_NO_STYLE #ifndef QT_NO_STYLE
if ( !startingUp() ) // on startup this has been done already if ( !startingUp() ) // on startup this has been done already
qApp->style().polish( pal ); // NB: non-const reference tqApp->style().polish( pal ); // NB: non-const reference
#endif #endif
bool all = FALSE; bool all = FALSE;
if ( !className ) { if ( !className ) {
@ -2137,7 +2137,7 @@ TQFontMetrics TQApplication::fontMetrics()
Example: Example:
\code \code
TQPushButton *quitButton = new TQPushButton( "Quit" ); TQPushButton *quitButton = new TQPushButton( "Quit" );
connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quitButton, SIGNAL(clicked()), tqApp, SLOT(quit()) );
\endcode \endcode
\sa exit() aboutToQuit() lastWindowClosed() TQAction \sa exit() aboutToQuit() lastWindowClosed() TQAction
@ -2159,10 +2159,10 @@ void TQApplication::quit()
\code \code
// the "Quit" menu entry should try to close all windows // the "Quit" menu entry should try to close all windows
TQPopupMenu* file = new TQPopupMenu( this ); TQPopupMenu* file = new TQPopupMenu( this );
file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q ); file->insertItem( "&Quit", tqApp, SLOT(closeAllWindows()), CTRL+Key_Q );
// when the last window is closed, the application should quit // when the last window is closed, the application should quit
connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) ); connect( tqApp, SIGNAL( lastWindowClosed() ), tqApp, SLOT( quit() ) );
\endcode \endcode
The windows are closed in random order, until one window does not The windows are closed in random order, until one window does not
@ -2286,9 +2286,9 @@ void TQApplication::aboutTQt()
approaches are listed below: approaches are listed below:
\list 1 \list 1
\i Reimplementing this function. This is very powerful, providing \i Reimplementing this function. This is very powerful, providing
complete control; but only one subclass can be qApp. complete control; but only one subclass can be tqApp.
\i Installing an event filter on qApp. Such an event filter is able \i Installing an event filter on tqApp. Such an event filter is able
to process all events for all widgets, so it's just as powerful as to process all events for all widgets, so it's just as powerful as
reimplementing notify(); furthermore, it's possible to have more reimplementing notify(); furthermore, it's possible to have more
than one application-global event filter. Global event filters even than one application-global event filter. Global event filters even
@ -2730,7 +2730,7 @@ void TQApplication::processOneEvent()
TQEventLoop *TQApplication::eventLoop() TQEventLoop *TQApplication::eventLoop()
{ {
if ( !eventloop && !is_app_closing ) if ( !eventloop && !is_app_closing )
(void) new TQEventLoop( qApp, "default event loop" ); (void) new TQEventLoop( tqApp, "default event loop" );
return eventloop; return eventloop;
} }
@ -2779,7 +2779,7 @@ int TQApplication::exec()
*/ */
void TQApplication::exit( int retcode ) void TQApplication::exit( int retcode )
{ {
qApp->eventLoop()->exit( retcode ); tqApp->eventLoop()->exit( retcode );
} }
/*! /*!
@ -2963,7 +2963,7 @@ void TQApplication::removeTranslator( TQTranslator * mf )
if ( !translators || !mf ) if ( !translators || !mf )
return; return;
if ( translators->remove( mf ) && ! qApp->closingDown() ) { if ( translators->remove( mf ) && ! tqApp->closingDown() ) {
setReverseLayout( qt_detectRTLLanguage() ); setReverseLayout( qt_detectRTLLanguage() );
TQWidgetList *list = topLevelWidgets(); TQWidgetList *list = topLevelWidgets();
@ -3666,12 +3666,12 @@ Q_EXPORT void qt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
TQEvent leaveEvent( TQEvent::Leave ); TQEvent leaveEvent( TQEvent::Leave );
for ( w = leaveList.first(); w; w = leaveList.next() ) { for ( w = leaveList.first(); w; w = leaveList.next() ) {
if ( !qApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 ))
TQApplication::sendEvent( w, &leaveEvent ); TQApplication::sendEvent( w, &leaveEvent );
} }
TQEvent enterEvent( TQEvent::Enter ); TQEvent enterEvent( TQEvent::Enter );
for ( w = enterList.first(); w; w = enterList.next() ) { for ( w = enterList.first(); w; w = enterList.next() ) {
if ( !qApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 ))
TQApplication::sendEvent( w, &enterEvent ); TQApplication::sendEvent( w, &enterEvent );
} }
} }
@ -3691,7 +3691,7 @@ Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
TQWidget *modal=0, *top=TQApplication::activeModalWidget(); TQWidget *modal=0, *top=TQApplication::activeModalWidget();
if ( rettop ) *rettop = top; if ( rettop ) *rettop = top;
if ( qApp->activePopupWidget() ) if ( tqApp->activePopupWidget() )
return TRUE; return TRUE;
#ifdef Q_WS_MACX #ifdef Q_WS_MACX

@ -419,7 +419,7 @@ static bool qt_x11EventFilter( XEvent* ev )
{ {
if ( qt_x11_event_filter && qt_x11_event_filter( ev ) ) if ( qt_x11_event_filter && qt_x11_event_filter( ev ) )
return TRUE; return TRUE;
return qApp->x11EventFilter( ev ); return tqApp->x11EventFilter( ev );
} }
@ -620,7 +620,7 @@ TQWidgetList *TQApplication::icHolderWidgets()
*/ */
void TQApplication::changeAllInputContext( const TQString &identifierName ) void TQApplication::changeAllInputContext( const TQString &identifierName )
{ {
TQWidgetList *list = qApp->icHolderWidgets(); TQWidgetList *list = tqApp->icHolderWidgets();
TQWidgetListIt it(*list); TQWidgetListIt it(*list);
while(it.current()) { while(it.current()) {
it.current()->changeInputContext( identifierName ); it.current()->changeInputContext( identifierName );
@ -687,7 +687,7 @@ void TQApplication::create_im()
*/ */
void TQApplication::close_im() void TQApplication::close_im()
{ {
TQWidgetList *list = qApp->icHolderWidgets(); TQWidgetList *list = tqApp->icHolderWidgets();
TQWidgetListIt it(*list); TQWidgetListIt it(*list);
while(it.current()) { while(it.current()) {
it.current()->destroyInputContext(); it.current()->destroyInputContext();
@ -708,7 +708,7 @@ void TQApplication::create_xim()
qt_xim_preferred_style = xim_default_style; qt_xim_preferred_style = xim_default_style;
#endif // QT_NO_XIM #endif // QT_NO_XIM
TQWidgetList *list= qApp->topLevelWidgets(); TQWidgetList *list= tqApp->topLevelWidgets();
TQWidgetListIt it(*list); TQWidgetListIt it(*list);
TQWidget * w; TQWidget * w;
while( (w=it.current()) != 0 ) { while( (w=it.current()) != 0 ) {
@ -733,7 +733,7 @@ void TQApplication::close_xim()
// qt_xim = 0; // qt_xim = 0;
#endif // QT_NO_XIM #endif // QT_NO_XIM
TQWidgetList *list = qApp->topLevelWidgets(); TQWidgetList *list = tqApp->topLevelWidgets();
TQWidgetListIt it(*list); TQWidgetListIt it(*list);
while(it.current()) { while(it.current()) {
it.current()->destroyInputContext(); it.current()->destroyInputContext();
@ -807,7 +807,7 @@ static int qt_x_errhandler( Display *dpy, XErrorEvent *err )
static int qt_xio_errhandler( Display * ) static int qt_xio_errhandler( Display * )
{ {
qWarning( "%s: Fatal IO error: client killed", appName ); qWarning( "%s: Fatal IO error: client killed", appName );
qApp = 0; tqApp = 0;
exit( 1 ); exit( 1 );
//### give the application a chance for a proper shutdown instead, //### give the application a chance for a proper shutdown instead,
//### exit(1) doesn't help. //### exit(1) doesn't help.
@ -1065,7 +1065,7 @@ bool TQApplication::x11_apply_settings()
if (defaultcodec != "none") { if (defaultcodec != "none") {
TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec); TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec);
if (codec) if (codec)
qApp->setDefaultCodec(codec); tqApp->setDefaultCodec(codec);
} }
TQStringList strut = settings.readListEntry("/qt/globalStrut"); TQStringList strut = settings.readListEntry("/qt/globalStrut");
@ -1559,7 +1559,7 @@ void qt_x11_create_wm_client_leader()
(unsigned char *)&qt_x11_wm_client_leader, 1 ); (unsigned char *)&qt_x11_wm_client_leader, 1 );
// If we are session managed, inform the window manager about it // If we are session managed, inform the window manager about it
TQCString session = qApp->sessionId().latin1(); TQCString session = tqApp->sessionId().latin1();
if ( !session.isEmpty() ) { if ( !session.isEmpty() ) {
XChangeProperty( TQPaintDevice::x11AppDisplay(), XChangeProperty( TQPaintDevice::x11AppDisplay(),
qt_x11_wm_client_leader, qt_sm_client_id, qt_x11_wm_client_leader, qt_sm_client_id,
@ -1808,7 +1808,7 @@ void qt_init_internal( int *argcptr, char **argv,
if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) { if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) {
qWarning( "%s: cannot connect to X server %s", appName, qWarning( "%s: cannot connect to X server %s", appName,
XDisplayName(appDpyName) ); XDisplayName(appDpyName) );
qApp = 0; tqApp = 0;
exit( 1 ); exit( 1 );
} }
@ -2206,7 +2206,7 @@ void qt_init_internal( int *argcptr, char **argv,
#endif #endif
if( qt_is_gui_used ) { if( qt_is_gui_used ) {
qApp->setName( appName ); tqApp->setName( appName );
int screen; int screen;
for ( screen = 0; screen < appScreenCount; ++screen ) { for ( screen = 0; screen < appScreenCount; ++screen ) {
@ -2398,7 +2398,7 @@ void qt_init_internal( int *argcptr, char **argv,
if (defaultcodec != "none") { if (defaultcodec != "none") {
TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec); TQTextCodec *codec = TQTextCodec::codecForName(defaultcodec);
if (codec) if (codec)
qApp->setDefaultCodec(codec); tqApp->setDefaultCodec(codec);
} }
qt_resolve_symlinks = qt_resolve_symlinks =
@ -2623,7 +2623,7 @@ const char *tqAppName() // get application name
return appName; return appName;
} }
const char *qAppClass() // get application class const char *tqAppClass() // get application class
{ {
return appClass; return appClass;
} }
@ -3482,7 +3482,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
case XKeyRelease: case XKeyRelease:
do { do {
popup->close(); popup->close();
} while ( (popup = qApp->activePopupWidget()) ); } while ( (popup = tqApp->activePopupWidget()) );
return 1; return 1;
} }
} }
@ -4102,7 +4102,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
|| nextEvent.type == PropertyNotify || nextEvent.type == PropertyNotify
|| nextEvent.type == Expose || nextEvent.type == Expose
|| nextEvent.type == NoExpose ) { || nextEvent.type == NoExpose ) {
qApp->x11ProcessEvent( &nextEvent ); tqApp->x11ProcessEvent( &nextEvent );
continue; continue;
} else if ( nextEvent.type != MotionNotify || } else if ( nextEvent.type != MotionNotify ||
nextEvent.xmotion.window != event->xmotion.window || nextEvent.xmotion.window != event->xmotion.window ||
@ -4170,7 +4170,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
// take care about grabbing. We do this here since it // take care about grabbing. We do this here since it
// is clear that we return anyway // is clear that we return anyway
if ( qApp->inPopupMode() && popupGrabOk ) if ( tqApp->inPopupMode() && popupGrabOk )
XAllowEvents( x11Display(), SyncPointer, CurrentTime ); XAllowEvents( x11Display(), SyncPointer, CurrentTime );
// We are only interested in ButtonPress. // We are only interested in ButtonPress.
@ -4264,8 +4264,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( type == 0 ) // don't send event if ( type == 0 ) // don't send event
return FALSE; return FALSE;
if ( qApp->inPopupMode() ) { // in popup mode if ( tqApp->inPopupMode() ) { // in popup mode
TQWidget *popup = qApp->activePopupWidget(); TQWidget *popup = tqApp->activePopupWidget();
if ( popup != this ) { if ( popup != this ) {
if ( testWFlags(WType_Popup) && rect().contains(pos) ) if ( testWFlags(WType_Popup) && rect().contains(pos) )
popup = this; popup = this;
@ -4334,7 +4334,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( releaseAfter ) if ( releaseAfter )
qt_button_down = 0; qt_button_down = 0;
if ( qApp->inPopupMode() ) { // still in popup mode if ( tqApp->inPopupMode() ) { // still in popup mode
if ( popupGrabOk ) if ( popupGrabOk )
XAllowEvents( dpy, SyncPointer, CurrentTime ); XAllowEvents( dpy, SyncPointer, CurrentTime );
} else { } else {
@ -4394,7 +4394,7 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
{ {
// send the event to the widget or its ancestors // send the event to the widget or its ancestors
{ {
TQWidget* popup = qApp->activePopupWidget(); TQWidget* popup = tqApp->activePopupWidget();
if ( popup && topLevelWidget() != popup ) if ( popup && topLevelWidget() != popup )
popup->close(); popup->close();
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
@ -4405,8 +4405,8 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
// send the event to the widget that has the focus or its ancestors, if different // send the event to the widget that has the focus or its ancestors, if different
TQWidget *w = this; TQWidget *w = this;
if ( w != qApp->focusWidget() && ( w = qApp->focusWidget() ) ) { if ( w != tqApp->focusWidget() && ( w = tqApp->focusWidget() ) ) {
TQWidget* popup = qApp->activePopupWidget(); TQWidget* popup = tqApp->activePopupWidget();
if ( popup && w != popup ) if ( popup && w != popup )
popup->hide(); popup->hide();
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
@ -6366,7 +6366,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
smd->sessionKey = TQString::number( tv.tv_sec ) + "_" + TQString::number(tv.tv_usec); smd->sessionKey = TQString::number( tv.tv_sec ) + "_" + TQString::number(tv.tv_usec);
// tell the session manager about our program in best POSIX style // tell the session manager about our program in best POSIX style
sm_setProperty( SmProgram, TQString( qApp->argv()[0] ) ); sm_setProperty( SmProgram, TQString( tqApp->argv()[0] ) );
// tell the session manager about our user as well. // tell the session manager about our user as well.
struct passwd* entry = getpwuid( geteuid() ); struct passwd* entry = getpwuid( geteuid() );
if ( entry ) if ( entry )
@ -6374,8 +6374,8 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
// generate a restart and discard command that makes sense // generate a restart and discard command that makes sense
TQStringList restart; TQStringList restart;
restart << qApp->argv()[0] << "-session" << smd->sessionId + "_" + smd->sessionKey; restart << tqApp->argv()[0] << "-session" << smd->sessionId + "_" + smd->sessionKey;
if (qstricmp(tqAppName(), qAppClass()) != 0) if (qstricmp(tqAppName(), tqAppClass()) != 0)
restart << "-name" << tqAppName(); restart << "-name" << tqAppName();
sm->setRestartCommand( restart ); sm->setRestartCommand( restart );
TQStringList discard; TQStringList discard;
@ -6383,15 +6383,15 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
switch ( sm_saveType ) { switch ( sm_saveType ) {
case SmSaveBoth: case SmSaveBoth:
qApp->commitData( *sm ); tqApp->commitData( *sm );
if ( sm_isshutdown && sm_cancel) if ( sm_isshutdown && sm_cancel)
break; // we cancelled the shutdown, no need to save state break; // we cancelled the shutdown, no need to save state
// fall through // fall through
case SmSaveLocal: case SmSaveLocal:
qApp->saveState( *sm ); tqApp->saveState( *sm );
break; break;
case SmSaveGlobal: case SmSaveGlobal:
qApp->commitData( *sm ); tqApp->commitData( *sm );
break; break;
default: default:
break; break;
@ -6438,7 +6438,7 @@ static void sm_dieCallback( SmcConn smcConn, SmPointer /* clientData */)
return; return;
resetSmState(); resetSmState();
TQEvent quitEvent(TQEvent::Quit); TQEvent quitEvent(TQEvent::Quit);
TQApplication::sendEvent(qApp, &quitEvent); TQApplication::sendEvent(tqApp, &quitEvent);
} }
static void sm_shutdownCancelledCallback( SmcConn smcConn, SmPointer /* clientData */) static void sm_shutdownCancelledCallback( SmcConn smcConn, SmPointer /* clientData */)
@ -6446,7 +6446,7 @@ static void sm_shutdownCancelledCallback( SmcConn smcConn, SmPointer /* clientDa
if (smcConn != smcConnection ) if (smcConn != smcConnection )
return; return;
if ( sm_waitingForInteraction ) if ( sm_waitingForInteraction )
qApp->exit_loop(); tqApp->exit_loop();
resetSmState(); resetSmState();
} }
@ -6462,7 +6462,7 @@ static void sm_interactCallback( SmcConn smcConn, SmPointer /* clientData */ )
if (smcConn != smcConnection ) if (smcConn != smcConnection )
return; return;
if ( sm_waitingForInteraction ) if ( sm_waitingForInteraction )
qApp->exit_loop(); tqApp->exit_loop();
} }
static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData ) static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData )
@ -6570,7 +6570,7 @@ bool TQSessionManager::allowsInteraction()
sm_interactCallback, (SmPointer*) this ); sm_interactCallback, (SmPointer*) this );
} }
if ( sm_waitingForInteraction ) { if ( sm_waitingForInteraction ) {
qApp->enter_loop(); tqApp->enter_loop();
sm_waitingForInteraction = FALSE; sm_waitingForInteraction = FALSE;
if ( sm_smActive ) { // not cancelled if ( sm_smActive ) { // not cancelled
sm_interactionActive = TRUE; sm_interactionActive = TRUE;
@ -6594,7 +6594,7 @@ bool TQSessionManager::allowsErrorInteraction()
sm_interactCallback, (SmPointer*) this ); sm_interactCallback, (SmPointer*) this );
} }
if ( sm_waitingForInteraction ) { if ( sm_waitingForInteraction ) {
qApp->enter_loop(); tqApp->enter_loop();
sm_waitingForInteraction = FALSE; sm_waitingForInteraction = FALSE;
if ( sm_smActive ) { // not cancelled if ( sm_smActive ) { // not cancelled
sm_interactionActive = TRUE; sm_interactionActive = TRUE;

@ -844,7 +844,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
case GlobalColorMap: case LocalColorMap: case GlobalColorMap: case LocalColorMap:
hold[count++]=ch; hold[count++]=ch;
if (count==3) { if (count==3) {
TQRgb rgb = qRgb(hold[0], hold[1], hold[2]); TQRgb rgb = tqRgb(hold[0], hold[1], hold[2]);
if ( state == LocalColorMap ) { if ( state == LocalColorMap ) {
if ( ccount < lncols ) if ( ccount < lncols )
localcmap[ccount] = rgb; localcmap[ccount] = rgb;

@ -480,7 +480,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
TQTime started = TQTime::currentTime(); TQTime started = TQTime::currentTime();
TQTime now = started; TQTime now = started;
if (qApp->eventLoop()->inherits("TQMotif")) { // yes yes, evil hack, we know if (tqApp->eventLoop()->inherits("TQMotif")) { // yes yes, evil hack, we know
if ( waiting_for_data ) if ( waiting_for_data )
qFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" ); qFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" );
@ -503,7 +503,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
started = now; started = now;
// 0x08 == ExcludeTimers for X11 only // 0x08 == ExcludeTimers for X11 only
qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput |
TQEventLoop::ExcludeSocketNotifiers | TQEventLoop::ExcludeSocketNotifiers |
TQEventLoop::WaitForMore | 0x08 ); TQEventLoop::WaitForMore | 0x08 );
@ -537,7 +537,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
// process other clipboard events, since someone is probably requesting data from us // process other clipboard events, since someone is probably requesting data from us
XEvent e; XEvent e;
if (XCheckIfEvent(dpy, &e, checkForClipboardEvents, 0)) if (XCheckIfEvent(dpy, &e, checkForClipboardEvents, 0))
qApp->x11ProcessEvent(&e); tqApp->x11ProcessEvent(&e);
now = TQTime::currentTime(); now = TQTime::currentTime();
if ( started > now ) // crossed midnight if ( started > now ) // crossed midnight

@ -259,10 +259,10 @@ void TQColor::initGlobalColors()
// HACK: we need a way to recognize color0 and color1 uniquely, so // HACK: we need a way to recognize color0 and color1 uniquely, so
// that we can use color0 and color1 with fixed pixel values on // that we can use color0 and color1 with fixed pixel values on
// all screens // all screens
stdcol[ 0].d.argb = qRgba(255, 255, 255, 1); stdcol[ 0].d.argb = tqRgba(255, 255, 255, 1);
stdcol[ 1].d.argb = qRgba( 0, 0, 0, 1); stdcol[ 1].d.argb = tqRgba( 0, 0, 0, 1);
#else #else
stdcol[ 0].d.argb = qRgb(255,255,255); stdcol[ 0].d.argb = tqRgb(255,255,255);
stdcol[ 1].d.argb = 0; stdcol[ 1].d.argb = 0;
#endif // Q_WS_X11 #endif // Q_WS_X11
stdcol[ 0].setPixel( COLOR0_PIX ); stdcol[ 0].setPixel( COLOR0_PIX );
@ -605,9 +605,9 @@ void TQColor::hsv( int *h, int *s, int *v ) const
{ {
if ( !h || !s || !v ) if ( !h || !s || !v )
return; return;
int r = qRed(d.argb); int r = tqRed(d.argb);
int g = qGreen(d.argb); int g = tqGreen(d.argb);
int b = qBlue(d.argb); int b = tqBlue(d.argb);
uint max = r; // maximum RGB component uint max = r; // maximum RGB component
int whatmax = 0; // r=>0, g=>1, b=>2 int whatmax = 0; // r=>0, g=>1, b=>2
if ( (uint)g > max ) { if ( (uint)g > max ) {
@ -712,7 +712,7 @@ void TQColor::setHsv( int h, int s, int v )
For an invalid color, the alpha value of the returned color is For an invalid color, the alpha value of the returned color is
unspecified. unspecified.
\sa setRgb(), hsv(), qRed(), qBlue(), qGreen(), isValid() \sa setRgb(), hsv(), tqRed(), tqBlue(), tqGreen(), isValid()
*/ */
/*! \fn void TQColor::getRgb( int *r, int *g, int *b ) const /*! \fn void TQColor::getRgb( int *r, int *g, int *b ) const
@ -727,9 +727,9 @@ void TQColor::setHsv( int h, int s, int v )
/*! \obsolete Use getRgb() instead */ /*! \obsolete Use getRgb() instead */
void TQColor::rgb( int *r, int *g, int *b ) const void TQColor::rgb( int *r, int *g, int *b ) const
{ {
*r = qRed(d.argb); *r = tqRed(d.argb);
*g = qGreen(d.argb); *g = tqGreen(d.argb);
*b = qBlue(d.argb); *b = tqBlue(d.argb);
} }
@ -749,7 +749,7 @@ void TQColor::setRgb( int r, int g, int b )
#endif #endif
return; return;
} }
d.argb = qRgb( r, g, b ); d.argb = tqRgb( r, g, b );
if ( colormodel == d8 ) { if ( colormodel == d8 ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
d.d8.direct = FALSE; d.d8.direct = FALSE;
@ -959,60 +959,60 @@ TQDataStream &operator>>( TQDataStream &s, TQColor &c )
*****************************************************************************/ *****************************************************************************/
/*! /*!
\fn int qRed( TQRgb rgb ) \fn int tqRed( TQRgb rgb )
\relates TQColor \relates TQColor
Returns the red component of the RGB triplet \a rgb. Returns the red component of the RGB triplet \a rgb.
\sa qRgb(), TQColor::red() \sa tqRgb(), TQColor::red()
*/ */
/*! /*!
\fn int qGreen( TQRgb rgb ) \fn int tqGreen( TQRgb rgb )
\relates TQColor \relates TQColor
Returns the green component of the RGB triplet \a rgb. Returns the green component of the RGB triplet \a rgb.
\sa qRgb(), TQColor::green() \sa tqRgb(), TQColor::green()
*/ */
/*! /*!
\fn int qBlue( TQRgb rgb ) \fn int tqBlue( TQRgb rgb )
\relates TQColor \relates TQColor
Returns the blue component of the RGB triplet \a rgb. Returns the blue component of the RGB triplet \a rgb.
\sa qRgb(), TQColor::blue() \sa tqRgb(), TQColor::blue()
*/ */
/*! /*!
\fn int qAlpha( TQRgb rgba ) \fn int tqAlpha( TQRgb rgba )
\relates TQColor \relates TQColor
Returns the alpha component of the RGBA quadruplet \a rgba. Returns the alpha component of the RGBA quadruplet \a rgba.
*/ */
/*! /*!
\fn TQRgb qRgb( int r, int g, int b ) \fn TQRgb tqRgb( int r, int g, int b )
\relates TQColor \relates TQColor
Returns the RGB triplet \a (r,g,b). Returns the RGB triplet \a (r,g,b).
The return type TQRgb is equivalent to \c unsigned \c int. The return type TQRgb is equivalent to \c unsigned \c int.
\sa qRgba(), qRed(), qGreen(), qBlue() \sa tqRgba(), tqRed(), tqGreen(), tqBlue()
*/ */
/*! /*!
\fn TQRgb qRgba( int r, int g, int b, int a ) \fn TQRgb tqRgba( int r, int g, int b, int a )
\relates TQColor \relates TQColor
Returns the RGBA quadruplet \a (r,g,b,a). Returns the RGBA quadruplet \a (r,g,b,a).
The return type TQRgba is equivalent to \c unsigned \c int. The return type TQRgba is equivalent to \c unsigned \c int.
\sa qRgb(), qRed(), qGreen(), qBlue() \sa tqRgb(), tqRed(), tqGreen(), tqBlue()
*/ */
/*! /*!
\fn int qGray( int r, int g, int b ) \fn int tqGray( int r, int g, int b )
\relates TQColor \relates TQColor
Returns a gray value 0..255 from the (\a r, \a g, \a b) triplet. Returns a gray value 0..255 from the (\a r, \a g, \a b) triplet.
@ -1022,7 +1022,7 @@ TQDataStream &operator>>( TQDataStream &s, TQColor &c )
*/ */
/*! /*!
\overload int qGray( qRgb rgb ) \overload int tqGray( tqRgb rgb )
\relates TQColor \relates TQColor
Returns a gray value 0..255 from the given \a rgb colour. Returns a gray value 0..255 from the given \a rgb colour.

@ -396,9 +396,9 @@ uint TQColor::alloc( int screen )
screen = TQPaintDevice::x11AppScreen(); screen = TQPaintDevice::x11AppScreen();
if ( !color_init ) if ( !color_init )
return dpy ? (uint)BlackPixel(dpy, screen) : 0; return dpy ? (uint)BlackPixel(dpy, screen) : 0;
int r = qRed(d.argb); int r = tqRed(d.argb);
int g = qGreen(d.argb); int g = tqGreen(d.argb);
int b = qBlue(d.argb); int b = tqBlue(d.argb);
uint pix = 0; uint pix = 0;
TQColorScreenData *sd = screendata[screen]; TQColorScreenData *sd = screendata[screen];
if ( sd->g_truecolor ) { // truecolor: map to pixel if ( sd->g_truecolor ) { // truecolor: map to pixel
@ -493,7 +493,7 @@ uint TQColor::alloc( int screen )
int unused, value; int unused, value;
hsv(&unused, &unused, &value); hsv(&unused, &unused, &value);
if (value < 128) { // dark, use black if (value < 128) { // dark, use black
d.argb = qRgb(0,0,0); d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen ); pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) { if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
@ -501,7 +501,7 @@ uint TQColor::alloc( int screen )
d.d8.pix = pix; d.d8.pix = pix;
} }
} else { // light, use white } else { // light, use white
d.argb = qRgb(0xff,0xff,0xff); d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen ); pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) { if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
@ -547,7 +547,7 @@ uint TQColor::alloc( int screen )
int unused, value; int unused, value;
hsv(&unused, &unused, &value); hsv(&unused, &unused, &value);
if (value < 128) { // dark, use black if (value < 128) { // dark, use black
d.argb = qRgb(0,0,0); d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen ); pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) { if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
@ -555,7 +555,7 @@ uint TQColor::alloc( int screen )
d.d8.pix = pix; d.d8.pix = pix;
} }
} else { // light, use white } else { // light, use white
d.argb = qRgb(0xff,0xff,0xff); d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen ); pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) { if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
@ -614,7 +614,7 @@ uint TQColor::pixel( int screen ) const
if (screen != TQPaintDevice::x11AppScreen() && if (screen != TQPaintDevice::x11AppScreen() &&
// don't allocate color0 or color1, they have fixed pixel // don't allocate color0 or color1, they have fixed pixel
// values for all screens // values for all screens
d.argb != qRgba(255, 255, 255, 1) && d.argb != qRgba(0, 0, 0, 1)) d.argb != tqRgba(255, 255, 255, 1) && d.argb != tqRgba(0, 0, 0, 1))
return ((TQColor*)this)->alloc( screen ); return ((TQColor*)this)->alloc( screen );
return pixel(); return pixel();
} }
@ -630,7 +630,7 @@ void TQColor::setSystemNamedColor( const TQString& name )
d.argb = qt_get_rgb_val( name.latin1() ); d.argb = qt_get_rgb_val( name.latin1() );
TQRgb rgb; TQRgb rgb;
if ( qt_get_named_rgb( name.latin1(), &rgb ) ) { if ( qt_get_named_rgb( name.latin1(), &rgb ) ) {
setRgb( qRed(rgb), qGreen(rgb), qBlue(rgb) ); setRgb( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) );
if ( colormodel == d8 ) { if ( colormodel == d8 ) {
d.d8.invalid = FALSE; d.d8.invalid = FALSE;
d.d8.dirty = TRUE; d.d8.dirty = TRUE;

@ -176,7 +176,7 @@ void TQCursor::initialize()
TQCursor::TQCursor() TQCursor::TQCursor()
{ {
if ( !initialized ) { if ( !initialized ) {
if ( qApp->startingUp() ) { if ( tqApp->startingUp() ) {
data = 0; data = 0;
return; return;
} }

@ -965,11 +965,11 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
if ( beingCancelled ) { if ( beingCancelled ) {
if ( e->type() == TQEvent::KeyRelease && if ( e->type() == TQEvent::KeyRelease &&
((TQKeyEvent*)e)->key() == Key_Escape ) { ((TQKeyEvent*)e)->key() == Key_Escape ) {
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
object = 0; object = 0;
dragSource = 0; dragSource = 0;
beingCancelled = FALSE; beingCancelled = FALSE;
qApp->exit_loop(); tqApp->exit_loop();
return TRUE; // block the key release return TRUE; // block the key release
} }
return FALSE; return FALSE;
@ -989,7 +989,7 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
need_modifiers_check = FALSE; need_modifiers_check = FALSE;
return TRUE; return TRUE;
} else if ( e->type() == TQEvent::MouseButtonRelease ) { } else if ( e->type() == TQEvent::MouseButtonRelease ) {
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
if ( willDrop ) if ( willDrop )
drop(); drop();
else else
@ -997,7 +997,7 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
object = 0; object = 0;
dragSource = 0; dragSource = 0;
beingCancelled = FALSE; beingCancelled = FALSE;
qApp->exit_loop(); tqApp->exit_loop();
return TRUE; return TRUE;
} else if ( e->type() == TQEvent::DragResponse ) { } else if ( e->type() == TQEvent::DragResponse ) {
if ( ((TQDragResponseEvent *)e)->dragAccepted() ) { if ( ((TQDragResponseEvent *)e)->dragAccepted() ) {
@ -1019,11 +1019,11 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
TQKeyEvent *ke = ((TQKeyEvent*)e); TQKeyEvent *ke = ((TQKeyEvent*)e);
if ( ke->key() == Key_Escape && e->type() == TQEvent::KeyPress ) { if ( ke->key() == Key_Escape && e->type() == TQEvent::KeyPress ) {
cancel(); cancel();
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
object = 0; object = 0;
dragSource = 0; dragSource = 0;
beingCancelled = FALSE; beingCancelled = FALSE;
qApp->exit_loop(); tqApp->exit_loop();
} else { } else {
if( updateMode(ke->stateAfter())) { if( updateMode(ke->stateAfter())) {
qt_xdnd_source_sameanswer = TQRect(); // force move qt_xdnd_source_sameanswer = TQRect(); // force move
@ -1125,7 +1125,7 @@ void TQDragManager::updateCursor()
} }
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
if ( c ) if ( c )
qApp->setOverrideCursor( *c, TRUE ); tqApp->setOverrideCursor( *c, TRUE );
#endif #endif
} }
@ -1738,7 +1738,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
if ( object ) { if ( object ) {
cancel(); cancel();
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
beingCancelled = FALSE; beingCancelled = FALSE;
} }
@ -1754,7 +1754,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
XEvent event; XEvent event;
if ( XCheckTypedEvent( TQPaintDevice::x11AppDisplay(), if ( XCheckTypedEvent( TQPaintDevice::x11AppDisplay(),
ClientMessage, &event ) ) ClientMessage, &event ) )
qApp->x11ProcessEvent( &event ); tqApp->x11ProcessEvent( &event );
now = TQTime::currentTime(); now = TQTime::currentTime();
if ( started > now ) // crossed midnight if ( started > now ) // crossed midnight
@ -1780,7 +1780,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
dragSource = (TQWidget *)(object->parent()); dragSource = (TQWidget *)(object->parent());
qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget()); qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
qt_xdnd_source_current_time = qt_x_time; qt_xdnd_source_current_time = qt_x_time;
XSetSelectionOwner( TQPaintDevice::x11AppDisplay(), qt_xdnd_selection, XSetSelectionOwner( TQPaintDevice::x11AppDisplay(), qt_xdnd_selection,
dragSource->topLevelWidget()->winId(), dragSource->topLevelWidget()->winId(),
@ -1795,7 +1795,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
need_modifiers_check = FALSE; need_modifiers_check = FALSE;
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
qApp->setOverrideCursor( arrowCursor ); tqApp->setOverrideCursor( arrowCursor );
restoreCursor = TRUE; restoreCursor = TRUE;
updateCursor(); updateCursor();
#endif #endif
@ -1806,10 +1806,10 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
if (!TQWidget::mouseGrabber()) if (!TQWidget::mouseGrabber())
qt_xdnd_deco->grabMouse(); qt_xdnd_deco->grabMouse();
qApp->enter_loop(); // Do the DND. tqApp->enter_loop(); // Do the DND.
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
qApp->restoreOverrideCursor(); tqApp->restoreOverrideCursor();
#endif #endif
delete qt_xdnd_deco; delete qt_xdnd_deco;

@ -264,7 +264,7 @@ TQDragManager * qt_dnd_manager = 0;
TQDragManager::TQDragManager() TQDragManager::TQDragManager()
: TQObject( qApp, "global drag manager" ) : TQObject( tqApp, "global drag manager" )
{ {
n_cursor = 3; n_cursor = 3;
pm_cursor = new TQPixmap[n_cursor]; pm_cursor = new TQPixmap[n_cursor];
@ -312,7 +312,7 @@ TQDragObject::TQDragObject( TQWidget * dragSource, const char * name )
d = new TQDragObjectData(); d = new TQDragObjectData();
d->pm_cursor = 0; d->pm_cursor = 0;
#ifndef QT_NO_DRAGANDDROP #ifndef QT_NO_DRAGANDDROP
if ( !qt_dnd_manager && qApp ) if ( !qt_dnd_manager && tqApp )
(void)new TQDragManager(); (void)new TQDragManager();
#endif #endif
} }

@ -2566,6 +2566,6 @@ TQCustomEvent::TQCustomEvent( int type )
TQEvent::~TQEvent() TQEvent::~TQEvent()
{ {
if ( posted && qApp ) if ( posted && tqApp )
TQApplication::removePostedEvent( this ); TQApplication::removePostedEvent( this );
} }

@ -210,7 +210,7 @@ int TQEventLoop::enterLoop()
d->quitnow = FALSE; d->quitnow = FALSE;
d->exitloop = FALSE; d->exitloop = FALSE;
d->shortcut = FALSE; d->shortcut = FALSE;
emit qApp->aboutToQuit(); emit tqApp->aboutToQuit();
// send deferred deletes // send deferred deletes
TQApplication::sendPostedEvents( 0, TQEvent::DeferredDelete ); TQApplication::sendPostedEvents( 0, TQEvent::DeferredDelete );

@ -192,7 +192,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
} }
nevents++; nevents++;
if ( qApp->x11ProcessEvent( &event ) == 1 ) if ( tqApp->x11ProcessEvent( &event ) == 1 )
return TRUE; return TRUE;
} }
} }
@ -301,7 +301,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
// we are awake, broadcast it // we are awake, broadcast it
emit awake(); emit awake();
emit qApp->guiThreadAwake(); emit tqApp->guiThreadAwake();
if (nsel == -1) { if (nsel == -1) {
if (errno == EBADF) { if (errno == EBADF) {

@ -2943,7 +2943,7 @@ static TQSingleCleanupHandler<TQFontCache> cleanup_fontcache;
TQFontCache::TQFontCache() TQFontCache::TQFontCache()
: TQObject( qApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ), : TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ),
current_timestamp( 0 ), fast( FALSE ), timer_id( -1 ) current_timestamp( 0 ), fast( FALSE ), timer_id( -1 )
{ {
Q_ASSERT( instance == 0 ); Q_ASSERT( instance == 0 );

@ -2170,7 +2170,7 @@ TQString TQFontDatabase::scriptName(TQFont::Script script)
break; break;
} }
return qApp ? qApp->translate("TQFont", name) : TQString::fromLatin1(name); return tqApp ? tqApp->translate("TQFont", name) : TQString::fromLatin1(name);
} }

@ -98,10 +98,10 @@
setAlphaBuffer() alpha buffer\endlink. setAlphaBuffer() alpha buffer\endlink.
An entry in the color table is an RGB triplet encoded as a \c An entry in the color table is an RGB triplet encoded as a \c
uint. Use the \link ::qRed() qRed()\endlink, \link ::qGreen() uint. Use the \link ::tqRed() tqRed()\endlink, \link ::tqGreen()
qGreen()\endlink and \link ::qBlue() qBlue()\endlink functions (\c tqGreen()\endlink and \link ::tqBlue() tqBlue()\endlink functions (\c
ntqcolor.h) to access the components, and \link ::qRgb() ntqcolor.h) to access the components, and \link ::tqRgb()
qRgb\endlink to make an RGB triplet (see the TQColor class tqRgb\endlink to make an RGB triplet (see the TQColor class
documentation). documentation).
1-bpp (monochrome) images have a color table with a most two 1-bpp (monochrome) images have a color table with a most two
@ -127,7 +127,7 @@
\code \code
TQImage image; TQImage image;
// set entry 19 in the color table to yellow // set entry 19 in the color table to yellow
image.setColor( 19, qRgb(255,255,0) ); image.setColor( 19, tqRgb(255,255,0) );
// set 8 bit pixel at (x,y) to value yellow (in color table) // set 8 bit pixel at (x,y) to value yellow (in color table)
*(image.scanLine(y) + x) = 19; *(image.scanLine(y) + x) = 19;
\endcode \endcode
@ -140,7 +140,7 @@
TQImage image; TQImage image;
// sets 32 bit pixel at (x,y) to yellow. // sets 32 bit pixel at (x,y) to yellow.
uint *p = (uint *)image.scanLine(y) + x; uint *p = (uint *)image.scanLine(y) + x;
*p = qRgb(255,255,0); *p = tqRgb(255,255,0);
\endcode \endcode
On TQt/Embedded, scanlines are aligned to the pixel depth and may On TQt/Embedded, scanlines are aligned to the pixel depth and may
@ -888,9 +888,9 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
Returns the color in the color table at index \a i. The first Returns the color in the color table at index \a i. The first
color is at index 0. color is at index 0.
A color value is an RGB triplet. Use the \link ::qRed() A color value is an RGB triplet. Use the \link ::tqRed()
qRed()\endlink, \link ::qGreen() qGreen()\endlink and \link tqRed()\endlink, \link ::tqGreen() tqGreen()\endlink and \link
::qBlue() qBlue()\endlink functions (defined in \c ntqcolor.h) to ::tqBlue() tqBlue()\endlink functions (defined in \c ntqcolor.h) to
get the color value components. get the color value components.
\sa setColor() numColors() TQColor \sa setColor() numColors() TQColor
@ -901,8 +901,8 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
Sets a color in the color table at index \a i to \a c. Sets a color in the color table at index \a i to \a c.
A color value is an RGB triplet. Use the \link ::qRgb() A color value is an RGB triplet. Use the \link ::tqRgb()
qRgb()\endlink function (defined in \c ntqcolor.h) to make RGB tqRgb()\endlink function (defined in \c ntqcolor.h) to make RGB
triplets. triplets.
\sa color() setNumColors() numColors() \sa color() setNumColors() numColors()
@ -920,9 +920,9 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
pointer to \c{TQRgb*} (TQRgb has a 32-bit size) and use it to pointer to \c{TQRgb*} (TQRgb has a 32-bit size) and use it to
read/write the pixel value. You cannot use the \c{uchar*} pointer read/write the pixel value. You cannot use the \c{uchar*} pointer
directly, because the pixel format depends on the byte order on directly, because the pixel format depends on the byte order on
the underlying platform. Hint: use \link ::qRed() qRed()\endlink, the underlying platform. Hint: use \link ::tqRed() tqRed()\endlink,
\link ::qGreen() qGreen()\endlink and \link ::qBlue() \link ::tqGreen() tqGreen()\endlink and \link ::tqBlue()
qBlue()\endlink, etc. (ntqcolor.h) to access the pixels. tqBlue()\endlink, etc. (ntqcolor.h) to access the pixels.
\warning If you are accessing 16-bpp image data, you must handle \warning If you are accessing 16-bpp image data, you must handle
endianness yourself. (TQt/Embedded only) endianness yourself. (TQt/Embedded only)
@ -1522,7 +1522,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
for ( bc=0; bc<=MAX_B; bc++ ) { for ( bc=0; bc<=MAX_B; bc++ ) {
dst->setColor( INDEXOF(rc,gc,bc), dst->setColor( INDEXOF(rc,gc,bc),
(amask&0xff000000) (amask&0xff000000)
| qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); | tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
} }
int sw = src->width(); int sw = src->width();
@ -1551,9 +1551,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
if ( ( conversion_flags & TQt::Dither_Mask ) == TQt::ThresholdDither ) { if ( ( conversion_flags & TQt::Dither_Mask ) == TQt::ThresholdDither ) {
#define DITHER(p,m) ((uchar) ((p * (m) + 127) / 255)) #define DITHER(p,m) ((uchar) ((p * (m) + 127) / 255))
while ( p < end ) { while ( p < end ) {
rc = qRed( *p ); rc = tqRed( *p );
gc = qGreen( *p ); gc = tqGreen( *p );
bc = qBlue( *p ); bc = tqBlue( *p );
*b++ = *b++ =
INDEXOF( INDEXOF(
@ -1572,9 +1572,9 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
while ( p < end ) { while ( p < end ) {
uint d = bm[y&15][x&15]; uint d = bm[y&15][x&15];
rc = qRed( *p ); rc = tqRed( *p );
gc = qGreen( *p ); gc = tqGreen( *p );
bc = qBlue( *p ); bc = tqBlue( *p );
*b++ = *b++ =
INDEXOF( INDEXOF(
@ -1805,8 +1805,8 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
dithermode = Diffuse; dithermode = Diffuse;
} }
dst->setColor( 0, qRgb(255, 255, 255) ); dst->setColor( 0, tqRgb(255, 255, 255) );
dst->setColor( 1, qRgb( 0, 0, 0) ); dst->setColor( 1, tqRgb( 0, 0, 0) );
int w = src->width(); int w = src->width();
int h = src->height(); int h = src->height();
int d = src->depth(); int d = src->depth();
@ -1822,7 +1822,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
// Pixel 0x00 -> 1 pixels (black) // Pixel 0x00 -> 1 pixels (black)
// Pixel 0xFF -> 0 pixels (white) // Pixel 0xFF -> 0 pixels (white)
for ( int i=0; i<src->numColors(); i++ ) for ( int i=0; i<src->numColors(); i++ )
gray[i] = qGray( src->color(i) & 0x00ffffff ); gray[i] = tqGray( src->color(i) & 0x00ffffff );
} }
} }
@ -1852,7 +1852,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
*b2++ = qGray(*(uint*)p); *b2++ = tqGray(*(uint*)p);
p += 4; p += 4;
} }
} }
@ -1878,7 +1878,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
*b2++ = qGray(*(uint*)p); *b2++ = tqGray(*(uint*)p);
p += 4; p += 4;
} }
} }
@ -1970,7 +1970,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
if ( (uint)qGray(*p++) < bm[j++&15][i&15] ) if ( (uint)tqGray(*p++) < bm[j++&15][i&15] )
*m |= 1 << bit; *m |= 1 << bit;
if ( bit == 0 ) { if ( bit == 0 ) {
m++; m++;
@ -2028,7 +2028,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
if ( qGray(*p++) < 128 ) if ( tqGray(*p++) < 128 )
*m |= 1 << bit; // Set pixel "black" *m |= 1 << bit; // Set pixel "black"
if ( bit == 0 ) { if ( bit == 0 ) {
m++; m++;
@ -2241,7 +2241,7 @@ int TQImage::pixelIndex( int x, int y ) const
If (\a x, \a y) is not \link valid() on the image\endlink, the If (\a x, \a y) is not \link valid() on the image\endlink, the
results are undefined. results are undefined.
\sa setPixel() qRed() qGreen() qBlue() valid() \sa setPixel() tqRed() tqGreen() tqBlue() valid()
*/ */
TQRgb TQImage::pixel( int x, int y ) const TQRgb TQImage::pixel( int x, int y ) const
@ -2285,7 +2285,7 @@ TQRgb TQImage::pixel( int x, int y ) const
If the image is a paletted image (depth() \<= 8) and \a If the image is a paletted image (depth() \<= 8) and \a
index_or_rgb \>= numColors(), the result is undefined. index_or_rgb \>= numColors(), the result is undefined.
\sa pixelIndex() pixel() qRgb() qRgba() valid() \sa pixelIndex() pixel() tqRgb() tqRgba() valid()
*/ */
void TQImage::setPixel( int x, int y, uint index_or_rgb ) void TQImage::setPixel( int x, int y, uint index_or_rgb )
@ -2377,8 +2377,8 @@ TQImage TQImage::convertBitOrder( Endian bitOrder ) const
static static
bool isGray(TQRgb c) bool isGray(TQRgb c)
{ {
return qRed(c) == qGreen(c) return tqRed(c) == tqGreen(c)
&& qRed(c) == qBlue(c); && tqRed(c) == tqBlue(c);
} }
/*! /*!
@ -2440,7 +2440,7 @@ bool TQImage::isGrayscale() const
#endif //QT_NO_IMAGE_TRUECOLOR #endif //QT_NO_IMAGE_TRUECOLOR
case 8: { case 8: {
for (int i=0; i<numColors(); i++) for (int i=0; i<numColors(); i++)
if (data->ctbl[i] != qRgb(i,i,i)) if (data->ctbl[i] != tqRgb(i,i,i))
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
@ -2532,14 +2532,14 @@ void pnmscale(const TQImage& src, TQImage& dst)
xelrow = (TQRgb*)src.scanLine(rowsread++); xelrow = (TQRgb*)src.scanLine(rowsread++);
for ( col = 0, xP = xelrow; col < cols; ++col, ++xP ) { for ( col = 0, xP = xelrow; col < cols; ++col, ++xP ) {
if (as) { if (as) {
as[col] += fracrowleft * qAlpha( *xP ); as[col] += fracrowleft * tqAlpha( *xP );
rs[col] += fracrowleft * qRed( *xP ) * qAlpha( *xP ) / 255; rs[col] += fracrowleft * tqRed( *xP ) * tqAlpha( *xP ) / 255;
gs[col] += fracrowleft * qGreen( *xP ) * qAlpha( *xP ) / 255; gs[col] += fracrowleft * tqGreen( *xP ) * tqAlpha( *xP ) / 255;
bs[col] += fracrowleft * qBlue( *xP ) * qAlpha( *xP ) / 255; bs[col] += fracrowleft * tqBlue( *xP ) * tqAlpha( *xP ) / 255;
} else { } else {
rs[col] += fracrowleft * qRed( *xP ); rs[col] += fracrowleft * tqRed( *xP );
gs[col] += fracrowleft * qGreen( *xP ); gs[col] += fracrowleft * tqGreen( *xP );
bs[col] += fracrowleft * qBlue( *xP ); bs[col] += fracrowleft * tqBlue( *xP );
} }
} }
fracrowtofill -= fracrowleft; fracrowtofill -= fracrowleft;
@ -2558,19 +2558,19 @@ void pnmscale(const TQImage& src, TQImage& dst)
register long r, g, b; register long r, g, b;
if ( as ) { if ( as ) {
r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; r = rs[col] + fracrowtofill * tqRed( *xP ) * tqAlpha( *xP ) / 255;
g = gs[col] + fracrowtofill * qGreen( *xP ) * qAlpha( *xP ) / 255; g = gs[col] + fracrowtofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255;
b = bs[col] + fracrowtofill * qBlue( *xP ) * qAlpha( *xP ) / 255; b = bs[col] + fracrowtofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255;
a = as[col] + fracrowtofill * qAlpha( *xP ); a = as[col] + fracrowtofill * tqAlpha( *xP );
if ( a ) { if ( a ) {
r = r * 255 / a * SCALE; r = r * 255 / a * SCALE;
g = g * 255 / a * SCALE; g = g * 255 / a * SCALE;
b = b * 255 / a * SCALE; b = b * 255 / a * SCALE;
} }
} else { } else {
r = rs[col] + fracrowtofill * qRed( *xP ); r = rs[col] + fracrowtofill * tqRed( *xP );
g = gs[col] + fracrowtofill * qGreen( *xP ); g = gs[col] + fracrowtofill * tqGreen( *xP );
b = bs[col] + fracrowtofill * qBlue( *xP ); b = bs[col] + fracrowtofill * tqBlue( *xP );
} }
r /= SCALE; r /= SCALE;
if ( r > maxval ) r = maxval; if ( r > maxval ) r = maxval;
@ -2581,10 +2581,10 @@ void pnmscale(const TQImage& src, TQImage& dst)
if ( as ) { if ( as ) {
a /= SCALE; a /= SCALE;
if ( a > maxval ) a = maxval; if ( a > maxval ) a = maxval;
*nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a );
as[col] = HALFSCALE; as[col] = HALFSCALE;
} else { } else {
*nxP = qRgb( (int)r, (int)g, (int)b ); *nxP = tqRgb( (int)r, (int)g, (int)b );
} }
rs[col] = gs[col] = bs[col] = HALFSCALE; rs[col] = gs[col] = bs[col] = HALFSCALE;
} }
@ -2617,19 +2617,19 @@ void pnmscale(const TQImage& src, TQImage& dst)
a = r = g = b = HALFSCALE; a = r = g = b = HALFSCALE;
} }
if ( as ) { if ( as ) {
r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; r += fraccoltofill * tqRed( *xP ) * tqAlpha( *xP ) / 255;
g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; g += fraccoltofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255;
b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; b += fraccoltofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255;
a += fraccoltofill * qAlpha( *xP ); a += fraccoltofill * tqAlpha( *xP );
if ( a ) { if ( a ) {
r = r * 255 / a * SCALE; r = r * 255 / a * SCALE;
g = g * 255 / a * SCALE; g = g * 255 / a * SCALE;
b = b * 255 / a * SCALE; b = b * 255 / a * SCALE;
} }
} else { } else {
r += fraccoltofill * qRed( *xP ); r += fraccoltofill * tqRed( *xP );
g += fraccoltofill * qGreen( *xP ); g += fraccoltofill * tqGreen( *xP );
b += fraccoltofill * qBlue( *xP ); b += fraccoltofill * tqBlue( *xP );
} }
r /= SCALE; r /= SCALE;
if ( r > maxval ) r = maxval; if ( r > maxval ) r = maxval;
@ -2640,9 +2640,9 @@ void pnmscale(const TQImage& src, TQImage& dst)
if (as) { if (as) {
a /= SCALE; a /= SCALE;
if ( a > maxval ) a = maxval; if ( a > maxval ) a = maxval;
*nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a );
} else { } else {
*nxP = qRgb( (int)r, (int)g, (int)b ); *nxP = tqRgb( (int)r, (int)g, (int)b );
} }
fraccolleft -= fraccoltofill; fraccolleft -= fraccoltofill;
fraccoltofill = SCALE; fraccoltofill = SCALE;
@ -2655,14 +2655,14 @@ void pnmscale(const TQImage& src, TQImage& dst)
needcol = 0; needcol = 0;
} }
if (as) { if (as) {
a += fraccolleft * qAlpha( *xP ); a += fraccolleft * tqAlpha( *xP );
r += fraccolleft * qRed( *xP ) * qAlpha( *xP ) / 255; r += fraccolleft * tqRed( *xP ) * tqAlpha( *xP ) / 255;
g += fraccolleft * qGreen( *xP ) * qAlpha( *xP ) / 255; g += fraccolleft * tqGreen( *xP ) * tqAlpha( *xP ) / 255;
b += fraccolleft * qBlue( *xP ) * qAlpha( *xP ) / 255; b += fraccolleft * tqBlue( *xP ) * tqAlpha( *xP ) / 255;
} else { } else {
r += fraccolleft * qRed( *xP ); r += fraccolleft * tqRed( *xP );
g += fraccolleft * qGreen( *xP ); g += fraccolleft * tqGreen( *xP );
b += fraccolleft * qBlue( *xP ); b += fraccolleft * tqBlue( *xP );
} }
fraccoltofill -= fraccolleft; fraccoltofill -= fraccolleft;
} }
@ -2670,19 +2670,19 @@ void pnmscale(const TQImage& src, TQImage& dst)
if ( fraccoltofill > 0 ) { if ( fraccoltofill > 0 ) {
--xP; --xP;
if (as) { if (as) {
a += fraccolleft * qAlpha( *xP ); a += fraccolleft * tqAlpha( *xP );
r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; r += fraccoltofill * tqRed( *xP ) * tqAlpha( *xP ) / 255;
g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; g += fraccoltofill * tqGreen( *xP ) * tqAlpha( *xP ) / 255;
b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; b += fraccoltofill * tqBlue( *xP ) * tqAlpha( *xP ) / 255;
if ( a ) { if ( a ) {
r = r * 255 / a * SCALE; r = r * 255 / a * SCALE;
g = g * 255 / a * SCALE; g = g * 255 / a * SCALE;
b = b * 255 / a * SCALE; b = b * 255 / a * SCALE;
} }
} else { } else {
r += fraccoltofill * qRed( *xP ); r += fraccoltofill * tqRed( *xP );
g += fraccoltofill * qGreen( *xP ); g += fraccoltofill * tqGreen( *xP );
b += fraccoltofill * qBlue( *xP ); b += fraccoltofill * tqBlue( *xP );
} }
} }
if ( ! needcol ) { if ( ! needcol ) {
@ -2695,9 +2695,9 @@ void pnmscale(const TQImage& src, TQImage& dst)
if (as) { if (as) {
a /= SCALE; a /= SCALE;
if ( a > maxval ) a = maxval; if ( a > maxval ) a = maxval;
*nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); *nxP = tqRgba( (int)r, (int)g, (int)b, (int)a );
} else { } else {
*nxP = qRgb( (int)r, (int)g, (int)b ); *nxP = tqRgb( (int)r, (int)g, (int)b );
} }
} }
} }
@ -4704,7 +4704,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
for ( int i=0; i<ncols; i++ ) { for ( int i=0; i<ncols; i++ ) {
if ( d->readBlock( (char *)rgb, rgb_len ) != rgb_len ) if ( d->readBlock( (char *)rgb, rgb_len ) != rgb_len )
return FALSE; return FALSE;
image.setColor( i, qRgb(rgb[2],rgb[1],rgb[0]) ); image.setColor( i, tqRgb(rgb[2],rgb[1],rgb[0]) );
if ( d->atEnd() ) // truncated file if ( d->atEnd() ) // truncated file
return FALSE; return FALSE;
} }
@ -4758,7 +4758,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
d->at(d->at()+pad); d->at(d->at()+pad);
#endif #endif
} }
if ( ncols == 2 && qGray(image.color(0)) < qGray(image.color(1)) ) if ( ncols == 2 && tqGray(image.color(0)) < tqGray(image.color(1)) )
swapPixel01( &image ); // pixel 0 is white! swapPixel01( &image ); // pixel 0 is white!
} }
@ -4929,7 +4929,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
c = *(uchar*)b | (*(uchar*)(b+1)<<8); c = *(uchar*)b | (*(uchar*)(b+1)<<8);
if (nbits != 16) if (nbits != 16)
c |= *(uchar*)(b+2)<<16; c |= *(uchar*)(b+2)<<16;
*p++ = qRgb(((c & red_mask) >> red_shift) * red_scale, *p++ = tqRgb(((c & red_mask) >> red_shift) * red_scale,
((c & green_mask) >> green_shift) * green_scale, ((c & green_mask) >> green_shift) * green_scale,
((c & blue_mask) >> blue_shift) * blue_scale); ((c & blue_mask) >> blue_shift) * blue_scale);
b += nbits/8; b += nbits/8;
@ -5012,9 +5012,9 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
uchar *rgb = color_table; uchar *rgb = color_table;
TQRgb *c = image.colorTable(); TQRgb *c = image.colorTable();
for ( int i=0; i<image.numColors(); i++ ) { for ( int i=0; i<image.numColors(); i++ ) {
*rgb++ = qBlue ( c[i] ); *rgb++ = tqBlue ( c[i] );
*rgb++ = qGreen( c[i] ); *rgb++ = tqGreen( c[i] );
*rgb++ = qRed ( c[i] ); *rgb++ = tqRed ( c[i] );
*rgb++ = 0; *rgb++ = 0;
} }
d->writeBlock( (char *)color_table, 4*image.numColors() ); d->writeBlock( (char *)color_table, 4*image.numColors() );
@ -5062,9 +5062,9 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
TQRgb *end = p + image.width(); TQRgb *end = p + image.width();
b = buf; b = buf;
while ( p < end ) { while ( p < end ) {
*b++ = qBlue(*p); *b++ = tqBlue(*p);
*b++ = qGreen(*p); *b++ = tqGreen(*p);
*b++ = qRed(*p); *b++ = tqRed(*p);
p++; p++;
} }
} }
@ -5216,7 +5216,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data
end = p + w; end = p + w;
b = buf24; b = buf24;
while ( p < end ) { while ( p < end ) {
*p++ = qRgb(b[0],b[1],b[2]); *p++ = tqRgb(b[0],b[1],b[2]);
b += 3; b += 3;
} }
} }
@ -5260,7 +5260,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data
r = read_pbm_int( d ); r = read_pbm_int( d );
g = read_pbm_int( d ); g = read_pbm_int( d );
b = read_pbm_int( d ); b = read_pbm_int( d );
*((TQRgb*)p) = qRgb( r, g, b ); *((TQRgb*)p) = tqRgb( r, g, b );
p += 4; p += 4;
} }
} else { } else {
@ -5268,7 +5268,7 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data
r = read_pbm_int( d ) * maxc / mcc; r = read_pbm_int( d ) * maxc / mcc;
g = read_pbm_int( d ) * maxc / mcc; g = read_pbm_int( d ) * maxc / mcc;
b = read_pbm_int( d ) * maxc / mcc; b = read_pbm_int( d ) * maxc / mcc;
*((TQRgb*)p) = qRgb( r, g, b ); *((TQRgb*)p) = tqRgb( r, g, b );
p += 4; p += 4;
} }
} }
@ -5278,12 +5278,12 @@ static void read_pbm_image( TQImageIO *iio ) // read PBM image data
if ( nbits == 1 ) { // bitmap if ( nbits == 1 ) { // bitmap
image.setNumColors( 2 ); image.setNumColors( 2 );
image.setColor( 0, qRgb(255,255,255) ); // white image.setColor( 0, tqRgb(255,255,255) ); // white
image.setColor( 1, qRgb(0,0,0) ); // black image.setColor( 1, tqRgb(0,0,0) ); // black
} else if ( nbits == 8 ) { // graymap } else if ( nbits == 8 ) { // graymap
image.setNumColors( maxc+1 ); image.setNumColors( maxc+1 );
for ( int i=0; i<=maxc; i++ ) for ( int i=0; i<=maxc; i++ )
image.setColor( i, qRgb(i*255/maxc,i*255/maxc,i*255/maxc) ); image.setColor( i, tqRgb(i*255/maxc,i*255/maxc,i*255/maxc) );
} }
iio->setImage( image ); iio->setImage( image );
@ -5308,7 +5308,7 @@ static void write_pbm_image( TQImageIO *iio )
} }
if ( image.depth() == 1 && image.numColors() == 2 ) { if ( image.depth() == 1 && image.numColors() == 2 ) {
if ( qGray(image.color(0)) < qGray(image.color(1)) ) { if ( tqGray(image.color(0)) < tqGray(image.color(1)) ) {
// 0=dark/black, 1=light/white - invert // 0=dark/black, 1=light/white - invert
image.detach(); image.detach();
for ( int y=0; y<image.height(); y++ ) { for ( int y=0; y<image.height(); y++ ) {
@ -5359,15 +5359,15 @@ static void write_pbm_image( TQImageIO *iio )
uchar *end = buf+bpl; uchar *end = buf+bpl;
if ( gray ) { if ( gray ) {
while ( p < end ) { while ( p < end ) {
uchar g = (uchar)qGray(color[*b++]); uchar g = (uchar)tqGray(color[*b++]);
*p++ = g; *p++ = g;
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
TQRgb rgb = color[*b++]; TQRgb rgb = color[*b++];
*p++ = qRed(rgb); *p++ = tqRed(rgb);
*p++ = qGreen(rgb); *p++ = tqGreen(rgb);
*p++ = qBlue(rgb); *p++ = tqBlue(rgb);
} }
} }
if ( bpl != (uint)out->writeBlock((char*)buf, bpl) ) { if ( bpl != (uint)out->writeBlock((char*)buf, bpl) ) {
@ -5394,15 +5394,15 @@ static void write_pbm_image( TQImageIO *iio )
uchar *end = buf+bpl; uchar *end = buf+bpl;
if ( gray ) { if ( gray ) {
while ( p < end ) { while ( p < end ) {
uchar g = (uchar)qGray(*b++); uchar g = (uchar)tqGray(*b++);
*p++ = g; *p++ = g;
} }
} else { } else {
while ( p < end ) { while ( p < end ) {
TQRgb rgb = *b++; TQRgb rgb = *b++;
*p++ = qRed(rgb); *p++ = tqRed(rgb);
*p++ = qGreen(rgb); *p++ = tqGreen(rgb);
*p++ = qBlue(rgb); *p++ = tqBlue(rgb);
} }
} }
if ( bpl != (uint)out->writeBlock((char*)buf, bpl) ) { if ( bpl != (uint)out->writeBlock((char*)buf, bpl) ) {
@ -5544,8 +5544,8 @@ static void read_xbm_image( TQImageIO *iio )
if ( image.isNull() ) if ( image.isNull() )
return; return;
image.setColor( 0, qRgb(255,255,255) ); // white image.setColor( 0, tqRgb(255,255,255) ); // white
image.setColor( 1, qRgb(0,0,0) ); // black image.setColor( 1, tqRgb(0,0,0) ); // black
int x = 0, y = 0; int x = 0, y = 0;
uchar *b = image.scanLine(0); uchar *b = image.scanLine(0);
@ -5597,7 +5597,7 @@ static void write_xbm_image( TQImageIO *iio )
if ( image.bitOrder() != TQImage::LittleEndian ) if ( image.bitOrder() != TQImage::LittleEndian )
image = image.convertBitOrder( TQImage::LittleEndian ); image = image.convertBitOrder( TQImage::LittleEndian );
bool invert = qGray(image.color(0)) < qGray(image.color(1)); bool invert = tqGray(image.color(0)) < tqGray(image.color(1));
char hexrep[16]; char hexrep[16];
for ( i=0; i<10; i++ ) for ( i=0; i<10; i++ )
hexrep[i] = '0' + i; hexrep[i] = '0' + i;
@ -5784,10 +5784,10 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
int transparentColor = currentColor; int transparentColor = currentColor;
if ( image.depth() == 8 ) { if ( image.depth() == 8 ) {
image.setColor( transparentColor, image.setColor( transparentColor,
RGB_MASK & qRgb(198,198,198) ); TQT_RGB_MASK & tqRgb(198,198,198) );
colorMap.insert( index, transparentColor ); colorMap.insert( index, transparentColor );
} else { } else {
TQRgb rgb = RGB_MASK & qRgb(198,198,198); TQRgb rgb = TQT_RGB_MASK & tqRgb(198,198,198);
colorMap.insert( index, rgb ); colorMap.insert( index, rgb );
} }
} else { } else {
@ -5947,15 +5947,15 @@ static void write_xpm_image( TQImageIO * iio )
TQMap<TQRgb, int>::Iterator c = colorMap.begin(); TQMap<TQRgb, int>::Iterator c = colorMap.begin();
while ( c != colorMap.end() ) { while ( c != colorMap.end() ) {
TQRgb color = c.key(); TQRgb color = c.key();
if ( image.hasAlphaBuffer() && color == (color & RGB_MASK) ) if ( image.hasAlphaBuffer() && color == (color & TQT_RGB_MASK) )
line.sprintf( "\"%s c None\"", line.sprintf( "\"%s c None\"",
xpm_color_name(cpp, *c) ); xpm_color_name(cpp, *c) );
else else
line.sprintf( "\"%s c #%02x%02x%02x\"", line.sprintf( "\"%s c #%02x%02x%02x\"",
xpm_color_name(cpp, *c), xpm_color_name(cpp, *c),
qRed(color), tqRed(color),
qGreen(color), tqGreen(color),
qBlue(color) ); tqBlue(color) );
++c; ++c;
s << "," << endl << line; s << "," << endl << line;
} }
@ -6182,17 +6182,17 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src,
const int ds = src->width() - sw; const int ds = src->width() - sw;
while ( sh-- ) { while ( sh-- ) {
for ( int t=sw; t--; ) { for ( int t=sw; t--; ) {
unsigned char a = qAlpha(*s); unsigned char a = tqAlpha(*s);
if ( a == 255 ) if ( a == 255 )
*d++ = *s++; *d++ = *s++;
else if ( a == 0 ) else if ( a == 0 )
++d,++s; // nothing ++d,++s; // nothing
else { else {
unsigned char r = ((qRed(*s)-qRed(*d)) * a) / 256 + qRed(*d); unsigned char r = ((tqRed(*s)-tqRed(*d)) * a) / 256 + tqRed(*d);
unsigned char g = ((qGreen(*s)-qGreen(*d)) * a) / 256 + qGreen(*d); unsigned char g = ((tqGreen(*s)-tqGreen(*d)) * a) / 256 + tqGreen(*d);
unsigned char b = ((qBlue(*s)-qBlue(*d)) * a) / 256 + qBlue(*d); unsigned char b = ((tqBlue(*s)-tqBlue(*d)) * a) / 256 + tqBlue(*d);
a = TQMAX(qAlpha(*d),a); // alternatives... a = TQMAX(tqAlpha(*d),a); // alternatives...
*d++ = qRgba(r,g,b,a); *d++ = tqRgba(r,g,b,a);
++s; ++s;
} }
} }
@ -6485,7 +6485,7 @@ TQGfx * TQImage::graphicsContext()
TQRgb * tmp=colorTable(); TQRgb * tmp=colorTable();
int nc=numColors(); int nc=numColors();
if(tmp==0) { if(tmp==0) {
static TQRgb table[2] = { qRgb(255,255,255), qRgb(0,0,0) }; static TQRgb table[2] = { tqRgb(255,255,255), tqRgb(0,0,0) };
tmp=table; tmp=table;
nc=2; nc=2;
} }

@ -263,7 +263,7 @@ void read_jpeg_image(TQImageIO* iio)
} else if ( cinfo.output_components == 1 ) { } else if ( cinfo.output_components == 1 ) {
created = image.create( sWidth, sHeight, 8, 256 ); created = image.create( sWidth, sHeight, 8, 256 );
for (int i=0; i<256; i++) for (int i=0; i<256; i++)
image.setColor(i, qRgb(i,i,i)); image.setColor(i, tqRgb(i,i,i));
} else { } else {
// Unsupported format // Unsupported format
} }
@ -288,7 +288,7 @@ void read_jpeg_image(TQImageIO* iio)
// the weight of it when added to the output buffer. At present it is a non-smooth scale which is // the weight of it when added to the output buffer. At present it is a non-smooth scale which is
// inefficently implemented, it still uncompresses all the jpeg, an optimization for progressive // inefficently implemented, it still uncompresses all the jpeg, an optimization for progressive
// jpegs could be made if scaling by say 50% or some other special cases // jpegs could be made if scaling by say 50% or some other special cases
out[sWidth * i / cinfo.output_width] = qRgb( in[0], in[1], in[2] ); out[sWidth * i / cinfo.output_width] = tqRgb( in[0], in[1], in[2] );
in += 3; in += 3;
} }
} else { } else {
@ -312,7 +312,7 @@ void read_jpeg_image(TQImageIO* iio)
} else if ( cinfo.output_components == 1 ) { } else if ( cinfo.output_components == 1 ) {
created = image.create( cinfo.output_width, cinfo.output_height, 8, 256 ); created = image.create( cinfo.output_width, cinfo.output_height, 8, 256 );
for (int i=0; i<256; i++) for (int i=0; i<256; i++)
image.setColor(i, qRgb(i,i,i)); image.setColor(i, tqRgb(i,i,i));
} else { } else {
// Unsupported format // Unsupported format
} }
@ -335,7 +335,7 @@ void read_jpeg_image(TQImageIO* iio)
for (uint i=cinfo.output_width; i--; ) { for (uint i=cinfo.output_width; i--; ) {
in-=3; in-=3;
out[i] = qRgb(in[0], in[1], in[2]); out[i] = tqRgb(in[0], in[1], in[2]);
} }
} }
} }
@ -475,8 +475,8 @@ void write_jpeg_image(TQImageIO* iio)
gray = TRUE; gray = TRUE;
int i; int i;
for (i=image.numColors(); gray && i--; ) { for (i=image.numColors(); gray && i--; ) {
gray = gray & ( qRed(cmap[i]) == qGreen(cmap[i]) && gray = gray & ( tqRed(cmap[i]) == tqGreen(cmap[i]) &&
qRed(cmap[i]) == qBlue(cmap[i]) ); tqRed(cmap[i]) == tqBlue(cmap[i]) );
} }
cinfo.input_components = gray ? 1 : 3; cinfo.input_components = gray ? 1 : 3;
cinfo.in_color_space = gray ? JCS_GRAYSCALE : JCS_RGB; cinfo.in_color_space = gray ? JCS_GRAYSCALE : JCS_RGB;
@ -522,12 +522,12 @@ void write_jpeg_image(TQImageIO* iio)
if ( image.bitOrder() == TQImage::LittleEndian ) { if ( image.bitOrder() == TQImage::LittleEndian ) {
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7))); bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7)));
row[i] = qRed(cmap[bit]); row[i] = tqRed(cmap[bit]);
} }
} else { } else {
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (7 -(i & 7)))); bool bit = !!(*(data + (i >> 3)) & (1 << (7 -(i & 7))));
row[i] = qRed(cmap[bit]); row[i] = tqRed(cmap[bit]);
} }
} }
} else { } else {
@ -535,16 +535,16 @@ void write_jpeg_image(TQImageIO* iio)
if ( image.bitOrder() == TQImage::LittleEndian ) { if ( image.bitOrder() == TQImage::LittleEndian ) {
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7))); bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7)));
*row++ = qRed(cmap[bit]); *row++ = tqRed(cmap[bit]);
*row++ = qGreen(cmap[bit]); *row++ = tqGreen(cmap[bit]);
*row++ = qBlue(cmap[bit]); *row++ = tqBlue(cmap[bit]);
} }
} else { } else {
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (7 -(i & 7)))); bool bit = !!(*(data + (i >> 3)) & (1 << (7 -(i & 7))));
*row++ = qRed(cmap[bit]); *row++ = tqRed(cmap[bit]);
*row++ = qGreen(cmap[bit]); *row++ = tqGreen(cmap[bit]);
*row++ = qBlue(cmap[bit]); *row++ = tqBlue(cmap[bit]);
} }
} }
} }
@ -553,15 +553,15 @@ void write_jpeg_image(TQImageIO* iio)
if (gray) { if (gray) {
uchar* pix = image.scanLine(cinfo.next_scanline); uchar* pix = image.scanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
*row = qRed(cmap[*pix]); *row = tqRed(cmap[*pix]);
++row; ++pix; ++row; ++pix;
} }
} else { } else {
uchar* pix = image.scanLine(cinfo.next_scanline); uchar* pix = image.scanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
*row++ = qRed(cmap[*pix]); *row++ = tqRed(cmap[*pix]);
*row++ = qGreen(cmap[*pix]); *row++ = tqGreen(cmap[*pix]);
*row++ = qBlue(cmap[*pix]); *row++ = tqBlue(cmap[*pix]);
++pix; ++pix;
} }
} }
@ -569,9 +569,9 @@ void write_jpeg_image(TQImageIO* iio)
case 32: { case 32: {
TQRgb* rgb = (TQRgb*)image.scanLine(cinfo.next_scanline); TQRgb* rgb = (TQRgb*)image.scanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) { for (int i=0; i<w; i++) {
*row++ = qRed(*rgb); *row++ = tqRed(*rgb);
*row++ = qGreen(*rgb); *row++ = tqGreen(*rgb);
*row++ = qBlue(*rgb); *row++ = tqBlue(*rgb);
++rgb; ++rgb;
} }
} }

@ -312,7 +312,7 @@ void TQLocalFs::operationGet( TQNetworkOperation *op )
emit dataTransferProgress( f.size() - remaining, f.size(), op ); emit dataTransferProgress( f.size() - remaining, f.size(), op );
remaining -= remaining; remaining -= remaining;
} }
qApp->processEvents(); tqApp->processEvents();
} }
if (!that) if (!that)
return; return;
@ -365,7 +365,7 @@ void TQLocalFs::operationPut( TQNetworkOperation *op )
emit dataTransferProgress( i + blockSize, ba.size(), op ); emit dataTransferProgress( i + blockSize, ba.size(), op );
i += blockSize; i += blockSize;
TQGuardedPtr<TQObject> that = this; TQGuardedPtr<TQObject> that = this;
qApp->processEvents(); tqApp->processEvents();
if (!that) if (!that)
return; return;
} }

@ -2493,7 +2493,7 @@ static void dumpRecursive( int level, TQObject *object )
buf += " "; buf += " ";
const char *name = object->name(); const char *name = object->name();
TQString flags=""; TQString flags="";
if ( qApp->focusWidget() == object ) if ( tqApp->focusWidget() == object )
flags += 'F'; flags += 'F';
if ( object->isWidgetType() ) { if ( object->isWidgetType() ) {
TQWidget * w = (TQWidget *)object; TQWidget * w = (TQWidget *)object;

@ -131,7 +131,7 @@ bool *TQPaintDevice::x_appdefvisual_arr;
TQPaintDevice::TQPaintDevice( uint devflags ) TQPaintDevice::TQPaintDevice( uint devflags )
{ {
if ( !qApp ) { // global constructor if ( !tqApp ) { // global constructor
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
qFatal( "TQPaintDevice: Must construct a TQApplication before a " qFatal( "TQPaintDevice: Must construct a TQApplication before a "
"TQPaintDevice" ); "TQPaintDevice" );

@ -2434,8 +2434,8 @@ void TQPainter::drawImage( int x, int y, const TQImage & image,
// This is a bit dubious // This is a bit dubious
if(image2.depth()==1) { if(image2.depth()==1) {
image2.setNumColors( 2 ); image2.setNumColors( 2 );
image2.setColor( 0, qRgb(255,255,255) ); image2.setColor( 0, tqRgb(255,255,255) );
image2.setColor( 1, qRgb(0,0,0) ); image2.setColor( 1, tqRgb(0,0,0) );
} }
if ( image2.hasAlphaBuffer() ) if ( image2.hasAlphaBuffer() )
gfx->setAlphaType(TQGfx::InlineAlpha); gfx->setAlphaType(TQGfx::InlineAlpha);

@ -1841,7 +1841,7 @@ void TQPainter::drawWinFocusRect( int x, int y, int w, int h,
setPen( white ); setPen( white );
setRasterOp( XorROP ); setRasterOp( XorROP );
} else { } else {
if ( qGray( bgColor.rgb() ) < 128 ) if ( tqGray( bgColor.rgb() ) < 128 )
setPen( white ); setPen( white );
else else
setPen( black ); setPen( black );

@ -393,7 +393,7 @@ extern "C" XftDraw *XftDrawCreateAlpha( Display *, TQt::HANDLE, int );
void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim ) void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
{ {
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
if ( qApp->type() == TQApplication::Tty ) { if ( tqApp->type() == TQApplication::Tty ) {
qWarning( "TQPixmap: Cannot create a TQPixmap when no GUI " qWarning( "TQPixmap: Cannot create a TQPixmap when no GUI "
"is being used" ); "is being used" );
} }
@ -474,7 +474,7 @@ void TQPixmap::deref()
qSafeXDestroyImage( (XImage*)data->ximage ); qSafeXDestroyImage( (XImage*)data->ximage );
if ( data->maskgc ) if ( data->maskgc )
XFreeGC( x11Display(), (GC)data->maskgc ); XFreeGC( x11Display(), (GC)data->maskgc );
if ( qApp && hd) { if ( tqApp && hd) {
#ifndef QT_NO_XFTFREETYPE #ifndef QT_NO_XFTFREETYPE
if (rendhd) { if (rendhd) {
@ -914,17 +914,17 @@ TQImage TQPixmap::convertToImage() const
b = blue_scale_table[b]; b = blue_scale_table[b];
if (alf) { if (alf) {
*dst++ = qRgba(r, g, b, asrc[x]); *dst++ = tqRgba(r, g, b, asrc[x]);
} else if (msk) { } else if (msk) {
if ( ale ) { if ( ale ) {
*dst++ = (asrc[x >> 3] & (1 << (x & 7))) *dst++ = (asrc[x >> 3] & (1 << (x & 7)))
? qRgba(r, g, b, 0xff) : qRgba(r, g, b, 0x00); ? tqRgba(r, g, b, 0xff) : tqRgba(r, g, b, 0x00);
} else { } else {
*dst++ = (asrc[x >> 3] & (1 << (7 -(x & 7)))) *dst++ = (asrc[x >> 3] & (1 << (7 -(x & 7))))
? qRgba(r, g, b, 0xff) : qRgba(r, g, b, 0x00); ? tqRgba(r, g, b, 0xff) : tqRgba(r, g, b, 0x00);
} }
} else { } else {
*dst++ = qRgb(r, g, b); *dst++ = tqRgb(r, g, b);
} }
} }
} }
@ -953,8 +953,8 @@ TQImage TQPixmap::convertToImage() const
if ( mono ) { // bitmap if ( mono ) { // bitmap
image.setNumColors( 2 ); image.setNumColors( 2 );
image.setColor( 0, qRgb(255,255,255) ); image.setColor( 0, tqRgb(255,255,255) );
image.setColor( 1, qRgb(0,0,0) ); image.setColor( 1, tqRgb(0,0,0) );
} else if ( !trucol ) { // pixmap with colormap } else if ( !trucol ) { // pixmap with colormap
register uchar *p; register uchar *p;
uchar *end; uchar *end;
@ -1044,7 +1044,7 @@ TQImage TQPixmap::convertToImage() const
if ( use[i] ) { if ( use[i] ) {
image.setColor( j++, image.setColor( j++,
( msk ? 0xff000000 : 0 ) ( msk ? 0xff000000 : 0 )
| qRgb( (carr[i].red >> 8) & 255, | tqRgb( (carr[i].red >> 8) & 255,
(carr[i].green >> 8) & 255, (carr[i].green >> 8) & 255,
(carr[i].blue >> 8) & 255 ) ); (carr[i].blue >> 8) & 255 ) );
} }
@ -1142,7 +1142,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if ( image.numColors() == 2 ) { if ( image.numColors() == 2 ) {
TQRgb c0 = image.color(0); // Auto: convert to best TQRgb c0 = image.color(0); // Auto: convert to best
TQRgb c1 = image.color(1); TQRgb c1 = image.color(1);
conv8 = TQMIN(c0,c1) != qRgb(0,0,0) || TQMAX(c0,c1) != qRgb(255,255,255); conv8 = TQMIN(c0,c1) != tqRgb(0,0,0) || TQMAX(c0,c1) != tqRgb(255,255,255);
} else { } else {
// eg. 1-color monochrome images (they do exist). // eg. 1-color monochrome images (they do exist).
conv8 = TRUE; conv8 = TRUE;
@ -1263,9 +1263,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if ( d8 ) { // setup pixel translation if ( d8 ) { // setup pixel translation
TQRgb *ctable = image.colorTable(); TQRgb *ctable = image.colorTable();
for ( int i=0; i<image.numColors(); i++ ) { for ( int i=0; i<image.numColors(); i++ ) {
int r = qRed (ctable[i]); int r = tqRed (ctable[i]);
int g = qGreen(ctable[i]); int g = tqGreen(ctable[i]);
int b = qBlue (ctable[i]); int b = tqBlue (ctable[i]);
r = red_shift > 0 ? r << red_shift : r >> -red_shift; r = red_shift > 0 ? r << red_shift : r >> -red_shift;
g = green_shift > 0 ? g << green_shift : g >> -green_shift; g = green_shift > 0 ? g << green_shift : g >> -green_shift;
b = blue_shift > 0 ? b << blue_shift : b >> -blue_shift; b = blue_shift > 0 ? b << blue_shift : b >> -blue_shift;
@ -1381,9 +1381,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
int pixel; \ int pixel; \
if ( d8 ) pixel = pix[*src++]; \ if ( d8 ) pixel = pix[*src++]; \
else { \ else { \
int r = qRed ( *p ); \ int r = tqRed ( *p ); \
int g = qGreen( *p ); \ int g = tqGreen( *p ); \
int b = qBlue ( *p++ ); \ int b = tqBlue ( *p++ ); \
r = red_shift > 0 \ r = red_shift > 0 \
? r << red_shift : r >> -red_shift; \ ? r << red_shift : r >> -red_shift; \
g = green_shift > 0 \ g = green_shift > 0 \
@ -1396,7 +1396,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
// optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice, // optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice,
// use direct values instead of variables, and use only one statement // use direct values instead of variables, and use only one statement
// (*p >> 16), (*p >> 8 ) and (*p) are qRed(),qGreen() and qBlue() without masking // (*p >> 16), (*p >> 8 ) and (*p) are tqRed(),tqGreen() and tqBlue() without masking
// shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction // shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction
#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \ #define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \
int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \ int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \
@ -1405,9 +1405,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
++p; ++p;
#define GET_PIXEL_DITHER_TC \ #define GET_PIXEL_DITHER_TC \
int r = qRed ( *p ); \ int r = tqRed ( *p ); \
int g = qGreen( *p ); \ int g = tqGreen( *p ); \
int b = qBlue ( *p++ ); \ int b = tqBlue ( *p++ ); \
const int thres = D[x%16][y%16]; \ const int thres = D[x%16][y%16]; \
if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \ if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \
> thres) \ > thres) \
@ -1431,15 +1431,15 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \ #define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \
rbits,gbits,bbits) \ rbits,gbits,bbits) \
const int thres = D[x%16][y%16]; \ const int thres = D[x%16][y%16]; \
int r = qRed ( *p ); \ int r = tqRed ( *p ); \
if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \ if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \
> thres) \ > thres) \
r += (1<<(8-rbits)); \ r += (1<<(8-rbits)); \
int g = qGreen( *p ); \ int g = tqGreen( *p ); \
if ( g <= (255-(1<<(8-gbits))) && ((g<<gbits) & 255) \ if ( g <= (255-(1<<(8-gbits))) && ((g<<gbits) & 255) \
> thres) \ > thres) \
g += (1<<(8-gbits)); \ g += (1<<(8-gbits)); \
int b = qBlue ( *p++ ); \ int b = tqBlue ( *p++ ); \
if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \ if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \
> thres) \ > thres) \
b += (1<<(8-bbits)); \ b += (1<<(8-bbits)); \
@ -1655,9 +1655,9 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
TQRgb* ctable = image.colorTable(); TQRgb* ctable = image.colorTable();
for ( i=0; i<256; i++ ) { // init pixel array for ( i=0; i<256; i++ ) { // init pixel array
if ( pop[i] > 0 ) { if ( pop[i] > 0 ) {
px->r = qRed ( ctable[i] ); px->r = tqRed ( ctable[i] );
px->g = qGreen( ctable[i] ); px->g = tqGreen( ctable[i] );
px->b = qBlue ( ctable[i] ); px->b = tqBlue ( ctable[i] );
px->n = 0; px->n = 0;
px->use = pop[i]; px->use = pop[i];
if ( pop[i] > maxpop ) { // select most popular entry if ( pop[i] > maxpop ) { // select most popular entry
@ -1830,7 +1830,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if (image.depth() == 8) { if (image.depth() == 8) {
const TQRgb * const rgb = image.colorTable(); const TQRgb * const rgb = image.colorTable();
for (int i = 0, count = image.numColors(); i < count; ++i) { for (int i = 0, count = image.numColors(); i < count; ++i) {
const int alpha = qAlpha(rgb[i]); const int alpha = tqAlpha(rgb[i]);
if (alpha != 0 && alpha != 0xff) { if (alpha != 0 && alpha != 0xff) {
alphamap = TRUE; alphamap = TRUE;
break; break;
@ -1890,7 +1890,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
for (uint y = 0; y < h; ++y) { for (uint y = 0; y < h; ++y) {
const uchar *iptr = image.scanLine(y); const uchar *iptr = image.scanLine(y);
for (uint x = 0; x < w; ++x) for (uint x = 0; x < w; ++x)
*aptr++ = qAlpha(rgb[*iptr++]); *aptr++ = tqAlpha(rgb[*iptr++]);
aptr += ( axi->bytes_per_line - w ); aptr += ( axi->bytes_per_line - w );
} }
} }

@ -156,8 +156,8 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
png_read_update_info( png_ptr, info_ptr ); png_read_update_info( png_ptr, info_ptr );
if (!image.create( width, height, 1, 2, TQImage::BigEndian )) if (!image.create( width, height, 1, 2, TQImage::BigEndian ))
return; return;
image.setColor( 1, qRgb(0,0,0) ); image.setColor( 1, tqRgb(0,0,0) );
image.setColor( 0, qRgb(255,255,255) ); image.setColor( 0, tqRgb(255,255,255) );
} else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { } else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
png_set_expand(png_ptr); png_set_expand(png_ptr);
png_set_strip_16(png_ptr); png_set_strip_16(png_ptr);
@ -182,7 +182,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
return; return;
for (int i=0; i<ncols; i++) { for (int i=0; i<ncols; i++) {
int c = i*255/(ncols-1); int c = i*255/(ncols-1);
image.setColor( i, qRgba(c,c,c,0xff) ); image.setColor( i, tqRgba(c,c,c,0xff) );
} }
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
@ -194,7 +194,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
#endif #endif
if (g < ncols) { if (g < ncols) {
image.setAlphaBuffer(TRUE); image.setAlphaBuffer(TRUE);
image.setColor(g, image.color(g) & RGB_MASK); image.setColor(g, image.color(g) & TQT_RGB_MASK);
} }
} }
} }
@ -225,13 +225,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
while ( i < info_ptr_num_trans ) { while ( i < info_ptr_num_trans ) {
image.setColor(i, qRgba( image.setColor(i, tqRgba(
info_ptr_palette[i].red, info_ptr_palette[i].red,
info_ptr_palette[i].green, info_ptr_palette[i].green,
info_ptr_palette[i].blue, info_ptr_palette[i].blue,
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
while ( i < info_ptr->num_trans ) { while ( i < info_ptr->num_trans ) {
image.setColor(i, qRgba( image.setColor(i, tqRgba(
info_ptr->palette[i].red, info_ptr->palette[i].red,
info_ptr->palette[i].green, info_ptr->palette[i].green,
info_ptr->palette[i].blue, info_ptr->palette[i].blue,
@ -250,13 +250,13 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
} }
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
while ( i < info_ptr_num_palette ) { while ( i < info_ptr_num_palette ) {
image.setColor(i, qRgba( image.setColor(i, tqRgba(
info_ptr_palette[i].red, info_ptr_palette[i].red,
info_ptr_palette[i].green, info_ptr_palette[i].green,
info_ptr_palette[i].blue, info_ptr_palette[i].blue,
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
while ( i < info_ptr->num_palette ) { while ( i < info_ptr->num_palette ) {
image.setColor(i, qRgba( image.setColor(i, tqRgba(
info_ptr->palette[i].red, info_ptr->palette[i].red,
info_ptr->palette[i].green, info_ptr->palette[i].green,
info_ptr->palette[i].blue, info_ptr->palette[i].blue,
@ -387,7 +387,7 @@ void read_png_image(TQImageIO* iio)
#if 0 // libpng takes care of this. #if 0 // libpng takes care of this.
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
TQRgb trans = 0xFF000000 | qRgb( TQRgb trans = 0xFF000000 | tqRgb(
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 ) #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
(info_ptr->trans_color.red << 8 >> bit_depth)&0xff, (info_ptr->trans_color.red << 8 >> bit_depth)&0xff,
(info_ptr->trans_color.green << 8 >> bit_depth)&0xff, (info_ptr->trans_color.green << 8 >> bit_depth)&0xff,
@ -435,7 +435,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
c = image.colorTable(); c = image.colorTable();
n = image.numColors(); n = image.numColors();
} }
while ( n-- && qAlpha(*c++)==0xff ) while ( n-- && tqAlpha(*c++)==0xff )
; ;
if ( n<0 ) // LIAR! if ( n<0 ) // LIAR!
image.setAlphaBuffer(FALSE); image.setAlphaBuffer(FALSE);
@ -622,13 +622,13 @@ should be able to comment this out.
for (int i=0; i<num_palette; i++) { for (int i=0; i<num_palette; i++) {
TQRgb rgb=image.color(i); TQRgb rgb=image.color(i);
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
info_ptr_palette[i].red = qRed(rgb); info_ptr_palette[i].red = tqRed(rgb);
info_ptr_palette[i].green = qGreen(rgb); info_ptr_palette[i].green = tqGreen(rgb);
info_ptr_palette[i].blue = qBlue(rgb); info_ptr_palette[i].blue = tqBlue(rgb);
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
info_ptr->palette[i].red = qRed(rgb); info_ptr->palette[i].red = tqRed(rgb);
info_ptr->palette[i].green = qGreen(rgb); info_ptr->palette[i].green = tqGreen(rgb);
info_ptr->palette[i].blue = qBlue(rgb); info_ptr->palette[i].blue = tqBlue(rgb);
#endif /* LIBPNG 1.5 */ #endif /* LIBPNG 1.5 */
if (image.hasAlphaBuffer()) { if (image.hasAlphaBuffer()) {
trans[i] = rgb >> 24; trans[i] = rgb >> 24;
@ -907,7 +907,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
if ( i == alignx ) { if ( i == alignx ) {
// All the same // All the same
for (i=0; i<alignx; i++) { for (i=0; i<alignx; i++) {
ld[x+i] = qRgba(0,0,0,0); ld[x+i] = tqRgba(0,0,0,0);
} }
} else { } else {
// Some different // Some different
@ -921,7 +921,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
if ( li[x] != lp[x] ) if ( li[x] != lp[x] )
ld[x] = 0xff000000 | li[x]; ld[x] = 0xff000000 | li[x];
else else
ld[x] = qRgba(0,0,0,0); ld[x] = tqRgba(0,0,0,0);
} }
} }
} }

@ -5407,12 +5407,12 @@ static TQByteArray compress( const TQImage & image, bool gray ) {
for( int x=0; x < width; x++ ) { for( int x=0; x < width; x++ ) {
TQRgb rgb = image.color( s[x] ); TQRgb rgb = image.color( s[x] );
if ( gray ) { if ( gray ) {
pixel[i] = (unsigned char) qGray( rgb ); pixel[i] = (unsigned char) tqGray( rgb );
i++; i++;
} else { } else {
pixel[i] = (unsigned char) qRed( rgb ); pixel[i] = (unsigned char) tqRed( rgb );
pixel[i+1] = (unsigned char) qGreen( rgb ); pixel[i+1] = (unsigned char) tqGreen( rgb );
pixel[i+2] = (unsigned char) qBlue( rgb ); pixel[i+2] = (unsigned char) tqBlue( rgb );
i += 3; i += 3;
} }
} }
@ -5423,15 +5423,15 @@ static TQByteArray compress( const TQImage & image, bool gray ) {
TQRgb * s = (TQRgb*)(image.scanLine( y )); TQRgb * s = (TQRgb*)(image.scanLine( y ));
for( int x=0; x < width; x++ ) { for( int x=0; x < width; x++ ) {
TQRgb rgb = (*s++); TQRgb rgb = (*s++);
if ( alpha && qAlpha( rgb ) < 0x40 ) // 25% alpha, convert to white - if ( alpha && tqAlpha( rgb ) < 0x40 ) // 25% alpha, convert to white -
rgb = qRgb( 0xff, 0xff, 0xff ); rgb = tqRgb( 0xff, 0xff, 0xff );
if ( gray ) { if ( gray ) {
pixel[i] = (unsigned char) qGray( rgb ); pixel[i] = (unsigned char) tqGray( rgb );
i++; i++;
} else { } else {
pixel[i] = (unsigned char) qRed( rgb ); pixel[i] = (unsigned char) tqRed( rgb );
pixel[i+1] = (unsigned char) qGreen( rgb ); pixel[i+1] = (unsigned char) tqGreen( rgb );
pixel[i+2] = (unsigned char) qBlue( rgb ); pixel[i+2] = (unsigned char) tqBlue( rgb );
i += 3; i += 3;
} }
} }
@ -5767,7 +5767,7 @@ static const char * color( const TQColor &c, TQPrinter * printer )
sprintf( returnbuffer, "%d d2 ", c.red() ); sprintf( returnbuffer, "%d d2 ", c.red() );
else if ( printer->colorMode() == TQPrinter::GrayScale ) else if ( printer->colorMode() == TQPrinter::GrayScale )
sprintf( returnbuffer, "%d d2 ", sprintf( returnbuffer, "%d d2 ",
qGray( c.red(), c.green(),c.blue() ) ); tqGray( c.red(), c.green(),c.blue() ) );
else else
sprintf( returnbuffer, "%d %d %d ", sprintf( returnbuffer, "%d %d %d ",
c.red(), c.green(), c.blue() ); c.red(), c.green(), c.blue() );

@ -198,13 +198,13 @@ TQTextFormat::~TQTextFormat()
} }
TQTextFormat::TQTextFormat() TQTextFormat::TQTextFormat()
: fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( qApp->font().pointSize() ) : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{ {
ref = 0; ref = 0;
usePixelSizes = FALSE; usePixelSizes = FALSE;
if ( stdSize == -1 ) { if ( stdSize == -1 ) {
stdSize = qApp->font().pixelSize(); stdSize = tqApp->font().pixelSize();
usePixelSizes = TRUE; usePixelSizes = TRUE;
} }
@ -214,13 +214,13 @@ TQTextFormat::TQTextFormat()
} }
TQTextFormat::TQTextFormat( const TQStyleSheetItem *style ) TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
: fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( qApp->font().pointSize() ) : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{ {
ref = 0; ref = 0;
usePixelSizes = FALSE; usePixelSizes = FALSE;
if ( stdSize == -1 ) { if ( stdSize == -1 ) {
stdSize = qApp->font().pixelSize(); stdSize = tqApp->font().pixelSize();
usePixelSizes = TRUE; usePixelSizes = TRUE;
} }

@ -157,7 +157,7 @@ void TQAuServerNAS::play(const TQString& filename)
AuFlush(nas); AuFlush(nas);
dataReceived(); dataReceived();
AuFlush(nas); AuFlush(nas);
qApp->flushX(); tqApp->flushX();
} }
} }
@ -207,7 +207,7 @@ void TQAuServerNAS::play(TQSound* s)
AuFlush(nas); AuFlush(nas);
dataReceived(); dataReceived();
AuFlush(nas); AuFlush(nas);
qApp->flushX(); tqApp->flushX();
} }
} }
@ -219,7 +219,7 @@ void TQAuServerNAS::stop(TQSound* s)
AuFlush(nas); AuFlush(nas);
dataReceived(); dataReceived();
AuFlush(nas); AuFlush(nas);
qApp->flushX(); tqApp->flushX();
} }
} }
@ -270,14 +270,14 @@ TQAuServerNull::TQAuServerNull(TQObject* parent) :
TQAuServer* qt_new_audio_server() TQAuServer* qt_new_audio_server()
{ {
#ifdef QT_NAS_SUPPORT #ifdef QT_NAS_SUPPORT
TQAuServer* s=new TQAuServerNAS(qApp); TQAuServer* s=new TQAuServerNAS(tqApp);
if (s->okay()) { if (s->okay()) {
return s; return s;
} else { } else {
delete s; delete s;
} }
#endif #endif
return new TQAuServerNull(qApp); return new TQAuServerNull(tqApp);
} }
#endif // QT_NO_SOUND #endif // QT_NO_SOUND

@ -150,7 +150,7 @@ static TQChar::Direction basicDirection( const TQString &str )
} }
static void qAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir ) static void tqAppendItems(TQTextEngine *engine, int &start, int &stop, BidiControl &control, TQChar::Direction dir )
{ {
TQScriptItemArray &items = engine->items; TQScriptItemArray &items = engine->items;
const TQChar *text = engine->string.unicode(); const TQChar *text = engine->string.unicode();
@ -244,7 +244,7 @@ static void qAppendItems(TQTextEngine *engine, int &start, int &stop, BidiContro
} }
typedef void (* fAppendItems)(TQTextEngine *, int &start, int &stop, BidiControl &control, TQChar::Direction dir); typedef void (* fAppendItems)(TQTextEngine *, int &start, int &stop, BidiControl &control, TQChar::Direction dir);
static fAppendItems appendItems = qAppendItems; static fAppendItems appendItems = tqAppendItems;
// creates the next TQScript items. // creates the next TQScript items.
static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode )

@ -365,8 +365,8 @@ TQTranslator::TQTranslator( TQObject * parent, const char * name )
TQTranslator::~TQTranslator() TQTranslator::~TQTranslator()
{ {
if ( qApp ) if ( tqApp )
qApp->removeTranslator( this ); tqApp->removeTranslator( this );
clear(); clear();
delete d; delete d;
} }
@ -597,8 +597,8 @@ bool TQTranslator::do_load( const uchar *data, int len )
} }
array.resetRawData( (const char *) data, len ); array.resetRawData( (const char *) data, len );
if ( qApp && qApp->translators && qApp->translators->contains(this) ) if ( tqApp && tqApp->translators && tqApp->translators->contains(this) )
qApp->setReverseLayout( qt_detectRTLLanguage() ); tqApp->setReverseLayout( qt_detectRTLLanguage() );
return ok; return ok;
} }
@ -690,8 +690,8 @@ void TQTranslator::clear()
d->messages = 0; d->messages = 0;
#endif #endif
if ( qApp ) { if ( tqApp ) {
qApp->setReverseLayout( qt_detectRTLLanguage() ); tqApp->setReverseLayout( qt_detectRTLLanguage() );
TQWidgetList *list = TQApplication::topLevelWidgets(); TQWidgetList *list = TQApplication::topLevelWidgets();
TQWidgetListIt it( *list ); TQWidgetListIt it( *list );
@ -699,7 +699,7 @@ void TQTranslator::clear()
while ( ( w=it.current() ) != 0 ) { while ( ( w=it.current() ) != 0 ) {
++it; ++it;
if (!w->isDesktop()) if (!w->isDesktop())
qApp->postEvent( w, new TQEvent( TQEvent::LanguageChange ) ); tqApp->postEvent( w, new TQEvent( TQEvent::LanguageChange ) );
} }
delete list; delete list;
} }

@ -881,7 +881,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
: TQObject( parent, name ), TQPaintDevice( TQInternal::Widget ) : TQObject( parent, name ), TQPaintDevice( TQInternal::Widget )
{ {
#if defined(QT_CHECK_STATE) && !defined(Q_WS_WIN) #if defined(QT_CHECK_STATE) && !defined(Q_WS_WIN)
if ( qApp->type() == TQApplication::Tty ) { if ( tqApp->type() == TQApplication::Tty ) {
qWarning( "TQWidget: Cannot create a TQWidget when no GUI " qWarning( "TQWidget: Cannot create a TQWidget when no GUI "
"is being used" ); "is being used" );
} }
@ -975,8 +975,8 @@ TQWidget::~TQWidget()
if ( TQApplication::main_widget == this ) { // reset main widget if ( TQApplication::main_widget == this ) { // reset main widget
TQApplication::main_widget = 0; TQApplication::main_widget = 0;
if (qApp) if (tqApp)
qApp->quit(); tqApp->quit();
} }
if ( hasFocus() ) if ( hasFocus() )
@ -1231,7 +1231,7 @@ void TQWidget::deactivateWidgetCleanup()
{ {
// If this was the active application window, reset it // If this was the active application window, reset it
if ( this == TQApplication::active_window ) if ( this == TQApplication::active_window )
qApp->setActiveWindow( 0 ); tqApp->setActiveWindow( 0 );
// If the is the active mouse press widget, reset it // If the is the active mouse press widget, reset it
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
extern TQGuardedPtr<TQWidget> qt_button_down; extern TQGuardedPtr<TQWidget> qt_button_down;
@ -1321,7 +1321,7 @@ TQStyle& TQWidget::style() const
{ {
if ( extra && extra->style ) if ( extra && extra->style )
return *extra->style; return *extra->style;
TQStyle &ret = qApp->style(); TQStyle &ret = tqApp->style();
return ret; return ret;
} }
@ -3236,7 +3236,7 @@ void TQWidget::focusProxyDestroyed()
\brief whether this widget (or its focus proxy) has the keyboard \brief whether this widget (or its focus proxy) has the keyboard
input focus input focus
Effectively equivalent to \c {qApp->focusWidget() == this}. Effectively equivalent to \c {tqApp->focusWidget() == this}.
\sa setFocus(), clearFocus(), setFocusPolicy(), TQApplication::focusWidget() \sa setFocus(), clearFocus(), setFocusPolicy(), TQApplication::focusWidget()
*/ */
@ -3245,7 +3245,7 @@ bool TQWidget::hasFocus() const
const TQWidget* w = this; const TQWidget* w = this;
while ( w->focusProxy() ) while ( w->focusProxy() )
w = w->focusProxy(); w = w->focusProxy();
return qApp->focusWidget() == w; return tqApp->focusWidget() == w;
} }
/*! /*!
@ -3284,7 +3284,7 @@ void TQWidget::setFocus()
} }
TQFocusData * f = focusData( TRUE ); TQFocusData * f = focusData( TRUE );
if ( f->it.current() == this && qApp->focusWidget() == this if ( f->it.current() == this && tqApp->focusWidget() == this
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
&& GetFocus() == winId() && GetFocus() == winId()
#endif #endif
@ -3303,7 +3303,7 @@ void TQWidget::setFocus()
} }
if ( isActiveWindow() ) { if ( isActiveWindow() ) {
TQWidget * prev = qApp->focus_widget; TQWidget * prev = tqApp->focus_widget;
if ( prev ) { if ( prev ) {
// This part is never executed when Q_WS_X11? Preceding XFocusOut // This part is never executed when Q_WS_X11? Preceding XFocusOut
// had already reset focus_widget when received XFocusIn // had already reset focus_widget when received XFocusIn
@ -3329,7 +3329,7 @@ void TQWidget::setFocus()
TQInputContext::endComposition(); TQInputContext::endComposition();
} }
#endif #endif
qApp->focus_widget = this; tqApp->focus_widget = this;
if( isInputMethodEnabled() ) if( isInputMethodEnabled() )
focusInputContext(); focusInputContext();
@ -3351,7 +3351,7 @@ void TQWidget::setFocus()
TQApplication::sendEvent( prev, &out ); TQApplication::sendEvent( prev, &out );
} }
if ( qApp->focus_widget == this ) { if ( tqApp->focus_widget == this ) {
TQFocusEvent in( TQEvent::FocusIn ); TQFocusEvent in( TQEvent::FocusIn );
TQApplication::sendEvent( this, &in ); TQApplication::sendEvent( this, &in );
} }
@ -3384,9 +3384,9 @@ void TQWidget::clearFocus()
#else #else
unfocusInputContext(); unfocusInputContext();
#endif #endif
TQWidget* w = qApp->focusWidget(); TQWidget* w = tqApp->focusWidget();
// clear active focus // clear active focus
qApp->focus_widget = 0; tqApp->focus_widget = 0;
TQFocusEvent out( TQEvent::FocusOut ); TQFocusEvent out( TQEvent::FocusOut );
TQApplication::sendEvent( w, &out ); TQApplication::sendEvent( w, &out );
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
@ -3588,7 +3588,7 @@ bool TQWidget::isActiveWindow() const
TQWidget *tlw = topLevelWidget(); TQWidget *tlw = topLevelWidget();
if(testWFlags(WSubWindow) && parentWidget()) if(testWFlags(WSubWindow) && parentWidget())
tlw = parentWidget()->topLevelWidget(); tlw = parentWidget()->topLevelWidget();
if(tlw == qApp->activeWindow() || ( isVisible() && tlw->isPopup() )) if(tlw == tqApp->activeWindow() || ( isVisible() && tlw->isPopup() ))
return TRUE; return TRUE;
#ifndef QT_NO_STYLE #ifndef QT_NO_STYLE
if(style().styleHint(TQStyle::SH_Widget_ShareActivation, this )) { if(style().styleHint(TQStyle::SH_Widget_ShareActivation, this )) {
@ -3596,7 +3596,7 @@ bool TQWidget::isActiveWindow() const
!tlw->testWFlags(TQt::WShowModal) && !tlw->testWFlags(TQt::WShowModal) &&
(!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow())) (!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow()))
return TRUE; return TRUE;
TQWidget *w = qApp->activeWindow(); TQWidget *w = tqApp->activeWindow();
if( !testWFlags(WSubWindow) && w && w->testWFlags(WSubWindow) && if( !testWFlags(WSubWindow) && w && w->testWFlags(WSubWindow) &&
w->parentWidget()->topLevelWidget() == tlw) w->parentWidget()->topLevelWidget() == tlw)
return TRUE; return TRUE;
@ -4037,7 +4037,7 @@ void TQWidget::show()
// stores the correct old focus widget even if it's stolen in the showevent // stores the correct old focus widget even if it's stolen in the showevent
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
if ( testWFlags(WType_Popup) ) if ( testWFlags(WType_Popup) )
qApp->openPopup( this ); tqApp->openPopup( this );
#endif #endif
TQShowEvent showEvent; TQShowEvent showEvent;
@ -4058,7 +4058,7 @@ void TQWidget::show()
#if !defined(Q_WS_WIN) #if !defined(Q_WS_WIN)
if ( testWFlags(WType_Popup) ) if ( testWFlags(WType_Popup) )
qApp->openPopup( this ); tqApp->openPopup( this );
#endif #endif
#if defined(QT_ACCESSIBILITY_SUPPORT) #if defined(QT_ACCESSIBILITY_SUPPORT)
@ -4090,7 +4090,7 @@ void TQWidget::hide()
setWState( WState_ForceHide ); setWState( WState_ForceHide );
if ( testWFlags(WType_Popup) ) if ( testWFlags(WType_Popup) )
qApp->closePopup( this ); tqApp->closePopup( this );
// Move test modal here. Otherwise, a modal dialog could get // Move test modal here. Otherwise, a modal dialog could get
// destroyed and we lose all access to its parent because we haven't // destroyed and we lose all access to its parent because we haven't
@ -4110,7 +4110,7 @@ void TQWidget::hide()
// next bit tries to move the focus if the focus widget is now // next bit tries to move the focus if the focus widget is now
// hidden. // hidden.
if ( qApp && qApp->focusWidget() == this ) if ( tqApp && tqApp->focusWidget() == this )
focusNextPrevChild( TRUE ); focusNextPrevChild( TRUE );
TQHideEvent hideEvent; TQHideEvent hideEvent;
TQApplication::sendEvent( this, &hideEvent ); TQApplication::sendEvent( this, &hideEvent );
@ -4235,7 +4235,7 @@ void TQWidget::polish()
if ( pm && !pm->isNull() ) if ( pm && !pm->isNull() )
setIcon( *pm ); setIcon( *pm );
else { else {
mw = qApp ? qApp->mainWidget() : 0; mw = tqApp ? tqApp->mainWidget() : 0;
pm = mw ? mw->icon() : 0; pm = mw ? mw->icon() : 0;
if ( pm && !pm->isNull() ) if ( pm && !pm->isNull() )
setIcon( *pm ); setIcon( *pm );
@ -4254,7 +4254,7 @@ void TQWidget::polish()
unsetPalette(); unsetPalette();
#endif #endif
setWState(WState_Polished); setWState(WState_Polished);
qApp->polish( this ); tqApp->polish( this );
TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
} }
} }
@ -4304,7 +4304,7 @@ bool TQWidget::close( bool alsoDelete )
return TRUE; return TRUE;
is_closing = 1; is_closing = 1;
WId id = winId(); WId id = winId();
bool isMain = qApp->mainWidget() == this; bool isMain = tqApp->mainWidget() == this;
bool checkLastWindowClosed = isTopLevel() && !isPopup(); bool checkLastWindowClosed = isTopLevel() && !isPopup();
bool deleted = FALSE; bool deleted = FALSE;
TQCloseEvent e; TQCloseEvent e;
@ -4317,11 +4317,11 @@ bool TQWidget::close( bool alsoDelete )
if ( !deleted && !isHidden() ) if ( !deleted && !isHidden() )
hide(); hide();
if ( checkLastWindowClosed if ( checkLastWindowClosed
&& qApp->receivers(SIGNAL(lastWindowClosed())) ) { && tqApp->receivers(SIGNAL(lastWindowClosed())) ) {
/* if there is no non-withdrawn top level window left (except /* if there is no non-withdrawn top level window left (except
the desktop, popups, or dialogs with parents), we emit the the desktop, popups, or dialogs with parents), we emit the
lastWindowClosed signal */ lastWindowClosed signal */
TQWidgetList *list = qApp->topLevelWidgets(); TQWidgetList *list = tqApp->topLevelWidgets();
TQWidget *widget = list->first(); TQWidget *widget = list->first();
while ( widget ) { while ( widget ) {
if ( !widget->isHidden() if ( !widget->isHidden()
@ -4333,10 +4333,10 @@ bool TQWidget::close( bool alsoDelete )
} }
delete list; delete list;
if ( widget == 0 ) if ( widget == 0 )
emit qApp->lastWindowClosed(); emit tqApp->lastWindowClosed();
} }
if ( isMain ) if ( isMain )
qApp->quit(); tqApp->quit();
if ( deleted ) if ( deleted )
return TRUE; return TRUE;
is_closing = 0; is_closing = 0;
@ -5045,9 +5045,9 @@ void TQWidget::mousePressEvent( TQMouseEvent *e )
if ( isPopup() ) { if ( isPopup() ) {
e->accept(); e->accept();
TQWidget* w; TQWidget* w;
while ( (w = qApp->activePopupWidget() ) && w != this ){ while ( (w = tqApp->activePopupWidget() ) && w != this ){
w->close(); w->close();
if (qApp->activePopupWidget() == w) // widget does not want to dissappear if (tqApp->activePopupWidget() == w) // widget does not want to dissappear
w->hide(); // hide at least w->hide(); // hide at least
} }
if (!rect().contains(e->pos()) ){ if (!rect().contains(e->pos()) ){

@ -236,11 +236,11 @@ Q_EXPORT void qt_wait_for_window_manager( TQWidget* w )
break; break;
if ( t.elapsed() > 500 ) if ( t.elapsed() > 500 )
return; // give up, no event available return; // give up, no event available
qApp->syncX(); // non-busy wait tqApp->syncX(); // non-busy wait
} }
qApp->x11ProcessEvent( &ev ); tqApp->x11ProcessEvent( &ev );
if ( XCheckTypedWindowEvent( w->x11Display(), w->winId(), ConfigureNotify, &ev ) ) if ( XCheckTypedWindowEvent( w->x11Display(), w->winId(), ConfigureNotify, &ev ) )
qApp->x11ProcessEvent( &ev ); tqApp->x11ProcessEvent( &ev );
} }
static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom two = 0) static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom two = 0)
@ -668,7 +668,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
XClassHint class_hint; XClassHint class_hint;
class_hint.res_name = (char *) tqAppName(); // application name class_hint.res_name = (char *) tqAppName(); // application name
class_hint.res_class = (char *) qAppClass(); // application class class_hint.res_class = (char *) tqAppClass(); // application class
XSetWMProperties( dpy, id, 0, 0, 0, 0, &size_hints, &wm_hints, &class_hint ); XSetWMProperties( dpy, id, 0, 0, 0, 0, &size_hints, &wm_hints, &class_hint );
@ -802,7 +802,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
if ( testWFlags(WShowModal) ) // just be sure we leave modal if ( testWFlags(WShowModal) ) // just be sure we leave modal
qt_leave_modal( this ); qt_leave_modal( this );
else if ( testWFlags(WType_Popup) ) else if ( testWFlags(WType_Popup) )
qApp->closePopup( this ); tqApp->closePopup( this );
#ifndef QT_NO_XFTFREETYPE #ifndef QT_NO_XFTFREETYPE
if ( rendhd) { if ( rendhd) {
@ -1825,7 +1825,7 @@ void TQWidget::setWindowState(uint newstate)
(getWFlags() & 0xffff0000), (getWFlags() & 0xffff0000),
mapToGlobal(TQPoint(0, 0))); mapToGlobal(TQPoint(0, 0)));
const TQRect r = top->normalGeometry; const TQRect r = top->normalGeometry;
setGeometry(qApp->desktop()->screenGeometry(this)); setGeometry(tqApp->desktop()->screenGeometry(this));
top->normalGeometry = r; top->normalGeometry = r;
if ( top->normalGeometry.width() < 0 ) if ( top->normalGeometry.width() < 0 )
@ -2873,7 +2873,7 @@ void TQWidget::updateFrameStrut() const
*/ */
TQWidget *TQWidget::icHolderWidget() TQWidget *TQWidget::icHolderWidget()
{ {
return qApp->locateICHolderWidget(this); return tqApp->locateICHolderWidget(this);
} }
@ -2923,7 +2923,7 @@ void TQWidget::changeInputContext( const TQString& identifierName )
*qicp = qic; *qicp = qic;
if ( qic ) { if ( qic ) {
TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)), TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)),
qApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); tqApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) );
TQObject::connect( qic, SIGNAL(deletionRequested()), TQObject::connect( qic, SIGNAL(deletionRequested()),
icWidget, SLOT(destroyInputContext()) ); icWidget, SLOT(destroyInputContext()) );
} }
@ -2962,7 +2962,7 @@ void TQWidget::createInputContext()
*qicp = qic; *qicp = qic;
if ( qic ) { if ( qic ) {
TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)), TQObject::connect( qic, SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)),
qApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) ); tqApp, SLOT(postIMEvent(TQObject *,TQIMEvent *)) );
TQObject::connect( qic, SIGNAL(deletionRequested()), TQObject::connect( qic, SIGNAL(deletionRequested()),
icWidget, SLOT(destroyInputContext()) ); icWidget, SLOT(destroyInputContext()) );
} }

@ -2962,8 +2962,8 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_TRANSLATION\n" ); fprintf( out, "#ifndef QT_NO_TRANSLATION\n" );
fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n", fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( qApp )\n" ); fprintf( out, " if ( tqApp )\n" );
fprintf( out, "\treturn qApp->translate( \"%s\", s, c," fprintf( out, "\treturn tqApp->translate( \"%s\", s, c,"
" TQApplication::DefaultCodec );\n", " TQApplication::DefaultCodec );\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " else\n" ); fprintf( out, " else\n" );
@ -2972,8 +2972,8 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" ); fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" );
fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n", fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( qApp )\n" ); fprintf( out, " if ( tqApp )\n" );
fprintf( out, "\treturn qApp->translate( \"%s\", s, c," fprintf( out, "\treturn tqApp->translate( \"%s\", s, c,"
" TQApplication::UnicodeUTF8 );\n", " TQApplication::UnicodeUTF8 );\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " else\n" ); fprintf( out, " else\n" );

@ -5788,8 +5788,8 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_TRANSLATION\n" ); fprintf( out, "#ifndef QT_NO_TRANSLATION\n" );
fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n", fprintf( out, "TQString %s::tr( const char *s, const char *c )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( qApp )\n" ); fprintf( out, " if ( tqApp )\n" );
fprintf( out, "\treturn qApp->translate( \"%s\", s, c," fprintf( out, "\treturn tqApp->translate( \"%s\", s, c,"
" TQApplication::DefaultCodec );\n", " TQApplication::DefaultCodec );\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " else\n" ); fprintf( out, " else\n" );
@ -5798,8 +5798,8 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" ); fprintf( out, "#ifndef QT_NO_TRANSLATION_UTF8\n" );
fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n", fprintf( out, "TQString %s::trUtf8( const char *s, const char *c )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( qApp )\n" ); fprintf( out, " if ( tqApp )\n" );
fprintf( out, "\treturn qApp->translate( \"%s\", s, c," fprintf( out, "\treturn tqApp->translate( \"%s\", s, c,"
" TQApplication::UnicodeUTF8 );\n", " TQApplication::UnicodeUTF8 );\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " else\n" ); fprintf( out, " else\n" );

@ -132,7 +132,7 @@ public:
{ {
#if defined(Q_DNS_SYNCHRONOUS) #if defined(Q_DNS_SYNCHRONOUS)
#if defined(Q_OS_UNIX) #if defined(Q_OS_UNIX)
noEventLoop = qApp==0 || qApp->loopLevel()==0; noEventLoop = tqApp==0 || tqApp->loopLevel()==0;
#else #else
noEventLoop = FALSE; noEventLoop = FALSE;
#endif #endif
@ -922,7 +922,7 @@ void TQDnsUgleHack::ugle( bool emitAnyway)
TQDnsManager::TQDnsManager() TQDnsManager::TQDnsManager()
: TQDnsSocket( qApp, "Internal DNS manager" ), : TQDnsSocket( tqApp, "Internal DNS manager" ),
queries( TQPtrVector<TQDnsQuery>( 0 ) ), queries( TQPtrVector<TQDnsQuery>( 0 ) ),
cache( TQDict<TQDnsDomain>( 83, FALSE ) ), cache( TQDict<TQDnsDomain>( 83, FALSE ) ),
ipv4Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv4, 0 ) ) ipv4Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv4, 0 ) )

@ -765,7 +765,7 @@ TQColor TQGLContext::overlayTransparentColor() const
uchar r = (uchar)((col.red / 65535.0) * 255.0 + 0.5); uchar r = (uchar)((col.red / 65535.0) * 255.0 + 0.5);
uchar g = (uchar)((col.green / 65535.0) * 255.0 + 0.5); uchar g = (uchar)((col.green / 65535.0) * 255.0 + 0.5);
uchar b = (uchar)((col.blue / 65535.0) * 255.0 + 0.5); uchar b = (uchar)((col.blue / 65535.0) * 255.0 + 0.5);
return TQColor(qRgb(r,g,b), trans_colors[i].color); return TQColor(tqRgb(r,g,b), trans_colors[i].color);
} }
} }
} }
@ -823,9 +823,9 @@ uint TQGLContext::colorIndex( const TQColor& c ) const
XColor col; XColor col;
col.flags = DoRed | DoGreen | DoBlue; col.flags = DoRed | DoGreen | DoBlue;
col.pixel = color_map_entry; col.pixel = color_map_entry;
col.red = (ushort)((qRed(c.rgb()) / 255.0) * 65535.0 + 0.5); col.red = (ushort)((tqRed(c.rgb()) / 255.0) * 65535.0 + 0.5);
col.green = (ushort)((qGreen(c.rgb()) / 255.0) * 65535.0 + 0.5); col.green = (ushort)((tqGreen(c.rgb()) / 255.0) * 65535.0 + 0.5);
col.blue = (ushort)((qBlue(c.rgb()) / 255.0) * 65535.0 + 0.5); col.blue = (ushort)((tqBlue(c.rgb()) / 255.0) * 65535.0 + 0.5);
XStoreColor(TQPaintDevice::x11AppDisplay(), x->cmap, &col); XStoreColor(TQPaintDevice::x11AppDisplay(), x->cmap, &col);
cmap->insert(color_map_entry, target); cmap->insert(color_map_entry, target);
@ -1275,9 +1275,9 @@ static void qStoreColors( TQWidget * tlw, Colormap cmap,
for ( int i = 0; i < cols.size(); i++ ) { for ( int i = 0; i < cols.size(); i++ ) {
color = cols.entryRgb( i ); color = cols.entryRgb( i );
c.pixel = i; c.pixel = i;
c.red = (ushort)( (qRed( color ) / 255.0) * 65535.0 + 0.5 ); c.red = (ushort)( (tqRed( color ) / 255.0) * 65535.0 + 0.5 );
c.green = (ushort)( (qGreen( color ) / 255.0) * 65535.0 + 0.5 ); c.green = (ushort)( (tqGreen( color ) / 255.0) * 65535.0 + 0.5 );
c.blue = (ushort)( (qBlue( color ) / 255.0) * 65535.0 + 0.5 ); c.blue = (ushort)( (tqBlue( color ) / 255.0) * 65535.0 + 0.5 );
c.flags = DoRed | DoGreen | DoBlue; c.flags = DoRed | DoGreen | DoBlue;
XStoreColor( tlw->x11Display(), cmap, &c ); XStoreColor( tlw->x11Display(), cmap, &c );
} }

@ -86,7 +86,7 @@
// This will fill the colormap with colors ranging from // This will fill the colormap with colors ranging from
// black to white. // black to white.
for ( int i = 0; i < colormap.size(); i++ ) for ( int i = 0; i < colormap.size(); i++ )
colormap.setEntry( i, qRgb( i, i, i ) ); colormap.setEntry( i, tqRgb( i, i, i ) );
widget.setColormap( colormap ); widget.setColormap( colormap );
widget.show(); widget.show();
@ -273,15 +273,15 @@ int TQGLColormap::findNearest( TQRgb color ) const
return idx; return idx;
int mapSize = size(); int mapSize = size();
int mindist = 200000; int mindist = 200000;
int r = qRed( color ); int r = tqRed( color );
int g = qGreen( color ); int g = tqGreen( color );
int b = qBlue( color ); int b = tqBlue( color );
int rx, gx, bx, dist; int rx, gx, bx, dist;
for ( int i=0; i < mapSize; i++ ) { for ( int i=0; i < mapSize; i++ ) {
TQRgb ci = d->cells[i]; TQRgb ci = d->cells[i];
rx = r - qRed( ci ); rx = r - tqRed( ci );
gx = g - qGreen( ci ); gx = g - tqGreen( ci );
bx = b - qBlue( ci ); bx = b - tqBlue( ci );
dist = rx*rx + gx*gx + bx*bx; // calculate distance dist = rx*rx + gx*gx + bx*bx; // calculate distance
if ( dist < mindist ) { // minimal? if ( dist < mindist ) { // minimal?
mindist = dist; mindist = dist;

@ -211,12 +211,12 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
{ {
static TQGuardedPtr<TQSqlDatabaseManager> sqlConnection = 0; static TQGuardedPtr<TQSqlDatabaseManager> sqlConnection = 0;
if ( !sqlConnection ) { if ( !sqlConnection ) {
if( qApp == 0 ){ if( tqApp == 0 ){
qFatal( "TQSqlDatabaseManager: A TQApplication object has to be " qFatal( "TQSqlDatabaseManager: A TQApplication object has to be "
"instantiated in order to use the SQL module." ); "instantiated in order to use the SQL module." );
return 0; return 0;
} }
sqlConnection = new TQSqlDatabaseManager( qApp, "database manager" ); sqlConnection = new TQSqlDatabaseManager( tqApp, "database manager" );
} }
return (TQSqlDatabaseManager*)sqlConnection; return (TQSqlDatabaseManager*)sqlConnection;
} }

@ -869,10 +869,10 @@ TQSql::Confirm TQDataManager::confirmEdit( TQWidget* parent, TQSql::Op m )
if ( m == TQSql::Delete ) { if ( m == TQSql::Delete ) {
#ifndef QT_NO_MESSAGEBOX #ifndef QT_NO_MESSAGEBOX
ans = TQMessageBox::information( parent, ans = TQMessageBox::information( parent,
qApp->translate( "TQSql", "Delete" ), tqApp->translate( "TQSql", "Delete" ),
qApp->translate( "TQSql", "Delete this record?" ), tqApp->translate( "TQSql", "Delete this record?" ),
qApp->translate( "TQSql", "Yes" ), tqApp->translate( "TQSql", "Yes" ),
qApp->translate( "TQSql", "No" ), tqApp->translate( "TQSql", "No" ),
TQString::null, 0, 1 ); TQString::null, 0, 1 );
#else #else
ans = TQSql::No; ans = TQSql::No;
@ -880,16 +880,16 @@ TQSql::Confirm TQDataManager::confirmEdit( TQWidget* parent, TQSql::Op m )
} else if ( m != TQSql::None ) { } else if ( m != TQSql::None ) {
TQString caption; TQString caption;
if ( m == TQSql::Insert ) { if ( m == TQSql::Insert ) {
caption = qApp->translate( "TQSql", "Insert" ); caption = tqApp->translate( "TQSql", "Insert" );
} else { // TQSql::Update } else { // TQSql::Update
caption = qApp->translate( "TQSql", "Update" ); caption = tqApp->translate( "TQSql", "Update" );
} }
#ifndef QT_NO_MESSAGEBOX #ifndef QT_NO_MESSAGEBOX
ans = TQMessageBox::information( parent, caption, ans = TQMessageBox::information( parent, caption,
qApp->translate( "TQSql", "Save edits?" ), tqApp->translate( "TQSql", "Save edits?" ),
qApp->translate( "TQSql", "Yes" ), tqApp->translate( "TQSql", "Yes" ),
qApp->translate( "TQSql", "No" ), tqApp->translate( "TQSql", "No" ),
qApp->translate( "TQSql", "Cancel" ), tqApp->translate( "TQSql", "Cancel" ),
0, 2 ); 0, 2 );
#else #else
ans = TQSql::No; ans = TQSql::No;
@ -921,10 +921,10 @@ TQSql::Confirm TQDataManager::confirmCancel( TQWidget* parent, TQSql::Op )
{ {
#ifndef QT_NO_MESSAGEBOX #ifndef QT_NO_MESSAGEBOX
switch ( TQMessageBox::information( parent, switch ( TQMessageBox::information( parent,
qApp->translate( "TQSql", "Confirm" ), tqApp->translate( "TQSql", "Confirm" ),
qApp->translate( "TQSql", "Cancel your edits?" ), tqApp->translate( "TQSql", "Cancel your edits?" ),
qApp->translate( "TQSql", "Yes" ), tqApp->translate( "TQSql", "Yes" ),
qApp->translate( "TQSql", "No" ), tqApp->translate( "TQSql", "No" ),
TQString::null, 0, 1 ) ) { TQString::null, 0, 1 ) ) {
case 0: case 0:
return TQSql::Yes; return TQSql::Yes;

@ -83,7 +83,7 @@ static TQStyleFactoryPrivate *instance = 0;
TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = 0; TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = 0;
TQStyleFactoryPrivate::TQStyleFactoryPrivate() TQStyleFactoryPrivate::TQStyleFactoryPrivate()
: TQObject( qApp ) : TQObject( tqApp )
{ {
manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE ); manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE );
} }

@ -2096,8 +2096,8 @@ int TQWindowsStyle::styleHint( StyleHint hint,
ret = 1; ret = 1;
} else if (d->altDown()) { } else if (d->altDown()) {
ret = 1; ret = 1;
} else if (qApp->focusWidget() && qApp->focusWidget()->isPopup()) { } else if (tqApp->focusWidget() && tqApp->focusWidget()->isPopup()) {
popupMenu = ::qt_cast<TQPopupMenu*>(qApp->focusWidget()); popupMenu = ::qt_cast<TQPopupMenu*>(tqApp->focusWidget());
TQMenuData *pm = popupMenu ? (TQMenuData*)popupMenu->qt_cast("TQMenuData") : 0; TQMenuData *pm = popupMenu ? (TQMenuData*)popupMenu->qt_cast("TQMenuData") : 0;
if (pm && ((FriendlyMenuData*)pm)->parentMenu == menuBar) { if (pm && ((FriendlyMenuData*)pm)->parentMenu == menuBar) {
if (d->hasSeenAlt(menuBar)) if (d->hasSeenAlt(menuBar))

@ -2781,7 +2781,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
} }
drawActiveSelection = hasFocus() || viewport()->hasFocus() || d->inMenuMode drawActiveSelection = hasFocus() || viewport()->hasFocus() || d->inMenuMode
|| is_child_of( qApp->focusWidget(), viewport() ) || is_child_of( tqApp->focusWidget(), viewport() )
|| !style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ); || !style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this );
if ( rowlast == -1 ) if ( rowlast == -1 )
rowlast = numRows() - 1; rowlast = numRows() - 1;
@ -4315,7 +4315,7 @@ void TQTable::focusOutEvent( TQFocusEvent* )
if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) {
d->inMenuMode = d->inMenuMode =
TQFocusEvent::reason() == TQFocusEvent::Popup || TQFocusEvent::reason() == TQFocusEvent::Popup ||
(qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar"));
if ( !d->inMenuMode ) if ( !d->inMenuMode )
repaintSelections(); repaintSelections();
} }

@ -180,7 +180,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
res = library->queryInterface( iid, iface ); res = library->queryInterface( iid, iface );
} }
TQLibraryInterface *libiface = 0; TQLibraryInterface *libiface = 0;
if ( library->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) != TQS_OK || !qApp ) { if ( library->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) != TQS_OK || !tqApp ) {
delete library; // only deletes the object, thanks to TQLibrary::Manual delete library; // only deletes the object, thanks to TQLibrary::Manual
} else { } else {
libiface->release(); libiface->release();

@ -681,7 +681,7 @@ void TQFile::setDecodingFunction( DecoderFn f )
TQMessageBox::critical( TQMessageBox::critical(
this, this,
tr("Open failed"), tr("Open failed"),
tr("Could not open file for reading: %1").arg( qApp->translate("TQFile",f.errorString()) ) tr("Could not open file for reading: %1").arg( tqApp->translate("TQFile",f.errorString()) )
); );
return; return;
} }

@ -499,7 +499,7 @@ void TQButtonGroup::setRadioButtonExclusive( bool on)
void TQButtonGroup::moveFocus( int key ) void TQButtonGroup::moveFocus( int key )
{ {
TQWidget * f = qApp->focusWidget(); TQWidget * f = tqApp->focusWidget();
TQButtonItem * i; TQButtonItem * i;
i = buttons->first(); i = buttons->first();

@ -353,7 +353,7 @@ void TQCheckBox::updateMask()
bool TQCheckBox::hitButton( const TQPoint &pos ) const bool TQCheckBox::hitButton( const TQPoint &pos ) const
{ {
TQRect r = TQStyle::visualRect( style().subRect( TQStyle::SR_CheckBoxFocusRect, this ), this ); TQRect r = TQStyle::visualRect( style().subRect( TQStyle::SR_CheckBoxFocusRect, this ), this );
if ( qApp->reverseLayout() ) { if ( tqApp->reverseLayout() ) {
r.setRight( width() ); r.setRight( width() );
} else { } else {
r.setLeft( 0 ); r.setLeft( 0 );

@ -1379,7 +1379,7 @@ void TQComboBox::mousePressEvent( TQMouseEvent *e )
if ( d->usingListBox() ) { if ( d->usingListBox() ) {
listBox()->blockSignals( TRUE ); listBox()->blockSignals( TRUE );
qApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
listBox()->setCurrentItem(d->current); listBox()->setCurrentItem(d->current);
listBox()->blockSignals( FALSE ); listBox()->blockSignals( FALSE );
popup(); popup();

@ -495,7 +495,7 @@ bool TQDateTimeEditor::event( TQEvent *e )
{ {
if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) {
if ( e->type() == TQEvent::FocusOut ) if ( e->type() == TQEvent::FocusOut )
qApp->sendEvent( cw, e ); tqApp->sendEvent( cw, e );
update( rect() ); update( rect() );
} else if ( e->type() == TQEvent::AccelOverride ) { } else if ( e->type() == TQEvent::AccelOverride ) {
TQKeyEvent* ke = (TQKeyEvent*) e; TQKeyEvent* ke = (TQKeyEvent*) e;
@ -648,7 +648,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
} }
} }
qApp->sendEvent( w, e ); tqApp->sendEvent( w, e );
return TRUE; return TRUE;
} }
} break; } break;
@ -1547,7 +1547,7 @@ void TQDateEdit::addNumber( int sec, int num )
emit valueChanged( date() ); emit valueChanged( date() );
} }
d->overwrite = overwrite; d->overwrite = overwrite;
d->timerId = startTimer( qApp->doubleClickInterval()*4 ); d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
d->ed->repaint( d->ed->rect(), FALSE ); d->ed->repaint( d->ed->rect(), FALSE );
} }
@ -2459,7 +2459,7 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( accepted ) if ( accepted )
emit valueChanged( time() ); emit valueChanged( time() );
d->overwrite = overwrite; d->overwrite = overwrite;
d->timerId = startTimer( qApp->doubleClickInterval()*4 ); d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
d->ed->repaint( d->ed->rect(), FALSE ); d->ed->repaint( d->ed->rect(), FALSE );
} }

@ -442,7 +442,7 @@ void TQDockWindowHandle::mousePressEvent( TQMouseEvent *e )
if ( !dockWindow->dockArea ) if ( !dockWindow->dockArea )
return; return;
ctrlDown = ( e->state() & ControlButton ) == ControlButton; ctrlDown = ( e->state() & ControlButton ) == ControlButton;
oldFocus = qApp->focusWidget(); oldFocus = tqApp->focusWidget();
setFocus(); setFocus();
e->ignore(); e->ignore();
if ( e->button() != LeftButton ) if ( e->button() != LeftButton )
@ -453,7 +453,7 @@ void TQDockWindowHandle::mousePressEvent( TQMouseEvent *e )
offset = e->pos(); offset = e->pos();
dockWindow->startRectDraw( mapToGlobal( e->pos() ), !opaque ); dockWindow->startRectDraw( mapToGlobal( e->pos() ), !opaque );
if ( !opaque ) if ( !opaque )
qApp->installEventFilter( dockWindow ); tqApp->installEventFilter( dockWindow );
} }
void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e ) void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e )
@ -469,7 +469,7 @@ void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e )
void TQDockWindowHandle::mouseReleaseEvent( TQMouseEvent *e ) void TQDockWindowHandle::mouseReleaseEvent( TQMouseEvent *e )
{ {
ctrlDown = FALSE; ctrlDown = FALSE;
qApp->removeEventFilter( dockWindow ); tqApp->removeEventFilter( dockWindow );
if ( oldFocus ) if ( oldFocus )
oldFocus->setFocus(); oldFocus->setFocus();
if ( !mousePressed ) if ( !mousePressed )
@ -610,7 +610,7 @@ void TQDockWindowTitleBar::mousePressEvent( TQMouseEvent *e )
} }
ctrlDown = ( e->state() & ControlButton ) == ControlButton; ctrlDown = ( e->state() & ControlButton ) == ControlButton;
oldFocus = qApp->focusWidget(); oldFocus = tqApp->focusWidget();
// setFocus activates the window, which deactivates the main window // setFocus activates the window, which deactivates the main window
// not what we want, and not required anyway on Windows // not what we want, and not required anyway on Windows
#ifndef Q_WS_WIN #ifndef Q_WS_WIN
@ -659,7 +659,7 @@ void TQDockWindowTitleBar::mouseReleaseEvent( TQMouseEvent *e )
} }
ctrlDown = FALSE; ctrlDown = FALSE;
qApp->removeEventFilter( dockWindow ); tqApp->removeEventFilter( dockWindow );
if ( oldFocus ) if ( oldFocus )
oldFocus->setFocus(); oldFocus->setFocus();
@ -1117,7 +1117,7 @@ void TQDockWindow::setOrientation( Orientation o )
TQDockWindow::~TQDockWindow() TQDockWindow::~TQDockWindow()
{ {
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
if ( area() ) if ( area() )
area()->removeDockWindow( this, FALSE, FALSE ); area()->removeDockWindow( this, FALSE, FALSE );
TQDockArea *a = area(); TQDockArea *a = area();
@ -1158,7 +1158,7 @@ void TQDockWindow::swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offse
TQWidget *TQDockWindow::areaAt( const TQPoint &gp ) TQWidget *TQDockWindow::areaAt( const TQPoint &gp )
{ {
TQWidget *w = qApp->widgetAt( gp, TRUE ); TQWidget *w = tqApp->widgetAt( gp, TRUE );
if ( w && ( w == this || w == titleBar ) && parentWidget() ) if ( w && ( w == this || w == titleBar ) && parentWidget() )
w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) ); w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) );
@ -1407,7 +1407,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
} }
dockArea = 0; dockArea = 0;
TQPoint topLeft = currRect.topLeft(); TQPoint topLeft = currRect.topLeft();
TQRect screen = qApp->desktop()->availableGeometry( topLeft ); TQRect screen = tqApp->desktop()->availableGeometry( topLeft );
if ( !screen.contains( topLeft ) ) { if ( !screen.contains( topLeft ) ) {
topLeft.setY(TQMAX(topLeft.y(), screen.top())); topLeft.setY(TQMAX(topLeft.y(), screen.top()));
topLeft.setY(TQMIN(topLeft.y(), screen.bottom()-height())); topLeft.setY(TQMIN(topLeft.y(), screen.bottom()-height()));
@ -1968,7 +1968,7 @@ void TQDockWindow::hideEvent( TQHideEvent *e )
void TQDockWindow::showEvent( TQShowEvent *e ) void TQDockWindow::showEvent( TQShowEvent *e )
{ {
if (curPlace == OutsideDock && (parent() && strcmp(parent()->name(), "qt_hide_dock") != 0)) { if (curPlace == OutsideDock && (parent() && strcmp(parent()->name(), "qt_hide_dock") != 0)) {
TQRect sr = qApp->desktop()->availableGeometry( this ); TQRect sr = tqApp->desktop()->availableGeometry( this );
if ( !sr.contains( pos() ) ) { if ( !sr.contains( pos() ) ) {
int nx = TQMIN( TQMAX( x(), sr.x() ), sr.right()-width() ); int nx = TQMIN( TQMAX( x(), sr.x() ), sr.right()-width() );
int ny = TQMIN( TQMAX( y(), sr.y() ), sr.bottom()-height() ); int ny = TQMIN( TQMAX( y(), sr.y() ), sr.bottom()-height() );
@ -2060,7 +2060,7 @@ bool TQDockWindow::eventFilter( TQObject * o, TQEvent *e )
verHandle->mousePressed = verHandle->mousePressed =
titleBar->mousePressed = FALSE; titleBar->mousePressed = FALSE;
endRectDraw( !opaque ); endRectDraw( !opaque );
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
return TRUE; return TRUE;
} }
} else if ( ((TQWidget*)o)->topLevelWidget() != this && place() == OutsideDock && isTopLevel() ) { } else if ( ((TQWidget*)o)->topLevelWidget() != this && place() == OutsideDock && isTopLevel() ) {

@ -145,7 +145,7 @@ void TQAlphaWidget::run( int time )
checkTime.start(); checkTime.start();
showWidget = TRUE; showWidget = TRUE;
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
widget->setWState( WState_Visible ); widget->setWState( WState_Visible );
@ -251,7 +251,7 @@ void TQAlphaWidget::render()
alpha = 1; alpha = 1;
if ( alpha >= 1 || !showWidget) { if ( alpha >= 1 || !showWidget) {
anim.stop(); anim.stop();
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
if ( widget ) { if ( widget ) {
if ( !showWidget ) { if ( !showWidget ) {
@ -318,9 +318,9 @@ void TQAlphaWidget::alphaBlend()
Q_UINT32 bp = bl[sx]; Q_UINT32 bp = bl[sx];
Q_UINT32 fp = fl[sx]; Q_UINT32 fp = fl[sx];
((Q_UINT32*)(md[sy]))[sx] = qRgb(int (qRed(bp)*ia + qRed(fp)*alpha), ((Q_UINT32*)(md[sy]))[sx] = tqRgb(int (tqRed(bp)*ia + tqRed(fp)*alpha),
int (qGreen(bp)*ia + qGreen(fp)*alpha), int (tqGreen(bp)*ia + tqGreen(fp)*alpha),
int (qBlue(bp)*ia + qBlue(fp)*alpha) ); int (tqBlue(bp)*ia + tqBlue(fp)*alpha) );
} }
} }
} }
@ -519,7 +519,7 @@ void TQRollEffect::run( int time )
show(); show();
setEnabled(FALSE); setEnabled(FALSE);
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
showWidget = TRUE; showWidget = TRUE;
done = FALSE; done = FALSE;
@ -581,7 +581,7 @@ void TQRollEffect::scroll()
} }
if ( done ) { if ( done ) {
anim.stop(); anim.stop();
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
if ( widget ) { if ( widget ) {
if ( !showWidget ) { if ( !showWidget ) {
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -633,8 +633,8 @@ void qScrollEffect( TQWidget* w, TQEffects::DirFlags orient, int time )
q_roll = 0; q_roll = 0;
} }
qApp->sendPostedEvents( w, TQEvent::Move ); tqApp->sendPostedEvents( w, TQEvent::Move );
qApp->sendPostedEvents( w, TQEvent::Resize ); tqApp->sendPostedEvents( w, TQEvent::Resize );
#ifdef Q_WS_X11 #ifdef Q_WS_X11
uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop
| (w->isPopup() ? TQt::WType_Popup : (TQt::WX11BypassWM | TQt::WStyle_Tool)); | (w->isPopup() ? TQt::WType_Popup : (TQt::WX11BypassWM | TQt::WStyle_Tool));
@ -657,8 +657,8 @@ void qFadeEffect( TQWidget* w, int time )
q_blend = 0; q_blend = 0;
} }
qApp->sendPostedEvents( w, TQEvent::Move ); tqApp->sendPostedEvents( w, TQEvent::Move );
qApp->sendPostedEvents( w, TQEvent::Resize ); tqApp->sendPostedEvents( w, TQEvent::Resize );
#ifdef Q_WS_X11 #ifdef Q_WS_X11
uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop uint flags = TQt::WStyle_Customize | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop

@ -2734,7 +2734,7 @@ void TQListBox::focusOutEvent( TQFocusEvent* )
if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) { if (style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this )) {
d->inMenuMode = d->inMenuMode =
TQFocusEvent::reason() == TQFocusEvent::Popup || TQFocusEvent::reason() == TQFocusEvent::Popup ||
(qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar"));
if ( !d->inMenuMode ) if ( !d->inMenuMode )
repaintSelection(); repaintSelection();
} }

@ -4308,7 +4308,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
bool close = i->isOpen(); bool close = i->isOpen();
setOpen( i, !close ); setOpen( i, !close );
// ### Looks dangerous, removed because of reentrance problems // ### Looks dangerous, removed because of reentrance problems
// qApp->processEvents(); // tqApp->processEvents();
if ( !d->focusItem ) { if ( !d->focusItem ) {
d->focusItem = i; d->focusItem = i;
repaintItem( d->focusItem ); repaintItem( d->focusItem );
@ -4518,7 +4518,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
bool close = i->isOpen(); bool close = i->isOpen();
setOpen( i, !close ); setOpen( i, !close );
// ### Looks dangerous, removed because of reentrance problems // ### Looks dangerous, removed because of reentrance problems
// qApp->processEvents(); // tqApp->processEvents();
if ( !d->focusItem ) { if ( !d->focusItem ) {
d->focusItem = i; d->focusItem = i;
repaintItem( d->focusItem ); repaintItem( d->focusItem );
@ -4845,7 +4845,7 @@ void TQListView::focusOutEvent( TQFocusEvent* )
if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) ) { if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) ) {
d->inMenuMode = d->inMenuMode =
TQFocusEvent::reason() == TQFocusEvent::Popup TQFocusEvent::reason() == TQFocusEvent::Popup
|| (qApp->focusWidget() && qApp->focusWidget()->inherits("TQMenuBar")); || (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar"));
if ( !d->inMenuMode ) { if ( !d->inMenuMode ) {
bool db = d->useDoubleBuffer; bool db = d->useDoubleBuffer;
d->useDoubleBuffer = TRUE; d->useDoubleBuffer = TRUE;

@ -594,7 +594,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
waitforalt = 0; waitforalt = 0;
} }
// ### ! block all accelerator events when the menu bar is active // ### ! block all accelerator events when the menu bar is active
if ( qApp && qApp->focusWidget() == this ) { if ( tqApp && tqApp->focusWidget() == this ) {
return TRUE; return TRUE;
} }
@ -1504,13 +1504,13 @@ void TQMenuBar::setAltMode( bool enable )
actItemDown = FALSE; actItemDown = FALSE;
if ( enable ) { if ( enable ) {
if ( !TQMenuData::d->aWidget ) if ( !TQMenuData::d->aWidget )
TQMenuData::d->aWidget = qApp->focusWidget(); TQMenuData::d->aWidget = tqApp->focusWidget();
setFocus(); setFocus();
updateItem( idAt( actItem ) ); updateItem( idAt( actItem ) );
} else { } else {
// set the focus back to the previous widget if // set the focus back to the previous widget if
// we still have the focus. // we still have the focus.
if ( qApp->focusWidget() == this ) { if ( tqApp->focusWidget() == this ) {
if ( TQMenuData::d->aWidget ) if ( TQMenuData::d->aWidget )
TQMenuData::d->aWidget->setFocus(); TQMenuData::d->aWidget->setFocus();
else else

@ -111,7 +111,7 @@ static void cleanup()
static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) { static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) {
if ( !singleSingleShot ) { if ( !singleSingleShot ) {
singleSingleShot = new TQTimer( qApp, "popup submenu timer" ); singleSingleShot = new TQTimer( tqApp, "popup submenu timer" );
qAddPostRoutine( cleanup ); qAddPostRoutine( cleanup );
} }
@ -314,8 +314,8 @@ TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name )
TQPopupMenu::~TQPopupMenu() TQPopupMenu::~TQPopupMenu()
{ {
if ( syncMenu == this && qApp ) { if ( syncMenu == this && tqApp ) {
qApp->exit_loop(); tqApp->exit_loop();
syncMenu = 0; syncMenu = 0;
} }
@ -558,7 +558,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
int h = height(); int h = height();
if ( snapToMouse ) { if ( snapToMouse ) {
if ( qApp->reverseLayout() ) if ( tqApp->reverseLayout() )
x -= w; x -= w;
if ( x+w > sx+sw ) if ( x+w > sx+sw )
x = mouse.x()-w; x = mouse.x()-w;
@ -587,7 +587,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
if( parent == NULL ) if( parent == NULL )
parent = TQApplication::widgetAt( pos ); parent = TQApplication::widgetAt( pos );
if( parent == NULL ) if( parent == NULL )
parent = qApp->activeWindow(); parent = tqApp->activeWindow();
if( parent != NULL ) if( parent != NULL )
x11SetWindowTransient( parent ); x11SetWindowTransient( parent );
} }
@ -649,9 +649,9 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
actItem = -1; actItem = -1;
#ifndef QT_NO_EFFECTS #ifndef QT_NO_EFFECTS
int hGuess = qApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll; int hGuess = tqApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll;
int vGuess = TQEffects::DownScroll; int vGuess = TQEffects::DownScroll;
if ( qApp->reverseLayout() ) { if ( tqApp->reverseLayout() ) {
if ( snapToMouse && ( x + w/2 > mouse.x() ) || if ( snapToMouse && ( x + w/2 > mouse.x() ) ||
( parentMenu && parentMenu->isPopupMenu && ( parentMenu && parentMenu->isPopupMenu &&
( x + w/2 > ((TQPopupMenu*)parentMenu)->x() ) ) ) ( x + w/2 > ((TQPopupMenu*)parentMenu)->x() ) ) )
@ -1403,8 +1403,8 @@ void TQPopupMenu::show()
void TQPopupMenu::hide() void TQPopupMenu::hide()
{ {
if ( syncMenu == this && qApp ) { if ( syncMenu == this && tqApp ) {
qApp->exit_loop(); tqApp->exit_loop();
syncMenu = 0; syncMenu = 0;
} }
@ -2200,7 +2200,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
if ( !ok_key && if ( !ok_key &&
!( e->key() == Key_Control || e->key() == Key_Shift || e->key() == Key_Meta ) ) !( e->key() == Key_Control || e->key() == Key_Shift || e->key() == Key_Meta ) )
qApp->beep(); tqApp->beep();
#endif // Q_OS_WIN32 #endif // Q_OS_WIN32
} }
@ -2480,7 +2480,7 @@ void TQPopupMenu::updateRow( int row )
int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint ) int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint )
{ {
snapToMouse = TRUE; snapToMouse = TRUE;
if ( !qApp ) if ( !tqApp )
return -1; return -1;
TQPopupMenu* priorSyncMenu = syncMenu; TQPopupMenu* priorSyncMenu = syncMenu;
@ -2491,7 +2491,7 @@ int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint )
TQGuardedPtr<TQPopupMenu> that = this; TQGuardedPtr<TQPopupMenu> that = this;
connectModal( that, TRUE ); connectModal( that, TRUE );
popup( pos, indexAtPoint ); popup( pos, indexAtPoint );
qApp->enter_loop(); tqApp->enter_loop();
connectModal( that, FALSE ); connectModal( that, FALSE );
syncMenu = priorSyncMenu; syncMenu = priorSyncMenu;

@ -712,7 +712,7 @@ void TQPushButton::popupPressed()
#endif #endif
if ( horizontal ) { if ( horizontal ) {
if ( topLeft ) { if ( topLeft ) {
if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + popup->sizeHint().height() <= qApp->desktop()->height() ) if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + popup->sizeHint().height() <= tqApp->desktop()->height() )
popup->exec( mapToGlobal( rect().bottomLeft() ) ); popup->exec( mapToGlobal( rect().bottomLeft() ) );
else else
popup->exec( mapToGlobal( rect().topLeft() - TQPoint( 0, popup->sizeHint().height() ) ) ); popup->exec( mapToGlobal( rect().topLeft() - TQPoint( 0, popup->sizeHint().height() ) ) );
@ -724,7 +724,7 @@ void TQPushButton::popupPressed()
} }
} else { } else {
if ( topLeft ) { if ( topLeft ) {
if ( mapToGlobal( TQPoint( rect().right(), 0 ) ).x() + popup->sizeHint().width() <= qApp->desktop()->width() ) if ( mapToGlobal( TQPoint( rect().right(), 0 ) ).x() + popup->sizeHint().width() <= tqApp->desktop()->width() )
popup->exec( mapToGlobal( rect().topRight() ) ); popup->exec( mapToGlobal( rect().topRight() ) );
else else
popup->exec( mapToGlobal( rect().topLeft() - TQPoint( popup->sizeHint().width(), 0 ) ) ); popup->exec( mapToGlobal( rect().topLeft() - TQPoint( popup->sizeHint().width(), 0 ) ) );

@ -179,7 +179,7 @@ bool TQRadioButton::hitButton( const TQPoint &pos ) const
TQRect r = TQRect r =
TQStyle::visualRect( style().subRect( TQStyle::SR_RadioButtonFocusRect, TQStyle::visualRect( style().subRect( TQStyle::SR_RadioButtonFocusRect,
this ), this ); this ), this );
if ( qApp->reverseLayout() ) { if ( tqApp->reverseLayout() ) {
r.setRight( width() ); r.setRight( width() );
} else { } else {
r.setLeft( 0 ); r.setLeft( 0 );

@ -659,7 +659,7 @@ bool TQSpinBox::eventFilter( TQObject* o, TQEvent* ev )
return FALSE; return FALSE;
if ( edited ) if ( edited )
interpretText(); interpretText();
qApp->sendEvent( this, ev ); tqApp->sendEvent( this, ev );
retval = TRUE; retval = TRUE;
} if ( k->key() == Key_Up ) { } if ( k->key() == Key_Up ) {
stepUp(); stepUp();

@ -115,10 +115,10 @@ public:
splash->show(); splash->show();
... // Loading some items ... // Loading some items
splash->message( "Loaded modules" ); splash->message( "Loaded modules" );
qApp->processEvents(); tqApp->processEvents();
... // Establishing connections ... // Establishing connections
splash->message( "Established connections" ); splash->message( "Established connections" );
qApp->processEvents(); tqApp->processEvents();
\endcode \endcode
*/ */

@ -585,7 +585,7 @@ void TQTabBar::paint( TQPainter * p, TQTab * t, bool selected ) const
if (isEnabled() && t->isEnabled()) if (isEnabled() && t->isEnabled())
flags |= TQStyle::Style_Enabled; flags |= TQStyle::Style_Enabled;
if (topLevelWidget() == qApp->activeWindow()) if (topLevelWidget() == tqApp->activeWindow())
flags |= TQStyle::Style_Active; flags |= TQStyle::Style_Active;
if ( selected ) if ( selected )
flags |= TQStyle::Style_Selected; flags |= TQStyle::Style_Selected;

@ -961,7 +961,7 @@ bool TQTabWidget::eventFilter( TQObject *o, TQEvent * e)
page = 0; page = 0;
} }
setCurrentPage( page ); setCurrentPage( page );
if ( !qApp->focusWidget() ) if ( !tqApp->focusWidget() )
d->tabs->setFocus(); d->tabs->setFocus();
return TRUE; return TRUE;
} }

@ -229,7 +229,7 @@ void TQTextBrowser::setSource(const TQString& name)
{ {
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
if ( isVisible() ) if ( isVisible() )
qApp->setOverrideCursor( waitCursor ); tqApp->setOverrideCursor( waitCursor );
#endif #endif
d->textOrSourceChanged = TRUE; d->textOrSourceChanged = TRUE;
TQString source = name; TQString source = name;
@ -263,7 +263,7 @@ void TQTextBrowser::setSource(const TQString& name)
if ( firstTag.left( 3 ) == "<qt" && firstTag.contains( "type" ) && firstTag.contains( "detail" ) ) { if ( firstTag.left( 3 ) == "<qt" && firstTag.contains( "type" ) && firstTag.contains( "detail" ) ) {
popupDetail( txt, TQCursor::pos() ); popupDetail( txt, TQCursor::pos() );
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
qApp->restoreOverrideCursor(); tqApp->restoreOverrideCursor();
#endif #endif
return; return;
} }
@ -304,7 +304,7 @@ void TQTextBrowser::setSource(const TQString& name)
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
if ( isVisible() ) if ( isVisible() )
qApp->restoreOverrideCursor(); tqApp->restoreOverrideCursor();
#endif #endif
emit sourceChanged( url ); emit sourceChanged( url );

@ -2604,7 +2604,7 @@ void TQTextEdit::contentsMouseDoubleClickEvent( TQMouseEvent * e )
repaintChanged(); repaintChanged();
d->trippleClickTimer->start( qApp->doubleClickInterval(), TRUE ); d->trippleClickTimer->start( tqApp->doubleClickInterval(), TRUE );
d->trippleClickPoint = e->globalPos(); d->trippleClickPoint = e->globalPos();
} }
inDoubleClick = TRUE; inDoubleClick = TRUE;

@ -915,7 +915,7 @@ void TQToolButton::popupTimerDone()
horizontal = FALSE; horizontal = FALSE;
#endif #endif
TQPoint p; TQPoint p;
TQRect screen = qApp->desktop()->availableGeometry( this ); TQRect screen = tqApp->desktop()->availableGeometry( this );
if ( horizontal ) { if ( horizontal ) {
if ( TQApplication::reverseLayout() ) { if ( TQApplication::reverseLayout() ) {
if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + d->popup->sizeHint().height() <= screen.height() ) { if ( mapToGlobal( TQPoint( 0, rect().bottom() ) ).y() + d->popup->sizeHint().height() <= screen.height() ) {

@ -156,7 +156,7 @@ static void initTipManager()
TQTipManager::TQTipManager() TQTipManager::TQTipManager()
: TQObject( qApp, "toolTipManager" ) : TQObject( tqApp, "toolTipManager" )
{ {
wakeUpDelay = 700; wakeUpDelay = 700;
tips = new TQPtrDict<TQTipManager::Tip>( 313 ); tips = new TQPtrDict<TQTipManager::Tip>( 313 );
@ -173,9 +173,9 @@ TQTipManager::TQTipManager()
TQTipManager::~TQTipManager() TQTipManager::~TQTipManager()
{ {
if ( isApplicationFilter && !qApp->closingDown() ) { if ( isApplicationFilter && !tqApp->closingDown() ) {
qApp->setGlobalMouseTracking( FALSE ); tqApp->setGlobalMouseTracking( FALSE );
qApp->removeEventFilter( tipManager ); tqApp->removeEventFilter( tipManager );
} }
delete label; delete label;
@ -234,10 +234,10 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w,
showTip(); showTip();
} }
if ( !isApplicationFilter && qApp ) { if ( !isApplicationFilter && tqApp ) {
isApplicationFilter = TRUE; isApplicationFilter = TRUE;
qApp->installEventFilter( tipManager ); tqApp->installEventFilter( tipManager );
qApp->setGlobalMouseTracking( TRUE ); tqApp->setGlobalMouseTracking( TRUE );
} }
if ( t->group ) { if ( t->group ) {
@ -371,11 +371,11 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
// avoid dumping core in case of application madness, and return // avoid dumping core in case of application madness, and return
// tquickly for some common but irrelevant events // tquickly for some common but irrelevant events
if ( e->type() == TQEvent::WindowDeactivate && if ( e->type() == TQEvent::WindowDeactivate &&
qApp && !qApp->activeWindow() && tqApp && !tqApp->activeWindow() &&
label && label->isVisible() ) label && label->isVisible() )
hideTipAndSleep(); hideTipAndSleep();
if ( !qApp if ( !tqApp
|| !obj || !obj->isWidgetType() // isWidgetType() catches most stuff || !obj || !obj->isWidgetType() // isWidgetType() catches most stuff
|| e->type() == TQEvent::Paint || e->type() == TQEvent::Paint
|| e->type() == TQEvent::Timer || e->type() == TQEvent::Timer

@ -475,7 +475,7 @@ void TQWhatsThisButton::mouseReleased()
TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
#endif #endif
wt->state = TQWhatsThisPrivate::Waiting; wt->state = TQWhatsThisPrivate::Waiting;
qApp->installEventFilter( wt ); tqApp->installEventFilter( wt );
} }
} }
@ -502,7 +502,7 @@ TQWhatsThisPrivate::TQWhatsThisPrivate()
TQWhatsThisPrivate::~TQWhatsThisPrivate() TQWhatsThisPrivate::~TQWhatsThisPrivate()
{ {
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
if ( state == Waiting && qApp ) if ( state == Waiting && tqApp )
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
#endif #endif
// the two straight-and-simple dicts // the two straight-and-simple dicts
@ -643,7 +643,7 @@ void TQWhatsThisPrivate::leaveWhatsThisMode()
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
#endif #endif
state = Inactive; state = Inactive;
qApp->removeEventFilter( this ); tqApp->removeEventFilter( this );
} }
} }
@ -923,7 +923,7 @@ void TQWhatsThis::enterWhatsThisMode()
TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
#endif #endif
wt->state = TQWhatsThisPrivate::Waiting; wt->state = TQWhatsThisPrivate::Waiting;
qApp->installEventFilter( wt ); tqApp->installEventFilter( wt );
} }
} }

@ -64,7 +64,7 @@ TQWidgetResizeHandler::TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw, co
range = frame ? frame->frameWidth() : RANGE; range = frame ? frame->frameWidth() : RANGE;
range = TQMAX( RANGE, range ); range = TQMAX( RANGE, range );
activeForMove = activeForResize = TRUE; activeForMove = activeForResize = TRUE;
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
} }
void TQWidgetResizeHandler::setActive( Action ac, bool b ) void TQWidgetResizeHandler::setActive( Action ac, bool b )
@ -116,7 +116,7 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
#ifndef QT_NO_SIZEGRIP #ifndef QT_NO_SIZEGRIP
|| ::qt_cast<TQSizeGrip*>(o) || ::qt_cast<TQSizeGrip*>(o)
#endif #endif
|| qApp->activePopupWidget() ) { || tqApp->activePopupWidget() ) {
if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease ) if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease )
buttonDown = FALSE; buttonDown = FALSE;
return FALSE; return FALSE;

@ -601,7 +601,7 @@ void TQWorkspace::place( TQWidget* w)
TQRect r2(0, 0, 0, 0); TQRect r2(0, 0, 0, 0);
TQRect maxRect = rect(); TQRect maxRect = rect();
if(d->wmode == TopLevel) { if(d->wmode == TopLevel) {
const TQDesktopWidget *dw = qApp->desktop(); const TQDesktopWidget *dw = tqApp->desktop();
maxRect = dw->availableGeometry(dw->screenNumber(topLevelWidget())); maxRect = dw->availableGeometry(dw->screenNumber(topLevelWidget()));
} }
int x = maxRect.left(), y = maxRect.top(); int x = maxRect.left(), y = maxRect.top();
@ -800,7 +800,7 @@ void TQWorkspace::resizeEvent( TQResizeEvent * )
void TQWorkspace::handleUndock(TQDockWindow *w) void TQWorkspace::handleUndock(TQDockWindow *w)
{ {
const TQDesktopWidget *dw = qApp->desktop(); const TQDesktopWidget *dw = tqApp->desktop();
TQRect maxRect = dw->availableGeometry(dw->screenNumber(d->mainwindow)); TQRect maxRect = dw->availableGeometry(dw->screenNumber(d->mainwindow));
TQPoint wpos(maxRect.left(), maxRect.top()); TQPoint wpos(maxRect.left(), maxRect.top());
int possible = 0; int possible = 0;
@ -1026,8 +1026,8 @@ void TQWorkspace::showEvent( TQShowEvent *e )
TQWidget *w = new TQWidget(NULL, "TQDoesNotExist", TQWidget *w = new TQWidget(NULL, "TQDoesNotExist",
WType_Dialog | WStyle_Customize | WStyle_NoBorder); WType_Dialog | WStyle_Customize | WStyle_NoBorder);
// if(qApp->mainWidget() == o) // if(tqApp->mainWidget() == o)
// TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit())); // TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
TQDesktopWidget *dw = TQApplication::desktop(); TQDesktopWidget *dw = TQApplication::desktop();
w->setGeometry(dw->availableGeometry(dw->screenNumber(o))); w->setGeometry(dw->availableGeometry(dw->screenNumber(o)));
o->reparent(w, TQPoint(0, 0), TRUE); o->reparent(w, TQPoint(0, 0), TRUE);
@ -1197,9 +1197,9 @@ void TQWorkspace::maximizeWindow( TQWidget* w)
c->adjustToFullscreen(); c->adjustToFullscreen();
c->show(); c->show();
c->internalRaise(); c->internalRaise();
qApp->sendPostedEvents( c, TQEvent::Resize ); tqApp->sendPostedEvents( c, TQEvent::Resize );
qApp->sendPostedEvents( c, TQEvent::Move ); tqApp->sendPostedEvents( c, TQEvent::Move );
qApp->sendPostedEvents( c, TQEvent::ShowWindowRequest ); tqApp->sendPostedEvents( c, TQEvent::ShowWindowRequest );
if ( d->maxWindow != c ) { if ( d->maxWindow != c ) {
if ( d->maxWindow ) if ( d->maxWindow )
d->maxWindow->setGeometry( d->maxRestore ); d->maxWindow->setGeometry( d->maxRestore );
@ -1892,7 +1892,7 @@ void TQWorkspace::cascade()
int h = prefSize.height(); int h = prefSize.height();
child->showNormal(); child->showNormal();
qApp->sendPostedEvents( 0, TQEvent::ShowNormal ); tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
if ( y + h > height() ) if ( y + h > height() )
y = 0; y = 0;
if ( x + w > width() ) if ( x + w > width() )
@ -1987,7 +1987,7 @@ void TQWorkspace::tile()
c->TQFrame::move( p ); c->TQFrame::move( p );
} else { } else {
c->showNormal(); c->showNormal();
qApp->sendPostedEvents( 0, TQEvent::ShowNormal ); tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
used[row*cols+col] = TRUE; used[row*cols+col] = TRUE;
TQSize sz(w, h); TQSize sz(w, h);
TQSize bsize(c->baseSize()); TQSize bsize(c->baseSize());
@ -2731,9 +2731,9 @@ void TQWorkspaceChild::adjustToFullscreen()
if ( !childWidget ) if ( !childWidget )
return; return;
qApp->sendPostedEvents( this, TQEvent::Resize ); tqApp->sendPostedEvents( this, TQEvent::Resize );
qApp->sendPostedEvents( childWidget, TQEvent::Resize ); tqApp->sendPostedEvents( childWidget, TQEvent::Resize );
qApp->sendPostedEvents( childWidget, TQEvent::Move ); tqApp->sendPostedEvents( childWidget, TQEvent::Move );
if( style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this) ) { if( style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this) ) {
setGeometry( 0, 0, parentWidget()->width(), parentWidget()->height()); setGeometry( 0, 0, parentWidget()->width(), parentWidget()->height());
} else { } else {

@ -53,7 +53,7 @@ inline TQString getVersionString()
Config::Config() Config::Config()
: hideSidebar( FALSE ), profil( 0 ), maximized(FALSE) : hideSidebar( FALSE ), profil( 0 ), maximized(FALSE)
{ {
fontSiz = qApp->font().pointSize(); fontSiz = tqApp->font().pointSize();
if( !static_configuration ) { if( !static_configuration ) {
static_configuration = this; static_configuration = this;
} else { } else {
@ -120,13 +120,13 @@ void Config::load()
linkCol = settings.readEntry( key + "LinkColor", "#0000FF" ); linkCol = settings.readEntry( key + "LinkColor", "#0000FF" );
src = settings.readListEntry( profkey + "Source" ); src = settings.readListEntry( profkey + "Source" );
sideBar = settings.readNumEntry( key + "SideBarPage" ); sideBar = settings.readNumEntry( key + "SideBarPage" );
if (qApp->type() != TQApplication::Tty) { if (tqApp->type() != TQApplication::Tty) {
fontFam = settings.readEntry( key + "Family", qApp->font().family() ); fontFam = settings.readEntry( key + "Family", tqApp->font().family() );
fontFix = settings.readEntry( key + "FixedFamily", "courier" ); fontFix = settings.readEntry( key + "FixedFamily", "courier" );
fontSiz = settings.readNumEntry( key + "Size", -1 ); fontSiz = settings.readNumEntry( key + "Size", -1 );
if ( fontSiz < 4 ) { if ( fontSiz < 4 ) {
fontSiz = qApp->font().pointSize(); fontSiz = tqApp->font().pointSize();
} }
geom.setRect( settings.readNumEntry( key + "GeometryX", TQApplication::desktop()->availableGeometry().x() ), geom.setRect( settings.readNumEntry( key + "GeometryX", TQApplication::desktop()->availableGeometry().x() ),
@ -162,14 +162,14 @@ void Config::saveSettings()
settings.writeEntry( key + "LinkColor", linkCol ); settings.writeEntry( key + "LinkColor", linkCol );
settings.writeEntry( profkey + "Source", src ); settings.writeEntry( profkey + "Source", src );
settings.writeEntry( key + "SideBarPage", sideBarPage() ); settings.writeEntry( key + "SideBarPage", sideBarPage() );
if (qApp->type() != TQApplication::Tty) { if (tqApp->type() != TQApplication::Tty) {
settings.writeEntry( key + "GeometryX", geom.x() ); settings.writeEntry( key + "GeometryX", geom.x() );
settings.writeEntry( key + "GeometryY", geom.y() ); settings.writeEntry( key + "GeometryY", geom.y() );
settings.writeEntry( key + "GeometryWidth", geom.width() ); settings.writeEntry( key + "GeometryWidth", geom.width() );
settings.writeEntry( key + "GeometryHeight", geom.height() ); settings.writeEntry( key + "GeometryHeight", geom.height() );
settings.writeEntry( key + "GeometryMaximized", maximized ); settings.writeEntry( key + "GeometryMaximized", maximized );
settings.writeEntry( key + "Family", fontFam ); settings.writeEntry( key + "Family", fontFam );
settings.writeEntry( key + "Size", fontSiz < 4 ? qApp->font().pointSize() : fontSiz ); settings.writeEntry( key + "Size", fontSiz < 4 ? tqApp->font().pointSize() : fontSiz );
settings.writeEntry( key + "FixedFamily", fontFix ); settings.writeEntry( key + "FixedFamily", fontFix );
} }
if ( !hideSidebar ) if ( !hideSidebar )

@ -230,7 +230,7 @@ void HelpDialog::initialize()
listContents->header()->hide(); listContents->header()->hide();
listContents->header()->setStretchEnabled( TRUE ); listContents->header()->setStretchEnabled( TRUE );
framePrepare->hide(); framePrepare->hide();
connect( qApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()) ); connect( tqApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()) );
termsEdit->setValidator( new SearchValidator( termsEdit ) ); termsEdit->setValidator( new SearchValidator( termsEdit ) );
@ -254,7 +254,7 @@ void HelpDialog::initialize()
void HelpDialog::processEvents() void HelpDialog::processEvents()
{ {
qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
} }
@ -292,7 +292,7 @@ void HelpDialog::timerEvent(TQTimerEvent *e)
help->setWindowOpacity((opacity-=4)/255.0); help->setWindowOpacity((opacity-=4)/255.0);
if (opacity<=0) if (opacity<=0)
#endif #endif
qApp->quit(); tqApp->quit();
} }

@ -69,7 +69,7 @@ Index::Index( const TQString &dp, const TQString &hp )
{ {
alreadyHaveDocList = FALSE; alreadyHaveDocList = FALSE;
lastWindowClosed = FALSE; lastWindowClosed = FALSE;
connect( qApp, SIGNAL( lastWindowClosed() ), connect( tqApp, SIGNAL( lastWindowClosed() ),
this, SLOT( setLastWinClosed() ) ); this, SLOT( setLastWinClosed() ) );
} }
@ -79,7 +79,7 @@ Index::Index( const TQStringList &dl, const TQString &hp )
docList = dl; docList = dl;
alreadyHaveDocList = TRUE; alreadyHaveDocList = TRUE;
lastWindowClosed = FALSE; lastWindowClosed = FALSE;
connect( qApp, SIGNAL( lastWindowClosed() ), connect( tqApp, SIGNAL( lastWindowClosed() ),
this, SLOT( setLastWinClosed() ) ); this, SLOT( setLastWinClosed() ) );
} }

@ -118,14 +118,14 @@ void MainWindow::setup()
if( setupCompleted ) if( setupCompleted )
return; return;
qApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) );
statusBar()->message( tr( "Initializing TQt Assistant..." ) ); statusBar()->message( tr( "Initializing TQt Assistant..." ) );
setupCompleted = TRUE; setupCompleted = TRUE;
helpDock->initialize(); helpDock->initialize();
connect( actionGoPrevious, SIGNAL( activated() ), tabs, SLOT( backward() ) ); connect( actionGoPrevious, SIGNAL( activated() ), tabs, SLOT( backward() ) );
connect( actionGoNext, SIGNAL( activated() ), tabs, SLOT( forward() ) ); connect( actionGoNext, SIGNAL( activated() ), tabs, SLOT( forward() ) );
connect( actionEditCopy, SIGNAL( activated() ), tabs, SLOT( copy() ) ); connect( actionEditCopy, SIGNAL( activated() ), tabs, SLOT( copy() ) );
connect( actionFileExit, SIGNAL( activated() ), qApp, SLOT( closeAllWindows() ) ); connect( actionFileExit, SIGNAL( activated() ), tqApp, SLOT( closeAllWindows() ) );
connect( actionAddBookmark, SIGNAL( activated() ), connect( actionAddBookmark, SIGNAL( activated() ),
helpDock, SLOT( addBookmark() ) ); helpDock, SLOT( addBookmark() ) );
connect( helpDock, SIGNAL( showLink( const TQString& ) ), connect( helpDock, SIGNAL( showLink( const TQString& ) ),
@ -167,7 +167,7 @@ void MainWindow::setup()
PopupMenu->insertItem( tr( "Vie&ws" ), createDockWindowMenu() ); PopupMenu->insertItem( tr( "Vie&ws" ), createDockWindowMenu() );
helpDock->tabWidget->setCurrentPage( config->sideBarPage() ); helpDock->tabWidget->setCurrentPage( config->sideBarPage() );
qApp->restoreOverrideCursor(); tqApp->restoreOverrideCursor();
actionGoPrevious->setEnabled( FALSE ); actionGoPrevious->setEnabled( FALSE );
actionGoNext->setEnabled( FALSE ); actionGoNext->setEnabled( FALSE );
} }
@ -335,8 +335,8 @@ void MainWindow::print()
if ( !p.begin( &printer ) ) if ( !p.begin( &printer ) )
return; return;
qApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) );
qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
TQPaintDeviceMetrics metrics(p.device()); TQPaintDeviceMetrics metrics(p.device());
TQTextBrowser *browser = tabs->currentBrowser(); TQTextBrowser *browser = tabs->currentBrowser();
@ -352,7 +352,7 @@ void MainWindow::print()
richText.setWidth( &p, view.width() ); richText.setWidth( &p, view.width() );
int page = 1; int page = 1;
do { do {
qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
richText.draw( &p, margin, margin, view, palette().active() ); richText.draw( &p, margin, margin, view, palette().active() );
view.moveBy( 0, view.height() ); view.moveBy( 0, view.height() );
@ -365,8 +365,8 @@ void MainWindow::print()
page++; page++;
} while (TRUE); } while (TRUE);
qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
qApp->restoreOverrideCursor(); tqApp->restoreOverrideCursor();
} }
} }

@ -403,7 +403,7 @@ void CustomWidgetEditor::checkWidgetName()
"to rename this widget with this name." ).arg( s ) ); "to rename this widget with this name." ).arg( s ) );
if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) { if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) {
boxWidgets->setCurrentItem( i ); boxWidgets->setCurrentItem( i );
qApp->processEvents(); tqApp->processEvents();
} }
editClass->setText( w->className ); editClass->setText( w->className );
classNameChanged( w->className ); classNameChanged( w->className );

@ -218,7 +218,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
TQCString data( f.size() ); TQCString data( f.size() );
f.readBlock( data.data(), f.size() ); f.readBlock( data.data(), f.size() );
f2.writeBlock( data ); f2.writeBlock( data );
} else if ( qApp->type() != TQApplication::Tty ) { } else if ( tqApp->type() != TQApplication::Tty ) {
TQMessageBox::warning( MainWindow::self, "Save", "The file " + TQMessageBox::warning( MainWindow::self, "Save", "The file " +
codeFile() + " could not be saved" ); codeFile() + " could not be saved" );
} }

@ -606,7 +606,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
delete l; delete l;
} }
} }
qApp->processEvents(); tqApp->processEvents();
} }
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
sel && e->button() == LeftButton ) { // control pressed and selected, unselect widget sel && e->button() == LeftButton ) { // control pressed and selected, unselect widget
@ -860,7 +860,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
break; break;
case CONNECT_TOOL: case CONNECT_TOOL:
restoreConnectionLine(); restoreConnectionLine();
wid = qApp->widgetAt( e->globalPos(), TRUE ); wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid ) if ( wid )
wid = designerWidget( wid ); wid = designerWidget( wid );
if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
@ -874,7 +874,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
mainWindow()->statusBar()->message( tr( "Connect '%1' to '%2'" ).arg( startWidget->name() ). mainWindow()->statusBar()->message( tr( "Connect '%1' to '%2'" ).arg( startWidget->name() ).
arg( endWidget->name() ) ); arg( endWidget->name() ) );
currentPos = mapFromGlobal( e->globalPos() ); currentPos = mapFromGlobal( e->globalPos() );
qApp->processEvents(); tqApp->processEvents();
if ( drawRecRect ) if ( drawRecRect )
restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ),
( (TQWidget*)oldendWidget )->size() ) ); ( (TQWidget*)oldendWidget )->size() ) );
@ -884,7 +884,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( !validForBuddy ) if ( !validForBuddy )
break; break;
restoreConnectionLine(); restoreConnectionLine();
wid = qApp->widgetAt( e->globalPos(), TRUE ); wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid ) if ( wid )
wid = designerWidget( wid ); wid = designerWidget( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
@ -904,7 +904,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
else else
mainWindow()->statusBar()->message( tr( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); mainWindow()->statusBar()->message( tr( "Set buddy '%1' to ..." ).arg( startWidget->name() ) );
currentPos = mapFromGlobal( e->globalPos() ); currentPos = mapFromGlobal( e->globalPos() );
qApp->processEvents(); tqApp->processEvents();
if ( drawRecRect && oldendWidget ) if ( drawRecRect && oldendWidget )
restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ),
( (TQWidget*)oldendWidget )->size() ) ); ( (TQWidget*)oldendWidget )->size() ) );
@ -1035,7 +1035,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
( (TQWidget*)endWidget )->pos() ), ( (TQWidget*)endWidget )->pos() ),
( (TQWidget*)endWidget )->size() ) ); ( (TQWidget*)endWidget )->size() ) );
endUnclippedPainter(); endUnclippedPainter();
qApp->processEvents(); tqApp->processEvents();
if ( startWidget && endWidget ) { if ( startWidget && endWidget ) {
if ( currTool == CONNECT_TOOL ) if ( currTool == CONNECT_TOOL )

@ -953,7 +953,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T
item->setRenameEnabled( 0, TRUE ); item->setRenameEnabled( 0, TRUE );
setCurrentItem( item ); setCurrentItem( item );
ensureItemVisible( item ); ensureItemVisible( item );
qApp->processEvents(); tqApp->processEvents();
newItem = item; newItem = item;
item->startRename( 0 ); item->startRename( 0 );
} }

@ -30,7 +30,7 @@ void ListEditor::addItem()
{ {
TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() ); TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() );
i->setRenameEnabled( 0, TRUE ); i->setRenameEnabled( 0, TRUE );
qApp->processEvents(); tqApp->processEvents();
i->startRename( 0 ); i->startRename( 0 );
} }

@ -185,7 +185,7 @@ MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir )
setupPluginManagers(); setupPluginManagers();
if ( !single ) if ( !single )
qApp->setMainWidget( this ); tqApp->setMainWidget( this );
TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory );
#ifndef Q_WS_MACX #ifndef Q_WS_MACX
setIcon( TQPixmap::fromMimeSource( "designer_appicon.png" ) ); setIcon( TQPixmap::fromMimeSource( "designer_appicon.png" ) );
@ -247,13 +247,13 @@ MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir )
emit hasActiveWindow( FALSE ); emit hasActiveWindow( FALSE );
lastPressWidget = 0; lastPressWidget = 0;
qApp->installEventFilter( this ); tqApp->installEventFilter( this );
TQSize as( qApp->desktop()->size() ); TQSize as( tqApp->desktop()->size() );
as -= TQSize( 30, 30 ); as -= TQSize( 30, 30 );
resize( TQSize( 1200, 1000 ).boundedTo( as ) ); resize( TQSize( 1200, 1000 ).boundedTo( as ) );
connect( qApp->clipboard(), SIGNAL( dataChanged() ), connect( tqApp->clipboard(), SIGNAL( dataChanged() ),
this, SLOT( clipboardChanged() ) ); this, SLOT( clipboardChanged() ) );
clipboardChanged(); clipboardChanged();
layoutChilds = FALSE; layoutChilds = FALSE;
@ -734,7 +734,7 @@ void MainWindow::previewForm( const TQString & style )
void MainWindow::helpContents() void MainWindow::helpContents()
{ {
TQWidget *focusWidget = qApp->focusWidget(); TQWidget *focusWidget = tqApp->focusWidget();
bool showClassDocu = TRUE; bool showClassDocu = TRUE;
while ( focusWidget ) { while ( focusWidget ) {
if ( focusWidget->isA( "PropertyList" ) ) { if ( focusWidget->isA( "PropertyList" ) ) {
@ -1525,7 +1525,7 @@ void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw )
setupRMBSpecialCommands( ids, commands, fw ); setupRMBSpecialCommands( ids, commands, fw );
setupRMBProperties( ids, commands, fw ); setupRMBProperties( ids, commands, fw );
qApp->processEvents(); tqApp->processEvents();
int r = rmbFormWindow->exec( gp ); int r = rmbFormWindow->exec( gp );
handleRMBProperties( r, commands, fw ); handleRMBProperties( r, commands, fw );
@ -1543,7 +1543,7 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg
setupRMBSpecialCommands( ids, commands, w ); setupRMBSpecialCommands( ids, commands, w );
setupRMBProperties( ids, commands, w ); setupRMBProperties( ids, commands, w );
qApp->processEvents(); tqApp->processEvents();
int r = rmbWidgets->exec( gp ); int r = rmbWidgets->exec( gp );
handleRMBProperties( r, commands, w ); handleRMBProperties( r, commands, w );
@ -1997,7 +1997,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
void MainWindow::clipboardChanged() void MainWindow::clipboardChanged()
{ {
TQString text( qApp->clipboard()->text() ); TQString text( tqApp->clipboard()->text() );
if (qWorkspace()->activeWindow() && ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow())) { if (qWorkspace()->activeWindow() && ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow())) {
actionEditPaste->setEnabled(!text.isEmpty()); actionEditPaste->setEnabled(!text.isEmpty());
} else { } else {
@ -3355,7 +3355,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
fw->showNormal(); fw->showNormal();
fw->setFocus(); fw->setFocus();
lastActiveFormWindow = fw; lastActiveFormWindow = fw;
qApp->processEvents(); tqApp->processEvents();
se = editSource(); se = editSource();
if ( se ) { if ( se ) {
switch ( lm ) { switch ( lm ) {
@ -3430,7 +3430,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) );
else else
fw->formFile()->showEditor( FALSE ); fw->formFile()->showEditor( FALSE );
qApp->processEvents(); // give all views the chance to get the formwindow tqApp->processEvents(); // give all views the chance to get the formwindow
SourceEditor *se = editSource(); SourceEditor *se = editSource();
if ( se ) { if ( se ) {
switch ( lm ) { switch ( lm ) {

@ -1082,7 +1082,7 @@ void MainWindow::fileQuit()
{ {
close(); close();
if ( !singleProjectMode() ) if ( !singleProjectMode() )
qApp->closeAllWindows(); tqApp->closeAllWindows();
} }
void MainWindow::fileClose() void MainWindow::fileClose()
@ -1531,7 +1531,7 @@ void MainWindow::editCopy()
return; return;
} }
if ( formWindow() ) if ( formWindow() )
qApp->clipboard()->setText( formWindow()->copy() ); tqApp->clipboard()->setText( formWindow()->copy() );
} }
void MainWindow::editPaste() void MainWindow::editPaste()
@ -1555,7 +1555,7 @@ void MainWindow::editPaste()
} }
if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
formWindow()->paste( qApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) );
hierarchyView->widgetInserted( 0 ); hierarchyView->widgetInserted( 0 );
formWindow()->commandHistory()->setModified( TRUE ); formWindow()->commandHistory()->setModified( TRUE );
} else { } else {
@ -2048,8 +2048,8 @@ void MainWindow::showStartDialog()
{ {
if ( singleProjectMode() ) if ( singleProjectMode() )
return; return;
for ( int i = 1; i < qApp->argc(); ++i ) { for ( int i = 1; i < tqApp->argc(); ++i ) {
TQString arg = qApp->argv()[i]; TQString arg = tqApp->argv()[i];
if ( arg[0] != '-' ) if ( arg[0] != '-' )
return; return;
} }

@ -822,7 +822,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e )
void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e )
{ {
TQWidget * fw = qApp->focusWidget(); TQWidget * fw = tqApp->focusWidget();
if ( e->lostFocus() && !::qt_cast<PopupMenuEditor*>(fw) ) if ( e->lostFocus() && !::qt_cast<PopupMenuEditor*>(fw) )
hideItem(); hideItem();
update(); update();

@ -265,7 +265,7 @@ int MultiLineEditor::exec()
{ {
res = 1; res = 1;
show(); show();
qApp->enter_loop(); tqApp->enter_loop();
return res; return res;
} }
@ -315,7 +315,7 @@ void MultiLineEditor::cancelClicked()
void MultiLineEditor::closeEvent( TQCloseEvent *e ) void MultiLineEditor::closeEvent( TQCloseEvent *e )
{ {
qApp->exit_loop(); tqApp->exit_loop();
MultiLineEditorBase::closeEvent( e ); MultiLineEditorBase::closeEvent( e );
} }

@ -114,7 +114,7 @@ static void debugMessageOutput( TQtMsgType type, const char *msg )
abort(); abort();
} }
qApp->flush(); tqApp->flush();
} }
void OutputWindow::setupDebug() void OutputWindow::setupDebug()

@ -89,7 +89,7 @@ void PixmapView::previewUrl( const TQUrl &u )
static void buildImageFormatList( TQString &filter, TQString &all ) static void buildImageFormatList( TQString &filter, TQString &all )
{ {
all = qApp->translate( "qChoosePixmap", "All Pixmaps (" ); all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" );
for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
TQString outputFormat = TQImageIO::outputFormats().at( i ); TQString outputFormat = TQImageIO::outputFormats().at( i );
TQString outputExtension; TQString outputExtension;
@ -97,12 +97,12 @@ static void buildImageFormatList( TQString &filter, TQString &all )
outputExtension = outputFormat.lower(); outputExtension = outputFormat.lower();
else else
outputExtension = "jpg;*.jpeg"; outputExtension = "jpg;*.jpeg";
filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ). filter += tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
arg( outputFormat ).arg( "*." + outputExtension); arg( outputFormat ).arg( "*." + outputExtension);
all += "*." + outputExtension + ";"; all += "*." + outputExtension + ";";
} }
filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) ); filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) );
filter += qApp->translate( "qChoosePixmap", "All Files (*)" ); filter += tqApp->translate( "qChoosePixmap", "All Files (*)" );
} }
TQStringList qChoosePixmaps( TQWidget *parent ) TQStringList qChoosePixmaps( TQWidget *parent )
@ -121,7 +121,7 @@ TQStringList qChoosePixmaps( TQWidget *parent )
fd.setContentsPreview( pw, pw ); fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List ); fd.setViewMode( TQFileDialog::List );
fd.setPreviewMode( TQFileDialog::Contents ); fd.setPreviewMode( TQFileDialog::Contents );
fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images..." ) ); fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) );
if ( fd.exec() == TQDialog::Accepted ) if ( fd.exec() == TQDialog::Accepted )
return fd.selectedFiles(); return fd.selectedFiles();
return TQStringList(); return TQStringList();
@ -144,7 +144,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
fd.setContentsPreview( pw, pw ); fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List ); fd.setViewMode( TQFileDialog::List );
fd.setPreviewMode( TQFileDialog::Contents ); fd.setPreviewMode( TQFileDialog::Contents );
fd.setCaption( qApp->translate( "qChoosePixmap", "Choose a Pixmap..." ) ); fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose a Pixmap..." ) );
if ( fd.exec() == TQDialog::Accepted ) { if ( fd.exec() == TQDialog::Accepted ) {
TQPixmap pix( fd.selectedFile() ); TQPixmap pix( fd.selectedFile() );
if ( fn ) if ( fn )

@ -1011,7 +1011,7 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * )
void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * )
{ {
TQWidget * fw = qApp->focusWidget(); TQWidget * fw = tqApp->focusWidget();
if ( !fw || ( !::qt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { if ( !fw || ( !::qt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) {
hideSubMenu(); hideSubMenu();
if ( fw && ::qt_cast<MenuBarEditor*>(fw) ) if ( fw && ::qt_cast<MenuBarEditor*>(fw) )

@ -1594,5 +1594,5 @@ TQString Project::locationOfObject( TQObject *o )
bool Project::hasGUI() const bool Project::hasGUI() const
{ {
return qApp->type() != TQApplication::Tty; return tqApp->type() != TQApplication::Tty;
} }

@ -333,14 +333,14 @@ void PropertyItem::setOpen( bool b )
children.setAutoDelete( TRUE ); children.setAutoDelete( TRUE );
children.clear(); children.clear();
children.setAutoDelete( FALSE ); children.setAutoDelete( FALSE );
qApp->processEvents(); tqApp->processEvents();
listview->updateEditorSize(); listview->updateEditorSize();
return; return;
} }
createChildren(); createChildren();
initChildren(); initChildren();
qApp->processEvents(); tqApp->processEvents();
listview->updateEditorSize(); listview->updateEditorSize();
} }
@ -552,10 +552,10 @@ TQString PropertyItem::currentItemFromObject() const
void PropertyItem::setFocus( TQWidget *w ) void PropertyItem::setFocus( TQWidget *w )
{ {
if ( !qApp->focusWidget() || if ( !tqApp->focusWidget() ||
listview->propertyEditor()->formWindow() && listview->propertyEditor()->formWindow() &&
( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) && ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) &&
!qApp->focusWidget()->inherits( "Editor" ) ) ) !tqApp->focusWidget()->inherits( "Editor" ) ) )
w->setFocus(); w->setFocus();
} }
@ -2560,7 +2560,7 @@ void PropertyKeysequenceItem::setValue()
PropertyItem::setValue( v ); PropertyItem::setValue( v );
if (sequence->hasFocus() if (sequence->hasFocus()
// if the user wants to use F1 as accelerator, Designer will pop up a TQWhatsThat widget // if the user wants to use F1 as accelerator, Designer will pop up a TQWhatsThat widget
|| (qApp->focusWidget() && qApp->focusWidget()->inherits("TQWhatsThat"))) || (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQWhatsThat")))
notifyValueChange(); notifyValueChange();
setChanged( TRUE ); setChanged( TRUE );
} }
@ -3314,7 +3314,7 @@ void PropertyList::setupProperties()
sort(); sort();
setSorting( -1 ); setSorting( -1 );
setCurrentItem( firstChild() ); setCurrentItem( firstChild() );
qApp->processEvents(); tqApp->processEvents();
} }
updateEditorSize(); updateEditorSize();

@ -1637,7 +1637,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
case TQVariant::Font: { case TQVariant::Font: {
TQVariant v( value ); TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl; ts << makeIndent( indent ) << "<font>" << endl;
TQFont f( qApp->font() ); TQFont f( tqApp->font() );
if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
f = ((TQWidget*)w)->parentWidget()->font(); f = ((TQWidget*)w)->parentWidget()->font();
TQFont f2( v.toFont() ); TQFont f2( v.toFont() );
@ -2188,7 +2188,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
TQVariant defVarient; TQVariant defVarient;
if ( e.tagName() == "font" ) { if ( e.tagName() == "font" ) {
TQFont f( qApp->font() ); TQFont f( tqApp->font() );
if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
f = ( (TQWidget*)obj )->parentWidget()->font(); f = ( (TQWidget*)obj )->parentWidget()->font();
defVarient = TQVariant( f ); defVarient = TQVariant( f );

@ -41,12 +41,12 @@
SyntaxHighlighter_HTML::SyntaxHighlighter_HTML() SyntaxHighlighter_HTML::SyntaxHighlighter_HTML()
: TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 )
{ {
TQFont f( qApp->font() ); TQFont f( tqApp->font() );
addFormat(Standard, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Text))); addFormat(Standard, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Text)));
addFormat(Keyword, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Dark))); addFormat(Keyword, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Dark)));
addFormat(Attribute, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::Link))); addFormat(Attribute, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::Link)));
addFormat(AttribValue, new TQTextFormat(f, qApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited))); addFormat(AttribValue, new TQTextFormat(f, tqApp->palette().color(TQPalette::Active, TQColorGroup::LinkVisited)));
} }
SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML() SyntaxHighlighter_HTML::~SyntaxHighlighter_HTML()

@ -41,10 +41,10 @@ TQMap<TQString, ConfigStyle> Config::defaultStyles()
{ {
ConfigStyle s; ConfigStyle s;
TQMap<TQString, ConfigStyle> styles; TQMap<TQString, ConfigStyle> styles;
int normalSize = qApp->font().pointSize(); int normalSize = tqApp->font().pointSize();
TQString normalFamily = qApp->font().family(); TQString normalFamily = tqApp->font().family();
TQString commentFamily = "times"; TQString commentFamily = "times";
int normalWeight = qApp->font().weight(); int normalWeight = tqApp->font().weight();
s.font = TQFont( normalFamily, normalSize, normalWeight ); s.font = TQFont( normalFamily, normalSize, normalWeight );
s.color = TQt::black; s.color = TQt::black;

@ -112,7 +112,7 @@ void AddressBook::fileSaveAs()
void AddressBook::fileExit() void AddressBook::fileExit()
{ {
qApp->exit(); tqApp->exit();
} }
void AddressBook::editFind() void AddressBook::editFind()

@ -35,7 +35,7 @@ void MulticlipForm::init()
lengthLCDNumber->setBackgroundColor( darkBlue ); lengthLCDNumber->setBackgroundColor( darkBlue );
currentLineEdit->setFocus(); currentLineEdit->setFocus();
cb = qApp->clipboard(); cb = tqApp->clipboard();
connect( cb, SIGNAL( dataChanged() ), SLOT( dataChanged() ) ); connect( cb, SIGNAL( dataChanged() ), SLOT( dataChanged() ) );
if ( cb->supportsSelection() ) if ( cb->supportsSelection() )
connect( cb, SIGNAL( selectionChanged() ), SLOT( selectionChanged() ) ); connect( cb, SIGNAL( selectionChanged() ), SLOT( selectionChanged() ) );

@ -17,7 +17,7 @@ void EditorForm::init()
void EditorForm::fileExit() void EditorForm::fileExit()
{ {
if ( saveAndContinue( "Exit" ) ) if ( saveAndContinue( "Exit" ) )
qApp->exit(); tqApp->exit();
} }
void EditorForm::fileNew() void EditorForm::fileNew()

@ -134,7 +134,7 @@ static TQMap<int, TQMap<TQString, int > > *wordMap = 0;
SyntaxHighlighter_CPP::SyntaxHighlighter_CPP() SyntaxHighlighter_CPP::SyntaxHighlighter_CPP()
: TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 )
{ {
TQFont f( qApp->font() ); TQFont f( tqApp->font() );
addFormat( Standard, new TQTextFormat( f, TQt::black ) ); addFormat( Standard, new TQTextFormat( f, TQt::black ) );
addFormat( Number, new TQTextFormat( f, TQt::darkBlue ) ); addFormat( Number, new TQTextFormat( f, TQt::darkBlue ) );

@ -2192,7 +2192,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
yyOut = TQString::null; yyOut = TQString::null;
widgetNo++; widgetNo++;
qApp->processEvents(); tqApp->processEvents();
if ( fremskritt.wasCancelled() ) if ( fremskritt.wasCancelled() )
break; break;
fremskritt.setProgress( widgetNo ); fremskritt.setProgress( widgetNo );

@ -106,12 +106,12 @@ void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *wi
templ == "TQDataView" || templ == "TQDataView" ||
templ == "TQDataBrowser" || templ == "TQDataBrowser" ||
templ == "TQDataTable" ) { templ == "TQDataTable" ) {
SqlFormWizard wizard( aIface, widget, qApp->mainWidget(), fw, 0, TRUE ); SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, TRUE );
wizard.exec(); wizard.exec();
} }
#endif #endif
if ( templ == "TQMainWindow" ) { if ( templ == "TQMainWindow" ) {
MainWindowWizardBase wizard( qApp->mainWidget(), 0, TRUE ); MainWindowWizardBase wizard( tqApp->mainWidget(), 0, TRUE );
wizard.setAppInterface( aIface, fw, widget ); wizard.setAppInterface( aIface, fw, widget );
wizard.exec(); wizard.exec();
} }

@ -51,7 +51,7 @@ static void init_colors()
return; return;
#if 0 // a calculated alternative for backColor1 #if 0 // a calculated alternative for backColor1
TQColorGroup myCg = qApp->palette().active(); TQColorGroup myCg = tqApp->palette().active();
int h1, s1, v1; int h1, s1, v1;
int h2, s2, v2; int h2, s2, v2;
myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 ); myCg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 );

@ -296,7 +296,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
bool failed = FALSE; bool failed = FALSE;
if ( !f.open( IO_ReadOnly ) ) if ( !f.open( IO_ReadOnly ) )
failed = TRUE; failed = TRUE;
if ( failed && qApp->type() == TQApplication::Tty ) { if ( failed && tqApp->type() == TQApplication::Tty ) {
// for TQSA: If we have no GUI, we have no form definition // for TQSA: If we have no GUI, we have no form definition
// files, but just the code. So try if only the code exists. // files, but just the code. So try if only the code exists.
f.setName( uiFile + ".qs" ); f.setName( uiFile + ".qs" );
@ -331,7 +331,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
widgetFactory->toplevel = 0; widgetFactory->toplevel = 0;
// If we have no GUI, we only want to load the code // If we have no GUI, we only want to load the code
if ( qApp->type() != TQApplication::Tty ) { if ( tqApp->type() != TQApplication::Tty ) {
TQIODevice::Offset start = dev->at(); TQIODevice::Offset start = dev->at();
Q_UINT32 magic; Q_UINT32 magic;
TQDataStream in( dev ); TQDataStream in( dev );
@ -2612,12 +2612,12 @@ void TQWidgetFactory::loadExtraSource()
TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment ) TQString TQWidgetFactory::translate( const TQString& sourceText, const TQString& comment )
{ {
return qApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(), return tqApp->translate( d->translationContext, sourceText.utf8(), comment.utf8(),
TQApplication::UnicodeUTF8 ); TQApplication::UnicodeUTF8 );
} }
TQString TQWidgetFactory::translate( const char *sourceText, const char *comment ) TQString TQWidgetFactory::translate( const char *sourceText, const char *comment )
{ {
return qApp->translate( d->translationContext, sourceText, comment, return tqApp->translate( d->translationContext, sourceText, comment,
TQApplication::UnicodeUTF8 ); TQApplication::UnicodeUTF8 );
} }

@ -253,7 +253,7 @@ QApplication::translate() function directly:
void same_global_function( LoginWidget *logwid ) void same_global_function( LoginWidget *logwid )
{ {
QLabel *label = new QLabel( QLabel *label = new QLabel(
qApp->translate("LoginWidget", "Password:"), tqApp->translate("LoginWidget", "Password:"),
logwid ); logwid );
} }
\endcode \endcode
@ -291,7 +291,7 @@ Example of QT_TRANSLATE_NOOP():
QString global_greeting( int greet_type ) QString global_greeting( int greet_type )
{ {
return qApp->translate( "FriendlyConversation", return tqApp->translate( "FriendlyConversation",
greeting_strings[greet_type] ); greeting_strings[greet_type] );
} }
\endcode \endcode
@ -597,7 +597,7 @@ The \c TQ_OBJECT macro defines \c tr(x) in \c ArrowPad like this
\index translate()!QApplication \index translate()!QApplication
\code \code
qApp->translate( "ArrowPad", x ) tqApp->translate( "ArrowPad", x )
\endcode \endcode
Knowing which class each source text appears in enables \e {Qt Knowing which class each source text appears in enables \e {Qt

@ -515,7 +515,7 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent,
this, SIGNAL(cutAvailable(bool)) ); this, SIGNAL(cutAvailable(bool)) );
connect( editorPage->translationMed, SIGNAL(copyAvailable(bool)), connect( editorPage->translationMed, SIGNAL(copyAvailable(bool)),
this, SIGNAL(copyAvailable(bool)) ); this, SIGNAL(copyAvailable(bool)) );
connect( qApp->clipboard(), SIGNAL(dataChanged()), connect( tqApp->clipboard(), SIGNAL(dataChanged()),
this, SLOT(updateCanPaste()) ); this, SLOT(updateCanPaste()) );
connect( phraseLv, SIGNAL(doubleClicked(TQListViewItem *)), connect( phraseLv, SIGNAL(doubleClicked(TQListViewItem *)),
this, SLOT(insertPhraseInTranslation(TQListViewItem *)) ); this, SLOT(insertPhraseInTranslation(TQListViewItem *)) );
@ -814,7 +814,7 @@ void MessageEditor::updateCanPaste()
{ {
bool oldCanPaste = canPaste; bool oldCanPaste = canPaste;
canPaste = ( !editorPage->translationMed->isReadOnly() && canPaste = ( !editorPage->translationMed->isReadOnly() &&
!qApp->clipboard()->text().isNull() ); !tqApp->clipboard()->text().isNull() );
if ( canPaste != oldCanPaste ) if ( canPaste != oldCanPaste )
emit pasteAvailable( canPaste ); emit pasteAvailable( canPaste );
} }

@ -130,7 +130,7 @@ bool QphHandler::fatalError( const TQXmlParseException& exception )
msg.sprintf( "Parse error at line %d, column %d (%s).", msg.sprintf( "Parse error at line %d, column %d (%s).",
exception.lineNumber(), exception.columnNumber(), exception.lineNumber(), exception.columnNumber(),
exception.message().latin1() ); exception.message().latin1() );
TQMessageBox::information( qApp->mainWidget(), TQMessageBox::information( tqApp->mainWidget(),
TQObject::tr("TQt Linguist"), msg ); TQObject::tr("TQt Linguist"), msg );
} }
return FALSE; return FALSE;

@ -329,7 +329,7 @@ TrWindow::TrWindow()
"are marked with a warning.") ); "are marked with a warning.") );
showNewCurrent( 0 ); showNewCurrent( 0 );
TQSize as( qApp->desktop()->size() ); TQSize as( tqApp->desktop()->size() );
as -= TQSize( 30, 30 ); as -= TQSize( 30, 30 );
resize( TQSize( 1000, 800 ).boundedTo( as ) ); resize( TQSize( 1000, 800 ).boundedTo( as ) );
readConfig(); readConfig();
@ -349,7 +349,7 @@ void TrWindow::openFile( const TQString& name )
{ {
if ( !name.isEmpty() ) { if ( !name.isEmpty() ) {
statusBar()->message( tr("Loading...") ); statusBar()->message( tr("Loading...") );
qApp->processEvents(); tqApp->processEvents();
tor.clear(); tor.clear();
if ( tor.load(name) ) { if ( tor.load(name) ) {
slv->clear(); slv->clear();
@ -376,7 +376,7 @@ void TrWindow::openFile( const TQString& name )
srcChars = 0; srcChars = 0;
srcCharsSpc = 0; srcCharsSpc = 0;
for ( it = all.begin(); it != all.end(); ++it ) { for ( it = all.begin(); it != all.end(); ++it ) {
qApp->processEvents(); tqApp->processEvents();
ContextLVI *c = contexts.find( TQString((*it).context()) ); ContextLVI *c = contexts.find( TQString((*it).context()) );
if ( c == 0 ) { if ( c == 0 ) {
c = new ContextLVI( lv, tor.toUnicode((*it).context(), c = new ContextLVI( lv, tor.toUnicode((*it).context(),
@ -682,7 +682,7 @@ void TrWindow::findAgain()
slv->setUpdatesEnabled( TRUE ); slv->setUpdatesEnabled( TRUE );
slv->triggerUpdate(); slv->triggerUpdate();
qApp->beep(); tqApp->beep();
TQMessageBox::warning( this, tr("TQt Linguist"), TQMessageBox::warning( this, tr("TQt Linguist"),
TQString( tr("Cannot find the string '%1'.") ).arg(findText) ); TQString( tr("Cannot find the string '%1'.") ).arg(findText) );
foundItem = 0; foundItem = 0;
@ -1038,7 +1038,7 @@ void TrWindow::updateFinished( bool finished )
danger(m->sourceText(), m->translation(), danger(m->sourceText(), m->translation(),
!oldDanger) ); !oldDanger) );
if ( !oldDanger && m->danger() ) if ( !oldDanger && m->danger() )
qApp->beep(); tqApp->beep();
tor.insert( m->message() ); tor.insert( m->message() );
if ( !dirty ) { if ( !dirty ) {
dirty = TRUE; dirty = TRUE;
@ -1066,7 +1066,7 @@ void TrWindow::doneAndNext()
dirty = TRUE; dirty = TRUE;
updateCaption(); updateCaption();
} }
qApp->beep(); tqApp->beep();
} }
updateStatistics(); updateStatistics();
} }
@ -1090,7 +1090,7 @@ void TrWindow::toggleFinished( TQListViewItem *item, const TQPoint& /* p */,
m->setDanger( danger(m->sourceText(), m->translation(), m->setDanger( danger(m->sourceText(), m->translation(),
!oldDanger) ); !oldDanger) );
if ( !oldDanger && m->danger() ) if ( !oldDanger && m->danger() )
qApp->beep(); tqApp->beep();
tor.insert( m->message() ); tor.insert( m->message() );
if ( !dirty ) { if ( !dirty ) {
dirty = TRUE; dirty = TRUE;
@ -1115,7 +1115,7 @@ void TrWindow::nextUnfinished()
if( (cItem == 0) && !(cItem = lv->firstChild()) ) { if( (cItem == 0) && !(cItem = lv->firstChild()) ) {
statusBar()->message( tr("No phrase to translate."), statusBar()->message( tr("No phrase to translate."),
MessageMS ); MessageMS );
qApp->beep(); tqApp->beep();
return; return;
} else { } else {
showNewScope( cItem ); showNewScope( cItem );
@ -1130,7 +1130,7 @@ void TrWindow::nextUnfinished()
} else { } else {
statusBar()->message( tr("No phrase to translate."), statusBar()->message( tr("No phrase to translate."),
MessageMS ); MessageMS );
qApp->beep(); tqApp->beep();
return; return;
} }
} }
@ -1182,7 +1182,7 @@ void TrWindow::nextUnfinished()
// If no Unfinished message is left, the user has finished the job. We // If no Unfinished message is left, the user has finished the job. We
// congratulate on a job well done with this ringing bell. // congratulate on a job well done with this ringing bell.
statusBar()->message( tr("No untranslated phrases left."), MessageMS ); statusBar()->message( tr("No untranslated phrases left."), MessageMS );
qApp->beep(); tqApp->beep();
} }
static TQListViewItem * lastChild( TQListView * view ) static TQListViewItem * lastChild( TQListView * view )
@ -1214,7 +1214,7 @@ void TrWindow::prevUnfinished()
if( (cItem == 0) && !(cItem = lv->firstChild()) ) { if( (cItem == 0) && !(cItem = lv->firstChild()) ) {
statusBar()->message( tr("No phrase to translate."), statusBar()->message( tr("No phrase to translate."),
MessageMS ); MessageMS );
qApp->beep(); tqApp->beep();
return; return;
} else { } else {
showNewScope( cItem ); showNewScope( cItem );
@ -1229,7 +1229,7 @@ void TrWindow::prevUnfinished()
} else { } else {
statusBar()->message( tr("No phrase to translate."), statusBar()->message( tr("No phrase to translate."),
MessageMS ); MessageMS );
qApp->beep(); tqApp->beep();
return; return;
} }
} }
@ -1275,7 +1275,7 @@ void TrWindow::prevUnfinished()
} while ( q != 0 ); } while ( q != 0 );
} }
statusBar()->message( tr("No untranslated phrases left."), MessageMS ); statusBar()->message( tr("No untranslated phrases left."), MessageMS );
qApp->beep(); tqApp->beep();
} }
void TrWindow::prev() void TrWindow::prev()

@ -192,10 +192,10 @@ bool TsHandler::fatalError( const TQXmlParseException& exception )
msg.sprintf( "Parse error at line %d, column %d (%s).", msg.sprintf( "Parse error at line %d, column %d (%s).",
exception.lineNumber(), exception.columnNumber(), exception.lineNumber(), exception.columnNumber(),
exception.message().latin1() ); exception.message().latin1() );
if ( qApp == 0 ) if ( tqApp == 0 )
fprintf( stderr, "XML error: %s\n", msg.latin1() ); fprintf( stderr, "XML error: %s\n", msg.latin1() );
else else
TQMessageBox::information( qApp->mainWidget(), TQMessageBox::information( tqApp->mainWidget(),
TQObject::tr("TQt Linguist"), msg ); TQObject::tr("TQt Linguist"), msg );
} }
return FALSE; return FALSE;

@ -19,7 +19,7 @@ MainWindow::MainWindow( TQWidget *parent, const char *name )
setCentralWidget( ap ); setCentralWidget( ap );
TQPopupMenu *file = new TQPopupMenu( this ); TQPopupMenu *file = new TQPopupMenu( this );
file->insertItem( tr("E&xit"), qApp, SLOT(quit()), file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
tr("Ctrl+Q", "Quit") ); tr("Ctrl+Q", "Quit") );
menuBar()->insertItem( tr("&File"), file ); menuBar()->insertItem( tr("&File"), file );
menuBar()->setSeparator( TQMenuBar::InWindowsStyle ); menuBar()->setSeparator( TQMenuBar::InWindowsStyle );

@ -22,7 +22,7 @@ MainWindow::MainWindow( TQWidget *parent, const char *name )
setCentralWidget( pp ); setCentralWidget( pp );
TQPopupMenu *file = new TQPopupMenu( this ); TQPopupMenu *file = new TQPopupMenu( this );
file->insertItem( tr("E&xit"), qApp, SLOT(quit()), file->insertItem( tr("E&xit"), tqApp, SLOT(quit()),
tr("Ctrl+Q", "Quit") ); tr("Ctrl+Q", "Quit") );
TQPopupMenu *help = new TQPopupMenu( this ); TQPopupMenu *help = new TQPopupMenu( this );
help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 ); help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 );

@ -198,7 +198,7 @@ public:
TQListViewItem* c = view->firstChild(); TQListViewItem* c = view->firstChild();
while ( c ) { while ( c ) {
renderAndSave(c); renderAndSave(c);
qApp->processEvents(); tqApp->processEvents();
c = c->nextSibling(); c = c->nextSibling();
} }
} }

@ -306,7 +306,7 @@ Main::Main()
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Test all", this, SLOT(testAll()), CTRL+Key_T ); file->insertItem( "&Test all", this, SLOT(testAll()), CTRL+Key_T );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q ); file->insertItem( "E&xit", tqApp, SLOT(quit()), CTRL+Key_Q );
menuBar()->insertItem( "&File",file ); menuBar()->insertItem( "&File",file );

@ -67,7 +67,7 @@ void ColorButton::setColor(const TQColor &c)
void ColorButton::changeColor() void ColorButton::changeColor()
{ {
TQColor c = TQColorDialog::getColor(col, qApp->activeWindow()); TQColor c = TQColorDialog::getColor(col, tqApp->activeWindow());
if (c.isValid()) { if (c.isValid()) {
setColor(c); setColor(c);

@ -572,7 +572,7 @@ void MainWindow::fileSave()
void MainWindow::fileExit() void MainWindow::fileExit()
{ {
qApp->closeAllWindows(); tqApp->closeAllWindows();
} }
@ -1123,7 +1123,7 @@ void MainWindow::closeEvent(TQCloseEvent *e)
tr("Save changes to settings?"), tr("Save changes to settings?"),
tr("&Yes"), tr("&No"), tr("&Cancel"), 0, 2)) { tr("&Yes"), tr("&No"), tr("&Cancel"), 0, 2)) {
case 0: // save case 0: // save
qApp->processEvents(); tqApp->processEvents();
fileSave(); fileSave();
// fall through intended // fall through intended

@ -371,7 +371,7 @@ void TQAnimationWriter::appendFrame(const TQImage& frm, const TQPoint& offset)
if ( i == alignx ) { if ( i == alignx ) {
// All the same // All the same
for (i=0; i<alignx; i++) { for (i=0; i<alignx; i++) {
ld[x+i] = qRgba(0,0,0,0); ld[x+i] = tqRgba(0,0,0,0);
} }
} else { } else {
// Some different // Some different
@ -385,7 +385,7 @@ void TQAnimationWriter::appendFrame(const TQImage& frm, const TQPoint& offset)
if ( li[x] != lp[x] ) if ( li[x] != lp[x] )
ld[x] = 0xff000000 | li[x]; ld[x] = 0xff000000 | li[x];
else else
ld[x] = qRgba(0,0,0,0); ld[x] = tqRgba(0,0,0,0);
} }
} }
} }

@ -135,7 +135,7 @@ void TQVFb::createMenu(TQMenuData *menu)
file->insertItem( "&Save image...", this, SLOT(saveImage()), ALT+CTRL+Key_S ); file->insertItem( "&Save image...", this, SLOT(saveImage()), ALT+CTRL+Key_S );
file->insertItem( "&Animation...", this, SLOT(toggleAnimation()), ALT+CTRL+Key_A ); file->insertItem( "&Animation...", this, SLOT(toggleAnimation()), ALT+CTRL+Key_A );
file->insertSeparator(); file->insertSeparator();
file->insertItem( "&Quit", qApp, SLOT(quit()) ); file->insertItem( "&Quit", tqApp, SLOT(quit()) );
menu->insertItem( "&File", file ); menu->insertItem( "&File", file );

@ -214,7 +214,7 @@ void TQVFbView::setGamma(double gr, double gg, double gb)
if ( r > 255 ) r = 255; if ( r > 255 ) r = 255;
if ( g > 255 ) g = 255; if ( g > 255 ) g = 255;
if ( b > 255 ) b = 255; if ( b > 255 ) b = 255;
gammatable[i] = qRgb(r,g,b); gammatable[i] = tqRgb(r,g,b);
//qDebug("%d: %d,%d,%d",i,r,g,b); //qDebug("%d: %d,%d,%d",i,r,g,b);
} }
@ -225,9 +225,9 @@ void TQVFbView::getGamma(int i, TQRgb& rgb)
{ {
if ( i > 255 ) i = 255; if ( i > 255 ) i = 255;
if ( i < 0 ) i = 0; if ( i < 0 ) i = 0;
rgb = qRgb(qRed(gammatable[i*rmax/255]), rgb = tqRgb(tqRed(gammatable[i*rmax/255]),
qGreen(gammatable[i*rmax/255]), tqGreen(gammatable[i*rmax/255]),
qBlue(gammatable[i*rmax/255])); tqBlue(gammatable[i*rmax/255]));
} }
int TQVFbView::displayId() const int TQVFbView::displayId() const
@ -257,7 +257,7 @@ void TQVFbView::setZoom( double z )
setDirty(TQRect(0,0,hdr->width,hdr->height)); setDirty(TQRect(0,0,hdr->width,hdr->height));
resizeContents( int(hdr->width*z), int(hdr->height*z) ); resizeContents( int(hdr->width*z), int(hdr->height*z) );
updateGeometry(); updateGeometry();
qApp->sendPostedEvents(); tqApp->sendPostedEvents();
topLevelWidget()->adjustSize(); topLevelWidget()->adjustSize();
drawScreen(); drawScreen();
} }
@ -398,10 +398,10 @@ TQImage TQVFbView::getBuffer( const TQRect &r, int &leading ) const
ushort s = *sptr++; ushort s = *sptr++;
#ifdef QT_QWS_REVERSE_BYTE_ENDIANNESS #ifdef QT_QWS_REVERSE_BYTE_ENDIANNESS
ushort s2 = *sptr++; ushort s2 = *sptr++;
*dptr++ = qRgb(qRed(gammatable[(s2>>rsh)&rmax]),qGreen(gammatable[(s2>>gsh)&gmax]),qBlue(gammatable[(s2>>bsh)&bmax])); *dptr++ = tqRgb(tqRed(gammatable[(s2>>rsh)&rmax]),tqGreen(gammatable[(s2>>gsh)&gmax]),tqBlue(gammatable[(s2>>bsh)&bmax]));
#endif #endif
*dptr++ = qRgb(qRed(gammatable[(s>>rsh)&rmax]),qGreen(gammatable[(s>>gsh)&gmax]),qBlue(gammatable[(s>>bsh)&bmax])); *dptr++ = tqRgb(tqRed(gammatable[(s>>rsh)&rmax]),tqGreen(gammatable[(s>>gsh)&gmax]),tqBlue(gammatable[(s>>bsh)&bmax]));
//*dptr++ = qRgb(((s>>rsh)&rmax)*255/rmax,((s>>gsh)&gmax)*255/gmax,((s>>bsh)&bmax)*255/bmax); //*dptr++ = tqRgb(((s>>rsh)&rmax)*255/rmax,((s>>gsh)&gmax)*255/gmax,((s>>bsh)&bmax)*255/bmax);
} }
} }
leading = 0; leading = 0;

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

@ -22,7 +22,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

@ -24,7 +24,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );
@ -78,7 +78,7 @@ GameBoard::GameBoard( TQWidget *parent, const char *name )
accel->connectItem( accel->insertItem( Key_Return ), accel->connectItem( accel->insertItem( Key_Return ),
this, SLOT(fire()) ); this, SLOT(fire()) );
accel->connectItem( accel->insertItem( CTRL+Key_Q ), accel->connectItem( accel->insertItem( CTRL+Key_Q ),
qApp, SLOT(quit()) ); tqApp, SLOT(quit()) );
TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
grid->addWidget( quit, 0, 0 ); grid->addWidget( quit, 0, 0 );

@ -26,7 +26,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
quit->setGeometry( 62, 40, 75, 30 ); quit->setGeometry( 62, 40, 75, 30 );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
} }

@ -25,7 +25,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" ); TQLCDNumber *lcd = new TQLCDNumber( 2, this, "lcd" );

@ -41,7 +41,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
TQGrid *grid = new TQGrid( 4, this ); TQGrid *grid = new TQGrid( 4, this );

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
TQGrid *grid = new TQGrid( 4, this ); TQGrid *grid = new TQGrid( 4, this );

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

@ -27,7 +27,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" );
quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); quit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); connect( quit, SIGNAL(clicked()), tqApp, SLOT(quit()) );
LCDRange *angle = new LCDRange( this, "angle" ); LCDRange *angle = new LCDRange( this, "angle" );
angle->setRange( 5, 70 ); angle->setRange( 5, 70 );

Loading…
Cancel
Save