From 7552c6d73043b1040139033f6864db48ae5446cf Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 2 Jul 2024 21:37:22 +0900 Subject: Rename main window nt* related files to equivalent tq*. The file "ntqsession.h" was totally unnecessary and has been removed. Signed-off-by: Michele Calgaro --- doc/html/scrollview-example.html | 142 +++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'doc/html/scrollview-example.html') diff --git a/doc/html/scrollview-example.html b/doc/html/scrollview-example.html index f20982e91..33b5df43c 100644 --- a/doc/html/scrollview-example.html +++ b/doc/html/scrollview-example.html @@ -49,8 +49,8 @@ optimized for very large contents. #include <ntqscrollview.h> #include <ntqapplication.h> -#include <ntqmenubar.h> -#include <ntqpopupmenu.h> +#include <tqmenubar.h> +#include <tqpopupmenu.h> #include <ntqpushbutton.h> #include <ntqpainter.h> #include <ntqpixmap.h> @@ -58,7 +58,7 @@ optimized for very large contents. #include <ntqlayout.h> #include <ntqlabel.h> #include <ntqmultilineedit.h> -#include <ntqsizegrip.h> +#include <tqsizegrip.h> #include <stdlib.h> @@ -241,30 +241,30 @@ public: ScrollViewExample(int technique, TQWidget* parent=0, const char* name=0) : TQWidget(parent,name) { - TQMenuBar* menubar = new TQMenuBar(this); + TQMenuBar* menubar = new TQMenuBar(this); TQ_CHECK_PTR( menubar ); - TQPopupMenu* file = new TQPopupMenu( menubar ); + TQPopupMenu* file = new TQPopupMenu( menubar ); TQ_CHECK_PTR( file ); - menubar->insertItem( "&File", file ); - file->insertItem( "Quit", tqApp, TQ_SLOT(quit()) ); + menubar->insertItem( "&File", file ); + file->insertItem( "Quit", tqApp, TQ_SLOT(quit()) ); - vp_options = new TQPopupMenu( menubar ); + vp_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( vp_options ); - vp_options->setCheckable( TRUE ); - menubar->insertItem( "&ScrollView", vp_options ); - connect( vp_options, TQ_SIGNAL(activated(int)), + vp_options->setCheckable( TRUE ); + menubar->insertItem( "&ScrollView", vp_options ); + connect( vp_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doVPMenuItem(int)) ); - vauto_id = vp_options->insertItem( "Vertical Auto" ); - vaoff_id = vp_options->insertItem( "Vertical AlwaysOff" ); - vaon_id = vp_options->insertItem( "Vertical AlwaysOn" ); - vp_options->insertSeparator(); - hauto_id = vp_options->insertItem( "Horizontal Auto" ); - haoff_id = vp_options->insertItem( "Horizontal AlwaysOff" ); - haon_id = vp_options->insertItem( "Horizontal AlwaysOn" ); - vp_options->insertSeparator(); - corn_id = vp_options->insertItem( "cornerWidget" ); + vauto_id = vp_options->insertItem( "Vertical Auto" ); + vaoff_id = vp_options->insertItem( "Vertical AlwaysOff" ); + vaon_id = vp_options->insertItem( "Vertical AlwaysOn" ); + vp_options->insertSeparator(); + hauto_id = vp_options->insertItem( "Horizontal Auto" ); + haoff_id = vp_options->insertItem( "Horizontal AlwaysOff" ); + haon_id = vp_options->insertItem( "Horizontal AlwaysOn" ); + vp_options->insertSeparator(); + corn_id = vp_options->insertItem( "cornerWidget" ); if (technique == 1) { vp = new TQScrollView(this); @@ -287,55 +287,55 @@ public: vp->viewport()->setBackgroundMode(NoBackground); } - f_options = new TQPopupMenu( menubar ); + f_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( f_options ); - f_options->setCheckable( TRUE ); - menubar->insertItem( "F&rame", f_options ); - connect( f_options, TQ_SIGNAL(activated(int)), + f_options->setCheckable( TRUE ); + menubar->insertItem( "F&rame", f_options ); + connect( f_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doFMenuItem(int)) ); - f_options->insertItem( "No Frame", style_id ); - f_options->insertItem( "Box", style_id|TQFrame::Box ); - f_options->insertItem( "Panel", style_id|TQFrame::Panel ); - f_options->insertItem( "WinPanel", style_id|TQFrame::WinPanel ); - f_options->insertSeparator(); - f_options->insertItem( "Plain", style_id|TQFrame::Plain ); - f_options->insertItem( "Raised", style_id|TQFrame::Raised ); - f_laststyle = f_options->indexOf( - f_options->insertItem( "Sunken", style_id|TQFrame::Sunken )); - f_options->insertSeparator(); - lw_options = new TQPopupMenu( menubar ); + f_options->insertItem( "No Frame", style_id ); + f_options->insertItem( "Box", style_id|TQFrame::Box ); + f_options->insertItem( "Panel", style_id|TQFrame::Panel ); + f_options->insertItem( "WinPanel", style_id|TQFrame::WinPanel ); + f_options->insertSeparator(); + f_options->insertItem( "Plain", style_id|TQFrame::Plain ); + f_options->insertItem( "Raised", style_id|TQFrame::Raised ); + f_laststyle = f_options->indexOf( + f_options->insertItem( "Sunken", style_id|TQFrame::Sunken )); + f_options->insertSeparator(); + lw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( lw_options ); - lw_options->setCheckable( TRUE ); + lw_options->setCheckable( TRUE ); for (int lw = 1; lw <= max_lw; lw++) { TQString str; str.sprintf("%d Pixels", lw); - lw_options->insertItem( str, lw_id | lw ); + lw_options->insertItem( str, lw_id | lw ); } - f_options->insertItem( "Line Width", lw_options ); - connect( lw_options, TQ_SIGNAL(activated(int)), + f_options->insertItem( "Line Width", lw_options ); + connect( lw_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doFMenuItem(int)) ); - mlw_options = new TQPopupMenu( menubar ); + mlw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( mlw_options ); - mlw_options->setCheckable( TRUE ); + mlw_options->setCheckable( TRUE ); for (int mlw = 0; mlw <= max_mlw; mlw++) { TQString str; str.sprintf("%d Pixels", mlw); - mlw_options->insertItem( str, mlw_id | mlw ); + mlw_options->insertItem( str, mlw_id | mlw ); } - f_options->insertItem( "Midline Width", mlw_options ); - connect( mlw_options, TQ_SIGNAL(activated(int)), + f_options->insertItem( "Midline Width", mlw_options ); + connect( mlw_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doFMenuItem(int)) ); - mw_options = new TQPopupMenu( menubar ); + mw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( mw_options ); - mw_options->setCheckable( TRUE ); + mw_options->setCheckable( TRUE ); for (int mw = 0; mw <= max_mw; mw++) { TQString str; str.sprintf("%d Pixels", mw); - mw_options->insertItem( str, mw_id | mw ); + mw_options->insertItem( str, mw_id | mw ); } - f_options->insertItem( "Margin Width", mw_options ); - connect( mw_options, TQ_SIGNAL(activated(int)), + f_options->insertItem( "Margin Width", mw_options ); + connect( mw_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doFMenuItem(int)) ); setVPMenuItems(); @@ -343,11 +343,11 @@ public: TQVBoxLayout* vbox = new TQVBoxLayout(this); vbox->setMenuBar(menubar); - menubar->setSeparator(TQMenuBar::InWindowsStyle); + menubar->setSeparator(TQMenuBar::InWindowsStyle); vbox->addWidget(vp); vbox->activate(); - corner = new TQSizeGrip(this); + corner = new TQSizeGrip(this); corner->hide(); } @@ -378,16 +378,16 @@ private slots: void setVPMenuItems() { TQScrollView::ScrollBarMode vm = vp->vScrollBarMode(); - vp_options->setItemChecked( vauto_id, vm == TQScrollView::Auto ); - vp_options->setItemChecked( vaoff_id, vm == TQScrollView::AlwaysOff ); - vp_options->setItemChecked( vaon_id, vm == TQScrollView::AlwaysOn ); + vp_options->setItemChecked( vauto_id, vm == TQScrollView::Auto ); + vp_options->setItemChecked( vaoff_id, vm == TQScrollView::AlwaysOff ); + vp_options->setItemChecked( vaon_id, vm == TQScrollView::AlwaysOn ); TQScrollView::ScrollBarMode hm = vp->hScrollBarMode(); - vp_options->setItemChecked( hauto_id, hm == TQScrollView::Auto ); - vp_options->setItemChecked( haoff_id, hm == TQScrollView::AlwaysOff ); - vp_options->setItemChecked( haon_id, hm == TQScrollView::AlwaysOn ); + vp_options->setItemChecked( hauto_id, hm == TQScrollView::Auto ); + vp_options->setItemChecked( haoff_id, hm == TQScrollView::AlwaysOff ); + vp_options->setItemChecked( haon_id, hm == TQScrollView::AlwaysOn ); - vp_options->setItemChecked( corn_id, !!vp->cornerWidget() ); + vp_options->setItemChecked( corn_id, !!vp->cornerWidget() ); } void doFMenuItem(int id) @@ -421,36 +421,36 @@ private slots: { int sty = vp->frameStyle(); - f_options->setItemChecked( style_id, !sty ); + f_options->setItemChecked( style_id, !sty ); for (int i=1; i <= f_laststyle; i++) { - int id = f_options->idAt(i); + int id = f_options->idAt(i); if (id & TQFrame::MShape) - f_options->setItemChecked( id, + f_options->setItemChecked( id, ((id&TQFrame::MShape) == (sty&TQFrame::MShape)) ); else - f_options->setItemChecked( id, + f_options->setItemChecked( id, ((id&TQFrame::MShadow) == (sty&TQFrame::MShadow)) ); } for (int lw=1; lw<=max_lw; lw++) - lw_options->setItemChecked( lw_id|lw, vp->lineWidth() == lw ); + lw_options->setItemChecked( lw_id|lw, vp->lineWidth() == lw ); for (int mlw=0; mlw<=max_mlw; mlw++) - mlw_options->setItemChecked( mlw_id|mlw, vp->midLineWidth() == mlw ); + mlw_options->setItemChecked( mlw_id|mlw, vp->midLineWidth() == mlw ); for (int mw=0; mw<=max_mw; mw++) - mw_options->setItemChecked( mw_id|mw, vp->margin() == mw ); + mw_options->setItemChecked( mw_id|mw, vp->margin() == mw ); } private: TQScrollView* vp; - TQPopupMenu* vp_options; - TQPopupMenu* f_options; - TQPopupMenu* lw_options; - TQPopupMenu* mlw_options; - TQPopupMenu* mw_options; - TQSizeGrip* corner; + TQPopupMenu* vp_options; + TQPopupMenu* f_options; + TQPopupMenu* lw_options; + TQPopupMenu* mlw_options; + TQPopupMenu* mw_options; + TQSizeGrip* corner; int vauto_id, vaoff_id, vaon_id, hauto_id, haoff_id, haon_id, -- cgit v1.2.3