diff options
Diffstat (limited to 'kstars/kstars/colorscheme.cpp')
-rw-r--r-- | kstars/kstars/colorscheme.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kstars/kstars/colorscheme.cpp b/kstars/kstars/colorscheme.cpp index 5449c48e..66981101 100644 --- a/kstars/kstars/colorscheme.cpp +++ b/kstars/kstars/colorscheme.cpp @@ -144,7 +144,7 @@ void ColorScheme::copy( const ColorScheme &cs ) { TQString ColorScheme::colorNamed( const TQString &name ) const { //TQString color( Palette[ name ] ); if ( ! hasColorNamed( name ) ) { - kdWarning() << i18n( "No color named \"%1\" found in color scheme." ).arg( name ) << endl; + kdWarning() << i18n( "No color named \"%1\" found in color scheme." ).tqarg( name ) << endl; //color = "#FFFFFF"; //set to white if no color found return "#FFFFFF"; } @@ -168,7 +168,7 @@ TQString ColorScheme::keyAt( int i ) const { } TQString ColorScheme::nameFromKey( const TQString &key ) const { - return nameAt( KeyName.findIndex( key ) ); + return nameAt( KeyName.tqfindIndex( key ) ); } void ColorScheme::setColor( const TQString &key, const TQString &color ) { @@ -191,8 +191,8 @@ bool ColorScheme::load( const TQString &filename ) { bool ok(false); int newmode = line.left(1).toInt( &ok ); if ( ok ) setStarColorMode( newmode ); - if ( line.contains(':') ) { - int newintens = line.mid( line.find(':')+1, 2 ).toInt( &ok ); + if ( line.tqcontains(':') ) { + int newintens = line.mid( line.tqfind(':')+1, 2 ).toInt( &ok ); if ( ok ) setStarColorIntensity( newintens ); } @@ -201,19 +201,19 @@ bool ColorScheme::load( const TQString &filename ) { while ( !stream.eof() ) { line = stream.readLine(); - if ( line.contains(':')==1 ) { //the new color preset format contains a ":" in each line, followed by the name of the color + if ( line.tqcontains(':')==1 ) { //the new color preset format contains a ":" in each line, followed by the name of the color ++inew; if ( iold ) return false; //we read at least one line without a colon...file is corrupted. //If this line has a valid Key, set the color. - TQString tkey = line.mid( line.find(':')+1 ).stripWhiteSpace(); - TQString tname = line.left( line.find(':')-1 ); + TQString tkey = line.mid( line.tqfind(':')+1 ).stripWhiteSpace(); + TQString tname = line.left( line.tqfind(':')-1 ); - if ( KeyName.contains( tkey ) ) { + if ( KeyName.tqcontains( tkey ) ) { setColor( tkey, tname ); } else { //attempt to translate from old color ID TQString k( line.mid( 5 ).stripWhiteSpace() + "Color" ); - if ( KeyName.contains( k ) ) { + if ( KeyName.tqcontains( k ) ) { setColor( k, tname ); } else { kdWarning() << "Could not use the key \"" << tkey << @@ -248,7 +248,7 @@ bool ColorScheme::save( const TQString &name ) { TQString filename = name.lower().stripWhiteSpace(); if ( !filename.isEmpty() ) { for( unsigned int i=0; i<filename.length(); ++i) - if ( filename.at(i)==' ' ) filename.replace( i, 1, "-" ); + if ( filename.at(i)==' ' ) filename.tqreplace( i, 1, "-" ); filename = filename.append( ".colors" ); file.setName( locateLocal( "appdata", filename ) ); //determine filename in local user KDE directory tree. @@ -294,7 +294,7 @@ void ColorScheme::loadFromConfig( KConfig *conf ) { TQStringList::Iterator it = KeyName.begin(); TQStringList::Iterator it_end = KeyName.end(); for ( ; it != it_end; ++it ) - setColor( TQString(*it), conf->readEntry( TQString(*it), TQString( *Default.at( KeyName.findIndex(*it) ) ) ) ); + setColor( TQString(*it), conf->readEntry( TQString(*it), TQString( *Default.at( KeyName.tqfindIndex(*it) ) ) ) ); setStarColorMode( conf->readNumEntry( "StarColorMode", 0 ) ); setStarColorIntensity( conf->readNumEntry( "StarColorIntensity", 5 ) ); |