diff options
Diffstat (limited to 'kstars/kstars/kstarsdata.cpp')
-rw-r--r-- | kstars/kstars/kstarsdata.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kstars/kstars/kstarsdata.cpp b/kstars/kstars/kstarsdata.cpp index 15f5178c..f5d847db 100644 --- a/kstars/kstars/kstarsdata.cpp +++ b/kstars/kstars/kstarsdata.cpp @@ -433,7 +433,7 @@ bool KStarsData::readCLineData( void ) { } if ( ! starFound ) - kdWarning() << i18n( "No star named %1 found." ).tqarg(name) << endl; + kdWarning() << i18n( "No star named %1 found." ).arg(name) << endl; } } file.close(); @@ -584,7 +584,7 @@ bool KStarsData::readStarData( void ) { if (Options::magLimitDrawStar() > loadUntilMag) loadUntilMag = Options::magLimitDrawStar(); for (unsigned int i=1; i<NHIPFILES+1; ++i) { - emit progressText( i18n( "Loading Star Data (%1%)" ).tqarg( int(100.*float(i)/float(NHIPFILES)) ) ); + emit progressText( i18n( "Loading Star Data (%1%)" ).arg( int(100.*float(i)/float(NHIPFILES)) ) ); if (openStarFile(i) == true) { while (starFileReader->hasMoreLines()) { @@ -788,7 +788,7 @@ bool KStarsData::readDeepSkyData( void ) { snum = TQString().sprintf( "%02d", i+1 ); fname = "ngcic" + snum + ".dat"; - emit progressText( i18n( "Loading NGC/IC Data (%1%)" ).tqarg( int(100.*float(i)/float(NNGCFILES)) ) ); + emit progressText( i18n( "Loading NGC/IC Data (%1%)" ).arg( int(100.*float(i)/float(NNGCFILES)) ) ); if ( KSUtils::openDataFile( file, fname ) ) { KSFileReader fileReader( file ); // close file is included @@ -1142,7 +1142,7 @@ bool KStarsData::addCatalog( TQString filename ) { return true; } else - kdWarning() << k_funcinfo << i18n("Error adding catalog: %1").tqarg( filename ) << endl; + kdWarning() << k_funcinfo << i18n("Error adding catalog: %1").arg( filename ) << endl; return false; } @@ -1220,7 +1220,7 @@ CustomCatalog* KStarsData::createCustomCatalog( TQString filename, bool showerrs if ( d.count() == Columns.count() ) { processCustomDataLine( i, d, Columns, CatalogPrefix, objList, showerrs, errs ); } else { - if ( showerrs ) errs.append( i18n( "Line %1 does not contain %2 fields. Skipping it." ).tqarg( i ).tqarg( Columns.count() ) ); + if ( showerrs ) errs.append( i18n( "Line %1 does not contain %2 fields. Skipping it." ).arg( i ).arg( Columns.count() ) ); } } } @@ -1246,10 +1246,10 @@ CustomCatalog* KStarsData::createCustomCatalog( TQString filename, bool showerrs } else { //Error opening catalog file if ( showerrs ) - KMessageBox::sorry( 0, i18n( "Could not open custom data file: %1" ).tqarg( filename ), + KMessageBox::sorry( 0, i18n( "Could not open custom data file: %1" ).arg( filename ), i18n( "Error opening file" ) ); else - kdDebug() << i18n( "Could not open custom data file: %1" ).tqarg( filename ) << endl; + kdDebug() << i18n( "Could not open custom data file: %1" ).arg( filename ) << endl; } //Return the catalog @@ -1280,7 +1280,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! RA.setFromString( d[i], false ) ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse RA value: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1289,7 +1289,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! Dec.setFromString( d[i], true ) ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Dec value: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1301,14 +1301,14 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( iType == 2 || iType > 8 ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Invalid object type: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) + + .arg(lnum).arg(i).arg(d[i]) + i18n( "Must be one of 0, 1, 3, 4, 5, 6, 7, 8." ) ); return false; } } else { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Object type: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1319,7 +1319,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! ok ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Magnitude: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1330,7 +1330,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! ok ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Major Axis: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1341,7 +1341,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! ok ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Minor Axis: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1352,7 +1352,7 @@ bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList C if ( ! ok ) { if ( showerrs ) errs.append( i18n( "Line %1, field %2: Unable to parse Position Angle: %3" ) - .tqarg(lnum).tqarg(i).tqarg(d[i]) ); + .arg(lnum).arg(i).arg(d[i]) ); return false; } } @@ -1400,7 +1400,7 @@ bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Column } else { //duplicate name in header if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Extra Name field in header: %1. Will be ignored" ).tqarg( d.mid(iname) ) ); + i18n( "Extra Name field in header: %1. Will be ignored" ).arg( d.mid(iname) ) ); } } else if ( iprefix == 0 ) { //line contains catalog prefix iprefix = d.find(":")+2; @@ -1409,7 +1409,7 @@ bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Column } else { //duplicate prefix in header if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Extra Prefix field in header: %1. Will be ignored" ).tqarg( d.mid(iprefix) ) ); + i18n( "Extra Prefix field in header: %1. Will be ignored" ).arg( d.mid(iprefix) ) ); } } else if ( icolor == 0 ) { //line contains catalog prefix icolor = d.find(":")+2; @@ -1418,7 +1418,7 @@ bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Column } else { //duplicate prefix in header if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Extra Color field in header: %1. Will be ignored" ).tqarg( d.mid(icolor) ) ); + i18n( "Extra Color field in header: %1. Will be ignored" ).arg( d.mid(icolor) ) ); } } else if ( iepoch == 0 ) { //line contains catalog epoch iepoch = d.find(":")+2; @@ -1428,13 +1428,13 @@ bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Column if ( !ok ) { if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Could not convert Epoch to float: %1. Using 2000. instead" ).tqarg( d.mid(iepoch) ) ); + i18n( "Could not convert Epoch to float: %1. Using 2000. instead" ).arg( d.mid(iepoch) ) ); CatalogEpoch = 2000.; //adopt default value } } else { //duplicate epoch in header if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Extra Epoch field in header: %1. Will be ignored" ).tqarg( d.mid(iepoch) ) ); + i18n( "Extra Epoch field in header: %1. Will be ignored" ).arg( d.mid(iepoch) ) ); } } else if ( ! foundDataColumns ) { //don't try to parse data column descriptors if we already found them //Chomp off leading "#" character @@ -1466,12 +1466,12 @@ bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Column fields.append( "Ig" ); //skip this column if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Duplicate data field descriptor \"%1\" will be ignored" ).tqarg( s ) ); + i18n( "Duplicate data field descriptor \"%1\" will be ignored" ).arg( s ) ); } else { //Invalid field fields.append( "Ig" ); //skip this column if ( showerrs ) errs.append( i18n( "Parsing header: " ) + - i18n( "Invalid data field descriptor \"%1\" will be ignored" ).tqarg( s ) ); + i18n( "Invalid data field descriptor \"%1\" will be ignored" ).arg( s ) ); } } @@ -1774,20 +1774,20 @@ void KStarsData::initError(TQString s, bool required = false) { message = i18n( "The file %1 could not be found. " "KStars cannot run properly without this file. " "To continue loading, place the file in one of the " - "following locations, then press Retry:\n\n" ).tqarg( s ) - + TQString( "\t$(TDEDIR)/share/apps/kstars/%1\n" ).tqarg( s ) - + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).tqarg( s ) + "following locations, then press Retry:\n\n" ).arg( s ) + + TQString( "\t$(TDEDIR)/share/apps/kstars/%1\n" ).arg( s ) + + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + i18n( "Otherwise, press Cancel to shutdown." ); - caption = i18n( "Critical File Not Found: %1" ).tqarg( s ); + caption = i18n( "Critical File Not Found: %1" ).arg( s ); } else { message = i18n( "The file %1 could not be found. " "KStars can still run without this file. " "However, to avoid seeing this message in the future, you can " - "place the file in one of the following locations, then press Retry:\n\n" ).tqarg( s ) - + TQString( "\t$(TDEDIR)/share/apps/kstars/%1\n" ).tqarg( s ) - + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).tqarg( s ) - + i18n( "Otherwise, press Cancel to continue loading without this file." ).tqarg( s ); - caption = i18n( "Non-Critical File Not Found: %1" ).tqarg( s ); + "place the file in one of the following locations, then press Retry:\n\n" ).arg( s ) + + TQString( "\t$(TDEDIR)/share/apps/kstars/%1\n" ).arg( s ) + + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + + i18n( "Otherwise, press Cancel to continue loading without this file." ).arg( s ); + caption = i18n( "Non-Critical File Not Found: %1" ).arg( s ); } if ( KMessageBox::warningContinueCancel( 0, message, caption, i18n( "Retry" ) ) == KMessageBox::Continue ) { @@ -1839,7 +1839,7 @@ void KStarsData::slotInitialize() { case 2: //Load stellar database// - emit progressText(i18n("Loading Star Data (%1%)" ).tqarg(0) ); + emit progressText(i18n("Loading Star Data (%1%)" ).arg(0) ); if ( !readStarData( ) ) initError( "hipNNN.dat", true ); if (!readVARData()) @@ -1850,7 +1850,7 @@ void KStarsData::slotInitialize() { case 3: //Load NGC/IC database and custom catalogs// - emit progressText( i18n("Loading NGC/IC Data (%1%)" ).tqarg(0) ); + emit progressText( i18n("Loading NGC/IC Data (%1%)" ).arg(0) ); if ( !readDeepSkyData( ) ) initError( "ngcicN.dat", true ); @@ -2345,7 +2345,7 @@ bool KStarsData::executeScript( const TQString &scriptname, SkyMap *map ) { TQFile f( scriptname ); if ( !f.open( IO_ReadOnly) ) { - kdDebug() << i18n( "Could not open file %1" ).tqarg( f.name() ) << endl; + kdDebug() << i18n( "Could not open file %1" ).arg( f.name() ) << endl; return false; } @@ -2445,7 +2445,7 @@ bool KStarsData::executeScript( const TQString &scriptname, SkyMap *map ) { cmdCount++; } else { kdWarning() << i18n( "Could not set time: %1 / %2 / %3 ; %4:%5:%6" ) - .tqarg(day).tqarg(mth).tqarg(yr).tqarg(hr).tqarg(min).tqarg(sec) << endl; + .arg(day).arg(mth).arg(yr).arg(hr).arg(min).arg(sec) << endl; } } else if ( fn[0] == "changeViewOption" && fn.count() == 3 ) { bool bOk(false), nOk(false), dOk(false); @@ -2559,7 +2559,7 @@ bool KStarsData::executeScript( const TQString &scriptname, SkyMap *map ) { } if ( !cityFound ) - kdWarning() << i18n( "Could not set location named %1, %2, %3" ).tqarg(city).tqarg(province).tqarg(country) << endl; + kdWarning() << i18n( "Could not set location named %1, %2, %3" ).arg(city).arg(province).arg(country) << endl; } } } //end while |