diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kregexpeditor/selectablelineedit.cpp | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/selectablelineedit.cpp')
-rw-r--r-- | kregexpeditor/selectablelineedit.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp index 3620fc3..c9ed250 100644 --- a/kregexpeditor/selectablelineedit.cpp +++ b/kregexpeditor/selectablelineedit.cpp @@ -16,14 +16,14 @@ * Boston, MA 02110-1301, USA. **/ -#ifndef QT_ONLY +#ifndef TQT_ONLY #include "selectablelineedit.moc" #endif #include "selectablelineedit.h" -SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, const char* name) - : TQLineEdit( parent, name ), _owner(owner) +SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* tqparent, const char* name) + : TQLineEdit( tqparent, name ), _owner(owner) { connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotKeyPressed() ) ); @@ -33,29 +33,29 @@ SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, c void SelectableLineEdit::setSelected( bool selected ) { if ( selected ) { - TQPalette pal = palette().copy(); + TQPalette pal = TQPalette(tqpalette()); pal.setBrush( TQColorGroup::Base, gray ); setPalette( pal ); } else { unsetPalette(); } - repaint(); + tqrepaint(); } -TQSize SelectableLineEdit::sizeHint() const +TQSize SelectableLineEdit::tqsizeHint() const { int frameWidth = frame() ? 8 : 4; // from TQLineEdit source TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); int charWidth = metrics.maxWidth(); - int height = TQLineEdit::sizeHint().height(); + int height = TQLineEdit::tqsizeHint().height(); int width; if ( hasFocus() ) width = actualSize+6*charWidth + frameWidth; else - width = QMAX(actualSize, charWidth) + frameWidth; + width = TQMAX(actualSize, charWidth) + frameWidth; return TQSize( width , height ); } @@ -67,7 +67,7 @@ void SelectableLineEdit::slotKeyPressed() int actualSize = metrics.width( text() ); if ( actualSize > size().width()-frameWidth ) { - repaint(); - emit parentPleaseUpdate(); + tqrepaint(); + emit tqparentPleaseUpdate(); } } |