comparison 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
comparison
equal deleted inserted replaced
554:930462068dcc 555:a1d210c767ab
110 m_workStatus = new WorkStatusWidget(this); 110 m_workStatus = new WorkStatusWidget(this);
111 cl->addWidget(m_workStatus, row, 0); 111 cl->addWidget(m_workStatus, row, 0);
112 112
113 m_findWidget = new FindWidget(this); 113 m_findWidget = new FindWidget(this);
114 cl->addWidget(m_findWidget, row++, 1, Qt::AlignRight | Qt::AlignTop); 114 cl->addWidget(m_findWidget, row++, 1, Qt::AlignRight | Qt::AlignTop);
115 connect(m_findWidget, SIGNAL(findTextChanged(QString)),
116 this, SLOT(findTextChanged(QString)));
115 117
116 m_hgTabs = new HgTabWidget(central, m_workFolderPath); 118 m_hgTabs = new HgTabWidget(central, m_workFolderPath);
117 connectTabsSignals(); 119 connectTabsSignals();
118 120
119 cl->addWidget(m_hgTabs, row++, 0, 1, 2); 121 cl->addWidget(m_hgTabs, row++, 0, 1, 2);
226 } 228 }
227 229
228 void MainWindow::showAllChanged() 230 void MainWindow::showAllChanged()
229 { 231 {
230 hgQueryPaths(); 232 hgQueryPaths();
233 }
234
235 void MainWindow::findTextChanged(QString text)
236 {
237 std::cerr << "find: " << text << std::endl;
238 m_hgTabs->setSearchText(text);
231 } 239 }
232 240
233 void MainWindow::hgRefresh() 241 void MainWindow::hgRefresh()
234 { 242 {
235 clearState(); 243 clearState();