GUI: move some options to a new View menu, and add some more index stats
This commit is contained in:
parent
d0400bdce7
commit
87e40eed16
@ -82,13 +82,17 @@
|
||||
<addaction name="fileEraseSearchHistoryAction"/>
|
||||
<addaction name="fileEraseDocHistoryAction"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="fileExitAction"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="viewMenu">
|
||||
<property name="title">
|
||||
<string>&View</string>
|
||||
</property>
|
||||
<addaction name="showMissingHelpers_Action"/>
|
||||
<addaction name="showActiveTypes_Action"/>
|
||||
<addaction name="actionShow_index_statistics"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="toggleFullScreenAction"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="fileExitAction"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="toolsMenu">
|
||||
<property name="title">
|
||||
@ -139,6 +143,7 @@
|
||||
<addaction name="actionSaveResultsAsCSV"/>
|
||||
</widget>
|
||||
<addaction name="fileMenu"/>
|
||||
<addaction name="viewMenu"/>
|
||||
<addaction name="toolsMenu"/>
|
||||
<addaction name="menuResults"/>
|
||||
<addaction name="preferencesMenu"/>
|
||||
@ -190,7 +195,7 @@
|
||||
</action>
|
||||
<action name="showMissingHelpers_Action">
|
||||
<property name="text">
|
||||
<string>&Show missing helpers</string>
|
||||
<string>Missing &helpers</string>
|
||||
</property>
|
||||
<property name="name" stdset="0">
|
||||
<cstring>showMissingHelpers_Action</cstring>
|
||||
@ -198,7 +203,7 @@
|
||||
</action>
|
||||
<action name="showActiveTypes_Action">
|
||||
<property name="text">
|
||||
<string>&Show indexed types</string>
|
||||
<string>Indexed &MIME types</string>
|
||||
</property>
|
||||
<property name="name" stdset="0">
|
||||
<cstring>showActiveTypes_Action</cstring>
|
||||
@ -524,7 +529,7 @@
|
||||
</action>
|
||||
<action name="actionShow_index_statistics">
|
||||
<property name="text">
|
||||
<string>Show index statistics</string>
|
||||
<string>Index &statistics</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
#include "rclhelp.h"
|
||||
#include "wasatorcl.h"
|
||||
#include "execmd.h"
|
||||
#include "indexer.h"
|
||||
|
||||
#ifdef RCL_USE_ASPELL
|
||||
#include "rclaspell.h"
|
||||
@ -292,19 +293,48 @@ void SpellW::showStats()
|
||||
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr("Smallest document length")));
|
||||
new QTableWidgetItem(tr("Smallest document length (terms)")));
|
||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||
QString::number(res.mindoclen)));
|
||||
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr("Longest document length")));
|
||||
new QTableWidgetItem(tr("Longest document length (terms)")));
|
||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||
QString::number(res.maxdoclen)));
|
||||
|
||||
if (!theconfig)
|
||||
return;
|
||||
|
||||
ConfSimple cs(theconfig->getIdxStatusFile().c_str(), 1);
|
||||
DbIxStatus st;
|
||||
cs.get("fn", st.fn);
|
||||
cs.get("docsdone", &st.docsdone);
|
||||
cs.get("filesdone", &st.filesdone);
|
||||
cs.get("fileerrors", &st.fileerrors);
|
||||
cs.get("dbtotdocs", &st.dbtotdocs);
|
||||
cs.get("totfiles", &st.totfiles);
|
||||
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr("Results from last indexing:")));
|
||||
resTW->setItem(row++, 1, new QTableWidgetItem(""));
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr(" Documents created/updated")));
|
||||
resTW->setItem(row++, 1,
|
||||
new QTableWidgetItem(QString::number(st.docsdone)));
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr(" Files tested")));
|
||||
resTW->setItem(row++, 1,
|
||||
new QTableWidgetItem(QString::number(st.filesdone)));
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0,
|
||||
new QTableWidgetItem(tr(" Unindexed files")));
|
||||
resTW->setItem(row++, 1,
|
||||
new QTableWidgetItem(QString::number(st.fileerrors)));
|
||||
|
||||
baseWordLE->setText(QString::fromLocal8Bit(theconfig->getDbDir().c_str()));
|
||||
|
||||
ExecCmd cmd;
|
||||
@ -348,7 +378,7 @@ void SpellW::showStats()
|
||||
for (multimap<int, string>::const_reverse_iterator it = mtbycnt.rbegin();
|
||||
it != mtbycnt.rend(); it++) {
|
||||
resTW->setRowCount(row+1);
|
||||
resTW->setItem(row, 0, new QTableWidgetItem(
|
||||
resTW->setItem(row, 0, new QTableWidgetItem(QString(" ") +
|
||||
QString::fromUtf8(it->second.c_str())));
|
||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||
QString::number(it->first)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user