diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdeui/kcharselect.cpp | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/kcharselect.cpp')
-rw-r--r-- | kdeui/kcharselect.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/kdeui/kcharselect.cpp b/kdeui/kcharselect.cpp index 1eb707c4d..a0486b42f 100644 --- a/kdeui/kcharselect.cpp +++ b/kdeui/kcharselect.cpp @@ -45,7 +45,7 @@ class KCharSelect::KCharSelectPrivate { public: - TQLineEdit *unicodeLine; + TQLineEdit *tqunicodeLine; }; TQFontDatabase * KCharSelect::fontDataBase = 0; @@ -66,7 +66,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ : TQGridView( parent, name ), vFont( _font ), vChr( _chr ), vTableNum( _tableNum ), vPos( 0, 0 ), focusItem( _chr ), focusPos( 0, 0 ), d(0) { - setBackgroundColor( colorGroup().base() ); + setBackgroundColor( tqcolorGroup().base() ); setCellWidth( 20 ); setCellHeight( 25 ); @@ -74,7 +74,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ setNumCols( 32 ); setNumRows( 8 ); - repaintContents( false ); + tqrepaintContents( false ); setToolTips(); @@ -86,7 +86,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ void KCharSelectTable::setFont( const TQString &_font ) { vFont = _font; - repaintContents( false ); + tqrepaintContents( false ); setToolTips(); } @@ -95,7 +95,7 @@ void KCharSelectTable::setFont( const TQString &_font ) void KCharSelectTable::setChar( const TQChar &_chr ) { vChr = _chr; - repaintContents( false ); + tqrepaintContents( false ); } //================================================================== @@ -104,13 +104,13 @@ void KCharSelectTable::setTableNum( int _tableNum ) focusItem = TQChar( _tableNum * 256 ); vTableNum = _tableNum; - repaintContents( false ); + tqrepaintContents( false ); setToolTips(); } //================================================================== -TQSize KCharSelectTable::sizeHint() const +TQSize KCharSelectTable::tqsizeHint() const { int w = cellWidth(); int h = cellHeight(); @@ -155,26 +155,26 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) c += row * numCols(); c += col; - if ( c == vChr.unicode() ) { - p->setBrush( TQBrush( colorGroup().highlight() ) ); + if ( c == vChr.tqunicode() ) { + p->setBrush( TQBrush( tqcolorGroup().highlight() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( colorGroup().highlightedText() ); + p->setPen( tqcolorGroup().highlightedText() ); vPos = TQPoint( col, row ); } else { TQFontMetrics fm = TQFontMetrics( font ); if( fm.inFont( c ) ) - p->setBrush( TQBrush( colorGroup().base() ) ); + p->setBrush( TQBrush( tqcolorGroup().base() ) ); else - p->setBrush( TQBrush( colorGroup().button() ) ); + p->setBrush( TQBrush( tqcolorGroup().button() ) ); p->setPen( NoPen ); p->drawRect( 0, 0, w, h ); - p->setPen( colorGroup().text() ); + p->setPen( tqcolorGroup().text() ); } - if ( c == focusItem.unicode() && hasFocus() ) { + if ( c == focusItem.tqunicode() && hasFocus() ) { style().drawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ), - colorGroup() ); + tqcolorGroup() ); focusPos = TQPoint( col, row ); } @@ -182,7 +182,7 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) p->drawText( 0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString( TQChar( c ) ) ); - p->setPen( colorGroup().text() ); + p->setPen( tqcolorGroup().text() ); p->drawLine( x2, 0, x2, y2 ); p->drawLine( 0, y2, x2, y2 ); @@ -210,9 +210,9 @@ void KCharSelectTable::mouseMoveEvent( TQMouseEvent *e ) focusPos = vPos; focusItem = vChr; - repaintCell( oldFocus.y(), oldFocus.x(), true ); - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( vPos.y(), vPos.x(), true ); + tqrepaintCell( oldFocus.y(), oldFocus.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( vPos.y(), vPos.x(), true ); emit highlighted( vChr ); emit highlighted(); @@ -256,8 +256,8 @@ void KCharSelectTable::keyPressEvent( TQKeyEvent *e ) vPos = focusPos; vChr = focusItem; - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( vPos.y(), vPos.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( vPos.y(), vPos.x(), true ); emit activated( vChr ); emit activated(); @@ -277,8 +277,8 @@ void KCharSelectTable::gotoLeft() focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() ); - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( focusPos.y(), focusPos.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( focusPos.y(), focusPos.x(), true ); emit focusItemChanged( vChr ); emit focusItemChanged(); @@ -295,8 +295,8 @@ void KCharSelectTable::gotoRight() focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() ); - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( focusPos.y(), focusPos.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( focusPos.y(), focusPos.x(), true ); emit focusItemChanged( vChr ); emit focusItemChanged(); @@ -313,8 +313,8 @@ void KCharSelectTable::gotoUp() focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() ); - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( focusPos.y(), focusPos.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( focusPos.y(), focusPos.x(), true ); emit focusItemChanged( vChr ); emit focusItemChanged(); @@ -331,8 +331,8 @@ void KCharSelectTable::gotoDown() focusItem = TQChar( vTableNum * 256 + numCols() * focusPos.y() + focusPos.x() ); - repaintCell( oldPos.y(), oldPos.x(), true ); - repaintCell( focusPos.y(), focusPos.x(), true ); + tqrepaintCell( oldPos.y(), oldPos.x(), true ); + tqrepaintCell( focusPos.y(), focusPos.x(), true ); emit focusItemChanged( vChr ); emit focusItemChanged(); @@ -381,41 +381,41 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f bar->setSpacing( KDialog::spacingHint() ); TQLabel* const lFont = new TQLabel( i18n( "Font:" ), bar ); - lFont->resize( lFont->sizeHint() ); - lFont->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); - lFont->setMaximumWidth( lFont->sizeHint().width() ); + lFont->resize( lFont->tqsizeHint() ); + lFont->tqsetAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lFont->setMaximumWidth( lFont->tqsizeHint().width() ); fontCombo = new TQComboBox( true, bar ); fillFontCombo(); - fontCombo->resize( fontCombo->sizeHint() ); + fontCombo->resize( fontCombo->tqsizeHint() ); connect( fontCombo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( fontSelected( const TQString & ) ) ); TQLabel* const lTable = new TQLabel( i18n( "Table:" ), bar ); - lTable->resize( lTable->sizeHint() ); - lTable->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); - lTable->setMaximumWidth( lTable->sizeHint().width() ); + lTable->resize( lTable->tqsizeHint() ); + lTable->tqsetAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lTable->setMaximumWidth( lTable->tqsizeHint().width() ); tableSpinBox = new TQSpinBox( 0, 255, 1, bar ); - tableSpinBox->resize( tableSpinBox->sizeHint() ); + tableSpinBox->resize( tableSpinBox->tqsizeHint() ); connect( tableSpinBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( tableChanged( int ) ) ); TQLabel* const lUnicode = new TQLabel( i18n( "&Unicode code point:" ), bar ); - lUnicode->resize( lUnicode->sizeHint() ); - lUnicode->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); - lUnicode->setMaximumWidth( lUnicode->sizeHint().width() ); + lUnicode->resize( lUnicode->tqsizeHint() ); + lUnicode->tqsetAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lUnicode->setMaximumWidth( lUnicode->tqsizeHint().width() ); const TQRegExp rx( "[a-fA-F0-9]{1,4}" ); TQValidator* const validator = new TQRegExpValidator( rx, this ); - d->unicodeLine = new KLineEdit( bar ); - d->unicodeLine->setValidator(validator); - lUnicode->setBuddy(d->unicodeLine); - d->unicodeLine->resize( d->unicodeLine->sizeHint() ); + d->tqunicodeLine = new KLineEdit( bar ); + d->tqunicodeLine->setValidator(validator); + lUnicode->setBuddy(d->tqunicodeLine); + d->tqunicodeLine->resize( d->tqunicodeLine->tqsizeHint() ); slotUpdateUnicode(_chr); - connect( d->unicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) ); + connect( d->tqunicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) ); charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQVBox::font().family() : _font, _chr, _tableNum ); const TQSize sz( charTable->contentsWidth() + 4 , @@ -452,15 +452,15 @@ KCharSelect::~KCharSelect() } //================================================================== -TQSize KCharSelect::sizeHint() const +TQSize KCharSelect::tqsizeHint() const { - return TQVBox::sizeHint(); + return TQVBox::tqsizeHint(); } //================================================================== void KCharSelect::setFont( const TQString &_font ) { - const TQValueList<TQString>::Iterator it = fontList.find( _font ); + const TQValueList<TQString>::Iterator it = fontList.tqfind( _font ); if ( it != fontList.end() ) { TQValueList<TQString>::Iterator it2 = fontList.begin(); int pos = 0; @@ -469,7 +469,7 @@ void KCharSelect::setFont( const TQString &_font ) charTable->setFont( _font ); } else - kdWarning() << "Can't find Font: " << _font << endl; + kdWarning() << "Can't tqfind Font: " << _font << endl; } //================================================================== @@ -513,7 +513,7 @@ void KCharSelect::tableChanged( int _value ) //================================================================== void KCharSelect::slotUnicodeEntered( ) { - const TQString s = d->unicodeLine->text(); + const TQString s = d->tqunicodeLine->text(); if (s.isEmpty()) return; @@ -532,10 +532,10 @@ void KCharSelect::slotUnicodeEntered( ) void KCharSelect::slotUpdateUnicode( const TQChar &c ) { - const int uc = c.unicode(); + const int uc = c.tqunicode(); TQString s; s.sprintf("%04X", uc); - d->unicodeLine->setText(s); + d->tqunicodeLine->setText(s); } void KCharSelectTable::virtual_hook( int, void*) |