diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-13 11:29:06 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-14 20:32:49 +0900 |
commit | 1eb017313b2ebc441dfc81e73a5d6573d03ea08d (patch) | |
tree | 8d37ac85ad8a529697fc81479852a039de534b8e /qtjava/javalib/examples/textedit/TextEdit.java | |
parent | 673e65a4a15e713643f4bb804f7af6dfdaa0d6d6 (diff) | |
download | tdebindings-1eb017313b2ebc441dfc81e73a5d6573d03ea08d.tar.gz tdebindings-1eb017313b2ebc441dfc81e73a5d6573d03ea08d.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit faf33629bb6562a6f43f930afafe4b22e9cdb60b)
Diffstat (limited to 'qtjava/javalib/examples/textedit/TextEdit.java')
-rw-r--r-- | qtjava/javalib/examples/textedit/TextEdit.java | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/qtjava/javalib/examples/textedit/TextEdit.java b/qtjava/javalib/examples/textedit/TextEdit.java index 657981cb..25437140 100644 --- a/qtjava/javalib/examples/textedit/TextEdit.java +++ b/qtjava/javalib/examples/textedit/TextEdit.java @@ -44,8 +44,8 @@ TextEdit( TQWidget parent, String name ) setupTextActions(); tabWidget = new TQTabWidget( this ); - connect( tabWidget, SIGNAL(" currentChanged( TQWidget )"), - this, SLOT(" editorChanged( TQWidget )") ); + connect( tabWidget, TQ_SIGNAL(" currentChanged( TQWidget )"), + this, TQ_SLOT(" editorChanged( TQWidget )") ); setCentralWidget( tabWidget ); if ( tqApp().args().length == 0 ) { @@ -65,31 +65,31 @@ void setupFileActions() TQAction a; a = new TQAction( tr( "New" ), new TQIconSet(new TQPixmap( "filenew.xpm" )), tr( "&New..." ), new TQKeySequence(CTRL + Key_N), this, "fileNew" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileNew()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileNew()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Open" ), new TQIconSet(new TQPixmap( "fileopen.xpm" )), tr( "&Open..." ), new TQKeySequence(CTRL + Key_O), this, "fileOpen" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileOpen()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileOpen()") ); a.addTo( tb ); a.addTo( menu ); menu.insertSeparator(); a = new TQAction( tr( "Save" ), new TQIconSet(new TQPixmap( "filesave.xpm" )), tr( "&Save..." ), new TQKeySequence(CTRL + Key_S), this, "fileSave" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileSave()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileSave()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Save As" ), new TQIconSet(new TQPixmap()), tr( "Save &As..." ), new TQKeySequence(0), this, "fileSaveAs" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileSaveAs()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileSaveAs()") ); a.addTo( menu ); menu.insertSeparator(); a = new TQAction( tr( "Print" ), new TQIconSet(new TQPixmap( "fileprint.xpm" )), tr( "&Print..." ), new TQKeySequence(CTRL + Key_P), this, "filePrint" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" filePrint()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" filePrint()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Close" ), new TQIconSet(new TQPixmap()), tr( "&Close" ), new TQKeySequence(0), this, "fileClose" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileClose()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileClose()") ); a.addTo( menu ); a = new TQAction( tr( "Exit" ), new TQIconSet(new TQPixmap()), tr( "E&xit" ), new TQKeySequence(0), this, "fileExit" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" fileExit()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" fileExit()") ); a.addTo( menu ); } @@ -102,24 +102,24 @@ void setupEditActions() TQAction a; a = new TQAction( tr( "Undo" ), new TQIconSet(new TQPixmap( "editundo.xpm" )), tr( "&Undo" ), new TQKeySequence(CTRL + Key_Z), this, "editUndo" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" editUndo()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" editUndo()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Redo" ), new TQIconSet(new TQPixmap( "editredo.xpm" )), tr( "&Redo" ), new TQKeySequence(CTRL + Key_Y), this, "editRedo" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" editRedo()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" editRedo()") ); a.addTo( tb ); a.addTo( menu ); menu.insertSeparator(); a = new TQAction( tr( "Copy" ), new TQIconSet(new TQPixmap( "editcopy.xpm" )), tr( "&Copy" ), new TQKeySequence(CTRL + Key_C), this, "editCopy" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" editCopy()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" editCopy()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Cut" ), new TQIconSet(new TQPixmap( "editcut.xpm" )), tr( "Cu&t" ), new TQKeySequence(CTRL + Key_X), this, "editCut" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" editCut()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" editCut()") ); a.addTo( tb ); a.addTo( menu ); a = new TQAction( tr( "Paste" ), new TQIconSet(new TQPixmap( "editpaste.xpm" )), tr( "&Paste" ), new TQKeySequence(CTRL + Key_V), this, "editPaste" ); - connect( a, SIGNAL(" activated()"), this, SLOT(" editPaste()") ); + connect( a, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" editPaste()") ); a.addTo( tb ); a.addTo( menu ); } @@ -139,36 +139,36 @@ void setupTextActions() comboStyle.insertItem( "Ordered List (Decimal)" ); comboStyle.insertItem( "Ordered List (Alpha lower)" ); comboStyle.insertItem( "Ordered List (Alpha upper)" ); - connect( comboStyle, SIGNAL(" activated( int )"), - this, SLOT(" textStyle( int )") ); + connect( comboStyle, TQ_SIGNAL(" activated( int )"), + this, TQ_SLOT(" textStyle( int )") ); comboFont = new TQComboBox( true, tb ); TQFontDatabase db = new TQFontDatabase(); comboFont.insertStringList( (String[]) db.families().toArray(new String[0]) ); - connect( comboFont, SIGNAL(" activated( String )"), - this, SLOT(" textFamily( String )") ); + connect( comboFont, TQ_SIGNAL(" activated( String )"), + this, TQ_SLOT(" textFamily( String )") ); comboFont.lineEdit().setText( TQApplication.font().family() ); comboSize = new TQComboBox( true, tb ); int[] sizes = db.standardSizes(); for (int i = 0; i < sizes.length; i++ ) comboSize.insertItem( Integer.toString(sizes[i]) ); - connect( comboSize, SIGNAL(" activated( String )"), - this, SLOT(" textSize( String )") ); + connect( comboSize, TQ_SIGNAL(" activated( String )"), + this, TQ_SLOT(" textSize( String )") ); comboSize.lineEdit().setText( Integer.toString( TQApplication.font().pointSize() ) ); actionTextBold = new TQAction( tr( "Bold" ), new TQIconSet(new TQPixmap( "textbold.xpm" )), tr( "&Bold" ), new TQKeySequence(CTRL + Key_B), this, "textBold" ); - connect( actionTextBold, SIGNAL(" activated()"), this, SLOT(" textBold()") ); + connect( actionTextBold, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" textBold()") ); actionTextBold.addTo( tb ); actionTextBold.addTo( menu ); actionTextBold.setToggleAction( true ); actionTextItalic = new TQAction( tr( "Italic" ), new TQIconSet(new TQPixmap( "textitalic.xpm" )), tr( "&Italic" ), new TQKeySequence(CTRL + Key_I), this, "textItalic" ); - connect( actionTextItalic, SIGNAL(" activated()"), this, SLOT(" textItalic()") ); + connect( actionTextItalic, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" textItalic()") ); actionTextItalic.addTo( tb ); actionTextItalic.addTo( menu ); actionTextItalic.setToggleAction( true ); actionTextUnderline = new TQAction( tr( "Underline" ), new TQIconSet(new TQPixmap( "textunder.xpm" )), tr( "&Underline" ), new TQKeySequence(CTRL + Key_U), this, "textUnderline" ); - connect( actionTextUnderline, SIGNAL(" activated()"), this, SLOT(" textUnderline()") ); + connect( actionTextUnderline, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" textUnderline()") ); actionTextUnderline.addTo( tb ); actionTextUnderline.addTo( menu ); actionTextUnderline.setToggleAction( true ); @@ -176,7 +176,7 @@ void setupTextActions() TQActionGroup grp = new TQActionGroup( this ); grp.setExclusive( true ); - connect( grp, SIGNAL(" selected( TQAction )"), this, SLOT(" textAlign( TQAction )") ); + connect( grp, TQ_SIGNAL(" selected( TQAction )"), this, TQ_SLOT(" textAlign( TQAction )") ); actionAlignLeft = new TQAction( tr( "Left" ), new TQIconSet(new TQPixmap( "textleft.xpm" )), tr( "&Left" ), new TQKeySequence(CTRL + Key_L), grp, "textLeft" ); actionAlignLeft.addTo( tb ); @@ -200,7 +200,7 @@ void setupTextActions() TQPixmap pix = new TQPixmap( 16, 16 ); pix.fill( black() ); actionTextColor = new TQAction( tr( "Color" ), new TQIconSet(pix), tr( "&Color..." ), new TQKeySequence(0), this, "textColor" ); - connect( actionTextColor, SIGNAL(" activated()"), this, SLOT(" textColor()") ); + connect( actionTextColor, TQ_SIGNAL(" activated()"), this, TQ_SLOT(" textColor()") ); actionTextColor.addTo( tb ); actionTextColor.addTo( menu ); } @@ -232,12 +232,12 @@ TQTextEdit currentEditor() void doConnections( TQTextEdit e ) { - connect( e, SIGNAL(" currentFontChanged( TQFont )"), - this, SLOT(" fontChanged( TQFont )") ); - connect( e, SIGNAL(" currentColorChanged( TQColor )"), - this, SLOT(" colorChanged( TQColor )") ); - connect( e, SIGNAL(" currentAlignmentChanged( int )"), - this, SLOT(" alignmentChanged( int )") ); + connect( e, TQ_SIGNAL(" currentFontChanged( TQFont )"), + this, TQ_SLOT(" fontChanged( TQFont )") ); + connect( e, TQ_SIGNAL(" currentColorChanged( TQColor )"), + this, TQ_SLOT(" colorChanged( TQColor )") ); + connect( e, TQ_SIGNAL(" currentAlignmentChanged( int )"), + this, TQ_SLOT(" alignmentChanged( int )") ); } void fileNew() |