added statusbar to search window (Fixes #3276)

0.6.3
Marc Zinnschlag 7 years ago
parent 4c4d4672d4
commit 7d2394273e

@ -24,6 +24,7 @@
Bug #4429: [Windows] Error on build INSTALL.vcxproj project (debug) with cmake 3.7.2
Bug #4432: Guards behaviour is incorrect if they do not have AI packages
Bug #4433: Guard behaviour is incorrect with Alarm = 0
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
Feature #4324: Add CFBundleIdentifier in Info.plist to allow for macOS function key shortcuts
Feature #4345: Add equivalents for the command line commands to Launcher
Feature #4444: Per-group KF-animation files support

@ -8,6 +8,9 @@
#include "../../model/world/idtablebase.hpp"
#include "../../model/prefs/state.hpp"
#include "../world/tablebottombox.hpp"
#include "../world/creator.hpp"
#include "reporttable.hpp"
#include "searchbox.hpp"
@ -73,6 +76,9 @@ CSVTools::SearchSubView::SearchSubView (const CSMWorld::UniversalId& id, CSMDoc:
layout->addWidget (mTable = new ReportTable (document, id, true), 2);
layout->addWidget (mBottom =
new CSVWorld::TableBottomBox (CSVWorld::NullCreatorFactory(), document, id, this), 0);
QWidget *widget = new QWidget;
widget->setLayout (layout);
@ -93,6 +99,12 @@ CSVTools::SearchSubView::SearchSubView (const CSMWorld::UniversalId& id, CSMDoc:
this, SLOT (startSearch (const CSMTools::Search&)));
connect (&mSearchBox, SIGNAL (replaceAll()), this, SLOT (replaceAllRequest()));
connect (document.getReport (id), SIGNAL (rowsRemoved (const QModelIndex&, int, int)),
this, SLOT (tableSizeUpdate()));
connect (document.getReport (id), SIGNAL (rowsInserted (const QModelIndex&, int, int)),
this, SLOT (tableSizeUpdate()));
}
void CSVTools::SearchSubView::setEditLock (bool locked)
@ -101,6 +113,11 @@ void CSVTools::SearchSubView::setEditLock (bool locked)
mSearchBox.setEditLock (locked);
}
void CSVTools::SearchSubView::setStatusBar (bool show)
{
mBottom->setStatusBar(show);
}
void CSVTools::SearchSubView::stateChanged (int state, CSMDoc::Document *document)
{
mSearchBox.setSearchMode (!(state & CSMDoc::State_Searching));
@ -126,3 +143,8 @@ void CSVTools::SearchSubView::replaceAllRequest()
{
replace (false);
}
void CSVTools::SearchSubView::tableSizeUpdate()
{
mBottom->tableSizeChanged (mDocument.getReport (getUniversalId())->rowCount(), 0, 0);
}

@ -15,6 +15,11 @@ namespace CSMDoc
class Document;
}
namespace CSVWorld
{
class TableBottomBox;
}
namespace CSVTools
{
class ReportTable;
@ -28,6 +33,7 @@ namespace CSVTools
CSMDoc::Document& mDocument;
CSMTools::Search mSearch;
bool mLocked;
CSVWorld::TableBottomBox *mBottom;
private:
@ -43,6 +49,8 @@ namespace CSVTools
virtual void setEditLock (bool locked);
virtual void setStatusBar (bool show);
private slots:
void stateChanged (int state, CSMDoc::Document *document);
@ -52,6 +60,8 @@ namespace CSVTools
void replaceRequest();
void replaceAllRequest();
void tableSizeUpdate();
};
}

Loading…
Cancel
Save