2012-12-03 22:03:02 +01:00
|
|
|
#ifndef CSV_WORLD_TABLESUBVIEW_H
|
|
|
|
#define CSV_WORLD_TABLESUBVIEW_H
|
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
#include "../doc/subview.hpp"
|
2012-12-03 22:03:02 +01:00
|
|
|
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <QModelIndex>
|
2023-01-26 00:05:51 +02:00
|
|
|
#include <QVariant>
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <QWidget>
|
2012-12-03 22:03:02 +01:00
|
|
|
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <apps/opencs/model/world/universalid.hpp>
|
|
|
|
|
|
|
|
class QEvent;
|
|
|
|
class QObject;
|
|
|
|
class QWidget;
|
2014-01-20 16:17:49 +01:00
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
2014-04-13 16:40:41 +02:00
|
|
|
namespace CSVFilter
|
|
|
|
{
|
|
|
|
class FilterBox;
|
|
|
|
}
|
|
|
|
|
2012-12-03 22:03:02 +01:00
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class Table;
|
2013-07-25 14:29:56 +02:00
|
|
|
class TableBottomBox;
|
2013-07-26 12:42:15 +02:00
|
|
|
class CreatorFactoryBase;
|
2012-12-03 22:03:02 +01:00
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
class TableSubView : public CSVDoc::SubView
|
2012-12-03 22:03:02 +01:00
|
|
|
{
|
2012-12-13 13:35:08 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
2012-12-03 22:03:02 +01:00
|
|
|
Table* mTable;
|
2013-07-25 14:29:56 +02:00
|
|
|
TableBottomBox* mBottom;
|
2014-04-13 16:40:41 +02:00
|
|
|
CSVFilter::FilterBox* mFilterBox;
|
2021-07-24 20:00:25 +00:00
|
|
|
bool mShowOptions;
|
|
|
|
QWidget* mOptions;
|
2012-12-03 22:03:02 +01:00
|
|
|
|
|
|
|
public:
|
2013-07-26 12:34:30 +02:00
|
|
|
TableSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
2013-10-31 13:40:14 +01:00
|
|
|
const CreatorFactoryBase& creatorFactory, bool sorting);
|
2012-12-03 22:03:02 +01:00
|
|
|
|
2013-10-31 13:40:14 +01:00
|
|
|
void setEditLock(bool locked) override;
|
2013-07-25 14:29:56 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
void setStatusBar(bool show) override;
|
2013-07-25 14:29:56 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
void useHint(const std::string& hint) override;
|
2014-01-27 19:40:05 +01:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
protected:
|
|
|
|
bool eventFilter(QObject* object, QEvent* event) override;
|
2014-04-13 16:40:41 +02:00
|
|
|
|
2014-02-21 13:30:52 +01:00
|
|
|
signals:
|
2020-10-16 22:18:54 +04:00
|
|
|
void cloneRequest(const std::string&, const CSMWorld::UniversalId::Type);
|
2014-02-21 12:48:39 +01:00
|
|
|
|
2014-01-27 19:40:05 +01:00
|
|
|
private slots:
|
2012-12-13 13:35:08 +01:00
|
|
|
|
|
|
|
void editRequest(const CSMWorld::UniversalId& id, const std::string& hint);
|
|
|
|
void cloneRequest(const CSMWorld::UniversalId& toClone);
|
2023-01-26 00:05:51 +02:00
|
|
|
void createFilterRequest(std::vector<CSMWorld::UniversalId>& types,
|
2023-01-29 21:42:01 +02:00
|
|
|
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action);
|
2021-07-24 20:00:25 +00:00
|
|
|
void toggleOptions();
|
2012-12-13 13:35:08 +01:00
|
|
|
|
2014-01-21 08:27:29 +01:00
|
|
|
public slots:
|
2019-07-01 23:26:05 +00:00
|
|
|
|
|
|
|
void requestFocus(const std::string& id);
|
2012-12-03 22:03:02 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2013-06-15 06:40:18 -05:00
|
|
|
#endif
|