Rename KLocale to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent eb973d5c88
commit 088cc453ec

@ -114,7 +114,7 @@ void CoordinateValidator::fixup( TQString & input ) const
if ( sc == -1 ) if ( sc == -1 )
{ {
sc = input.length(); sc = input.length();
KLocale* l = TDEGlobal::locale(); TDELocale* l = TDEGlobal::locale();
if ( mpolar ) if ( mpolar )
input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + input.append( TQString::fromLatin1( ";" ) + l->positiveSign() +
TQString::fromLatin1( "" ) ); TQString::fromLatin1( "" ) );
@ -157,7 +157,7 @@ Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const
{ {
TQString xs = r.cap(1); TQString xs = r.cap(1);
TQString ys = r.cap(2); TQString ys = r.cap(2);
KLocale* l = TDEGlobal::locale(); TDELocale* l = TDEGlobal::locale();
double x = l->readNumber( xs, &ok ); double x = l->readNumber( xs, &ok );
if ( ! ok ) x = xs.toDouble( &ok ); if ( ! ok ) x = xs.toDouble( &ok );
if ( ! ok ) return Coordinate(); if ( ! ok ) return Coordinate();

@ -309,7 +309,7 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
vlay->addWidget( Pos ); vlay->addWidget( Pos );
//Coordinates Section: //Coordinates Section:
//Don't use KLocale::formatNumber() for the epoch string, //Don't use TDELocale::formatNumber() for the epoch string,
//because we don't want a thousands-place separator! //because we don't want a thousands-place separator!
TQString sEpoch = TQString::number( ut.epoch(), 'f', 1 ); TQString sEpoch = TQString::number( ut.epoch(), 'f', 1 );
//Replace the decimal point with localized decimal symbol //Replace the decimal point with localized decimal symbol

@ -348,7 +348,7 @@ bool InfoBoxes::timeChanged( const KStarsDateTime &ut, const KStarsDateTime &lt,
TQString STString; TQString STString;
STString = STString.sprintf( "%02d:%02d:%02d ", lst->hour(), lst->minute(), lst->second() ); STString = STString.sprintf( "%02d:%02d:%02d ", lst->hour(), lst->minute(), lst->second() );
//Don't use KLocale::formatNumber() for Julian Day because we don't want //Don't use TDELocale::formatNumber() for Julian Day because we don't want
//thousands-place separators //thousands-place separators
TQString JDString = TQString::number( ut.djd(), 'f', 2 ); TQString JDString = TQString::number( ut.djd(), 'f', 2 );
JDString.replace( ".", TDEGlobal::locale()->decimalSymbol() ); JDString.replace( ".", TDEGlobal::locale()->decimalSymbol() );

@ -71,7 +71,7 @@ KStarsData::KStarsData() : stdDirs(0), locale(0),
//standard directories and locale objects //standard directories and locale objects
stdDirs = new TDEStandardDirs(); stdDirs = new TDEStandardDirs();
locale = new KLocale( "kstars" ); locale = new TDELocale( "kstars" );
//Check to see if config file already exists. If not, set //Check to see if config file already exists. If not, set
//useDefaultOptions = true //useDefaultOptions = true

@ -441,9 +441,9 @@ public:
*/ */
bool isTimeRunningForward() { return TimeRunsForward; } bool isTimeRunningForward() { return TimeRunsForward; }
/**@return pointer to the localization (KLocale) object /**@return pointer to the localization (TDELocale) object
*/ */
KLocale *getLocale() { return locale; } TDELocale *getLocale() { return locale; }
/**@return pointer to the Earth object /**@return pointer to the Earth object
*/ */
@ -736,7 +736,7 @@ private:
TQString cnameFile; TQString cnameFile;
TDEStandardDirs *stdDirs; TDEStandardDirs *stdDirs;
KLocale *locale; TDELocale *locale;
dms *LST, *HourAngle; dms *LST, *HourAngle;

@ -25,7 +25,7 @@ class TQTime;
class TQVariant; class TQVariant;
class TQVBoxLayout; class TQVBoxLayout;
class KDialogBase; class KDialogBase;
class KLocale; class TDELocale;
class SkyObject; class SkyObject;
class SkyPoint; class SkyPoint;
class dms; class dms;

@ -1007,11 +1007,11 @@ LangSet LanguageOptions::getLangSet () const
void LanguageOptions::loadCountryData() void LanguageOptions::loadCountryData()
{ {
// temperary use of our locale as the global locale // temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale; TDELocale *lsave = TDEGlobal::_locale;
TQString curr_lang = lsave->language(); TQString curr_lang = lsave->language();
// KLocale locale("kvoctrain"); // TDELocale locale("kvoctrain");
KLocale locale(TQString::null); TDELocale locale(TQString::null);
locale.setLanguage(curr_lang); locale.setLanguage(curr_lang);
TDEGlobal::_locale = &locale; TDEGlobal::_locale = &locale;

@ -35,10 +35,10 @@
class ExtCalendarSystemPrivate class ExtCalendarSystemPrivate
{ {
public: public:
const KLocale * locale; const TDELocale * locale;
}; };
ExtCalendarSystem::ExtCalendarSystem(const KLocale * locale) ExtCalendarSystem::ExtCalendarSystem(const TDELocale * locale)
: d(new ExtCalendarSystemPrivate) : d(new ExtCalendarSystemPrivate)
{ {
d->locale = locale; d->locale = locale;
@ -49,7 +49,7 @@ ExtCalendarSystem::~ExtCalendarSystem()
delete d; delete d;
} }
const KLocale * ExtCalendarSystem::locale() const const TDELocale * ExtCalendarSystem::locale() const
{ {
if ( d->locale ) if ( d->locale )
return d->locale; return d->locale;

@ -28,7 +28,7 @@
#include "extdatetime.h" #include "extdatetime.h"
class KLocale; class TDELocale;
class ExtCalendarSystemPrivate; class ExtCalendarSystemPrivate;
@ -51,7 +51,7 @@ public:
* *
* @param locale It will use this locale for translations, 0 means global. * @param locale It will use this locale for translations, 0 means global.
*/ */
ExtCalendarSystem(const KLocale * locale = 0); ExtCalendarSystem(const TDELocale * locale = 0);
/** /**
* Descructor. * Descructor.
@ -348,7 +348,7 @@ public:
virtual bool isSolar() const = 0; virtual bool isSolar() const = 0;
protected: protected:
const KLocale * locale() const; const TDELocale * locale() const;
private: private:
ExtCalendarSystemPrivate * d; ExtCalendarSystemPrivate * d;

@ -32,7 +32,7 @@
#include "extcalendarsystemgregorian.h" #include "extcalendarsystemgregorian.h"
ExtCalendarSystemGregorian::ExtCalendarSystemGregorian(const KLocale * locale) ExtCalendarSystemGregorian::ExtCalendarSystemGregorian(const TDELocale * locale)
: ExtCalendarSystem(locale) : ExtCalendarSystem(locale)
{ {
} }

@ -38,7 +38,7 @@ class ExtCalendarSystemGregorianPrivate;
* The Gregorian calender is the most used calendar today. The first year in * The Gregorian calender is the most used calendar today. The first year in
* the calendar is set to the birth of Christ. * the calendar is set to the birth of Christ.
* *
* @see KLocale,ExtCalendarSystem,ExtCalendarSystemFactory * @see TDELocale,ExtCalendarSystem,ExtCalendarSystemFactory
* *
* @author Carlos Moro <cfmoro@correo.uniovi.es> * @author Carlos Moro <cfmoro@correo.uniovi.es>
* @license GNU-GPL v.2 * @license GNU-GPL v.2
@ -48,7 +48,7 @@ class ExtCalendarSystemGregorianPrivate;
class ExtCalendarSystemGregorian: public ExtCalendarSystem class ExtCalendarSystemGregorian: public ExtCalendarSystem
{ {
public: public:
ExtCalendarSystemGregorian (const KLocale * locale = 0); ExtCalendarSystemGregorian (const TDELocale * locale = 0);
virtual ~ExtCalendarSystemGregorian (); virtual ~ExtCalendarSystemGregorian ();
virtual int year (const ExtDate & date) const; virtual int year (const ExtDate & date) const;

@ -73,7 +73,7 @@ ExtDateWidget::ExtDateWidget( const ExtDate &date, TQWidget *parent,
// void ExtDateWidget::init() // void ExtDateWidget::init()
// { // {
// d = new ExtDateWidgetPrivate; // d = new ExtDateWidgetPrivate;
// KLocale *locale = TDEGlobal::locale(); // TDELocale *locale = TDEGlobal::locale();
// TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); // TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
// layout->setAutoAdd(true); // layout->setAutoAdd(true);
// d->m_day = new ExtDateWidgetSpinBox(1, 1, this); // d->m_day = new ExtDateWidgetSpinBox(1, 1, this);
@ -97,7 +97,7 @@ ExtDateWidget::ExtDateWidget( const ExtDate &date, TQWidget *parent,
void ExtDateWidget::init(const ExtDate& date) void ExtDateWidget::init(const ExtDate& date)
{ {
d = new ExtDateWidgetPrivate; d = new ExtDateWidgetPrivate;
//KLocale *locale = TDEGlobal::locale(); //TDELocale *locale = TDEGlobal::locale();
TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true); layout->setAutoAdd(true);
d->m_day = new ExtDateWidgetSpinBox(1, 1, this); d->m_day = new ExtDateWidgetSpinBox(1, 1, this);

Loading…
Cancel
Save