diff options
Diffstat (limited to 'krename/coorddialog.cpp')
-rw-r--r-- | krename/coorddialog.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/krename/coorddialog.cpp b/krename/coorddialog.cpp index f67062d..48d5955 100644 --- a/krename/coorddialog.cpp +++ b/krename/coorddialog.cpp @@ -17,29 +17,29 @@ #include "coorddialog.h" -// Qt includes -#include <qcheckbox.h> -#include <qfontmetrics.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvalidator.h> +// TQt includes +#include <tqcheckbox.h> +#include <tqfontmetrics.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvalidator.h> // KDE includes #include <kapplication.h> #include <klocale.h> -DSLineEdit::DSLineEdit( QWidget* parent, const char* name ) - : KLineEdit( parent, name ) +DSLineEdit::DSLineEdit( TQWidget* tqparent, const char* name ) + : KLineEdit( tqparent, name ) { } -void DSLineEdit::keyPressEvent( QKeyEvent* e ) +void DSLineEdit::keyPressEvent( TQKeyEvent* e ) { KLineEdit::keyPressEvent( e ); emit changed(); } -void DSLineEdit::mousePressEvent( QMouseEvent* e ) +void DSLineEdit::mousePressEvent( TQMouseEvent* e ) { KLineEdit::mousePressEvent( e ); emit changed(); @@ -47,36 +47,36 @@ void DSLineEdit::mousePressEvent( QMouseEvent* e ) bool CoordDialog::m_inversion = false; -CoordDialog::CoordDialog( const QString & file, QWidget *_parent, const char *name ) +CoordDialog::CoordDialog( const TQString & file, TQWidget *_parent, const char *name ) : KDialogBase( KDialogBase::Plain, "KRename", KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, _parent, name, true, true ), m_file( file ) { - QFrame* parent = plainPage(); - QVBoxLayout* layout = new QVBoxLayout( parent ); + TQFrame* tqparent = plainPage(); + TQVBoxLayout* tqlayout = new TQVBoxLayout( tqparent ); - filename = new DSLineEdit( parent ); + filename = new DSLineEdit( tqparent ); filename->setText( file ); - filename->setValidator( new QRegExpValidator( QRegExp( file ), this ) ); + filename->setValidator( new TQRegExpValidator( TQRegExp( file ), TQT_TQOBJECT(this) ) ); - preview = new QLabel( parent ); + preview = new TQLabel( tqparent ); - checkInvert = new QCheckBox( i18n("&Invert selection"), plainPage() ); + checkInvert = new TQCheckBox( i18n("&Invert selection"), plainPage() ); checkInvert->setChecked( m_inversion ); - layout->addWidget( new QLabel( i18n("Please select the text you want to insert:"), plainPage() ) ); - layout->addWidget( filename ); - layout->addWidget( checkInvert ); - layout->addWidget( preview ); + tqlayout->addWidget( new TQLabel( i18n("Please select the text you want to insert:"), plainPage() ) ); + tqlayout->addWidget( filename ); + tqlayout->addWidget( checkInvert ); + tqlayout->addWidget( preview ); updateCommand(); - connect( filename, SIGNAL( selectionChanged() ), this, SLOT( updateCommand() ) ); - connect( checkInvert, SIGNAL( clicked() ), this, SLOT( updateCommand() ) ); - connect( filename, SIGNAL( textChanged( const QString & ) ), this, SLOT( resetText() ) ); - connect( filename, SIGNAL( changed() ), this, SLOT( updateCommand() ) ); + connect( filename, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateCommand() ) ); + connect( checkInvert, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updateCommand() ) ); + connect( filename, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( resetText() ) ); + connect( filename, TQT_SIGNAL( changed() ), this, TQT_SLOT( updateCommand() ) ); show(); - QFontMetrics fm( filename->font() ); + TQFontMetrics fm( filename->font() ); int w = fm.width( file ); if( w > width() ) resize( @@ -102,26 +102,26 @@ void CoordDialog::updateCommand() start++; end++; if( start > 1 ) - m_command = QString("[$1;%1]").arg(start-1); + m_command = TQString("[$1;%1]").tqarg(start-1); if( end <= (signed int)filename->text().length() ) - m_command.append( QString("[$%1-[length]]").arg(end) ); + m_command.append( TQString("[$%1-[length]]").tqarg(end) ); } } else if( checkInvert->isChecked() && !filename->hasSelectedText() ) { int p = filename->cursorPosition(); - m_command = QString("[$1;%1][$%2-[length]]").arg(p).arg(p+1); + m_command = TQString("[$1;%1][$%2-[length]]").tqarg(p).tqarg(p+1); } else if( !checkInvert->isChecked() && filename->hasSelectedText() ){ if( end ) { start++; end++; if( end <= (signed int)filename->text().length() ) - m_command = QString("[$%1;%2]").arg(start).arg(end-start); + m_command = TQString("[$%1;%2]").tqarg(start).tqarg(end-start); else - m_command = QString("[$%1-[length]]").arg(start); + m_command = TQString("[$%1-[length]]").tqarg(start); } } else if( !checkInvert->isChecked() && !filename->hasSelectedText() ) { int p = filename->cursorPosition(); - m_command = QString("[$%1-[length]]").arg( p ); + m_command = TQString("[$%1-[length]]").tqarg( p ); } } @@ -135,7 +135,7 @@ void CoordDialog::resetText() updateCommand(); } -QString CoordDialog::coords() +TQString CoordDialog::coords() { m_inversion = checkInvert->isChecked(); return m_command; |