diff options
Diffstat (limited to 'kbabel/commonui/finddialog.cpp')
-rw-r--r-- | kbabel/commonui/finddialog.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp index 7335f30a..d210811a 100644 --- a/kbabel/commonui/finddialog.cpp +++ b/kbabel/commonui/finddialog.cpp @@ -34,14 +34,14 @@ **************************************************************************** */ #include "finddialog.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqwhatsthis.h> #include <kcombobox.h> #include <kconfig.h> @@ -52,14 +52,14 @@ using namespace KBabel; -FindDialog::FindDialog(bool forReplace, QWidget* parent) +FindDialog::FindDialog(bool forReplace, TQWidget* parent) :KDialogBase(parent, "finddialog",true, "", Ok|Cancel, Ok) , _regExpEditDialog(0), _replaceDlg(forReplace) { - QWidget* page = new QWidget(this); - QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint()); + TQWidget* page = new TQWidget(this); + TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint()); - QLabel *label = new QLabel(i18n("&Find:"),page); + TQLabel *label = new TQLabel(i18n("&Find:"),page); layout->addWidget(label); _findCombo = new KComboBox(true, page, "findCombo"); @@ -68,20 +68,20 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) layout->addWidget(_findCombo); label->setBuddy(_findCombo); - QString msg=i18n("<qt><p><b>Find text</b></p>" + TQString msg=i18n("<qt><p><b>Find text</b></p>" "<p>Here you can enter the text you want to search for. " "If you want to search for a regular expression, " "enable <b>Use regular expression</b> below.</p></qt>"); - QWhatsThis::add(label,msg); - QWhatsThis::add(_findCombo,msg); + TQWhatsThis::add(label,msg); + TQWhatsThis::add(_findCombo,msg); if(forReplace) { setCaption(i18n("Replace")); setButtonOK(i18n("&Replace")); - _replaceLabel = new QLabel(i18n("&Replace with:"),page); + _replaceLabel = new TQLabel(i18n("&Replace with:"),page); layout->addWidget(_replaceLabel); _replaceCombo = new KComboBox(true, page, "replaceCombo"); _replaceCombo->setMaxCount(10); @@ -94,8 +94,8 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) "replaced with. The text is used as is. It is not possible to make a back " "reference, if you have searched for a regular expression.</p></qt>"); - QWhatsThis::add(_replaceLabel,msg); - QWhatsThis::add(_replaceCombo,msg); + TQWhatsThis::add(_replaceLabel,msg); + TQWhatsThis::add(_replaceCombo,msg); } else { setCaption(i18n("Find")); @@ -105,48 +105,48 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) _replaceCombo=0; } - _buttonGrp = new QButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page); - connect(_buttonGrp,SIGNAL(clicked(int)), this, SLOT(inButtonsClicked(int))); + _buttonGrp = new TQButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page); + connect(_buttonGrp,TQT_SIGNAL(clicked(int)), this, TQT_SLOT(inButtonsClicked(int))); layout->addWidget(_buttonGrp); - _inMsgid = new QCheckBox(i18n("&Msgid"),_buttonGrp); - _inMsgstr = new QCheckBox(i18n("M&sgstr"),_buttonGrp); - _inComment = new QCheckBox(i18n("Comm&ent"),_buttonGrp); + _inMsgid = new TQCheckBox(i18n("&Msgid"),_buttonGrp); + _inMsgstr = new TQCheckBox(i18n("M&sgstr"),_buttonGrp); + _inComment = new TQCheckBox(i18n("Comm&ent"),_buttonGrp); - QWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>" + TQWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>" "<p>Select here in which parts of a catalog entry you want " "to search.</p></qt>")); - QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("Options"), page); + TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("Options"), page); layout->addWidget(box); - _caseSensitive = new QCheckBox(i18n("C&ase sensitive"),box); - _wholeWords = new QCheckBox(i18n("O&nly whole words"),box); - _ignoreAccelMarker = new QCheckBox(i18n("I&gnore marker for keyboard accelerator"),box); - _ignoreContextInfo = new QCheckBox(i18n("Ignore con&text information"),box); - _fromCursor = new QCheckBox(i18n("From c&ursor position"),box); - _backwards = new QCheckBox(i18n("F&ind backwards"),box); + _caseSensitive = new TQCheckBox(i18n("C&ase sensitive"),box); + _wholeWords = new TQCheckBox(i18n("O&nly whole words"),box); + _ignoreAccelMarker = new TQCheckBox(i18n("I&gnore marker for keyboard accelerator"),box); + _ignoreContextInfo = new TQCheckBox(i18n("Ignore con&text information"),box); + _fromCursor = new TQCheckBox(i18n("From c&ursor position"),box); + _backwards = new TQCheckBox(i18n("F&ind backwards"),box); - QHBox *regexp = new QHBox(box); + TQHBox *regexp = new TQHBox(box); - _isRegExp = new QCheckBox(i18n("Use regu&lar expression"),regexp); + _isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp); _regExpButton = 0; if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) { - _regExpButton = new QPushButton( i18n("&Edit..."), regexp ); - connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked())); - connect( _isRegExp, SIGNAL( toggled(bool) ), _regExpButton, SLOT(setEnabled(bool))); + _regExpButton = new TQPushButton( i18n("&Edit..."), regexp ); + connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked())); + connect( _isRegExp, TQT_SIGNAL( toggled(bool) ), _regExpButton, TQT_SLOT(setEnabled(bool))); } if(forReplace) { _inMsgid->setEnabled(false); - _askForReplace = new QCheckBox(i18n("As&k before replacing"),box); + _askForReplace = new TQCheckBox(i18n("As&k before replacing"),box); _ignoreContextInfo->setEnabled(false); - QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>" + TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>" "<p>Here you can finetune replacing:" "<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>" "<li><b>Only whole words</b>: text found must not be part of a longer word</li>" @@ -163,7 +163,7 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) else { _askForReplace=0; - QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>" + TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>" "<p>Here you can finetune the search:" "<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>" "<li><b>Only whole words</b>: text found must not be part of a longer word</li>" @@ -186,7 +186,7 @@ FindDialog::~FindDialog() saveSettings(); } -int FindDialog::show(QString initialStr) +int FindDialog::show(TQString initialStr) { if( !initialStr.isEmpty() ) { _findCombo->setEditText( initialStr ); @@ -199,7 +199,7 @@ int FindDialog::show(QString initialStr) int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if(_replaceDlg) { _replaceList.remove(_replaceCombo->currentText()); _replaceList.prepend(_replaceCombo->currentText()); @@ -260,7 +260,7 @@ int FindDialog::show(QString initialStr) return r; } -int FindDialog::exec(QString initialStr) +int FindDialog::exec(TQString initialStr) { if( !initialStr.isEmpty() ) { _findCombo->setEditText( initialStr ); @@ -273,7 +273,7 @@ int FindDialog::exec(QString initialStr) int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if(_replaceDlg) { _replaceList.remove(_replaceCombo->currentText()); _replaceList.prepend(_replaceCombo->currentText()); @@ -520,30 +520,30 @@ void FindDialog::inButtonsClicked(int id) void FindDialog::regExpButtonClicked() { if ( _regExpEditDialog == 0 ) - _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this ); + _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this ); KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( _regExpEditDialog ); if( iface ) { iface->setRegExp( _findCombo->currentText() ); - if( _regExpEditDialog->exec() == QDialog::Accepted ) + if( _regExpEditDialog->exec() == TQDialog::Accepted ) _findCombo->setCurrentText( iface->regExp() ); } } -ReplaceDialog::ReplaceDialog(QWidget* parent) +ReplaceDialog::ReplaceDialog(TQWidget* parent) :KDialogBase(Plain, "", Close|User1|User2|User3, User1, parent,"finddialog" , true,false,i18n("&Replace"),i18n("&Goto Next"),i18n("R&eplace All")) { - QWidget* page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint()); + TQWidget* page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint()); - QLabel *label = new QLabel(i18n("Replace this string?"),page); + TQLabel *label = new TQLabel(i18n("Replace this string?"),page); layout->addWidget(label); - connect(this,SIGNAL(user1Clicked()),this,SIGNAL(replace())); - connect(this,SIGNAL(user2Clicked()),this,SIGNAL(next())); - connect(this,SIGNAL(user3Clicked()),this,SIGNAL(replaceAll())); + connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace())); + connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next())); + connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll())); } ReplaceDialog::~ReplaceDialog() |