diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kformula/symboltable.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kformula/symboltable.cc')
-rw-r--r-- | lib/kformula/symboltable.cc | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc index 0a444519..74f160e6 100644 --- a/lib/kformula/symboltable.cc +++ b/lib/kformula/symboltable.cc @@ -19,12 +19,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qfile.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> -#include <qfontmetrics.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> +#include <tqfontmetrics.h> #include <kconfig.h> #include <kdebug.h> @@ -42,19 +42,19 @@ KFORMULA_NAMESPACE_BEGIN #include "symbolfontmapping.cc" SymbolFontHelper::SymbolFontHelper() - : greek("abgdezhqiklmnxpvrstufjcywGDQLXPSUFYVW") + : greek("abgdezhqiklmnxpvrstufjcywGDTQLXPSUFYVW") { - for ( uint i = 0; symbolMap[ i ].unicode != 0; i++ ) { - compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].unicode; + for ( uint i = 0; symbolMap[ i ].tqunicode != 0; i++ ) { + compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].tqunicode; } } -QChar SymbolFontHelper::unicodeFromSymbolFont( QChar pos ) const +TQChar SymbolFontHelper::tqunicodeFromSymbolFont( TQChar pos ) const { - if ( compatibility.contains( pos ) ) { + if ( compatibility.tqcontains( pos ) ) { return compatibility[ pos.latin1() ]; } - return QChar::null; + return TQChar::null; } @@ -63,48 +63,48 @@ SymbolTable::SymbolTable() } -void SymbolTable::init( const QFont& font ) +void SymbolTable::init( const TQFont& font ) { backupFont = font; - for ( int i=0; operatorTable[i].unicode != 0; ++i ) { - names[QChar( operatorTable[i].unicode )] = get_name( operatorTable[i] ); - entries[get_name( operatorTable[i] )] = QChar( operatorTable[i].unicode ); + for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { + names[TQChar( operatorTable[i].tqunicode )] = get_name( operatorTable[i] ); + entries[get_name( operatorTable[i] )] = TQChar( operatorTable[i].tqunicode ); } - for ( int i=0; arrowTable[i].unicode != 0; ++i ) { - names[QChar( arrowTable[i].unicode )] = get_name( arrowTable[i] ); - entries[get_name( arrowTable[i] )] = QChar( arrowTable[i].unicode ); + for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { + names[TQChar( arrowTable[i].tqunicode )] = get_name( arrowTable[i] ); + entries[get_name( arrowTable[i] )] = TQChar( arrowTable[i].tqunicode ); } - for ( int i=0; greekTable[i].unicode != 0; ++i ) { - names[QChar( greekTable[i].unicode )] = get_name( greekTable[i] ); - entries[get_name( greekTable[i] )] = QChar( greekTable[i].unicode ); + for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { + names[TQChar( greekTable[i].tqunicode )] = get_name( greekTable[i] ); + entries[get_name( greekTable[i] )] = TQChar( greekTable[i].tqunicode ); } } -bool SymbolTable::contains(QString name) const +bool SymbolTable::tqcontains(TQString name) const { - return entries.find( name ) != entries.end(); + return entries.tqfind( name ) != entries.end(); } -QChar SymbolTable::unicode(QString name) const +TQChar SymbolTable::tqunicode(TQString name) const { return entries[ name ]; } -QString SymbolTable::name( QChar symbol ) const +TQString SymbolTable::name( TQChar symbol ) const { return names[symbol]; } -QFont SymbolTable::font( QChar symbol, const QFont& f ) const { - QFontMetrics fm( f ); +TQFont SymbolTable::font( TQChar symbol, const TQFont& f ) const { + TQFontMetrics fm( f ); if ( fm.inFont( symbol ) ) { return f; } - return QFont("Arev Sans"); + return TQFont("Arev Sans"); } -CharClass SymbolTable::charClass( QChar symbol ) const +CharClass SymbolTable::charClass( TQChar symbol ) const { return ORDINARY; // FIXME @@ -112,39 +112,39 @@ CharClass SymbolTable::charClass( QChar symbol ) const } -QChar SymbolTable::unicodeFromSymbolFont( QChar pos ) const +TQChar SymbolTable::tqunicodeFromSymbolFont( TQChar pos ) const { - return symbolFontHelper.unicodeFromSymbolFont( pos ); + return symbolFontHelper.tqunicodeFromSymbolFont( pos ); } -QString SymbolTable::greekLetters() const +TQString SymbolTable::greekLetters() const { return symbolFontHelper.greekLetters(); } -QStringList SymbolTable::allNames() const +TQStringList SymbolTable::allNames() const { - QStringList list; + TQStringList list; - for ( int i=0; operatorTable[i].unicode != 0; ++i ) { + for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { list.append( get_name( operatorTable[i] )); } - for ( int i=0; arrowTable[i].unicode != 0; ++i ) { + for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { list.append( get_name( arrowTable[i] )); } - for ( int i=0; greekTable[i].unicode != 0; ++i ) { + for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { list.append( get_name( greekTable[i] ) ); } return list; } -QString SymbolTable::get_name( struct UnicodeNameTable entry ) const +TQString SymbolTable::get_name( struct UnicodeNameTable entry ) const { if ( !*entry.name ) { - return "U" + QString( "%1" ).arg( entry.unicode, 4, 16 ).upper(); + return "U" + TQString( "%1" ).tqarg( entry.tqunicode, 4, 16 ).upper(); } return entry.name; } |