void SearchBar::slotFindPrevious() { if (m_searchEdit->text().isEmpty()) { m_searchEdit->setPalette(QPalette()); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); return; } emit signalSearchPrevious(); }
IRCViewBox::IRCViewBox(QWidget* parent, Server* newServer) : QVBox(parent) { m_ircView = new IRCView(this, newServer); m_searchBar = new SearchBar(this); m_searchBar->hide(); m_matchedOnce = false; connect(m_searchBar, SIGNAL(signalSearchChanged(const QString&)), this, SLOT(slotSearchChanged(const QString&))); connect(m_searchBar, SIGNAL(signalSearchNext()), this, SLOT(slotSearchNext())); connect(m_searchBar, SIGNAL(signalSearchPrevious()), this, SLOT(slotSearchPrevious())); connect(m_ircView, SIGNAL(doSearch()), SLOT(slotSearch())); connect(m_searchBar, SIGNAL(hidden()), m_ircView, SIGNAL(gotFocus())); }