summaryrefslogtreecommitdiffstats
path: root/parts/grepview/grepdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/grepview/grepdlg.cpp')
-rw-r--r--parts/grepview/grepdlg.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/parts/grepview/grepdlg.cpp b/parts/grepview/grepdlg.cpp
index 9c62510e..80264a92 100644
--- a/parts/grepview/grepdlg.cpp
+++ b/parts/grepview/grepdlg.cpp
@@ -11,13 +11,13 @@
#include "grepdlg.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <kbuttonbox.h>
#include <kpushbutton.h>
@@ -28,7 +28,7 @@
#include <kmessagebox.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kcombobox.h>
#include <kurlcompletion.h>
#include <kurlrequester.h>
@@ -80,32 +80,32 @@ const char *filepatterns[] = {
};
-GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
- : QDialog(parent, name, false), m_part( part )
+GrepDialog::GrepDialog( GrepViewPart * part, TQWidget *parent, const char *name )
+ : TQDialog(parent, name, false), m_part( part )
{
setCaption(i18n("Find in Files"));
config = GrepViewFactory::instance()->config();
config->setGroup("GrepDialog");
- QGridLayout *layout = new QGridLayout(this, 9, 2, 10, 4);
+ TQGridLayout *layout = new TQGridLayout(this, 9, 2, 10, 4);
layout->setColStretch(0, 0);
layout->setColStretch(1, 20);
- QLabel *pattern_label = new QLabel(i18n("&Pattern:"), this);
+ TQLabel *pattern_label = new TQLabel(i18n("&Pattern:"), this);
layout->addWidget(pattern_label, 0, 0, AlignRight | AlignVCenter);
pattern_combo = new KHistoryCombo(true, this);
pattern_label->setBuddy(pattern_combo);
pattern_combo->setFocus();
pattern_combo->setHistoryItems(config->readListEntry("LastSearchItems"), true);
- pattern_combo->setInsertionPolicy(QComboBox::NoInsertion);
+ pattern_combo->setInsertionPolicy(TQComboBox::NoInsertion);
layout->addWidget(pattern_combo, 0, 1);
- QLabel *template_label = new QLabel(i18n("&Template:"), this);
+ TQLabel *template_label = new TQLabel(i18n("&Template:"), this);
layout->addWidget(template_label, 1, 0, AlignRight | AlignVCenter);
- QBoxLayout *template_layout = new QHBoxLayout(4);
+ TQBoxLayout *template_layout = new TQHBoxLayout(4);
layout->addLayout(template_layout, 1, 1);
template_edit = new KLineEdit(this);
@@ -117,28 +117,28 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
template_combo->insertStrList(template_desc);
template_layout->addWidget(template_combo, 0);
- QBoxLayout *search_opts_layout = new QHBoxLayout(15);
+ TQBoxLayout *search_opts_layout = new TQHBoxLayout(15);
layout->addLayout(search_opts_layout, 2, 1);
- regexp_box = new QCheckBox(i18n("&Regular Expression"), this);
+ regexp_box = new TQCheckBox(i18n("&Regular Expression"), this);
regexp_box->setChecked(config->readBoolEntry("regexp", false ));
search_opts_layout->addWidget(regexp_box);
- case_sens_box = new QCheckBox(i18n("C&ase sensitive"), this);
- case_sens_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ case_sens_box = new TQCheckBox(i18n("C&ase sensitive"), this);
+ case_sens_box->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
case_sens_box->setChecked(config->readBoolEntry("case_sens", true));
search_opts_layout->addWidget(case_sens_box);
- QLabel *dir_label = new QLabel(i18n("&Directory:"), this);
+ TQLabel *dir_label = new TQLabel(i18n("&Directory:"), this);
layout->addWidget(dir_label, 3, 0, AlignRight | AlignVCenter);
- QBoxLayout *dir_layout = new QHBoxLayout(4);
+ TQBoxLayout *dir_layout = new TQHBoxLayout(4);
layout->addLayout(dir_layout, 3, 1);
dir_combo = new KComboBox( true, this );
dir_combo->insertStringList(config->readPathListEntry("LastSearchPaths"));
- dir_combo->setInsertionPolicy(QComboBox::NoInsertion);
- dir_combo->setEditText(QDir::homeDirPath());
+ dir_combo->setInsertionPolicy(TQComboBox::NoInsertion);
+ dir_combo->setEditText(TQDir::homeDirPath());
url_requester = new KURLRequester( dir_combo, this );
url_requester->completionObject()->setMode(KURLCompletion::DirCompletion);
@@ -149,27 +149,27 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
dir_layout->addWidget( url_requester, 10 );
synch_button = new KPushButton( this );
- QIconSet set = SmallIconSet( "dirsynch" );
- QPixmap pix = set.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet set = SmallIconSet( "dirsynch" );
+ TQPixmap pix = set.pixmap( TQIconSet::Small, TQIconSet::Normal );
synch_button->setFixedSize( pix.width()+8, pix.height()+8 );
synch_button->setIconSet( set );
- synch_button->setAccel( QKeySequence( "Alt+y") );
- QToolTip::add( synch_button, i18n("Set directory to that of the current file (Alt+Y)") );
+ synch_button->setAccel( TQKeySequence( "Alt+y") );
+ TQToolTip::add( synch_button, i18n("Set directory to that of the current file (Alt+Y)") );
dir_layout->addWidget( synch_button );
- QBoxLayout *dir_opts_layout = new QHBoxLayout(15);
+ TQBoxLayout *dir_opts_layout = new TQHBoxLayout(15);
layout->addLayout(dir_opts_layout, 4, 1);
- recursive_box = new QCheckBox(i18n("Rec&ursive"), this);
+ recursive_box = new TQCheckBox(i18n("Rec&ursive"), this);
recursive_box->setChecked(config->readBoolEntry("recursive", true));
dir_opts_layout->addWidget(recursive_box);
- use_project_box = new QCheckBox(i18n("Limit search to &project files"), this);
- use_project_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ use_project_box = new TQCheckBox(i18n("Limit search to &project files"), this);
+ use_project_box->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
use_project_box->setChecked(config->readBoolEntry("search_project_files", true));
dir_opts_layout->addWidget(use_project_box);
- QLabel *files_label = new QLabel(i18n("&Files:"), this);
+ TQLabel *files_label = new TQLabel(i18n("&Files:"), this);
layout->addWidget(files_label, 5, 0, AlignRight | AlignVCenter);
files_combo = new KComboBox(true, this);
@@ -177,10 +177,10 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
files_combo->insertStrList(filepatterns);
layout->addWidget(files_combo, 5, 1);
- QLabel *exclude_label = new QLabel(i18n("&Exclude:"), this);
+ TQLabel *exclude_label = new TQLabel(i18n("&Exclude:"), this);
layout->addWidget(exclude_label, 6, 0, AlignRight | AlignVCenter);
- QStringList exclude_list = config->readListEntry("exclude_patterns");
+ TQStringList exclude_list = config->readListEntry("exclude_patterns");
exclude_combo = new KComboBox(true, this);
exclude_label->setBuddy(files_combo->focusProxy());
if (exclude_list.count()) {
@@ -193,19 +193,19 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
}
layout->addWidget(exclude_combo, 6, 1);
- QBoxLayout *other_opts_layout = new QHBoxLayout(15);
+ TQBoxLayout *other_opts_layout = new TQHBoxLayout(15);
layout->addLayout(other_opts_layout, 7, 1);
- keep_output_box = new QCheckBox(i18n("New view"), this);
+ keep_output_box = new TQCheckBox(i18n("New view"), this);
keep_output_box->setChecked(config->readBoolEntry("new_view", true));
other_opts_layout->addWidget(keep_output_box);
- no_find_err_box = new QCheckBox(i18n("&Suppress find errors"), this);
- no_find_err_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ no_find_err_box = new TQCheckBox(i18n("&Suppress find errors"), this);
+ no_find_err_box->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
no_find_err_box->setChecked(config->readBoolEntry("no_find_errs", true));
other_opts_layout->addWidget(no_find_err_box);
- QBoxLayout *button_layout = new QHBoxLayout(4);
+ TQBoxLayout *button_layout = new TQHBoxLayout(4);
layout->addLayout(button_layout, 8, 1);
search_button = new KPushButton(KGuiItem(i18n("Sea&rch"),"grep"), this);
search_button->setDefault(true);
@@ -216,7 +216,7 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
resize(sizeHint());
- QWhatsThis::add(pattern_combo,
+ TQWhatsThis::add(pattern_combo,
i18n("<qt>Enter the regular expression you want to search for here.<p>"
"Possible meta characters are:"
"<ul>"
@@ -240,31 +240,31 @@ GrepDialog::GrepDialog( GrepViewPart * part, QWidget *parent, const char *name )
"Furthermore, backreferences to bracketed subexpressions are "
"available via the notation \\<i>n</i>.</qt>"
));
- QWhatsThis::add(files_combo,
+ TQWhatsThis::add(files_combo,
i18n("Enter the file name pattern of the files to search here. "
"You may give several patterns separated by commas"));
- QWhatsThis::add(template_edit,
+ TQWhatsThis::add(template_edit,
i18n("You can choose a template for the pattern from the combo box "
"and edit it here. The string %s in the template is replaced "
"by the pattern input field, resulting in the regular expression "
"to search for."));
- connect( template_combo, SIGNAL(activated(int)),
- SLOT(templateActivated(int)) );
- connect( search_button, SIGNAL(clicked()),
- SLOT(slotSearchClicked()) );
- connect( done_button, SIGNAL(clicked()),
- SLOT(hide()) );
- connect( pattern_combo->lineEdit(), SIGNAL( textChanged ( const QString & ) ),
- SLOT( slotPatternChanged( const QString & ) ) );
- connect( synch_button, SIGNAL(clicked()), this, SLOT(slotSynchDirectory()) );
+ connect( template_combo, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(templateActivated(int)) );
+ connect( search_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSearchClicked()) );
+ connect( done_button, TQT_SIGNAL(clicked()),
+ TQT_SLOT(hide()) );
+ connect( pattern_combo->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ),
+ TQT_SLOT( slotPatternChanged( const TQString & ) ) );
+ connect( synch_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSynchDirectory()) );
slotPatternChanged( pattern_combo->currentText() );
}
-// Returns the contents of a QComboBox as a QStringList
-static QStringList qCombo2StringList( QComboBox* combo )
+// Returns the contents of a TQComboBox as a QStringList
+static TQStringList qCombo2StringList( TQComboBox* combo )
{
- QStringList list;
+ TQStringList list;
if (!combo)
return list;
for (int i = 0; i < combo->count(); ++i ) {
@@ -288,7 +288,7 @@ GrepDialog::~GrepDialog()
config->writeEntry("exclude_patterns", qCombo2StringList(exclude_combo));
}
-void GrepDialog::slotPatternChanged( const QString & _text )
+void GrepDialog::slotPatternChanged( const TQString & _text )
{
search_button->setEnabled( !_text.isEmpty() );
}
@@ -299,7 +299,7 @@ void GrepDialog::templateActivated(int index)
}
// Find out whether the string s is already contained in combo
-static bool qComboContains( const QString& s, QComboBox* combo )
+static bool qComboContains( const TQString& s, TQComboBox* combo )
{
if (!combo)
return false;
@@ -348,15 +348,15 @@ void GrepDialog::show()
// managers and Qt versions
if (isVisible())
hide();
-// QDialog::hide();
- QDialog::show();
+// TQDialog::hide();
+ TQDialog::show();
pattern_combo->setFocus();
}
void GrepDialog::hide()
{
pattern_combo->setFocus();
- QDialog::hide();
+ TQDialog::hide();
}
void GrepDialog::slotSynchDirectory( )