summaryrefslogtreecommitdiffstats
path: root/examples/menu/menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/menu/menu.cpp')
-rw-r--r--examples/menu/menu.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/menu/menu.cpp b/examples/menu/menu.cpp
index 70eda9b5b..124601720 100644
--- a/examples/menu/menu.cpp
+++ b/examples/menu/menu.cpp
@@ -120,7 +120,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
TQPixmap p2( p2_xpm );
TQPixmap p3( p3_xpm );
TQPopupMenu *print = new TQPopupMenu( this );
- Q_CHECK_PTR( print );
+ TQ_CHECK_PTR( print );
print->insertTearOffHandle();
print->insertItem( "&Print to printer", this, SLOT(printer()) );
print->insertItem( "Print to &file", this, SLOT(file()) );
@@ -129,7 +129,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
print->insertItem( "Printer &Setup", this, SLOT(printerSetup()) );
TQPopupMenu *file = new TQPopupMenu( this );
- Q_CHECK_PTR( file );
+ TQ_CHECK_PTR( file );
file->insertItem( p1, "&Open", this, SLOT(open()), CTRL+Key_O );
file->insertItem( p2, "&New", this, SLOT(news()), CTRL+Key_N );
file->insertItem( p3, "&Save", this, SLOT(save()), CTRL+Key_S );
@@ -140,14 +140,14 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
file->insertItem( "E&xit", qApp, SLOT(quit()), CTRL+Key_Q );
TQPopupMenu *edit = new TQPopupMenu( this );
- Q_CHECK_PTR( edit );
+ TQ_CHECK_PTR( edit );
int undoID = edit->insertItem( "&Undo", this, SLOT(undo()) );
int redoID = edit->insertItem( "&Redo", this, SLOT(redo()) );
edit->setItemEnabled( undoID, FALSE );
edit->setItemEnabled( redoID, FALSE );
TQPopupMenu* options = new TQPopupMenu( this );
- Q_CHECK_PTR( options );
+ TQ_CHECK_PTR( options );
options->insertTearOffHandle();
options->setCaption("Options");
options->insertItem( "&Normal Font", this, SLOT(normal()) );
@@ -171,13 +171,13 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
TQPopupMenu *help = new TQPopupMenu( this );
- Q_CHECK_PTR( help );
+ TQ_CHECK_PTR( help );
help->insertItem( "&About", this, SLOT(about()), CTRL+Key_H );
help->insertItem( "About &TQt", this, SLOT(aboutTQt()) );
// If we used a TQMainWindow we could use its built-in menuBar().
menu = new TQMenuBar( this );
- Q_CHECK_PTR( menu );
+ TQ_CHECK_PTR( menu );
menu->insertItem( "&File", file );
menu->insertItem( "&Edit", edit );
menu->insertItem( "&Options", options );
@@ -187,7 +187,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
TQLabel *msg = new TQLabel( this );
- Q_CHECK_PTR( msg );
+ TQ_CHECK_PTR( msg );
msg->setText( "A context menu is available.\n"
"Invoke it by right-clicking or by"
" pressing the 'context' button." );
@@ -195,7 +195,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
msg->setAlignment( AlignCenter );
label = new TQLabel( this );
- Q_CHECK_PTR( label );
+ TQ_CHECK_PTR( label );
label->setGeometry( 20, rect().center().y()-20, width()-40, 40 );
label->setFrameStyle( TQFrame::Box | TQFrame::Raised );
label->setLineWidth( 1 );
@@ -212,7 +212,7 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
void MenuExample::contextMenuEvent( TQContextMenuEvent * )
{
TQPopupMenu* contextMenu = new TQPopupMenu( this );
- Q_CHECK_PTR( contextMenu );
+ TQ_CHECK_PTR( contextMenu );
TQLabel *caption = new TQLabel( "<font color=darkblue><u><b>"
"Context Menu</b></u></font>", this );
caption->setAlignment( TQt::AlignCenter );
@@ -221,7 +221,7 @@ void MenuExample::contextMenuEvent( TQContextMenuEvent * )
contextMenu->insertItem( "&Open...", this, SLOT(open()), CTRL+Key_O );
contextMenu->insertItem( "&Save", this, SLOT(save()), CTRL+Key_S );
TQPopupMenu *submenu = new TQPopupMenu( this );
- Q_CHECK_PTR( submenu );
+ TQ_CHECK_PTR( submenu );
submenu->insertItem( "&Print to printer", this, SLOT(printer()) );
submenu->insertItem( "Print to &file", this, SLOT(file()) );
submenu->insertItem( "Print to fa&x", this, SLOT(fax()) );