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"
|
|
|
|
|
2015-03-25 11:56:14 +01:00
|
|
|
#include "searchbox.hpp"
|
|
|
|
|
2015-03-17 12:30:47 +01:00
|
|
|
class QTableView;
|
|
|
|
class QModelIndex;
|
|
|
|
|
|
|
|
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);
|
2015-05-14 14:48:29 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void showEvent (QShowEvent *event);
|
2015-12-14 17:38:33 +01:00
|
|
|
|
2015-03-17 12:30:47 +01:00
|
|
|
public:
|
|
|
|
|
|
|
|
SearchSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
|
|
|
|
|
|
|
virtual void setEditLock (bool locked);
|
|
|
|
|
2018-06-13 14:55:03 +02:00
|
|
|
virtual void setStatusBar (bool show);
|
|
|
|
|
2015-03-25 11:56:14 +01:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void stateChanged (int state, CSMDoc::Document *document);
|
2015-03-27 16:33:54 +01:00
|
|
|
|
|
|
|
void startSearch (const CSMTools::Search& search);
|
2015-04-16 18:50:22 +02:00
|
|
|
|
|
|
|
void replaceRequest();
|
2015-04-16 20:11:14 +02:00
|
|
|
|
|
|
|
void replaceAllRequest();
|
2018-06-13 14:55:03 +02:00
|
|
|
|
|
|
|
void tableSizeUpdate();
|
2018-06-13 15:48:24 +02:00
|
|
|
|
|
|
|
void operationDone (int type, bool failed);
|
2015-03-17 12:30:47 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|