GUI: display estimated result count in status line
This commit is contained in:
+19
-1
@@ -241,7 +241,9 @@ void RclMain::init()
|
||||
this, SLOT(showUIPrefs()));
|
||||
connect(extIdxAction, SIGNAL(activated()),
|
||||
this, SLOT(showExtIdxDialog()));
|
||||
|
||||
connect(this, SIGNAL(applyFiltSortData()),
|
||||
this, SLOT(onResultsChanged()));
|
||||
|
||||
if (prefs.catgToolBar && catgCMB)
|
||||
connect(catgCMB, SIGNAL(activated(int)),
|
||||
this, SLOT(catgFilter(int)));
|
||||
@@ -621,6 +623,22 @@ void RclMain::startSearch(RefCntr<Rcl::SearchData> sdata)
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void RclMain::onResultsChanged()
|
||||
{
|
||||
if (m_source.isNotNull()) {
|
||||
int cnt = m_source->getResCnt();
|
||||
QString msg;
|
||||
if (cnt > 0) {
|
||||
QString str;
|
||||
msg = tr("Result count (est.)") + ": " +
|
||||
str.setNum(cnt);
|
||||
} else {
|
||||
msg = tr("No results found");
|
||||
}
|
||||
statusBar()->showMessage(msg, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void RclMain::resetSearch()
|
||||
{
|
||||
emit searchReset();
|
||||
|
||||
@@ -100,6 +100,7 @@ public slots:
|
||||
virtual void onResTableSortBy(DocSeqSortSpec);
|
||||
virtual void resultCount(int);
|
||||
virtual void showQueryDetails();
|
||||
virtual void onResultsChanged();
|
||||
|
||||
signals:
|
||||
void docSourceChanged(RefCntr<DocSequence>);
|
||||
|
||||
Reference in New Issue
Block a user