diff options
Diffstat (limited to 'examples/demo/textdrawing')
-rw-r--r-- | examples/demo/textdrawing/helpwindow.cpp | 52 | ||||
-rw-r--r-- | examples/demo/textdrawing/textedit.cpp | 60 |
2 files changed, 56 insertions, 56 deletions
diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 833caa179..01bb90add 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -46,23 +46,23 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, browser = new TQTextBrowser( this ); browser->mimeSourceFactory()->setFilePath( _path ); browser->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - connect( browser, SIGNAL( textChanged() ), - this, SLOT( textChanged() ) ); + connect( browser, TQ_SIGNAL( textChanged() ), + this, TQ_SLOT( textChanged() ) ); setCentralWidget( browser ); if ( !home_.isEmpty() ) browser->setSource( home_ ); - connect( browser, SIGNAL( highlighted( const TQString&) ), - statusBar(), SLOT( message( const TQString&)) ); + connect( browser, TQ_SIGNAL( highlighted( const TQString&) ), + statusBar(), TQ_SLOT( message( const TQString&)) ); resize( 640,700 ); TQPopupMenu* file = new TQPopupMenu( this ); - file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N ); - file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O ); - file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P ); + file->insertItem( tr("&New Window"), this, TQ_SLOT( newWindow() ), ALT | Key_N ); + file->insertItem( tr("&Open File"), this, TQ_SLOT( openFile() ), ALT | Key_O ); + file->insertItem( tr("&Print"), this, TQ_SLOT( print() ), ALT | Key_P ); // The same three icons are used twice each. TQIconSet icon_back( TQPixmap("textdrawing/previous.png") ); @@ -71,29 +71,29 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, TQPopupMenu* go = new TQPopupMenu( this ); backwardId = go->insertItem( icon_back, - tr("&Backward"), browser, SLOT( backward() ), + tr("&Backward"), browser, TQ_SLOT( backward() ), ALT | Key_Left ); forwardId = go->insertItem( icon_forward, - tr("&Forward"), browser, SLOT( forward() ), + tr("&Forward"), browser, TQ_SLOT( forward() ), ALT | Key_Right ); - go->insertItem( icon_home, tr("&Home"), browser, SLOT( home() ) ); + go->insertItem( icon_home, tr("&Home"), browser, TQ_SLOT( home() ) ); hist = new TQPopupMenu( this ); TQStringList::Iterator it = history.begin(); for ( ; it != history.end(); ++it ) mHistory[ hist->insertItem( *it ) ] = *it; - connect( hist, SIGNAL( activated( int ) ), - this, SLOT( histChosen( int ) ) ); + connect( hist, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( histChosen( int ) ) ); bookm = new TQPopupMenu( this ); - bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); + bookm->insertItem( tr( "Add Bookmark" ), this, TQ_SLOT( addBookmark() ) ); bookm->insertSeparator(); TQStringList::Iterator it2 = bookmarks.begin(); for ( ; it2 != bookmarks.end(); ++it2 ) mBookmarks[ bookm->insertItem( *it2 ) ] = *it2; - connect( bookm, SIGNAL( activated( int ) ), - this, SLOT( bookmChosen( int ) ) ); + connect( bookm, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( bookmChosen( int ) ) ); menuBar()->insertItem( tr("&File"), file ); menuBar()->insertItem( tr("&Go"), go ); @@ -102,29 +102,29 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, menuBar()->setItemEnabled( forwardId, FALSE); menuBar()->setItemEnabled( backwardId, FALSE); - connect( browser, SIGNAL( backwardAvailable( bool ) ), - this, SLOT( setBackwardAvailable( bool ) ) ); - connect( browser, SIGNAL( forwardAvailable( bool ) ), - this, SLOT( setForwardAvailable( bool ) ) ); + connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ), + this, TQ_SLOT( setBackwardAvailable( bool ) ) ); + connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ), + this, TQ_SLOT( setForwardAvailable( bool ) ) ); TQToolBar* toolbar = new TQToolBar( this ); addToolBar( toolbar, "Toolbar"); TQToolButton* button; - button = new TQToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar ); - connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); + button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar ); + connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); button->setEnabled( FALSE ); - button = new TQToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar ); - connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); + button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar ); + connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); button->setEnabled( FALSE ); - button = new TQToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar ); + button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar ); toolbar->addSeparator(); pathCombo = new TQComboBox( TRUE, toolbar ); - connect( pathCombo, SIGNAL( activated( const TQString & ) ), - this, SLOT( pathSelected( const TQString & ) ) ); + connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT( pathSelected( const TQString & ) ) ); toolbar->setStretchableWidget( pathCombo ); setRightJustification( TRUE ); setDockEnabled( DockLeft, FALSE ); diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index c564f21b6..5e203ed16 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -36,8 +36,8 @@ TextEdit::TextEdit( TQWidget *parent, const char *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 ); } @@ -49,28 +49,28 @@ void TextEdit::setupFileActions() TQAction *a; a = new TQAction( tr( "New" ), TQPixmap( "textdrawing/filenew.png" ), tr( "&New..." ), 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" ), TQPixmap( "textdrawing/fileopen.png" ), tr( "&Open..." ), 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" ), TQPixmap( "textdrawing/filesave.png" ), tr( "&Save..." ), 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" ), TQPixmap(), tr( "Save &As..." ), 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" ), TQPixmap( "textdrawing/print.png" ), tr( "&Print..." ), 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" ), TQPixmap(), tr( "&Close" ), 0, this, "fileClose" ); - connect( a, SIGNAL( activated() ), this, SLOT( fileClose() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileClose() ) ); a->addTo( menu ); } @@ -82,24 +82,24 @@ void TextEdit::setupEditActions() TQAction *a; a = new TQAction( tr( "Undo" ), TQPixmap( "textdrawing/undo.png" ), tr( "&Undo" ), 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" ), TQPixmap( "textdrawing/redo.png" ), tr( "&Redo" ), 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( "Cut" ), TQPixmap( "textdrawing/editcut.png" ), tr( "&Cut" ), 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( "Copy" ), TQPixmap( "textdrawing/editcopy.png" ), tr( "C&opy" ), 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( "Paste" ), TQPixmap( "textdrawing/editpaste.png" ), tr( "&Paste" ), 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 ); } @@ -118,14 +118,14 @@ void TextEdit::setupTextActions() comboStyle->insertItem( tr("Ordered List (Decimal)") ); comboStyle->insertItem( tr("Ordered List (Alpha lower)") ); comboStyle->insertItem( tr("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; comboFont->insertStringList( db.families() ); - connect( comboFont, SIGNAL( activated( const TQString & ) ), - this, SLOT( textFamily( const TQString & ) ) ); + connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT( textFamily( const TQString & ) ) ); comboFont->lineEdit()->setText( TQApplication::font().family() ); comboSize = new TQComboBox( TRUE, tb ); @@ -133,22 +133,22 @@ void TextEdit::setupTextActions() TQValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) comboSize->insertItem( TQString::number( *it ) ); - connect( comboSize, SIGNAL( activated( const TQString & ) ), - this, SLOT( textSize( const TQString & ) ) ); + connect( comboSize, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT( textSize( const TQString & ) ) ); comboSize->lineEdit()->setText( TQString::number( TQApplication::font().pointSize() ) ); actionTextBold = new TQAction( tr( "Bold" ), TQPixmap( "textdrawing/textbold.png" ), tr( "&Bold" ), 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" ), TQPixmap( "textdrawing/textitalic.png" ), tr( "&Italic" ), 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" ), TQPixmap( "textdrawing/textunderline.png" ), tr( "&Underline" ), 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 ); @@ -156,7 +156,7 @@ void TextEdit::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" ), TQPixmap( "textdrawing/textleft.png" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" ); actionAlignLeft->addTo( tb ); @@ -180,7 +180,7 @@ void TextEdit::setupTextActions() TQPixmap pix( 16, 16 ); pix.fill( black ); actionTextColor = new TQAction( tr( "Color" ), pix, tr( "&Color..." ), 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 ); } @@ -215,12 +215,12 @@ TQTextEdit *TextEdit::currentEditor() const void TextEdit::doConnections( TQTextEdit *e ) { - connect( e, SIGNAL( currentFontChanged( const TQFont & ) ), - this, SLOT( fontChanged( const TQFont & ) ) ); - connect( e, SIGNAL( currentColorChanged( const TQColor & ) ), - this, SLOT( colorChanged( const TQColor & ) ) ); - connect( e, SIGNAL( currentAlignmentChanged( int ) ), - this, SLOT( alignmentChanged( int ) ) ); + connect( e, TQ_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQ_SLOT( fontChanged( const TQFont & ) ) ); + connect( e, TQ_SIGNAL( currentColorChanged( const TQColor & ) ), + this, TQ_SLOT( colorChanged( const TQColor & ) ) ); + connect( e, TQ_SIGNAL( currentAlignmentChanged( int ) ), + this, TQ_SLOT( alignmentChanged( int ) ) ); } void TextEdit::fileNew() |