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