diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-12 18:46:48 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-17 14:10:44 +0900 |
commit | 32e1827c79cc9ac21c6540dc3c07d9e364bb54f7 (patch) | |
tree | 295a94b53b0053471b796c8d68b33c1589962b26 | |
parent | 118efac31c7d85eda2db83c3f37cccfb6bd3e17d (diff) | |
download | tdeedu-32e1827c79cc9ac21c6540dc3c07d9e364bb54f7.tar.gz tdeedu-32e1827c79cc9ac21c6540dc3c07d9e364bb54f7.zip |
Drop TQT_BASE_OBJECT* defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | kstars/kstars/fovdialog.cpp | 12 | ||||
-rw-r--r-- | kstars/kstars/kstarsactions.cpp | 42 | ||||
-rw-r--r-- | kstars/kstars/opscatalog.cpp | 2 | ||||
-rw-r--r-- | kstars/kstars/opssolarsystem.cpp | 2 | ||||
-rw-r--r-- | kstars/kstars/tools/altvstime.cpp | 10 | ||||
-rw-r--r-- | kvoctrain/kvoctrain/query-dialogs/RandomQueryDlg.cpp | 4 | ||||
-rw-r--r-- | kwordquiz/src/kwordquizview.cpp | 2 | ||||
-rw-r--r-- | libtdeedu/extdate/extdatetimeedit.cpp | 2 |
8 files changed, 38 insertions, 38 deletions
diff --git a/kstars/kstars/fovdialog.cpp b/kstars/kstars/fovdialog.cpp index 2e1722e9..19194474 100644 --- a/kstars/kstars/fovdialog.cpp +++ b/kstars/kstars/fovdialog.cpp @@ -237,15 +237,15 @@ void NewFOV::paintEvent( TQPaintEvent * ) { void NewFOV::slotComputeFOV() { //DEBUG - kdDebug() << ":" << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() << ":" << endl; - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "ComputeEyeFOV" ) ) kdDebug() << "A" << endl; - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) kdDebug() << "B" << endl; + kdDebug() << ":" << sender()->name() << ":" << endl; + if ( sender()->name() == TQString( "ComputeEyeFOV" ) ) kdDebug() << "A" << endl; + if ( sender()->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) kdDebug() << "B" << endl; - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) + if ( sender()->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) ui->FOVEdit->setText( TDEGlobal::locale()->formatNumber( ui->EyeFOV->value() * ui->EyeLength->value() / ui->TLength1->value() ) ); - else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "ComputeCameraFOV" ) && ui->TLength2->value() > 0.0 ) + else if ( sender()->name() == TQString( "ComputeCameraFOV" ) && ui->TLength2->value() > 0.0 ) ui->FOVEdit->setText( TDEGlobal::locale()->formatNumber( ui->ChipSize->value() * 3438.0 / ui->TLength2->value() ) ); - else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "ComputeHPBW" ) && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) { + else if ( sender()->name() == TQString( "ComputeHPBW" ) && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) { ui->FOVEdit->setText( TDEGlobal::locale()->formatNumber( 34.34 * 1.2 * ui->WaveLength->value() / ui->RTDiameter->value() ) ); // Beam width for an antenna is usually a circle on the sky. ui->ShapeBox->setCurrentItem(4); diff --git a/kstars/kstars/kstarsactions.cpp b/kstars/kstars/kstarsactions.cpp index 81ac63ba..900f586e 100644 --- a/kstars/kstars/kstarsactions.cpp +++ b/kstars/kstars/kstarsactions.cpp @@ -93,23 +93,23 @@ void KStars::slotViewToolBar() { - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_stars" ) ) { + if ( sender()->name() == TQString( "show_stars" ) ) { Options::setShowStars( !Options::showStars() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_deepsky" ) ) { + } else if ( sender()->name() == TQString( "show_deepsky" ) ) { Options::setShowDeepSky( ! Options::showDeepSky() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_planets" ) ) { + } else if ( sender()->name() == TQString( "show_planets" ) ) { Options::setShowPlanets( ! Options::showPlanets() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_clines" ) ) { + } else if ( sender()->name() == TQString( "show_clines" ) ) { Options::setShowCLines( !Options::showCLines() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_cnames" ) ) { + } else if ( sender()->name() == TQString( "show_cnames" ) ) { Options::setShowCNames( !Options::showCNames() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_cbounds" ) ) { + } else if ( sender()->name() == TQString( "show_cbounds" ) ) { Options::setShowCBounds( !Options::showCBounds() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_mw" ) ) { + } else if ( sender()->name() == TQString( "show_mw" ) ) { Options::setShowMilkyWay( !Options::showMilkyWay() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_grid" ) ) { + } else if ( sender()->name() == TQString( "show_grid" ) ) { Options::setShowGrid( !Options::showGrid() ); - } else if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_horizon" ) ) { + } else if ( sender()->name() == TQString( "show_horizon" ) ) { Options::setShowGround( !Options::showGround() ); } @@ -623,7 +623,7 @@ void KStars::slotToggleTimer() { //Focus void KStars::slotPointFocus() { - TQString sentFrom( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); + TQString sentFrom( sender()->name() ); if ( sentFrom == "zenith" ) map()->invokeKey( KKey( "Z" ).keyCodeQt() ); @@ -813,12 +813,12 @@ void KStars::slotCoordSys() { //Settings Menu: void KStars::slotColorScheme() { //use mid(3) to exclude the leading "cs_" prefix from the action name - TQString filename = TQString( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ).mid(3) + ".colors"; + TQString filename = TQString( sender()->name() ).mid(3) + ".colors"; loadColorScheme( filename ); } void KStars::slotTargetSymbol() { - TQString symbolName( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); + TQString symbolName( sender()->name() ); FOV f( symbolName ); //read data from fov.dat Options::setFOVName( f.name() ); @@ -955,24 +955,24 @@ void KStars::slotClearAllTrails() { //toggle display of GUI Items on/off void KStars::slotShowGUIItem( bool show ) { //Toolbars - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_mainToolBar" ) ) { + if ( sender()->name() == TQString( "show_mainToolBar" ) ) { Options::setShowMainToolBar( show ); if ( show ) toolBar( "mainToolBar" )->show(); else toolBar( "mainToolBar" )->hide(); } - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_viewToolBar" ) ) { + if ( sender()->name() == TQString( "show_viewToolBar" ) ) { Options::setShowViewToolBar( show ); if ( show ) toolBar( "viewToolBar" )->show(); else toolBar( "viewToolBar" )->hide(); } - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_statusBar" ) ) { + if ( sender()->name() == TQString( "show_statusBar" ) ) { Options::setShowStatusBar( show ); if ( show ) statusBar()->show(); else statusBar()->hide(); } - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_sbAzAlt" ) ) { + if ( sender()->name() == TQString( "show_sbAzAlt" ) ) { Options::setShowAltAzField( show ); if ( show ) { //To preserve the order (AzAlt before RADec), we have to remove @@ -994,7 +994,7 @@ void KStars::slotShowGUIItem( bool show ) { } } - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_sbRADec" ) ) { + if ( sender()->name() == TQString( "show_sbRADec" ) ) { Options::setShowRADecField( show ); if ( show ) { TQString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width @@ -1008,13 +1008,13 @@ void KStars::slotShowGUIItem( bool show ) { //InfoBoxes: we only change options here; these are also connected to slots in //InfoBoxes that actually toggle the display. - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_boxes" ) ) + if ( sender()->name() == TQString( "show_boxes" ) ) Options::setShowInfoBoxes( show ); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_time_box" ) ) + if ( sender()->name() == TQString( "show_time_box" ) ) Options::setShowTimeBox( show ); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_location_box" ) ) + if ( sender()->name() == TQString( "show_location_box" ) ) Options::setShowGeoBox( show ); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "show_focus_box" ) ) + if ( sender()->name() == TQString( "show_focus_box" ) ) Options::setShowFocusBox( show ); } diff --git a/kstars/kstars/opscatalog.cpp b/kstars/kstars/opscatalog.cpp index 71909872..a9fda7ac 100644 --- a/kstars/kstars/opscatalog.cpp +++ b/kstars/kstars/opscatalog.cpp @@ -82,7 +82,7 @@ OpsCatalog::~OpsCatalog() {} void OpsCatalog::updateDisplay() { //Modify display according to settings in the CatalogList - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "CatalogList" ) ) + if ( sender()->name() == TQString( "CatalogList" ) ) Options::setShowDeepSky( true ); Options::setShowMessier( showMessier->isOn() ); diff --git a/kstars/kstars/opssolarsystem.cpp b/kstars/kstars/opssolarsystem.cpp index 90202a56..688a53c7 100644 --- a/kstars/kstars/opssolarsystem.cpp +++ b/kstars/kstars/opssolarsystem.cpp @@ -58,7 +58,7 @@ void OpsSolarSystem::slotCometWidgets( bool on ) { void OpsSolarSystem::slotSelectPlanets() { bool b=true; - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "showNonePlanets" ) ) b = false; + if ( sender()->name() == TQString( "showNonePlanets" ) ) b = false; kcfg_ShowSun->setChecked( b ); kcfg_ShowMoon->setChecked( b ); diff --git a/kstars/kstars/tools/altvstime.cpp b/kstars/kstars/tools/altvstime.cpp index 9a95e188..0df74318 100644 --- a/kstars/kstars/tools/altvstime.cpp +++ b/kstars/kstars/tools/altvstime.cpp @@ -307,11 +307,11 @@ void AltVsTime::slotHighlight(void) { //move input focus to the next logical widget void AltVsTime::slotAdvanceFocus(void) { - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "nameBox" ) ) avtUI->addButton->setFocus(); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "raBox" ) ) avtUI->decBox->setFocus(); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "decbox" ) ) avtUI->addButton->setFocus(); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "longBox" ) ) avtUI->latBox->setFocus(); - if ( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() == TQString( "latBox" ) ) avtUI->updateButton->setFocus(); + if ( sender()->name() == TQString( "nameBox" ) ) avtUI->addButton->setFocus(); + if ( sender()->name() == TQString( "raBox" ) ) avtUI->decBox->setFocus(); + if ( sender()->name() == TQString( "decbox" ) ) avtUI->addButton->setFocus(); + if ( sender()->name() == TQString( "longBox" ) ) avtUI->latBox->setFocus(); + if ( sender()->name() == TQString( "latBox" ) ) avtUI->updateButton->setFocus(); } void AltVsTime::slotClear(void) { diff --git a/kvoctrain/kvoctrain/query-dialogs/RandomQueryDlg.cpp b/kvoctrain/kvoctrain/query-dialogs/RandomQueryDlg.cpp index 6b047be3..819ed2a2 100644 --- a/kvoctrain/kvoctrain/query-dialogs/RandomQueryDlg.cpp +++ b/kvoctrain/kvoctrain/query-dialogs/RandomQueryDlg.cpp @@ -486,7 +486,7 @@ void RandomQueryDlg::slotTransChanged(const TQString&) { mw->verify->setDefault(true); bool suggestions = Prefs::suggestions(); - if ( suggestions && sender() && TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())) -> isA ("TQComboBox") ) + if ( suggestions && sender() && sender() -> isA ("TQComboBox") ) { TQLineEdit* edit = ((TQComboBox*) sender()) -> lineEdit(); resetField (edit); @@ -497,7 +497,7 @@ void RandomQueryDlg::slotTransChanged(const TQString&) else mw->status -> clear(); } - else if ( ! suggestions && sender() && TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())) -> isA ("TQLineEdit") ) + else if ( ! suggestions && sender() && sender() -> isA ("TQLineEdit") ) resetField ((TQLineEdit*) sender()); } diff --git a/kwordquiz/src/kwordquizview.cpp b/kwordquiz/src/kwordquizview.cpp index 5fbf5be6..6d875c87 100644 --- a/kwordquiz/src/kwordquizview.cpp +++ b/kwordquiz/src/kwordquizview.cpp @@ -1051,7 +1051,7 @@ void KWordQuizView::slotCheckedAnswer( int i ) bool KWordQuizView::eventFilter( TQObject * o, TQEvent * e ) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(cellEditor)) + if (o == cellEditor) { if ( e->type() == TQEvent::KeyPress ) { diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp index 21e74809..1fe1a22c 100644 --- a/libtdeedu/extdate/extdatetimeedit.cpp +++ b/libtdeedu/extdate/extdatetimeedit.cpp @@ -474,7 +474,7 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e ) */ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { + if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; switch ( ke->key() ) { |