Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 558:d932ce55c364 find
Remove the single find widget from top, add one to each tab at the bottom instead. (Turns out you don't usually want to search for the same text in both types of widget.) Also provide sensible no-results text.
author | Chris Cannam |
---|---|
date | Mon, 27 Feb 2012 17:08:26 +0000 |
parents | a1d210c767ab |
children | 533519ebc0cb |
comparison
equal
deleted
inserted
replaced
557:57a7f95ef400 | 558:d932ce55c364 |
---|---|
51 #include "version.h" | 51 #include "version.h" |
52 #include "workstatuswidget.h" | 52 #include "workstatuswidget.h" |
53 #include "hgignoredialog.h" | 53 #include "hgignoredialog.h" |
54 #include "versiontester.h" | 54 #include "versiontester.h" |
55 #include "fswatcher.h" | 55 #include "fswatcher.h" |
56 #include "findwidget.h" | |
57 | 56 |
58 | 57 |
59 MainWindow::MainWindow(QString myDirPath) : | 58 MainWindow::MainWindow(QString myDirPath) : |
60 m_myDirPath(myDirPath), | 59 m_myDirPath(myDirPath), |
61 m_helpDialog(0) | 60 m_helpDialog(0) |
106 #ifndef Q_OS_MAC | 105 #ifndef Q_OS_MAC |
107 cl->setMargin(0); | 106 cl->setMargin(0); |
108 #endif | 107 #endif |
109 | 108 |
110 m_workStatus = new WorkStatusWidget(this); | 109 m_workStatus = new WorkStatusWidget(this); |
111 cl->addWidget(m_workStatus, row, 0); | 110 cl->addWidget(m_workStatus, row++, 0); |
112 | |
113 m_findWidget = new FindWidget(this); | |
114 cl->addWidget(m_findWidget, row++, 1, Qt::AlignRight | Qt::AlignTop); | |
115 connect(m_findWidget, SIGNAL(findTextChanged(QString)), | |
116 this, SLOT(findTextChanged(QString))); | |
117 | 111 |
118 m_hgTabs = new HgTabWidget(central, m_workFolderPath); | 112 m_hgTabs = new HgTabWidget(central, m_workFolderPath); |
119 connectTabsSignals(); | 113 connectTabsSignals(); |
120 | 114 |
121 cl->addWidget(m_hgTabs, row++, 0, 1, 2); | 115 cl->addWidget(m_hgTabs, row++, 0, 1, 2); |
228 } | 222 } |
229 | 223 |
230 void MainWindow::showAllChanged() | 224 void MainWindow::showAllChanged() |
231 { | 225 { |
232 hgQueryPaths(); | 226 hgQueryPaths(); |
233 } | |
234 | |
235 void MainWindow::findTextChanged(QString text) | |
236 { | |
237 std::cerr << "find: " << text << std::endl; | |
238 m_hgTabs->setSearchText(text); | |
239 } | 227 } |
240 | 228 |
241 void MainWindow::hgRefresh() | 229 void MainWindow::hgRefresh() |
242 { | 230 { |
243 clearState(); | 231 clearState(); |