diff options
Diffstat (limited to 'kstars/kstars/detaildialog.cpp')
-rw-r--r-- | kstars/kstars/detaildialog.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/kstars/kstars/detaildialog.cpp b/kstars/kstars/detaildialog.cpp index 4bbb6a91..1194d4bd 100644 --- a/kstars/kstars/detaildialog.cpp +++ b/kstars/kstars/detaildialog.cpp @@ -57,7 +57,7 @@ #include "devicemanager.h" #include "indistd.h" -LogEdit::LogEdit( TQWidget *parent, const char *name ) : KTextEdit( parent, name ) +LogEdit::LogEdit( TQWidget *tqparent, const char *name ) : KTextEdit( tqparent, name ) { setFrameStyle( TQFrame::StyledPanel ); setFrameShadow( TQFrame::Plain ); @@ -69,13 +69,13 @@ void LogEdit::focusOutEvent( TQFocusEvent *e ) { TQWidget::focusOutEvent(e); } -ClickLabel::ClickLabel( TQWidget *parent, const char *name ) : TQLabel( parent, name ) +ClickLabel::ClickLabel( TQWidget *tqparent, const char *name ) : TQLabel( tqparent, name ) {} DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo, - TQWidget *parent, const char *name ) : - KDialogBase( KDialogBase::Tabbed, i18n( "Object Details" ), Close, Close, parent, name ) , - selectedObject(o), ksw((KStars*)parent), Data(0), Pos(0), Links(0), Adv(0), Log(0) + TQWidget *tqparent, const char *name ) : + KDialogBase( KDialogBase::Tabbed, i18n( "Object Details" ), Close, Close, tqparent, name ) , + selectedObject(o), ksw((KStars*)tqparent), Data(0), Pos(0), Links(0), Adv(0), Log(0) { //Modify color palette setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Base ) ); @@ -135,20 +135,20 @@ void DetailDialog::createGeneralTab() Data->Names->setText( s->longname() ); Data->Type->setText( s->sptype() + " " + i18n("star") ); - Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).arg( + Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).tqarg( KGlobal::locale()->formatNumber( s->mag(), 1 ) ) ); //show to tenths place //distance if ( s->distance() > 2000. || s->distance() < 0. ) // parallax < 0.5 mas Data->Distance->setText( TQString(i18n("larger than 2000 parsecs", "> 2000 pc") ) ); else if ( s->distance() > 50.0 ) //show to nearest integer - Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg( + Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).tqarg( TQString::number( int( s->distance() + 0.5 ) ) ) ); else if ( s->distance() > 10.0 ) //show to tenths place - Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg( + Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).tqarg( KGlobal::locale()->formatNumber( s->distance(), 1 ) ) ); else //show to hundredths place - Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg( + Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).tqarg( KGlobal::locale()->formatNumber( s->distance(), 2 ) ) ); //Note multiplicity/variablility in angular size label @@ -183,28 +183,28 @@ void DetailDialog::createGeneralTab() //Magnitude: The moon displays illumination fraction instead if ( selectedObject->name() == "Moon" ) { Data->MagLabel->setText( i18n("Illumination:") ); - Data->Mag->setText( TQString("%1 %").arg( int( ((KSMoon *)selectedObject)->illum()*100. ) ) ); + Data->Mag->setText( TQString("%1 %").tqarg( int( ((KSMoon *)selectedObject)->illum()*100. ) ) ); } else { - Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).arg( + Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).tqarg( KGlobal::locale()->formatNumber( ps->mag(), 1 ) ) ); //show to tenths place } //Distance from Earth. The moon requires a unit conversion if ( ps->name() == "Moon" ) { - Data->Distance->setText( i18n("distance in kilometers", "%1 km").arg( + Data->Distance->setText( i18n("distance in kilometers", "%1 km").tqarg( KGlobal::locale()->formatNumber( ps->rearth()*AU_KM ) ) ); } else { - Data->Distance->setText( i18n("distance in Astronomical Units", "%1 AU").arg( + Data->Distance->setText( i18n("distance in Astronomical Units", "%1 AU").tqarg( KGlobal::locale()->formatNumber( ps->rearth() ) ) ); } //Angular size; moon and sun in arcmin, others in arcsec if ( ps->angSize() ) { if ( ps->name() == "Sun" || ps->name() == "Moon" ) - Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg( + Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").tqarg( KGlobal::locale()->formatNumber( ps->angSize() ) ) ); else - Data->AngSize->setText( i18n("angular size in arcseconds", "%1 arcsec").arg( + Data->AngSize->setText( i18n("angular size in arcseconds", "%1 arcsec").tqarg( KGlobal::locale()->formatNumber( ps->angSize()*60.0 ) ) ); } else { Data->AngSize->setText( "--" ); @@ -230,11 +230,11 @@ void DetailDialog::createGeneralTab() if ( dso->ugc() != 0 ) { if ( ! oname.isEmpty() ) oname += ", "; - oname += "UGC " + TQString("%1").arg( dso->ugc() ); + oname += "UGC " + TQString("%1").tqarg( dso->ugc() ); } if ( dso->pgc() != 0 ) { if ( ! oname.isEmpty() ) oname += ", "; - oname += "PGC " + TQString("%1").arg( dso->pgc() ); + oname += "PGC " + TQString("%1").tqarg( dso->pgc() ); } if ( ! oname.isEmpty() ) pname += ", " + oname; @@ -245,7 +245,7 @@ void DetailDialog::createGeneralTab() if ( dso->mag() > 90.0 ) Data->Mag->setText( "--" ); else - Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).arg( + Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).tqarg( KGlobal::locale()->formatNumber( dso->mag(), 1 ) ) ); //show to tenths place //No distances at this point... @@ -253,10 +253,10 @@ void DetailDialog::createGeneralTab() //Only show decimal place for small angular sizes if ( dso->a() > 10.0 ) - Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg( + Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").tqarg( int( dso->a() ) ) ); else if ( dso->a() ) - Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg( + Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").tqarg( KGlobal::locale()->formatNumber( dso->a(), 1 ) ) ); else Data->AngSize->setText( "--" ); @@ -313,10 +313,10 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo //because we don't want a thousands-place separator! TQString sEpoch = TQString::number( ut.epoch(), 'f', 1 ); //Replace the decimal point with localized decimal symbol - sEpoch.replace( ".", KGlobal::locale()->decimalSymbol() ); + sEpoch.tqreplace( ".", KGlobal::locale()->decimalSymbol() ); - Pos->RALabel->setText( i18n( "RA (%1):" ).arg( sEpoch ) ); - Pos->DecLabel->setText( i18n( "Dec (%1):" ).arg( sEpoch ) ); + Pos->RALabel->setText( i18n( "RA (%1):" ).tqarg( sEpoch ) ); + Pos->DecLabel->setText( i18n( "Dec (%1):" ).tqarg( sEpoch ) ); Pos->RA->setText( selectedObject->ra()->toHMSString() ); Pos->Dec->setText( selectedObject->dec()->toDMSString() ); Pos->Az->setText( selectedObject->az()->toDMSString() ); @@ -331,7 +331,7 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo ha.setH( 24.0 - ha.Hours() ); sgn = '-'; } - Pos->HA->setText( TQString("%1%2").arg(sgn).arg( ha.toHMSString() ) ); + Pos->HA->setText( TQString("%1%2").tqarg(sgn).tqarg( ha.toHMSString() ) ); //Airmass is approximated as the secant of the zenith distance, //equivalent to 1./sin(Alt). Beware of Inf at Alt=0! @@ -484,7 +484,7 @@ void DetailDialog::createLogTab() vlay->addWidget( Log ); if ( selectedObject->userLog.isEmpty() ) - Log->UserLog->setText(i18n("Record here observation logs and/or data on %1.").arg(selectedObject->translatedName())); + Log->UserLog->setText(i18n("Record here observation logs and/or data on %1.").tqarg(selectedObject->translatedName())); else Log->UserLog->setText(selectedObject->userLog); @@ -658,7 +658,7 @@ void DetailDialog::removeLinkDialog() currentItemTitle = Links->ImagesList->currentText(); } - if (KMessageBox::warningContinueCancel( 0, i18n("Are you sure you want to remove the %1 link?").arg(currentItemTitle), i18n("Delete Confirmation"),KStdGuiItem::del())!=KMessageBox::Continue) + if (KMessageBox::warningContinueCancel( 0, i18n("Are you sure you want to remove the %1 link?").tqarg(currentItemTitle), i18n("Delete Confirmation"),KStdGuiItem::del())!=KMessageBox::Continue) return; switch (type) @@ -706,9 +706,9 @@ bool DetailDialog::verifyUserData(int type) for (i=0; i<dataList.count(); i++) { line = dataList[i]; - name = line.mid( 0, line.find(':') ); - sub = line.mid( line.find(':')+1 ); - title = sub.mid( 0, sub.find(':') ); + name = line.mid( 0, line.tqfind(':') ); + sub = line.mid( line.tqfind(':')+1 ); + title = sub.mid( 0, sub.tqfind(':') ); if (name == selectedObject->name() && title == currentItemTitle) { ObjectFound = true; @@ -723,9 +723,9 @@ bool DetailDialog::verifyUserData(int type) for (i=0; i<dataList.count(); i++) { line = dataList[i]; - name = line.mid( 0, line.find(':') ); - sub = line.mid( line.find(':')+1 ); - title = sub.mid( 0, sub.find(':') ); + name = line.mid( 0, line.tqfind(':') ); + sub = line.mid( line.tqfind(':')+1 ); + title = sub.mid( 0, sub.tqfind(':') ); if (name == selectedObject->name() && title == currentItemTitle) { ObjectFound = true; @@ -774,7 +774,7 @@ bool DetailDialog::readUserFile(int type)//, int sourceFileType) return true; } -void DetailDialog::populateADVTree(TQListViewItem *parent) +void DetailDialog::populateADVTree(TQListViewItem *tqparent) { // list done if (!treeIt->current()) @@ -782,20 +782,20 @@ void DetailDialog::populateADVTree(TQListViewItem *parent) // if relative top level [KSLABEL] if (treeIt->current()->Type == 0) - forkTree(parent); + forkTree(tqparent); while (treeIt->current()) { if (treeIt->current()->Type == 0) { - forkTree(parent); + forkTree(tqparent); continue; } else if (treeIt->current()->Type == 1) break; - if (parent) - new TQListViewItem( parent, treeIt->current()->Name); + if (tqparent) + new TQListViewItem( tqparent, treeIt->current()->Name); else new TQListViewItem( Adv->ADVTree, treeIt->current()->Name); @@ -803,11 +803,11 @@ void DetailDialog::populateADVTree(TQListViewItem *parent) } } -void DetailDialog::forkTree(TQListViewItem *parent) +void DetailDialog::forkTree(TQListViewItem *tqparent) { TQListViewItem *current = 0; - if (parent) - current = new TQListViewItem(parent, treeIt->current()->Name); + if (tqparent) + current = new TQListViewItem(tqparent, treeIt->current()->Name); else current = new TQListViewItem(Adv->ADVTree, treeIt->current()->Name); @@ -845,13 +845,13 @@ TQString DetailDialog::parseADVData(TQString link) TQString subLink; int index; - if ( (index = link.find("KSOBJ")) != -1) + if ( (index = link.tqfind("KSOBJ")) != -1) { link.remove(index, 5); link = link.insert(index, selectedObject->name()); } - if ( (index = link.find("KSRA")) != -1) + if ( (index = link.tqfind("KSRA")) != -1) { link.remove(index, 4); subLink = TQString().sprintf("%02d%02d%02d", selectedObject->ra0()->hour(), selectedObject->ra0()->minute(), selectedObject->ra0()->second()); @@ -860,7 +860,7 @@ TQString DetailDialog::parseADVData(TQString link) link = link.insert(index, subLink); } - if ( (index = link.find("KSDEC")) != -1) + if ( (index = link.tqfind("KSDEC")) != -1) { link.remove(index, 5); if (selectedObject->dec()->degree() < 0) @@ -905,8 +905,8 @@ void DetailDialog::centerTelescope() int selectedCoord(0); SkyPoint sp; - // Find the first device with EQUATORIAL_EOD_COORD or EQUATORIAL_COORD and with SLEW element - // i.e. the first telescope we find! + // Find the first device with ETQUATORIAL_EOD_COORD or ETQUATORIAL_COORD and with SLEW element + // i.e. the first telescope we tqfind! INDIMenu *imenu = ksw->getINDIMenu(); @@ -917,10 +917,10 @@ void DetailDialog::centerTelescope() { indidev = imenu->mgr.at(i)->indi_dev.at(j); indidev->stdDev->currentObject = NULL; - prop = indidev->findProp("EQUATORIAL_EOD_COORD"); + prop = indidev->findProp("ETQUATORIAL_EOD_COORD"); if (prop == NULL) { - prop = indidev->findProp("EQUATORIAL_COORD"); + prop = indidev->findProp("ETQUATORIAL_COORD"); if (prop == NULL) { prop = indidev->findProp("HORIZONTAL_COORD"); @@ -938,7 +938,7 @@ void DetailDialog::centerTelescope() if (ConnectEle->state == PS_OFF) { - KMessageBox::error(0, i18n("Telescope %1 is offline. Please connect and retry again.").arg(indidev->label)); + KMessageBox::error(0, i18n("Telescope %1 is offline. Please connect and retry again.").tqarg(indidev->label)); return; } @@ -953,7 +953,7 @@ void DetailDialog::centerTelescope() if (!DecEle) continue; break; - // Horizontal + //Qt::Horizontal case 1: if (prop->perm == PP_RO) continue; AzEle = prop->findElement("AZ"); @@ -990,10 +990,10 @@ void DetailDialog::centerTelescope() sp.set (ksw->map()->clickedPoint()->ra(), ksw->map()->clickedPoint()->dec()); if (useJ2000) - sp.apparentCoord(ksw->data()->ut().djd(), (long double) J2000); + sp.aptqparentCoord(ksw->data()->ut().djd(), (long double) J2000); - RAEle->write_w->setText(TQString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); - DecEle->write_w->setText(TQString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); + RAEle->write_w->setText(TQString("%1:%2:%3").tqarg(sp.ra()->hour()).tqarg(sp.ra()->minute()).tqarg(sp.ra()->second())); + DecEle->write_w->setText(TQString("%1:%2:%3").tqarg(sp.dec()->degree()).tqarg(sp.dec()->arcmin()).tqarg(sp.dec()->arcsec())); break; @@ -1009,8 +1009,8 @@ void DetailDialog::centerTelescope() sp.setAlt(*ksw->map()->clickedPoint()->alt()); } - AzEle->write_w->setText(TQString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); - AltEle->write_w->setText(TQString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); + AzEle->write_w->setText(TQString("%1:%2:%3").tqarg(sp.az()->degree()).tqarg(sp.az()->arcmin()).tqarg(sp.az()->arcsec())); + AltEle->write_w->setText(TQString("%1:%2:%3").tqarg(sp.alt()->degree()).tqarg(sp.alt()->arcmin()).tqarg(sp.alt()->arcsec())); break; } @@ -1040,7 +1040,7 @@ void DetailDialog::showThumbnail() { //If no image found, load "no image" image //If that isn't found, make it blank. TQFile file; - TQString fname = "thumb-" + selectedObject->name().lower().replace( TQRegExp(" "), "" ) + ".png"; + TQString fname = "thumb-" + selectedObject->name().lower().tqreplace( TQRegExp(" "), "" ) + ".png"; if ( KSUtils::openDataFile( file, fname ) ) { file.close(); Thumbnail->load( file.name(), "PNG" ); @@ -1060,7 +1060,7 @@ void DetailDialog::updateThumbnail() { if ( tp.exec() == TQDialog::Accepted ) { TQString fname = locateLocal( "appdata", "thumb-" - + selectedObject->name().lower().replace( TQRegExp(" "), "" ) + ".png" ); + + selectedObject->name().lower().tqreplace( TQRegExp(" "), "" ) + ".png" ); Data->Image->setPixmap( *(tp.image()) ); |