diff options
Diffstat (limited to 'konversation/src/searchbar.cpp')
-rw-r--r-- | konversation/src/searchbar.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/konversation/src/searchbar.cpp b/konversation/src/searchbar.cpp index 992086a..7f8c004 100644 --- a/konversation/src/searchbar.cpp +++ b/konversation/src/searchbar.cpp @@ -12,16 +12,16 @@ #include "searchbar.h" -#include <qcheckbox.h> -#include <qtimer.h> -#include <qpalette.h> -#include <qaccel.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qobjectlist.h> -#include <qtoolbutton.h> -#include <qpopupmenu.h> -#include <qwidgetstack.h> +#include <tqcheckbox.h> +#include <tqtimer.h> +#include <tqpalette.h> +#include <tqaccel.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqobjectlist.h> +#include <tqtoolbutton.h> +#include <tqpopupmenu.h> +#include <tqwidgetstack.h> #include <kdebug.h> #include <kapplication.h> @@ -36,7 +36,7 @@ #define FROM_CURSOR_MENU 4 -SearchBar::SearchBar(QWidget* parent) +SearchBar::SearchBar(TQWidget* parent) : SearchBarBase(parent) { m_searchFoward = false; @@ -52,25 +52,25 @@ SearchBar::SearchBar(QWidget* parent) m_statusPixLabel->hide(); m_statusTextLabel->hide(); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); - QAccel* accel = new QAccel(this); - accel->connectItem( accel->insertItem(Qt::Key_Escape), this, SLOT(hide())); + TQAccel* accel = new TQAccel(this); + accel->connectItem( accel->insertItem(Qt::Key_Escape), this, TQT_SLOT(hide())); - connect(m_timer, SIGNAL(timeout()), SLOT(slotFind())); - connect(m_searchEdit, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged())); - connect(m_searchEdit, SIGNAL(returnPressed()), SLOT(slotFindNext())); - connect(m_findNextButton, SIGNAL(clicked()), SLOT(slotFindNext())); - connect(m_findPreviousButton, SIGNAL(clicked()), SLOT(slotFindPrevious())); - connect(m_closeButton, SIGNAL(clicked()), SLOT(hide())); - connect(m_optionsButton, SIGNAL(clicked()), this, SLOT(showOptionsMenu())); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFind())); + connect(m_searchEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged())); + connect(m_searchEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotFindNext())); + connect(m_findNextButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFindNext())); + connect(m_findPreviousButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFindPrevious())); + connect(m_closeButton, TQT_SIGNAL(clicked()), TQT_SLOT(hide())); + connect(m_optionsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showOptionsMenu())); - m_optionsMenu = new QPopupMenu(m_optionsButton, "options_menu"); + m_optionsMenu = new TQPopupMenu(m_optionsButton, "options_menu"); m_optionsMenu->setCheckable(true); - m_optionsMenu->insertItem(i18n("Find Forward"), this, SLOT(toggleSearchFoward()), 0, SEARCH_FORWARD_MENU); - m_optionsMenu->insertItem(i18n("Case Sensitive"), this, SLOT(toggleMatchCase()), 0, MATCH_CASE_MENU); - m_optionsMenu->insertItem(i18n("Whole Words Only"), this, SLOT(toggleWholeWords()), 0, WHOLE_WORDS_ONLY_MENU); - m_optionsMenu->insertItem(i18n("From Cursor"), this, SLOT(toggleFromCursor()), 0, FROM_CURSOR_MENU); + m_optionsMenu->insertItem(i18n("Find Forward"), this, TQT_SLOT(toggleSearchFoward()), 0, SEARCH_FORWARD_MENU); + m_optionsMenu->insertItem(i18n("Case Sensitive"), this, TQT_SLOT(toggleMatchCase()), 0, MATCH_CASE_MENU); + m_optionsMenu->insertItem(i18n("Whole Words Only"), this, TQT_SLOT(toggleWholeWords()), 0, WHOLE_WORDS_ONLY_MENU); + m_optionsMenu->insertItem(i18n("From Cursor"), this, TQT_SLOT(toggleFromCursor()), 0, FROM_CURSOR_MENU); m_optionsButton->setPopup(m_optionsMenu); } @@ -79,7 +79,7 @@ SearchBar::~SearchBar() { } -void SearchBar::showEvent(QShowEvent *e) +void SearchBar::showEvent(TQShowEvent *e) { SearchBarBase::showEvent(e); m_searchEdit->selectAll(); @@ -87,15 +87,15 @@ void SearchBar::showEvent(QShowEvent *e) bool SearchBar::focusedChild() { - QObjectList *l = queryList("QWidget", 0,0, true); - QObjectListIt it( *l ); - QObject *obj; + TQObjectList *l = queryList("TQWidget", 0,0, true); + TQObjectListIt it( *l ); + TQObject *obj; bool has=false; while ((obj = it.current()) != 0) { ++it; - if (((QWidget*)obj)->hasFocus()) + if (((TQWidget*)obj)->hasFocus()) { has=true; break; @@ -126,7 +126,7 @@ void SearchBar::slotFind() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(QPixmap(), ""); + setStatus(TQPixmap(), ""); return; } @@ -140,7 +140,7 @@ void SearchBar::slotFindNext() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(QPixmap(), ""); + setStatus(TQPixmap(), ""); return; } @@ -154,7 +154,7 @@ void SearchBar::slotFindPrevious() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(QPixmap(), ""); + setStatus(TQPixmap(), ""); return; } @@ -163,14 +163,14 @@ void SearchBar::slotFindPrevious() void SearchBar::setHasMatch(bool value) { - QPalette pal = m_searchEdit->palette(); - pal.setColor(QPalette::Active, QColorGroup::Base, value ? Qt::green : Qt::red); + TQPalette pal = m_searchEdit->palette(); + pal.setColor(TQPalette::Active, TQColorGroup::Base, value ? Qt::green : Qt::red); m_searchEdit->setPalette(pal); m_findNextButton->setEnabled(value); m_findPreviousButton->setEnabled(value); } -void SearchBar::setStatus(const QPixmap& pix, const QString& text) +void SearchBar::setStatus(const TQPixmap& pix, const TQString& text) { if(!text.isEmpty()) { m_statusPixLabel->show(); @@ -184,7 +184,7 @@ void SearchBar::setStatus(const QPixmap& pix, const QString& text) m_statusTextLabel->setText(text); } -QString SearchBar::pattern() const +TQString SearchBar::pattern() const { return m_searchEdit->text(); } |