diff options
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; } |