Rename KLocale to enhance compatibility with KDE4

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

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

@ -309,7 +309,7 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
vlay->addWidget( Pos );
//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!
TQString sEpoch = TQString::number( ut.epoch(), 'f', 1 );
//Replace the decimal point with localized decimal symbol

@ -348,7 +348,7 @@ bool InfoBoxes::timeChanged( const KStarsDateTime &ut, const KStarsDateTime &lt,
TQString STString;
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
TQString JDString = TQString::number( ut.djd(), 'f', 2 );
JDString.replace( ".", TDEGlobal::locale()->decimalSymbol() );

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

@ -441,9 +441,9 @@ public:
*/
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
*/
@ -736,7 +736,7 @@ private:
TQString cnameFile;
TDEStandardDirs *stdDirs;
KLocale *locale;
TDELocale *locale;
dms *LST, *HourAngle;

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

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

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

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

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

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

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

Loading…
Cancel
Save