From 6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:47:17 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kpercentage/kpercentage/kanswer.cpp | 4 +-- kpercentage/kpercentage/kpercentage.cpp | 4 +-- kpercentage/kpercentage/kpercentage.docbook | 38 ++++++++++++++--------------- kpercentage/kpercentage/kpercentmain.cpp | 20 +++++++-------- kpercentage/kpercentage/ksplashscreen.cpp | 2 +- 5 files changed, 34 insertions(+), 34 deletions(-) (limited to 'kpercentage/kpercentage') diff --git a/kpercentage/kpercentage/kanswer.cpp b/kpercentage/kpercentage/kanswer.cpp index 51d5c8d5..df04bfa6 100644 --- a/kpercentage/kpercentage/kanswer.cpp +++ b/kpercentage/kpercentage/kanswer.cpp @@ -26,7 +26,7 @@ // TQt includes #include #include -#include +#include // KDE includes #include @@ -63,7 +63,7 @@ KAnswer::KAnswer( TQWidget *parent ): KDialog( parent, "answer", TRUE ) TextLabelAnswer->setBackgroundOrigin( TQLabel::ParentOrigin ); TextLabelAnswer->setBackgroundPixmap( bgp ); - canvas->tqsetBackgroundPixmap( bgp ); + canvas->setBackgroundPixmap( bgp ); canvas_view->setBackgroundOrigin( TQCanvasView::ParentOrigin ); canvas_view->setBackgroundPixmap( bgp ); diff --git a/kpercentage/kpercentage/kpercentage.cpp b/kpercentage/kpercentage/kpercentage.cpp index f9608601..e3523675 100644 --- a/kpercentage/kpercentage/kpercentage.cpp +++ b/kpercentage/kpercentage/kpercentage.cpp @@ -24,7 +24,7 @@ // TQt includes #include -#include +#include #include #include @@ -60,7 +60,7 @@ KPercentage::KPercentage( const char *name ) : // prepare exercise window, that will use the fontsize above! percent_main = new KPercentMain( this, "KPercentage" ); - // fixed tqgeometry bacause of background pixmap + // fixed geometry bacause of background pixmap setFixedSize( TQSize( 548, 248 ) ); /** load and set background pixmap */ diff --git a/kpercentage/kpercentage/kpercentage.docbook b/kpercentage/kpercentage/kpercentage.docbook index 58742c91..809ccb85 100644 --- a/kpercentage/kpercentage/kpercentage.docbook +++ b/kpercentage/kpercentage/kpercentage.docbook @@ -243,7 +243,7 @@ Programming &kpercentage; plugins is a joy to behold. Just read through the next should consult the docbook reference for further details. The example below was taken from that reference and shortened a bit for readability. --> - + XtUnmanageChildren Xt - Geometry Management @@ -251,26 +251,26 @@ taken from that reference and shortened a bit for readability. --> XtUnmanageChildren -remove a list of tqchildren from a parent widget's managed list. +remove a list of children from a parent widget's managed list. -widgetsremoving -XtUnmanageChildren +widgetsremoving +XtUnmanageChildren 4 March 1996 -void XtUnmanageChildren(tqchildren, num_tqchildren) - WidgetList tqchildren; - Cardinal num_tqchildren; +void XtUnmanageChildren(children, num_children) + WidgetList children; + Cardinal num_children; - + Inputs -tqchildren +children Specifies an array of child widgets. Each child must be of @@ -279,26 +279,26 @@ class RectObj or any subclass thereof. -num_tqchildren +num_children -Specifies the number of elements in tqchildren. +Specifies the number of elements in children. - + Description XtUnmanageChildren() unmaps the specified widgets -and removes them from their parent's tqgeometry management. +and removes them from their parent's geometry management. The widgets will disappear from the screen, and (depending on its parent) may no longer have screen space allocated for them. -Each of the widgets in the tqchildren array must have +Each of the widgets in the children array must have the same parent. See the “Algorithm” section below for full details of the @@ -306,13 +306,13 @@ widget unmanagement procedure. - + Usage Unmanaging widgets is the usual method for temporarily making them invisible. They can be re-managed with XtManageChildren(). -You can unmap a widget, but leave it under tqgeometry +You can unmap a widget, but leave it under geometry management by calling XtUnmapWidget(). You can destroy a widget's window without destroying the widget by calling XtUnrealizeWidget(). You can destroy a @@ -329,7 +329,7 @@ method once. - + Algorithm XtUnmanageChildren() performs the following: @@ -358,11 +358,11 @@ by unmapping it. - + Structures The WidgetList type is simply an array of widgets: -typedef Widget *WidgetList; +typedef Widget *WidgetList; diff --git a/kpercentage/kpercentage/kpercentmain.cpp b/kpercentage/kpercentage/kpercentmain.cpp index d02b57fd..12d359fb 100644 --- a/kpercentage/kpercentage/kpercentmain.cpp +++ b/kpercentage/kpercentage/kpercentmain.cpp @@ -24,7 +24,7 @@ #include // TQt includes -#include +#include #include #include #include @@ -55,15 +55,15 @@ KPercentMain::KPercentMain( TQWidget *parent, const char *name ) : KIntValidator *validLine = new KIntValidator( this ); line_edit_percentage = new TQLineEdit( this, "line_edit_percentage" ); - line_edit_percentage->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_percentage->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_percentage->setValidator( validLine ); line_edit_basevalue = new TQLineEdit( this, "line_edit_basevalue" ); - line_edit_basevalue->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_basevalue->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_basevalue->setValidator( validLine ); line_edit_percentvalue = new TQLineEdit( this, "line_edit_percentvalue" ); - line_edit_percentvalue->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_percentvalue->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_percentvalue->setValidator( validLine ); progress_bar_count = new TQProgressBar( this, "progress_bar_count" ); @@ -202,12 +202,12 @@ void KPercentMain::newTask() line_edit_percentvalue->setFocusPolicy( TQ_NoFocus ); // set the number of managed tasks into a label - label_count->setText( TQString( i18n("You got %1 of %2 exercises.").tqarg(count).tqarg(number) ) ); // update Label for the Progress + label_count->setText( TQString( i18n("You got %1 of %2 exercises.").arg(count).arg(number) ) ); // update Label for the Progress // progress_bar_count->setProgress( count*100 ); // updating Progrssbar startTimer( 10 ); // set string which task is just workin on (Task x of y) - TQString taskNumber( i18n( "Exercise no. %1:" ).tqarg(count+1) ); + TQString taskNumber( i18n( "Exercise no. %1:" ).arg(count+1) ); label_number->setText( taskNumber ); // label_number->adjustSize(); @@ -292,8 +292,8 @@ void KPercentMain::slotApplyInput() total_answers++; progress_bar_right_wrong->setTotalSteps( total_answers ); progress_bar_right_wrong->setProgress( right_answers ); - label_right->setText( i18n( "%1%\nright" ).tqarg( (100*right_answers)/total_answers ) ); - label_wrong->setText( i18n( "%1%\nwrong" ).tqarg( 100-(100*right_answers)/total_answers ) ); + label_right->setText( i18n( "%1%\nright" ).arg( (100*right_answers)/total_answers ) ); + label_wrong->setText( i18n( "%1%\nwrong" ).arg( 100-(100*right_answers)/total_answers ) ); newTask(); // next task, perhaps } @@ -304,8 +304,8 @@ void KPercentMain::slotApplyInput() total_answers++; progress_bar_right_wrong->setTotalSteps( total_answers ); progress_bar_right_wrong->setProgress( right_answers ); - label_right->setText( i18n( "%1%\nright" ).tqarg( (100*right_answers)/total_answers ) ); - label_wrong->setText( i18n( "%1%\nwrong" ).tqarg( 100-(100*right_answers)/total_answers ) ); + label_right->setText( i18n( "%1%\nright" ).arg( (100*right_answers)/total_answers ) ); + label_wrong->setText( i18n( "%1%\nwrong" ).arg( 100-(100*right_answers)/total_answers ) ); } } } diff --git a/kpercentage/kpercentage/ksplashscreen.cpp b/kpercentage/kpercentage/ksplashscreen.cpp index 226fa881..07c5b0d7 100644 --- a/kpercentage/kpercentage/ksplashscreen.cpp +++ b/kpercentage/kpercentage/ksplashscreen.cpp @@ -42,7 +42,7 @@ KSplashScreen::KSplashScreen( KPercentage *percentage, const char *name ) : TQCanvas *canvas = new TQCanvas( TQT_TQOBJECT(this) ); canvas->resize( 400, 300 ); /* set the background pixmap */ - canvas->tqsetBackgroundPixmap( bgp ); + canvas->setBackgroundPixmap( bgp ); //remove version number from splash annma 14/02/2005 //TQCanvasText *t = new TQCanvasText( KPERCENTAGE_VERSION, canvas ); //t->move( 330.0, 260.0 ); -- cgit v1.2.3