Rename tqt3 color functions

pull/1/head
Timothy Pearson 14 years ago
parent 6d5f6f30f0
commit ef5a04df56

@ -504,7 +504,7 @@ EOF
public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle) public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle)
public static native TQCursor whatsThisCursor(); // arrow with a question mark public static native TQCursor whatsThisCursor(); // arrow with a question mark
public static native TQApplication qApp(); public static native TQApplication tqApp();
public static native void qDebug(String message); public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) { public static void qDebug(String pattern, Object[] arguments) {
@ -814,7 +814,7 @@ JNIEXPORT jobject JNICALL
Java_org_kde_qt_Qt_qApp(JNIEnv* env, jclass cls) Java_org_kde_qt_Qt_qApp(JNIEnv* env, jclass cls)
{ {
(void) cls; (void) cls;
return (jobject) QtSupport::objectForQtKey(env, qApp, "org.kde.qt.TQApplication"); return (jobject) QtSupport::objectForQtKey(env, tqApp, "org.kde.qt.TQApplication");
} }
JNIEXPORT void JNICALL JNIEXPORT void JNICALL

@ -299,7 +299,7 @@ EOF
public static native TQCursor pointingHandCursor(); // pointing hand public static native TQCursor pointingHandCursor(); // pointing hand
public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle) public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle)
*/ */
// public static native TQApplication qApp(); // public static native TQApplication tqApp();
public static native void qDebug(String message); public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) { public static void qDebug(String pattern, Object[] arguments) {

@ -395,7 +395,7 @@ EOF
public const int IO_TimeOutError = 7; public const int IO_TimeOutError = 7;
public const int IO_UnspecifiedError= 8; public const int IO_UnspecifiedError= 8;
public static TQApplication qApp = null; public static TQApplication tqApp = null;
public static string SIGNAL(string signal) { public static string SIGNAL(string signal) {
return "2"+ signal; return "2"+ signal;

@ -677,7 +677,7 @@ public class KApplication extends TQApplication implements KInstanceInterface {
public static native void addCmdLineOptions(); public static native void addCmdLineOptions();
/** /**
Returns the current application object. Returns the current application object.
This is similar to the global TQApplication pointer qApp. It This is similar to the global TQApplication pointer tqApp. It
allows access to the single global KApplication object, since allows access to the single global KApplication object, since
more than one cannot be created in the same application. It more than one cannot be created in the same application. It
saves you the trouble of having to pass the pointer explicitly saves you the trouble of having to pass the pointer explicitly

@ -34,7 +34,7 @@ import org.kde.qt.TQResizeEvent;
to define your main window class and to define your main window class and
<pre> <pre>
MyMainWindow mainframe; MyMainWindow mainframe;
qApp.setMainWidget(&mainframe); tqApp.setMainWidget(&mainframe);
mainframe.addWindow(view1); // put it under MDI control mainframe.addWindow(view1); // put it under MDI control
mainframe.addWindow(view2); mainframe.addWindow(view2);
</pre> </pre>

@ -140,7 +140,7 @@ KJS::Value StdDirsImp::call( KJS::ExecState *exec, KJS::Object &/*self*/, const
case StdDirsImp::homeDirPath: case StdDirsImp::homeDirPath:
return KJS::String(TQDir::homeDirPath()); return KJS::String(TQDir::homeDirPath());
case StdDirsImp::applicationDirPath: case StdDirsImp::applicationDirPath:
return KJS::String(qApp->applicationDirPath()); return KJS::String(tqApp->applicationDirPath());
default: default:
kdWarning() << "StdDirsImp has no method " << id << endl; kdWarning() << "StdDirsImp has no method " << id << endl;
} }

@ -69,7 +69,7 @@ void KSimpleProcess::enter_loop()
TQWidget dummy(0,0,WType_Dialog | WShowModal); TQWidget dummy(0,0,WType_Dialog | WShowModal);
dummy.setFocusPolicy( TQWidget::NoFocus ); dummy.setFocusPolicy( TQWidget::NoFocus );
qt_enter_modal(&dummy); qt_enter_modal(&dummy);
qApp->enter_loop(); tqApp->enter_loop();
qt_leave_modal(&dummy); qt_leave_modal(&dummy);
} }
@ -77,7 +77,7 @@ void KSimpleProcess::slotProcessExited()
{ {
while( m_proc->canReadLineStdout() ) while( m_proc->canReadLineStdout() )
m_currBuffer += m_proc->readLineStdout() + '\n'; m_currBuffer += m_proc->readLineStdout() + '\n';
qApp->exit_loop(); tqApp->exit_loop();
} }
void KSimpleProcess::slotReceivedStdout() void KSimpleProcess::slotReceivedStdout()

@ -560,9 +560,9 @@ inline const T& kClamp( const T& x, const T& low, const T& high )
} }
static inline unsigned int intensityValue( unsigned int color ) { static inline unsigned int intensityValue( unsigned int color ) {
return (unsigned int)( (0.299*qRed( color ) + return (unsigned int)( (0.299*tqRed( color ) +
0.587*qGreen( color ) + 0.587*tqGreen( color ) +
0.1140000000000001*qBlue( color ) ) ); 0.1140000000000001*tqBlue( color ) ) );
} }
struct BumpmapParams { struct BumpmapParams {
@ -643,7 +643,7 @@ static void bumpmap_convert_row( uint *row,
unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5); unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5);
*p++ = lut[(unsigned int) ( waterlevel + *p++ = lut[(unsigned int) ( waterlevel +
( ( idx - ( ( idx -
waterlevel) * qBlue( *row )) / 255.0 )]; waterlevel) * tqBlue( *row )) / 255.0 )];
} else { } else {
unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5); unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5);
*p++ = lut[idx]; *p++ = lut[idx];
@ -730,19 +730,19 @@ static void bumpmap_row( uint *src,
* also change * also change
*/ */
if (compensate) { if (compensate) {
int red = (int)((qRed( *src ) * shade) / (params->compensation * 255)); int red = (int)((tqRed( *src ) * shade) / (params->compensation * 255));
int green = (int)((qGreen( *src ) * shade) / (params->compensation * 255)); int green = (int)((tqGreen( *src ) * shade) / (params->compensation * 255));
int blue = (int)((qBlue( *src ) * shade) / (params->compensation * 255)); int blue = (int)((tqBlue( *src ) * shade) / (params->compensation * 255));
int alpha = (int)((qAlpha( *src ) * shade) / (params->compensation * 255)); int alpha = (int)((tqAlpha( *src ) * shade) / (params->compensation * 255));
++src; ++src;
*dest++ = qRgba( red, green, blue, alpha ); *dest++ = tqRgba( red, green, blue, alpha );
} else { } else {
int red = qRed( *src ) * shade / 255; int red = tqRed( *src ) * shade / 255;
int green = qGreen( *src ) * shade / 255; int green = tqGreen( *src ) * shade / 255;
int blue = qBlue( *src ) * shade / 255; int blue = tqBlue( *src ) * shade / 255;
int alpha = qAlpha( *src ) * shade / 255; int alpha = tqAlpha( *src ) * shade / 255;
++src; ++src;
*dest++ = qRgba( red, green, blue, alpha ); *dest++ = tqRgba( red, green, blue, alpha );
} }
/* Next pixel */ /* Next pixel */

@ -244,7 +244,7 @@ void JSSlotUtils::implantColor( KJS::ExecState *exec, TQUObject *uo, const KJS::
pix = pix << 8; pix = pix << 8;
pix = pix | a; pix = pix | a;
*color = TQColor( qRgba(r,g,b,a), pix ); *color = TQColor( tqRgba(r,g,b,a), pix );
} }
} }

@ -39,7 +39,7 @@ public void setupMenuBar()
file.insertItem( new TQIconSet(new TQPixmap( "fileprint.xpm" )), "Print...", this, SLOT( "filePrint()" ), new TQKeySequence(CTRL + Key_P) ); file.insertItem( new TQIconSet(new TQPixmap( "fileprint.xpm" )), "Print...", this, SLOT( "filePrint()" ), new TQKeySequence(CTRL + Key_P) );
file.insertSeparator(); file.insertSeparator();
file.insertItem( "Close", this, SLOT( "closeWindow()" ), new TQKeySequence(CTRL + Key_W) ); file.insertItem( "Close", this, SLOT( "closeWindow()" ), new TQKeySequence(CTRL + Key_W) );
file.insertItem( "Quit", qApp(), SLOT( "quit()" ), new TQKeySequence(CTRL + Key_Q) ); file.insertItem( "Quit", tqApp(), SLOT( "quit()" ), new TQKeySequence(CTRL + Key_Q) );
} }
public void setupFileTools() public void setupFileTools()

@ -125,7 +125,7 @@ public class ApplicationWindow extends TQMainWindow {
connect(fileCloseAction, SIGNAL("activated()"), this, SLOT("close()")); connect(fileCloseAction, SIGNAL("activated()"), this, SLOT("close()"));
fileQuitAction = new TQAction("Quit", "&Quit", new TQKeySequence(CTRL+Key_Q), this, "quit", false); fileQuitAction = new TQAction("Quit", "&Quit", new TQKeySequence(CTRL+Key_Q), this, "quit", false);
connect(fileQuitAction, SIGNAL("activated()"), qApp(), SLOT("closeAllWindows()")); connect(fileQuitAction, SIGNAL("activated()"), tqApp(), SLOT("closeAllWindows()"));
// populate a tool bar with some actions // populate a tool bar with some actions

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

@ -30,7 +30,7 @@ ExampleWidget( TQWidget parent, String 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.

@ -159,7 +159,7 @@ ApplicationWindow()
file.setWhatsThis( id, filePrintText ); file.setWhatsThis( id, filePrintText );
file.insertSeparator(); file.insertSeparator();
file.insertItem( "&Close", this, SLOT("closeWindow()"), new TQKeySequence(CTRL+Key_W) ); file.insertItem( "&Close", this, SLOT("closeWindow()"), new TQKeySequence(CTRL+Key_W) );
file.insertItem( "&Quit", qApp(), SLOT(" closeAllWindows()"), new TQKeySequence(CTRL+Key_Q) ); file.insertItem( "&Quit", tqApp(), SLOT(" closeAllWindows()"), new TQKeySequence(CTRL+Key_Q) );
windowsMenu = new TQPopupMenu( this ); windowsMenu = new TQPopupMenu( this );
windowsMenu.setCheckable( true ); windowsMenu.setCheckable( true );

@ -149,7 +149,7 @@ MenuExample( TQWidget parent, String 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()"), new TQKeySequence(CTRL+Key_Q) ); file.insertItem( "E&xit", tqApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) );
TQPopupMenu edit = new TQPopupMenu( this ); TQPopupMenu edit = new TQPopupMenu( this );
int undoID = edit.insertItem( "&Undo", this, SLOT("undo()") ); int undoID = edit.insertItem( "&Undo", this, SLOT("undo()") );

@ -91,7 +91,7 @@ MagWidget( TQWidget parent, String name )
10+multiSaveButton.fontMetrics().width("MultiSave"), 20 ); 10+multiSaveButton.fontMetrics().width("MultiSave"), 20 );
quitButton = new TQPushButton( this ); quitButton = new TQPushButton( this );
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 );
@ -296,10 +296,10 @@ protected void mouseMoveEvent( TQMouseEvent e )
if ( image.valid(x,y) ) if ( image.valid(x,y) )
{ {
int px = image.pixel(x,y); int px = image.pixel(x,y);
pixelinfo= " " + qRed(px) + "," + qGreen(px) + "," + qBlue(px) + " "; pixelinfo= " " + tqRed(px) + "," + tqGreen(px) + "," + tqBlue(px) + " ";
pixelinfo += "#" + Integer.toHexString(qRed(px)) pixelinfo += "#" + Integer.toHexString(tqRed(px))
+ Integer.toHexString(qGreen(px)) + Integer.toHexString(tqGreen(px))
+ Integer.toHexString(qBlue(px)) + " "; + Integer.toHexString(tqBlue(px)) + " ";
} }
String label = "x=" + (x+grabx) + ", y=" + (y+graby) + " " + pixelinfo; String label = "x=" + (x+grabx) + ", y=" + (y+graby) + " " + pixelinfo;
rgb.setText( label ); rgb.setText( label );

@ -59,7 +59,7 @@ Editor( TQWidget parent , String name )
file.insertItem( "&Print...", this, SLOT("print()"), new TQKeySequence(ALT+Key_P) ); file.insertItem( "&Print...", this, SLOT("print()"), new TQKeySequence(ALT+Key_P) );
file.insertSeparator(); file.insertSeparator();
file.insertItem( "&Close", this, SLOT("close()"),new TQKeySequence(ALT+Key_W) ); file.insertItem( "&Close", this, SLOT("close()"),new TQKeySequence(ALT+Key_W) );
file.insertItem( "&Quit", qApp(), SLOT("closeAllWindows()"), new TQKeySequence(ALT+Key_Q) ); file.insertItem( "&Quit", tqApp(), SLOT("closeAllWindows()"), new TQKeySequence(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)") );
@ -128,8 +128,8 @@ void rebuildCodecList()
void newDoc() void 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 );

@ -108,7 +108,7 @@ MyRichText( TQWidget parent, String 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()") );

@ -29,7 +29,7 @@ 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 );

@ -57,7 +57,7 @@ Canvas( TQWidget parent, String name )
pen = new TQPen( Qt.red(), 3 ); pen = new TQPen( Qt.red(), 3 );
polyline = new TQPointArray(3); polyline = new TQPointArray(3);
if ((qApp().args().length > 0) && !buffer.load(qApp().args()[0])) if ((tqApp().args().length > 0) && !buffer.load(tqApp().args()[0]))
buffer.fill( colorGroup().base() ); buffer.fill( colorGroup().base() );
setBackgroundMode( TQWidget.PaletteBase ); setBackgroundMode( TQWidget.PaletteBase );
setCursor( Qt.crossCursor() ); setCursor( Qt.crossCursor() );

@ -83,7 +83,7 @@ ImageViewer( TQWidget parent, String 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()"), new TQKeySequence(CTRL+Key_Q) ); file.insertItem( "E&xit", tqApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) );
edit = new TQPopupMenu( menubar ); edit = new TQPopupMenu( menubar );
menubar.insertItem( "&Edit", edit ); menubar.insertItem( "&Edit", edit );

@ -57,7 +57,7 @@ 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);
} }

@ -27,7 +27,7 @@ TabDialog( TQWidget parent, String name, String _filename )
setupTab2(); setupTab2();
setupTab3(); setupTab3();
connect( this, SIGNAL(" applyButtonPressed()"), qApp(), SLOT(" quit()") ); connect( this, SIGNAL(" applyButtonPressed()"), tqApp(), SLOT(" quit()") );
} }
void setupTab1() void setupTab1()

@ -48,11 +48,11 @@ TextEdit( TQWidget parent, String name )
this, SLOT(" editorChanged( TQWidget )") ); this, SLOT(" editorChanged( TQWidget )") );
setCentralWidget( tabWidget ); setCentralWidget( tabWidget );
if ( qApp().args().length == 0 ) { if ( tqApp().args().length == 0 ) {
load( "example.html" ); load( "example.html" );
} else { } else {
for ( int i = 0; i < qApp().args().length; ++i ) for ( int i = 0; i < tqApp().args().length; ++i )
load( qApp().args()[ i ] ); load( tqApp().args()[ i ] );
} }
} }
@ -332,7 +332,7 @@ void fileClose()
void fileExit() void fileExit()
{ {
qApp().quit(); tqApp().quit();
} }
void editUndo() void editUndo()

@ -31,7 +31,7 @@ public MyWidgetView( TQWidget parent, String name )
ArrayList styles = TQStyleFactory.keys(); ArrayList styles = TQStyleFactory.keys();
s = (++s)%styles.size(); s = (++s)%styles.size();
qApp().setStyle( (String) styles.get(s) ); tqApp().setStyle( (String) styles.get(s) );
super.button1Clicked(); super.button1Clicked();
} }

@ -243,7 +243,7 @@ WidgetView( TQWidget parent, String 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 );
@ -268,7 +268,7 @@ WidgetView( TQWidget parent, String name )
id = popup.insertItem( new TQIconSet(openIcon), "&Open", this, SLOT(" open()") ); id = popup.insertItem( new TQIconSet(openIcon), "&Open", this, SLOT(" open()") );
popup.insertSeparator(); popup.insertSeparator();
popup.insertItem( "&Quit", qApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) ); popup.insertItem( "&Quit", tqApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) );
textStylePopup = popup = new TQPopupMenu( this ); textStylePopup = popup = new TQPopupMenu( this );
@ -813,13 +813,13 @@ void mySelectionChanged( TQListViewItem item )
void showProperties() void showProperties()
{ {
if ( qApp().focusWidget() == null ) if ( tqApp().focusWidget() == null )
return; return;
String output = "Properties for class '" + qApp().focusWidget().className() + "'"; String output = "Properties for class '" + 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 ) ) {
TQMetaProperty p TQMetaProperty p
= qApp().focusWidget().metaObject().property( i, true ); = tqApp().focusWidget().metaObject().property( i, true );
String tmp = "\n " + (++i) + ": " + p.name() String tmp = "\n " + (++i) + ": " + p.name()
+ " (read-" + (p.writable() ? "write" : "only") + ", " + p.type() + ")"; + " (read-" + (p.writable() ? "write" : "only") + ", " + p.type() + ")";
output += tmp; output += tmp;

@ -31,7 +31,7 @@ Wizard( TQWidget parent, String name )
setupPage2(); setupPage2();
setupPage3(); setupPage3();
connect(this, SIGNAL("selected(String)"), this, SLOT("doShowPage(String)")); connect(this, SIGNAL("selected(String)"), this, SLOT("doShowPage(String)"));
connect(finishButton(), SIGNAL("clicked()"), qApp(), SLOT("quit()")); connect(finishButton(), SIGNAL("clicked()"), tqApp(), SLOT("quit()"));
key.setFocus(); key.setFocus();
} }

@ -926,14 +926,14 @@ public class Qt implements QtSupport {
*/ */
public static native TQDataStream op_write(TQDataStream arg1, TQPen arg2); public static native TQDataStream op_write(TQDataStream arg1, TQPen arg2);
public static native TQDataStream op_read(TQDataStream arg1, TQPen arg2); public static native TQDataStream op_read(TQDataStream arg1, TQPen arg2);
public static native int qRed(int rgb); public static native int tqRed(int rgb);
public static native int qGreen(int rgb); public static native int tqGreen(int rgb);
public static native int qBlue(int rgb); public static native int tqBlue(int rgb);
public static native int qAlpha(int rgb); public static native int tqAlpha(int rgb);
public static native int qRgb(int r, int g, int b); public static native int tqRgb(int r, int g, int b);
public static native int qRgba(int r, int g, int b, int a); public static native int tqRgba(int r, int g, int b, int a);
public static native int qGray(int r, int g, int b); public static native int tqGray(int r, int g, int b);
public static native int qGray(int rgb); public static native int tqGray(int rgb);
/** ************************************************** /** **************************************************
TQColor stream functions TQColor stream functions
************************************************** @short TQColor stream functions ************************************************** @short TQColor stream functions
@ -1083,7 +1083,7 @@ public class Qt implements QtSupport {
public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle) public static native TQCursor forbiddenCursor(); // forbidden cursor (slashed circle)
public static native TQCursor whatsThisCursor(); // arrow with a question mark public static native TQCursor whatsThisCursor(); // arrow with a question mark
public static native TQApplication qApp(); public static native TQApplication tqApp();
public static native void qDebug(String message); public static native void qDebug(String message);
public static void qDebug(String pattern, Object[] arguments) { public static void qDebug(String pattern, Object[] arguments) {

@ -996,7 +996,7 @@ Java_org_kde_qt_Qt_qAlpha(JNIEnv* env, jclass cls, jint rgb)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qAlpha((TQRgb) rgb); jint xret = (jint) ::tqAlpha((TQRgb) rgb);
return xret; return xret;
} }
@ -1014,7 +1014,7 @@ Java_org_kde_qt_Qt_qBlue(JNIEnv* env, jclass cls, jint rgb)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qBlue((TQRgb) rgb); jint xret = (jint) ::tqBlue((TQRgb) rgb);
return xret; return xret;
} }
@ -1439,7 +1439,7 @@ Java_org_kde_qt_Qt_qGray__I(JNIEnv* env, jclass cls, jint rgb)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qGray((TQRgb) rgb); jint xret = (jint) ::tqGray((TQRgb) rgb);
return xret; return xret;
} }
@ -1448,7 +1448,7 @@ Java_org_kde_qt_Qt_qGray__III(JNIEnv* env, jclass cls, jint r, jint g, jint b)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qGray((int) r, (int) g, (int) b); jint xret = (jint) ::tqGray((int) r, (int) g, (int) b);
return xret; return xret;
} }
@ -1457,7 +1457,7 @@ Java_org_kde_qt_Qt_qGreen(JNIEnv* env, jclass cls, jint rgb)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qGreen((TQRgb) rgb); jint xret = (jint) ::tqGreen((TQRgb) rgb);
return xret; return xret;
} }
@ -1604,7 +1604,7 @@ Java_org_kde_qt_Qt_qRed(JNIEnv* env, jclass cls, jint rgb)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qRed((TQRgb) rgb); jint xret = (jint) ::tqRed((TQRgb) rgb);
return xret; return xret;
} }
@ -1613,7 +1613,7 @@ Java_org_kde_qt_Qt_qRgb(JNIEnv* env, jclass cls, jint r, jint g, jint b)
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qRgb((int) r, (int) g, (int) b); jint xret = (jint) ::tqRgb((int) r, (int) g, (int) b);
return xret; return xret;
} }
@ -1622,7 +1622,7 @@ Java_org_kde_qt_Qt_qRgba(JNIEnv* env, jclass cls, jint r, jint g, jint b, jint a
{ {
(void) cls; (void) cls;
(void) env; (void) env;
jint xret = (jint) ::qRgba((int) r, (int) g, (int) b, (int) a); jint xret = (jint) ::tqRgba((int) r, (int) g, (int) b, (int) a);
return xret; return xret;
} }
@ -1990,7 +1990,7 @@ JNIEXPORT jobject JNICALL
Java_org_kde_qt_Qt_qApp(JNIEnv* env, jclass cls) Java_org_kde_qt_Qt_qApp(JNIEnv* env, jclass cls)
{ {
(void) cls; (void) cls;
return (jobject) QtSupport::objectForQtKey(env, qApp, "org.kde.qt.TQApplication"); return (jobject) QtSupport::objectForQtKey(env, tqApp, "org.kde.qt.TQApplication");
} }
JNIEXPORT void JNICALL JNIEXPORT void JNICALL

@ -170,7 +170,7 @@ public class ScribbleWindow extends TQWidget {
_filemenu.insertItem( "&Load", this, SLOT( "slotLoad()" ) ); _filemenu.insertItem( "&Load", this, SLOT( "slotLoad()" ) );
_filemenu.insertItem( "&Save", this, SLOT( "slotSave()" ) ); _filemenu.insertItem( "&Save", this, SLOT( "slotSave()" ) );
_filemenu.insertSeparator(); _filemenu.insertSeparator();
_filemenu.insertItem( "&Quit", qApp(), SLOT( "quit()" ) ); _filemenu.insertItem( "&Quit", tqApp(), SLOT( "quit()" ) );
_colormenu = new TQPopupMenu(); // create a color menu _colormenu = new TQPopupMenu(); // create a color menu
_colormenu.insertItem( "B&lack", COLOR_MENU_ID_BLACK); _colormenu.insertItem( "B&lack", COLOR_MENU_ID_BLACK);

@ -5,7 +5,7 @@ public class Tut10 extends TQWidget {
TQPushButton quit = new TQPushButton("&Quit", this, "quit"); TQPushButton quit = new TQPushButton("&Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -5,7 +5,7 @@ public class Tut11 extends TQWidget {
TQPushButton quit = new TQPushButton("&Quit", this, "quit"); TQPushButton quit = new TQPushButton("&Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -5,7 +5,7 @@ public class Tut12 extends TQWidget {
TQPushButton quit = new TQPushButton("&Quit", this, "quit"); TQPushButton quit = new TQPushButton("&Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -9,7 +9,7 @@ public class GameBoard extends TQWidget {
TQPushButton quit = new TQPushButton("&Quit", this, "quit"); TQPushButton quit = new TQPushButton("&Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -10,7 +10,7 @@ public class GameBoard extends TQWidget {
TQPushButton quit = new TQPushButton("&Quit", this, "quit"); TQPushButton quit = new TQPushButton("&Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);
@ -56,11 +56,11 @@ public class GameBoard extends TQWidget {
TQAccel accel = new TQAccel(this); TQAccel accel = new TQAccel(this);
accel.connectItem(accel.insertItem(new TQKeySequence(Key_Enter)), this, SLOT("fire()")); accel.connectItem(accel.insertItem(new TQKeySequence(Key_Enter)), this, SLOT("fire()"));
accel.connectItem(accel.insertItem(new TQKeySequence(Key_Return)), this, SLOT("fire()")); accel.connectItem(accel.insertItem(new TQKeySequence(Key_Return)), this, SLOT("fire()"));
accel.connectItem(accel.insertItem(new TQKeySequence(CTRL+Key_Q)), qApp(), SLOT("quit()")); accel.connectItem(accel.insertItem(new TQKeySequence(CTRL+Key_Q)), tqApp(), SLOT("quit()"));
/*** /***
accel.connectItem(accel.insertItem(Key_Enter), this, SLOT("fire()")); accel.connectItem(accel.insertItem(Key_Enter), this, SLOT("fire()"));
accel.connectItem(accel.insertItem(Key_Return), this, SLOT("fire()")); accel.connectItem(accel.insertItem(Key_Return), this, SLOT("fire()"));
accel.connectItem(accel.insertItem(CTRL+Key_Q), qApp(), SLOT("quit()")); accel.connectItem(accel.insertItem(CTRL+Key_Q), tqApp(), SLOT("quit()"));
***/ ***/
TQGridLayout grid = new TQGridLayout(this, 2, 2, 10, -1, null); TQGridLayout grid = new TQGridLayout(this, 2, 2, 10, -1, null);
grid.addWidget(quit, 0, 0); grid.addWidget(quit, 0, 0);

@ -9,7 +9,7 @@ public class Tut4 extends TQWidget {
quit.setGeometry(62, 40, 75, 30); quit.setGeometry(62, 40, 75, 30);
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(quit, SIGNAL("clicked()"), qApp(), SLOT("quit()")); connect(quit, SIGNAL("clicked()"), tqApp(), SLOT("quit()"));
} }
public static void main(String[] args) { public static void main(String[] args) {

@ -5,7 +5,7 @@ public class Tut5 extends TQVBox {
TQPushButton quit = new TQPushButton("Quit", this, "quit"); TQPushButton quit = new TQPushButton("Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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");

@ -5,7 +5,7 @@ public class Tut6 extends TQVBox {
TQPushButton quit = new TQPushButton("Quit", this, "quit"); TQPushButton quit = new TQPushButton("Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(quit, SIGNAL("clicked()"), qApp(), SLOT("quit()")); connect(quit, SIGNAL("clicked()"), tqApp(), SLOT("quit()"));
TQGrid grid = new TQGrid(4, this, null, 0); TQGrid grid = new TQGrid(4, this, null, 0);

@ -5,7 +5,7 @@ public class Tut7 extends TQVBox {
TQPushButton quit = new TQPushButton("Quit", this, "quit"); TQPushButton quit = new TQPushButton("Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(quit, SIGNAL("clicked()"), qApp(), SLOT("quit()")); connect(quit, SIGNAL("clicked()"), tqApp(), SLOT("quit()"));
TQGrid grid = new TQGrid(4, this, null, 0); TQGrid grid = new TQGrid(4, this, null, 0);

@ -5,7 +5,7 @@ public class Tut8 extends TQWidget {
TQPushButton quit = new TQPushButton("Quit", this, "quit"); TQPushButton quit = new TQPushButton("Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -5,7 +5,7 @@ public class Tut9 extends TQWidget {
TQPushButton quit = new TQPushButton("Quit", this, "quit"); TQPushButton quit = new TQPushButton("Quit", this, "quit");
quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
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);

@ -1759,8 +1759,8 @@ qapplication_argv(VALUE /*self*/)
{ {
VALUE result = rb_ary_new(); VALUE result = rb_ary_new();
// Drop argv[0], as it isn't included in the ruby global ARGV // Drop argv[0], as it isn't included in the ruby global ARGV
for (int index = 1; index < qApp->argc(); index++) { for (int index = 1; index < tqApp->argc(); index++) {
rb_ary_push(result, rb_str_new2(qApp->argv()[index])); rb_ary_push(result, rb_str_new2(tqApp->argv()[index]));
} }
return result; return result;

@ -43,7 +43,7 @@ namespace Qt {
private QtSignalMap csSignalMap; private QtSignalMap csSignalMap;
private QtSignalMap cppSignalMap; private QtSignalMap cppSignalMap;
public static TQApplication qApp { public static TQApplication tqApp {
get {return qapp;} get {return qapp;}
set {qapp = value;} set {qapp = value;}
} }

@ -26,7 +26,7 @@ namespace QtSamples {
public Display () public Display ()
{ {
filemenu = new TQPopupMenu (null, "filemenu"); filemenu = new TQPopupMenu (null, "filemenu");
filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); filemenu.InsertItem ("&Quit", tqApp, TQT_SLOT ("quit()"));
aboutmenu = new TQPopupMenu(null, "aboutmenu"); aboutmenu = new TQPopupMenu(null, "aboutmenu");
aboutmenu.InsertItem("&About Qt-Sharp", this, TQT_SLOT("slotAbout()")); aboutmenu.InsertItem("&About Qt-Sharp", this, TQT_SLOT("slotAbout()"));

@ -39,7 +39,7 @@ namespace Qf {
filemenu = new TQPopupMenu (null, "filemenu"); filemenu = new TQPopupMenu (null, "filemenu");
filemenu.InsertItem ("&Screenshot", display, TQT_SLOT ("SlotScreenshot()")); filemenu.InsertItem ("&Screenshot", display, TQT_SLOT ("SlotScreenshot()"));
filemenu.InsertSeparator (); filemenu.InsertSeparator ();
filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); filemenu.InsertItem ("&Quit", tqApp, TQT_SLOT ("quit()"));
//Setup the shapemenu //Setup the shapemenu
shapemenu = new TQPopupMenu (null, "typemenu"); shapemenu = new TQPopupMenu (null, "typemenu");
@ -156,7 +156,7 @@ namespace Qf {
this, TQT_SLOT ("SlotIntense()")); this, TQT_SLOT ("SlotIntense()"));
TQObject.Connect (buffer, TQT_SIGNAL ("Painted()"), TQObject.Connect (buffer, TQT_SIGNAL ("Painted()"),
this, TQT_SLOT ("SlotSetLabels()")); this, TQT_SLOT ("SlotSetLabels()"));
TQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"), TQObject.Connect (tqApp, TQT_SIGNAL ("lastWindowClosed ()"),
this, TQT_SLOT ("SlotQuit ()")); this, TQT_SLOT ("SlotQuit ()"));
//Layout labels //Layout labels

@ -39,7 +39,7 @@ namespace QtSamples {
filemenu.InsertItem ("&Load", this, TQT_SLOT ("SlotLoad()") ); filemenu.InsertItem ("&Load", this, TQT_SLOT ("SlotLoad()") );
filemenu.InsertItem ("&Save", this, TQT_SLOT ("SlotSave()") ); filemenu.InsertItem ("&Save", this, TQT_SLOT ("SlotSave()") );
filemenu.InsertSeparator (); filemenu.InsertSeparator ();
filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); filemenu.InsertItem ("&Quit", tqApp, TQT_SLOT ("quit()"));
aboutmenu = new TQPopupMenu (null, "helpmenu"); aboutmenu = new TQPopupMenu (null, "helpmenu");
aboutmenu.InsertItem ("&About Qt-Sharp", this, TQT_SLOT ("SlotAboutQtSharp()")); aboutmenu.InsertItem ("&About Qt-Sharp", this, TQT_SLOT ("SlotAboutQtSharp()"));

@ -17,8 +17,8 @@ public class MyWidget : TQWidget {
quit.SetGeometry (62, 40, 75, 30); quit.SetGeometry (62, 40, 75, 30);
quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold) ); quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold) );
Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); Connect ( quit, TQT_SIGNAL ("clicked()"), tqApp, TQT_SLOT ("Quit()") );
// In C++, qApp is a global variable. Here it's a property of the TQObject // In C++, tqApp is a global variable. Here it's a property of the TQObject
// class, which we inherit, giving the same effect. We also inherit the // class, which we inherit, giving the same effect. We also inherit the
// static method connect(). // static method connect().
} }

@ -13,7 +13,7 @@ public class MyWidget : TQVBox {
TQPushButton quit = new TQPushButton ("Quit", this, "quit"); TQPushButton quit = new TQPushButton ("Quit", this, "quit");
quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
TQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); TQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), tqApp, TQT_SLOT ("Quit()") );
TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" ); TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" );

@ -31,7 +31,7 @@ public class MyWidget : TQVBox {
TQPushButton quit = new TQPushButton ("Quit", this, "quit"); TQPushButton quit = new TQPushButton ("Quit", this, "quit");
quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); Connect ( quit, TQT_SIGNAL ("clicked()"), tqApp, TQT_SLOT ("Quit()") );
TQGrid grid = new TQGrid (4, this); TQGrid grid = new TQGrid (4, this);

@ -43,7 +43,7 @@ public class MyWidget : TQVBox {
TQPushButton quit = new TQPushButton ("Quit", this, "quit"); TQPushButton quit = new TQPushButton ("Quit", this, "quit");
quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); Connect ( quit, TQT_SIGNAL ("clicked()"), tqApp, TQT_SLOT ("Quit()") );
TQGrid grid = new TQGrid (4, this); TQGrid grid = new TQGrid (4, this);

Loading…
Cancel
Save