diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/selectablelineedit.cpp | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/selectablelineedit.cpp')
-rw-r--r-- | kregexpeditor/selectablelineedit.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp index 98aff72..3620fc3 100644 --- a/kregexpeditor/selectablelineedit.cpp +++ b/kregexpeditor/selectablelineedit.cpp @@ -22,19 +22,19 @@ #include "selectablelineedit.h" -SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, QWidget* parent, const char* name) - : QLineEdit( parent, name ), _owner(owner) +SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, const char* name) + : TQLineEdit( parent, name ), _owner(owner) { - connect( this, SIGNAL( textChanged( const QString & ) ), this, - SLOT( slotKeyPressed() ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this, + TQT_SLOT( slotKeyPressed() ) ); setAcceptDrops( false ); } void SelectableLineEdit::setSelected( bool selected ) { if ( selected ) { - QPalette pal = palette().copy(); - pal.setBrush( QColorGroup::Base, gray ); + TQPalette pal = palette().copy(); + pal.setBrush( TQColorGroup::Base, gray ); setPalette( pal ); } else { @@ -43,27 +43,27 @@ void SelectableLineEdit::setSelected( bool selected ) repaint(); } -QSize SelectableLineEdit::sizeHint() const +TQSize SelectableLineEdit::sizeHint() const { - int frameWidth = frame() ? 8 : 4; // from QLineEdit source - QFontMetrics metrics = fontMetrics(); + int frameWidth = frame() ? 8 : 4; // from TQLineEdit source + TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); int charWidth = metrics.maxWidth(); - int height = QLineEdit::sizeHint().height(); + int height = TQLineEdit::sizeHint().height(); int width; if ( hasFocus() ) width = actualSize+6*charWidth + frameWidth; else width = QMAX(actualSize, charWidth) + frameWidth; - return QSize( width , height ); + return TQSize( width , height ); } void SelectableLineEdit::slotKeyPressed() { - int frameWidth = frame() ? 8 : 4; // from QLineEdit source + int frameWidth = frame() ? 8 : 4; // from TQLineEdit source - QFontMetrics metrics = fontMetrics(); + TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); if ( actualSize > size().width()-frameWidth ) { |