diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 17:55:22 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-27 17:55:22 -0600 |
commit | ef5a04df564ad5c27406c41fb55e32ad3aa39d25 (patch) | |
tree | bf521221fffb7a73f318fc5579da7c25fed9ff74 /qtjava/javalib/examples | |
parent | 6d5f6f30f0236920737b74261e664fdaab90c33c (diff) | |
download | tdebindings-ef5a04df564ad5c27406c41fb55e32ad3aa39d25.tar.gz tdebindings-ef5a04df564ad5c27406c41fb55e32ad3aa39d25.zip |
Rename tqt3 color functions
Diffstat (limited to 'qtjava/javalib/examples')
18 files changed, 32 insertions, 32 deletions
diff --git a/qtjava/javalib/examples/addressbook/ABMainWindow.java b/qtjava/javalib/examples/addressbook/ABMainWindow.java index c4949289..570e6b8b 100644 --- a/qtjava/javalib/examples/addressbook/ABMainWindow.java +++ b/qtjava/javalib/examples/addressbook/ABMainWindow.java @@ -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.insertSeparator(); 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() diff --git a/qtjava/javalib/examples/application/ApplicationWindow.java b/qtjava/javalib/examples/application/ApplicationWindow.java index f214d240..a169454d 100644 --- a/qtjava/javalib/examples/application/ApplicationWindow.java +++ b/qtjava/javalib/examples/application/ApplicationWindow.java @@ -125,7 +125,7 @@ public class ApplicationWindow extends TQMainWindow { connect(fileCloseAction, SIGNAL("activated()"), this, SLOT("close()")); 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 diff --git a/qtjava/javalib/examples/helpviewer/HelpWindow.java b/qtjava/javalib/examples/helpviewer/HelpWindow.java index d220d35e..d5c6858d 100644 --- a/qtjava/javalib/examples/helpviewer/HelpWindow.java +++ b/qtjava/javalib/examples/helpviewer/HelpWindow.java @@ -61,7 +61,7 @@ HelpWindow( String home_, String _path, file.insertItem( tr("&Print"), this, SLOT(" print()"), new TQKeySequence(CTRL+Key_P) ); file.insertSeparator(); 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. TQIconSet icon_back = new TQIconSet( new TQPixmap("back.xpm") ); diff --git a/qtjava/javalib/examples/layout/ExampleWidget.java b/qtjava/javalib/examples/layout/ExampleWidget.java index 1bdc8e54..cb6c5408 100644 --- a/qtjava/javalib/examples/layout/ExampleWidget.java +++ b/qtjava/javalib/examples/layout/ExampleWidget.java @@ -30,7 +30,7 @@ ExampleWidget( TQWidget parent, String name ) menubar.setSeparator( TQMenuBar.InWindowsStyle ); TQPopupMenu popup; popup = new TQPopupMenu( this ); - popup.insertItem( "&Quit", qApp(), SLOT("quit()") ); + popup.insertItem( "&Quit", tqApp(), SLOT("quit()") ); menubar.insertItem( "&File", popup ); // ...and tell the layout about it. diff --git a/qtjava/javalib/examples/mdi/ApplicationWindow.java b/qtjava/javalib/examples/mdi/ApplicationWindow.java index 624dfa4a..85c3a8ca 100644 --- a/qtjava/javalib/examples/mdi/ApplicationWindow.java +++ b/qtjava/javalib/examples/mdi/ApplicationWindow.java @@ -159,7 +159,7 @@ ApplicationWindow() file.setWhatsThis( id, filePrintText ); file.insertSeparator(); 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.setCheckable( true ); diff --git a/qtjava/javalib/examples/menu/MenuExample.java b/qtjava/javalib/examples/menu/MenuExample.java index c7b72ce7..1965efa4 100644 --- a/qtjava/javalib/examples/menu/MenuExample.java +++ b/qtjava/javalib/examples/menu/MenuExample.java @@ -149,7 +149,7 @@ MenuExample( TQWidget parent, String name ) file.insertSeparator(); file.insertItem( "&Print", print, CTRL+Key_P ); 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 ); int undoID = edit.insertItem( "&Undo", this, SLOT("undo()") ); diff --git a/qtjava/javalib/examples/qmag/MagWidget.java b/qtjava/javalib/examples/qmag/MagWidget.java index cf766570..33637587 100644 --- a/qtjava/javalib/examples/qmag/MagWidget.java +++ b/qtjava/javalib/examples/qmag/MagWidget.java @@ -91,7 +91,7 @@ MagWidget( TQWidget parent, String name ) 10+multiSaveButton.fontMetrics().width("MultiSave"), 20 ); quitButton = new TQPushButton( this ); - connect( quitButton, SIGNAL("clicked()"), qApp(), SLOT("quit()") ); + connect( quitButton, SIGNAL("clicked()"), tqApp(), SLOT("quit()") ); quitButton.setText( "Quit" ); quitButton.setGeometry( multiSaveButton.geometry().right() + 2, 2, 10+quitButton.fontMetrics().width("Quit"), 20 ); @@ -296,10 +296,10 @@ protected void mouseMoveEvent( TQMouseEvent e ) if ( image.valid(x,y) ) { int px = image.pixel(x,y); - pixelinfo= " " + qRed(px) + "," + qGreen(px) + "," + qBlue(px) + " "; - pixelinfo += "#" + Integer.toHexString(qRed(px)) - + Integer.toHexString(qGreen(px)) - + Integer.toHexString(qBlue(px)) + " "; + pixelinfo= " " + tqRed(px) + "," + tqGreen(px) + "," + tqBlue(px) + " "; + pixelinfo += "#" + Integer.toHexString(tqRed(px)) + + Integer.toHexString(tqGreen(px)) + + Integer.toHexString(tqBlue(px)) + " "; } String label = "x=" + (x+grabx) + ", y=" + (y+graby) + " " + pixelinfo; rgb.setText( label ); diff --git a/qtjava/javalib/examples/qwerty/Editor.java b/qtjava/javalib/examples/qwerty/Editor.java index 3598c144..ec1423ad 100644 --- a/qtjava/javalib/examples/qwerty/Editor.java +++ b/qtjava/javalib/examples/qwerty/Editor.java @@ -59,7 +59,7 @@ Editor( TQWidget parent , String name ) file.insertItem( "&Print...", this, SLOT("print()"), new TQKeySequence(ALT+Key_P) ); file.insertSeparator(); 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( open_as, SIGNAL("activated(int)"), this, SLOT("openAsEncoding(int)") ); @@ -128,8 +128,8 @@ void rebuildCodecList() void newDoc() { Editor ed = new Editor(); - if ( qApp().desktop().size().width() < 450 - || qApp().desktop().size().height() < 450 ) { + if ( tqApp().desktop().size().width() < 450 + || tqApp().desktop().size().height() < 450 ) { ed.showMaximized(); } else { ed.resize( 400, 400 ); diff --git a/qtjava/javalib/examples/richtext/MyRichText.java b/qtjava/javalib/examples/richtext/MyRichText.java index 79f6ac1e..1b6b299b 100644 --- a/qtjava/javalib/examples/richtext/MyRichText.java +++ b/qtjava/javalib/examples/richtext/MyRichText.java @@ -108,7 +108,7 @@ MyRichText( TQWidget parent, String name ) 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( bNext, SIGNAL(" clicked()"), this, SLOT(" next()") ); diff --git a/qtjava/javalib/examples/rot13/Rot13.java b/qtjava/javalib/examples/rot13/Rot13.java index 67c2ee7f..8d5c1315 100644 --- a/qtjava/javalib/examples/rot13/Rot13.java +++ b/qtjava/javalib/examples/rot13/Rot13.java @@ -29,7 +29,7 @@ Rot13() TQPushButton quit = new TQPushButton( "&Quit", this ); 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 ); l.addWidget( left, 0, 0 ); diff --git a/qtjava/javalib/examples/scribble/Scribble.java b/qtjava/javalib/examples/scribble/Scribble.java index e9ecda9e..1f7b8408 100644 --- a/qtjava/javalib/examples/scribble/Scribble.java +++ b/qtjava/javalib/examples/scribble/Scribble.java @@ -57,7 +57,7 @@ Canvas( TQWidget parent, String name ) pen = new TQPen( Qt.red(), 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() ); setBackgroundMode( TQWidget.PaletteBase ); setCursor( Qt.crossCursor() ); diff --git a/qtjava/javalib/examples/showimg/ImageViewer.java b/qtjava/javalib/examples/showimg/ImageViewer.java index c902e413..bb7ae395 100644 --- a/qtjava/javalib/examples/showimg/ImageViewer.java +++ b/qtjava/javalib/examples/showimg/ImageViewer.java @@ -83,7 +83,7 @@ ImageViewer( TQWidget parent, String name, int wFlags ) si = file.insertItem( "Save image", saveimage ); sp = file.insertItem( "Save pixmap", savepixmap ); 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 ); menubar.insertItem( "&Edit", edit ); diff --git a/qtjava/javalib/examples/sound/SoundPlayer.java b/qtjava/javalib/examples/sound/SoundPlayer.java index 81b7a932..cf546a16 100644 --- a/qtjava/javalib/examples/sound/SoundPlayer.java +++ b/qtjava/javalib/examples/sound/SoundPlayer.java @@ -57,7 +57,7 @@ SoundPlayer() file.insertItem("Play 3 and 4 together", this, SLOT("doPlay34()")); file.insertItem("Play all together", this, SLOT("doPlay1234()")); file.insertSeparator(); - file.insertItem("E&xit", qApp(), SLOT("quit()")); + file.insertItem("E&xit", tqApp(), SLOT("quit()")); menuBar().insertItem("&File", file); } diff --git a/qtjava/javalib/examples/tabdialog/TabDialog.java b/qtjava/javalib/examples/tabdialog/TabDialog.java index bbfeb0ff..f529509a 100644 --- a/qtjava/javalib/examples/tabdialog/TabDialog.java +++ b/qtjava/javalib/examples/tabdialog/TabDialog.java @@ -27,7 +27,7 @@ TabDialog( TQWidget parent, String name, String _filename ) setupTab2(); setupTab3(); - connect( this, SIGNAL(" applyButtonPressed()"), qApp(), SLOT(" quit()") ); + connect( this, SIGNAL(" applyButtonPressed()"), tqApp(), SLOT(" quit()") ); } void setupTab1() diff --git a/qtjava/javalib/examples/textedit/TextEdit.java b/qtjava/javalib/examples/textedit/TextEdit.java index 7135f0e6..560ebc32 100644 --- a/qtjava/javalib/examples/textedit/TextEdit.java +++ b/qtjava/javalib/examples/textedit/TextEdit.java @@ -48,11 +48,11 @@ TextEdit( TQWidget parent, String name ) this, SLOT(" editorChanged( TQWidget )") ); setCentralWidget( tabWidget ); - if ( qApp().args().length == 0 ) { + if ( tqApp().args().length == 0 ) { load( "example.html" ); } else { - for ( int i = 0; i < qApp().args().length; ++i ) - load( qApp().args()[ i ] ); + for ( int i = 0; i < tqApp().args().length; ++i ) + load( tqApp().args()[ i ] ); } } @@ -332,7 +332,7 @@ void fileClose() void fileExit() { - qApp().quit(); + tqApp().quit(); } void editUndo() diff --git a/qtjava/javalib/examples/widgets/MyWidgetView.java b/qtjava/javalib/examples/widgets/MyWidgetView.java index 968a13ea..948de601 100644 --- a/qtjava/javalib/examples/widgets/MyWidgetView.java +++ b/qtjava/javalib/examples/widgets/MyWidgetView.java @@ -31,7 +31,7 @@ public MyWidgetView( TQWidget parent, String name ) ArrayList styles = TQStyleFactory.keys(); s = (++s)%styles.size(); - qApp().setStyle( (String) styles.get(s) ); + tqApp().setStyle( (String) styles.get(s) ); super.button1Clicked(); } diff --git a/qtjava/javalib/examples/widgets/WidgetView.java b/qtjava/javalib/examples/widgets/WidgetView.java index 2907f49c..77382908 100644 --- a/qtjava/javalib/examples/widgets/WidgetView.java +++ b/qtjava/javalib/examples/widgets/WidgetView.java @@ -243,7 +243,7 @@ WidgetView( TQWidget parent, String name ) + "about widgets on the screen."); // 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 central = new TQWidget( this ); @@ -268,7 +268,7 @@ WidgetView( TQWidget parent, String name ) id = popup.insertItem( new TQIconSet(openIcon), "&Open", this, SLOT(" open()") ); 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 ); @@ -813,13 +813,13 @@ void mySelectionChanged( TQListViewItem item ) void showProperties() { - if ( qApp().focusWidget() == null ) + if ( tqApp().focusWidget() == null ) return; - String output = "Properties for class '" + qApp().focusWidget().className() + "'"; + String output = "Properties for class '" + tqApp().focusWidget().className() + "'"; int i = 0; - while( i < (int) qApp().focusWidget().metaObject().numProperties( true ) ) { + while( i < (int) tqApp().focusWidget().metaObject().numProperties( true ) ) { TQMetaProperty p - = qApp().focusWidget().metaObject().property( i, true ); + = tqApp().focusWidget().metaObject().property( i, true ); String tmp = "\n " + (++i) + ": " + p.name() + " (read-" + (p.writable() ? "write" : "only") + ", " + p.type() + ")"; output += tmp; diff --git a/qtjava/javalib/examples/wizard/Wizard.java b/qtjava/javalib/examples/wizard/Wizard.java index 22a3cb28..c2b140fb 100644 --- a/qtjava/javalib/examples/wizard/Wizard.java +++ b/qtjava/javalib/examples/wizard/Wizard.java @@ -31,7 +31,7 @@ Wizard( TQWidget parent, String name ) setupPage2(); setupPage3(); 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(); } |