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="fileEraseSearchHistoryAction"/>
|
||||||
<addaction name="fileEraseDocHistoryAction"/>
|
<addaction name="fileEraseDocHistoryAction"/>
|
||||||
<addaction name="separator"/>
|
<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="showMissingHelpers_Action"/>
|
||||||
<addaction name="showActiveTypes_Action"/>
|
<addaction name="showActiveTypes_Action"/>
|
||||||
<addaction name="actionShow_index_statistics"/>
|
<addaction name="actionShow_index_statistics"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="toggleFullScreenAction"/>
|
<addaction name="toggleFullScreenAction"/>
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="fileExitAction"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="toolsMenu">
|
<widget class="QMenu" name="toolsMenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -139,6 +143,7 @@
|
|||||||
<addaction name="actionSaveResultsAsCSV"/>
|
<addaction name="actionSaveResultsAsCSV"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="fileMenu"/>
|
<addaction name="fileMenu"/>
|
||||||
|
<addaction name="viewMenu"/>
|
||||||
<addaction name="toolsMenu"/>
|
<addaction name="toolsMenu"/>
|
||||||
<addaction name="menuResults"/>
|
<addaction name="menuResults"/>
|
||||||
<addaction name="preferencesMenu"/>
|
<addaction name="preferencesMenu"/>
|
||||||
@ -190,7 +195,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="showMissingHelpers_Action">
|
<action name="showMissingHelpers_Action">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Show missing helpers</string>
|
<string>Missing &helpers</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="name" stdset="0">
|
<property name="name" stdset="0">
|
||||||
<cstring>showMissingHelpers_Action</cstring>
|
<cstring>showMissingHelpers_Action</cstring>
|
||||||
@ -198,7 +203,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="showActiveTypes_Action">
|
<action name="showActiveTypes_Action">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Show indexed types</string>
|
<string>Indexed &MIME types</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="name" stdset="0">
|
<property name="name" stdset="0">
|
||||||
<cstring>showActiveTypes_Action</cstring>
|
<cstring>showActiveTypes_Action</cstring>
|
||||||
@ -524,7 +529,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionShow_index_statistics">
|
<action name="actionShow_index_statistics">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show index statistics</string>
|
<string>Index &statistics</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
#include "rclhelp.h"
|
#include "rclhelp.h"
|
||||||
#include "wasatorcl.h"
|
#include "wasatorcl.h"
|
||||||
#include "execmd.h"
|
#include "execmd.h"
|
||||||
|
#include "indexer.h"
|
||||||
|
|
||||||
#ifdef RCL_USE_ASPELL
|
#ifdef RCL_USE_ASPELL
|
||||||
#include "rclaspell.h"
|
#include "rclaspell.h"
|
||||||
@ -292,19 +293,48 @@ void SpellW::showStats()
|
|||||||
|
|
||||||
resTW->setRowCount(row+1);
|
resTW->setRowCount(row+1);
|
||||||
resTW->setItem(row, 0,
|
resTW->setItem(row, 0,
|
||||||
new QTableWidgetItem(tr("Smallest document length")));
|
new QTableWidgetItem(tr("Smallest document length (terms)")));
|
||||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||||
QString::number(res.mindoclen)));
|
QString::number(res.mindoclen)));
|
||||||
|
|
||||||
resTW->setRowCount(row+1);
|
resTW->setRowCount(row+1);
|
||||||
resTW->setItem(row, 0,
|
resTW->setItem(row, 0,
|
||||||
new QTableWidgetItem(tr("Longest document length")));
|
new QTableWidgetItem(tr("Longest document length (terms)")));
|
||||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||||
QString::number(res.maxdoclen)));
|
QString::number(res.maxdoclen)));
|
||||||
|
|
||||||
if (!theconfig)
|
if (!theconfig)
|
||||||
return;
|
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()));
|
baseWordLE->setText(QString::fromLocal8Bit(theconfig->getDbDir().c_str()));
|
||||||
|
|
||||||
ExecCmd cmd;
|
ExecCmd cmd;
|
||||||
@ -348,7 +378,7 @@ void SpellW::showStats()
|
|||||||
for (multimap<int, string>::const_reverse_iterator it = mtbycnt.rbegin();
|
for (multimap<int, string>::const_reverse_iterator it = mtbycnt.rbegin();
|
||||||
it != mtbycnt.rend(); it++) {
|
it != mtbycnt.rend(); it++) {
|
||||||
resTW->setRowCount(row+1);
|
resTW->setRowCount(row+1);
|
||||||
resTW->setItem(row, 0, new QTableWidgetItem(
|
resTW->setItem(row, 0, new QTableWidgetItem(QString(" ") +
|
||||||
QString::fromUtf8(it->second.c_str())));
|
QString::fromUtf8(it->second.c_str())));
|
||||||
resTW->setItem(row++, 1, new QTableWidgetItem(
|
resTW->setItem(row++, 1, new QTableWidgetItem(
|
||||||
QString::number(it->first)));
|
QString::number(it->first)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user