diff src/mainwindow.cpp @ 555:a1d210c767ab find

Implement basic search function in both work and history tabs
author Chris Cannam
date Wed, 22 Feb 2012 14:54:30 +0000
parents 930462068dcc
children d932ce55c364
line wrap: on
line diff
--- a/src/mainwindow.cpp	Mon Feb 20 18:15:53 2012 +0000
+++ b/src/mainwindow.cpp	Wed Feb 22 14:54:30 2012 +0000
@@ -112,6 +112,8 @@
 
     m_findWidget = new FindWidget(this);
     cl->addWidget(m_findWidget, row++, 1, Qt::AlignRight | Qt::AlignTop);
+    connect(m_findWidget, SIGNAL(findTextChanged(QString)),
+            this, SLOT(findTextChanged(QString)));
 
     m_hgTabs = new HgTabWidget(central, m_workFolderPath);
     connectTabsSignals();
@@ -230,6 +232,12 @@
     hgQueryPaths();
 }
 
+void MainWindow::findTextChanged(QString text)
+{
+    std::cerr << "find: " << text << std::endl;
+    m_hgTabs->setSearchText(text);
+}
+
 void MainWindow::hgRefresh()
 {
     clearState();