summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoGlobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoGlobal.cpp')
-rw-r--r--lib/kofficecore/KoGlobal.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp
index 87717172..53c9e4fe 100644
--- a/lib/kofficecore/KoGlobal.cpp
+++ b/lib/kofficecore/KoGlobal.cpp
@@ -21,8 +21,8 @@
#include "config.h"
#include <KoGlobal.h>
#include <kdebug.h>
-#include <qfont.h>
-#include <qfontinfo.h>
+#include <tqfont.h>
+#include <tqfontinfo.h>
#include <kglobalsettings.h>
#include <kglobal.h>
#include <klocale.h>
@@ -47,7 +47,7 @@ KoGlobal* KoGlobal::self()
KoGlobal::KoGlobal()
: m_pointSize( -1 ), m_kofficeConfig( 0L )
{
- // Make sure that QCString::setNum doesn't give us "," as decimal point, e.g. when saving to OpenDocument.
+ // Make sure that TQCString::setNum doesn't give us "," as decimal point, e.g. when saving to OpenDocument.
setlocale( LC_NUMERIC, "C" );
// Install the libkoffice* translations
@@ -61,12 +61,12 @@ KoGlobal::KoGlobal()
// Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice");
- // Another way to get the DPI of the display would be QPaintDeviceMetrics,
+ // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily).
-#ifdef Q_WS_X11
- m_dpiX = QPaintDevice::x11AppDpiX();
- m_dpiY = QPaintDevice::x11AppDpiY();
+#ifdef TQ_WS_X11
+ m_dpiX = TQPaintDevice::x11AppDpiX();
+ m_dpiY = TQPaintDevice::x11AppDpiY();
#else
m_dpiX = 75;
m_dpiY = 75;
@@ -78,31 +78,31 @@ KoGlobal::~KoGlobal()
delete m_kofficeConfig;
}
-QFont KoGlobal::_defaultFont()
+TQFont KoGlobal::_defaultFont()
{
- QFont font = KGlobalSettings::generalFont();
- // we have to use QFontInfo, in case the font was specified with a pixel size
+ TQFont font = KGlobalSettings::generalFont();
+ // we have to use TQFontInfo, in case the font was specified with a pixel size
if ( font.pointSize() == -1 )
{
- // cache size into m_pointSize, since QFontInfo loads the font -> slow
+ // cache size into m_pointSize, since TQFontInfo loads the font -> slow
if ( m_pointSize == -1 )
- m_pointSize = QFontInfo(font).pointSize();
+ m_pointSize = TQFontInfo(font).pointSize();
Q_ASSERT( m_pointSize != -1 );
font.setPointSize( m_pointSize );
}
- //kdDebug()<<k_funcinfo<<"QFontInfo(font).pointSize() :"<<QFontInfo(font).pointSize()<<endl;
+ //kdDebug()<<k_funcinfo<<"TQFontInfo(font).pointSize() :"<<TQFontInfo(font).pointSize()<<endl;
//kdDebug()<<k_funcinfo<<"font.name() :"<<font.family ()<<endl;
return font;
}
-QStringList KoGlobal::_listOfLanguageTags()
+TQStringList KoGlobal::_listOfLanguageTags()
{
if ( m_langMap.isEmpty() )
createListOfLanguages();
return m_langMap.values();
}
-QStringList KoGlobal::_listOfLanguages()
+TQStringList KoGlobal::_listOfLanguages()
{
if ( m_langMap.empty() )
createListOfLanguages();
@@ -114,17 +114,17 @@ void KoGlobal::createListOfLanguages()
KConfig config( "all_languages", true, false, "locale" );
// Note that we could also use KLocale::allLanguagesTwoAlpha
- QMap<QString, bool> seenLanguages;
- const QStringList langlist = config.groupList();
- for ( QStringList::ConstIterator itall = langlist.begin();
+ TQMap<TQString, bool> seenLanguages;
+ const TQStringList langlist = config.groupList();
+ for ( TQStringList::ConstIterator itall = langlist.begin();
itall != langlist.end(); ++itall )
{
- const QString tag = *itall;
+ const TQString tag = *itall;
config.setGroup( tag );
- const QString name = config.readEntry("Name", tag);
+ const TQString name = config.readEntry("Name", tag);
// e.g. name is "French" and tag is "fr"
- // The QMap does the sorting on the display-name, so that
+ // The TQMap does the sorting on the display-name, so that
// comboboxes are sorted.
m_langMap.insert( name, tag );
@@ -135,23 +135,23 @@ void KoGlobal::createListOfLanguages()
// Many of them are already in all_languages but all_languages doesn't
// currently have en_GB or en_US etc.
- const QStringList translationList = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
- for ( QStringList::ConstIterator it = translationList.begin();
+ const TQStringList translationList = KGlobal::dirs()->findAllResources("locale",
+ TQString::tqfromLatin1("*/entry.desktop"));
+ for ( TQStringList::ConstIterator it = translationList.begin();
it != translationList.end(); ++it )
{
// Extract the language tag from the directory name
- QString tag = *it;
- int index = tag.findRev('/');
+ TQString tag = *it;
+ int index = tag.tqfindRev('/');
tag = tag.left(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index+1);
- if ( seenLanguages.find( tag ) == seenLanguages.end() ) {
+ if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) {
KSimpleConfig entry(*it);
entry.setGroup("KCM Locale");
- const QString name = entry.readEntry("Name", tag);
+ const TQString name = entry.readEntry("Name", tag);
// e.g. name is "US English" and tag is "en_US"
m_langMap.insert( name, tag );
@@ -166,20 +166,20 @@ void KoGlobal::createListOfLanguages()
// How to add them?
}
-QString KoGlobal::tagOfLanguage( const QString & _lang)
+TQString KoGlobal::tagOfLanguage( const TQString & _lang)
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.find( _lang );
+ TQMap<TQString,TQString>::ConstIterator it = map.tqfind( _lang );
if ( it != map.end() )
return *it;
- return QString::null;
+ return TQString();
}
-QString KoGlobal::languageFromTag( const QString &langTag )
+TQString KoGlobal::languageFromTag( const TQString &langTag )
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.begin();
- const QMap<QString,QString>::ConstIterator end = map.end();
+ TQMap<TQString,TQString>::ConstIterator it = map.begin();
+ const TQMap<TQString,TQString>::ConstIterator end = map.end();
for ( ; it != end; ++it )
if ( it.data() == langTag )
return it.key();