summaryrefslogtreecommitdiffstats
path: root/juk/searchwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'juk/searchwidget.cpp')
-rw-r--r--juk/searchwidget.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/juk/searchwidget.cpp b/juk/searchwidget.cpp
index 83b7808e..a9b8d868 100644
--- a/juk/searchwidget.cpp
+++ b/juk/searchwidget.cpp
@@ -23,11 +23,11 @@
#include <kdebug.h>
#include <kaction.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
#include "searchwidget.h"
#include "collectionlist.h"
@@ -39,8 +39,8 @@ using namespace ActionCollection;
// SearchLine public methods
////////////////////////////////////////////////////////////////////////////////
-SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
- QHBox(parent, name),
+SearchLine::SearchLine(TQWidget *parent, bool simple, const char *name) :
+ TQHBox(parent, name),
m_simple(simple),
m_searchFieldsBox(0)
{
@@ -48,24 +48,24 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
if(!m_simple) {
m_searchFieldsBox = new KComboBox(this, "searchFields");
- connect(m_searchFieldsBox, SIGNAL(activated(int)),
- this, SIGNAL(signalQueryChanged()));
+ connect(m_searchFieldsBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(signalQueryChanged()));
}
m_lineEdit = new KLineEdit(this, "searchLineEdit");
m_lineEdit->installEventFilter(this);
- connect(m_lineEdit, SIGNAL(textChanged(const QString &)),
- this, SIGNAL(signalQueryChanged()));
- connect(m_lineEdit, SIGNAL(returnPressed()),
- this, SLOT(slotActivate()));
+ connect(m_lineEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SIGNAL(signalQueryChanged()));
+ connect(m_lineEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(slotActivate()));
if(!m_simple) {
m_caseSensitive = new KComboBox(this);
m_caseSensitive->insertItem(i18n("Normal Matching"), 0);
m_caseSensitive->insertItem(i18n("Case Sensitive"), 1);
m_caseSensitive->insertItem(i18n("Pattern Matching"), 2);
- connect(m_caseSensitive, SIGNAL(activated(int)),
- this, SIGNAL(signalQueryChanged()));
+ connect(m_caseSensitive, TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(signalQueryChanged()));
}
else
m_caseSensitive = 0;
@@ -75,15 +75,15 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
PlaylistSearch::Component SearchLine::searchComponent() const
{
- QString query = m_lineEdit->text();
+ TQString query = m_lineEdit->text();
bool caseSensitive = m_caseSensitive && m_caseSensitive->currentItem() == CaseSensitive;
Playlist *playlist = CollectionList::instance();
- QValueList<int> searchedColumns;
+ TQValueList<int> searchedColumns;
if(!m_searchFieldsBox || m_searchFieldsBox->currentItem() == 0) {
- QValueListConstIterator<int> it = m_columnList.begin();
+ TQValueListConstIterator<int> it = m_columnList.begin();
for(; it != m_columnList.end(); ++it) {
if(playlist->isColumnVisible(*it))
searchedColumns.append(*it);
@@ -93,7 +93,7 @@ PlaylistSearch::Component SearchLine::searchComponent() const
searchedColumns.append(m_columnList[m_searchFieldsBox->currentItem() - 1]);
if(m_caseSensitive && m_caseSensitive->currentItem() == Pattern)
- return PlaylistSearch::Component(QRegExp(query), searchedColumns);
+ return PlaylistSearch::Component(TQRegExp(query), searchedColumns);
else
return PlaylistSearch::Component(query, caseSensitive, searchedColumns);
}
@@ -134,16 +134,16 @@ void SearchLine::setFocus()
m_lineEdit->setFocus();
}
-bool SearchLine::eventFilter(QObject *watched, QEvent *e)
+bool SearchLine::eventFilter(TQObject *watched, TQEvent *e)
{
- if(watched != m_lineEdit || e->type() != QEvent::KeyPress)
- return QHBox::eventFilter(watched, e);
+ if(watched != m_lineEdit || e->type() != TQEvent::KeyPress)
+ return TQHBox::eventFilter(watched, e);
- QKeyEvent *key = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *key = static_cast<TQKeyEvent *>(e);
if(key->key() == Qt::Key_Down)
emit signalDownPressed();
- return QHBox::eventFilter(watched, e);
+ return TQHBox::eventFilter(watched, e);
}
void SearchLine::slotActivate()
@@ -154,16 +154,16 @@ void SearchLine::slotActivate()
void SearchLine::updateColumns()
{
- QString currentText;
+ TQString currentText;
if(m_searchFieldsBox) {
currentText = m_searchFieldsBox->currentText();
m_searchFieldsBox->clear();
}
- QStringList columnHeaders;
+ TQStringList columnHeaders;
- columnHeaders.append(QString("<%1>").arg(i18n("All Visible")));
+ columnHeaders.append(TQString("<%1>").arg(i18n("All Visible")));
Playlist *playlist = CollectionList::instance();
@@ -172,7 +172,7 @@ void SearchLine::updateColumns()
for(int i = 0; i < playlist->columns(); i++) {
m_columnList.append(i);
- QString text = playlist->columnText(i);
+ TQString text = playlist->columnText(i);
columnHeaders.append(text);
if(currentText == text)
selection = m_columnList.size() - 1;
@@ -188,7 +188,7 @@ void SearchLine::updateColumns()
// SearchWidget public methods
////////////////////////////////////////////////////////////////////////////////
-SearchWidget::SearchWidget(QWidget *parent, const char *name) : KToolBar(parent, name)
+SearchWidget::SearchWidget(TQWidget *parent, const char *name) : KToolBar(parent, name)
{
setupLayout();
updateColumns();
@@ -211,12 +211,12 @@ void SearchWidget::setSearch(const PlaylistSearch &search)
m_searchLine->setSearchComponent(*components.begin());
}
-QString SearchWidget::searchText() const
+TQString SearchWidget::searchText() const
{
return m_searchLine->searchComponent().query();
}
-void SearchWidget::setSearchText(const QString &text)
+void SearchWidget::setSearchText(const TQString &text)
{
m_searchLine->setSearchComponent(PlaylistSearch::Component(text));
}
@@ -263,29 +263,29 @@ void SearchWidget::setupLayout()
{
boxLayout()->setSpacing(5);
- QToolButton *clearSearchButton = new QToolButton(this);
+ TQToolButton *clearSearchButton = new TQToolButton(this);
clearSearchButton->setTextLabel(i18n("Clear Search"), true);
clearSearchButton->setIconSet(SmallIconSet("locationbar_erase"));
- QLabel *label = new QLabel(i18n("Search:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("Search:"), this, "kde toolbar widget");
m_searchLine = new SearchLine(this, true, "kde toolbar widget");
label->setBuddy(m_searchLine);
- connect(m_searchLine, SIGNAL(signalQueryChanged()), this, SIGNAL(signalQueryChanged()));
- connect(m_searchLine, SIGNAL(signalDownPressed()), this, SIGNAL(signalDownPressed()));
- connect(clearSearchButton, SIGNAL(pressed()), m_searchLine, SLOT(clear()));
+ connect(m_searchLine, TQT_SIGNAL(signalQueryChanged()), this, TQT_SIGNAL(signalQueryChanged()));
+ connect(m_searchLine, TQT_SIGNAL(signalDownPressed()), this, TQT_SIGNAL(signalDownPressed()));
+ connect(clearSearchButton, TQT_SIGNAL(pressed()), m_searchLine, TQT_SLOT(clear()));
setStretchableWidget(m_searchLine);
// I've decided that I think this is ugly, for now.
/*
- QToolButton *b = new QToolButton(this);
+ TQToolButton *b = new TQToolButton(this);
b->setTextLabel(i18n("Advanced Search"), true);
b->setIconSet(SmallIconSet("wizard"));
- connect(b, SIGNAL(clicked()), this, SIGNAL(signalAdvancedSearchClicked()));
+ connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(signalAdvancedSearchClicked()));
*/
}