2015-03-17 11:30:47 +00:00
|
|
|
#ifndef CSV_TOOLS_SEARCHSUBVIEW_H
|
|
|
|
#define CSV_TOOLS_SEARCHSUBVIEW_H
|
|
|
|
|
2015-04-16 16:50:22 +00:00
|
|
|
#include "../../model/tools/search.hpp"
|
|
|
|
|
2015-03-17 11:30:47 +00:00
|
|
|
#include "../doc/subview.hpp"
|
|
|
|
|
2022-10-19 17:02:00 +00:00
|
|
|
#include <apps/opencs/model/world/universalid.hpp>
|
|
|
|
|
2015-03-25 10:56:14 +00:00
|
|
|
#include "searchbox.hpp"
|
|
|
|
|
2015-03-17 11:30:47 +00:00
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
2018-06-13 12:55:03 +00:00
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class TableBottomBox;
|
|
|
|
}
|
|
|
|
|
2015-03-17 11:30:47 +00:00
|
|
|
namespace CSVTools
|
|
|
|
{
|
|
|
|
class ReportTable;
|
|
|
|
|
|
|
|
class SearchSubView : public CSVDoc::SubView
|
|
|
|
{
|
2022-09-22 18:26:05 +00:00
|
|
|
Q_OBJECT
|
2015-03-17 11:30:47 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
ReportTable* mTable;
|
|
|
|
SearchBox mSearchBox;
|
|
|
|
CSMDoc::Document& mDocument;
|
|
|
|
CSMTools::Search mSearch;
|
|
|
|
bool mLocked;
|
|
|
|
CSVWorld::TableBottomBox* mBottom;
|
2015-03-17 11:30:47 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
private:
|
|
|
|
void replace(bool selection);
|
2015-04-16 18:11:14 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent* event) override;
|
2015-05-14 12:48:29 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
public:
|
|
|
|
SearchSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
2015-05-14 12:48:29 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void setEditLock(bool locked) override;
|
2015-12-14 16:38:33 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void setStatusBar(bool show) override;
|
2015-03-17 11:30:47 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
private slots:
|
2015-03-17 11:30:47 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void stateChanged(int state, CSMDoc::Document* document);
|
2015-03-17 11:30:47 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void startSearch(const CSMTools::Search& search);
|
2018-06-13 12:55:03 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void replaceRequest();
|
2015-03-25 10:56:14 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void replaceAllRequest();
|
2015-03-27 15:33:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void tableSizeUpdate();
|
2015-04-16 16:50:22 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void operationDone(int type, bool failed);
|
2015-03-17 11:30:47 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|