1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 00:23:53 +00:00
openmw/apps/opencs/view/world/scenesubview.hpp

90 lines
1.8 KiB
C++
Raw Normal View History

#ifndef CSV_WORLD_SCENESUBVIEW_H
#define CSV_WORLD_SCENESUBVIEW_H
#include <QHBoxLayout>
#include "../doc/subview.hpp"
class QModelIndex;
namespace CSMWorld
{
class CellSelection;
}
namespace CSMDoc
{
class Document;
}
2014-02-25 13:59:46 +00:00
namespace CSVRender
{
class WorldspaceWidget;
2014-05-03 12:00:30 +00:00
class PagedWorldspaceWidget;
class UnpagedWorldspaceWidget;
2014-02-25 13:59:46 +00:00
}
namespace CSVWidget
{
class SceneToolbar;
class SceneToolMode;
}
namespace CSVWorld
{
class TableBottomBox;
class CreatorFactoryBase;
class SceneSubView : public CSVDoc::SubView
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2022-09-22 18:26:05 +00:00
TableBottomBox* mBottom;
CSVRender::WorldspaceWidget* mScene;
QHBoxLayout* mLayout;
CSMDoc::Document& mDocument;
CSVWidget::SceneToolbar* mToolbar;
std::string mTitle;
2022-09-22 18:26:05 +00:00
public:
SceneSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document);
2022-09-22 18:26:05 +00:00
void setEditLock(bool locked) override;
2022-09-22 18:26:05 +00:00
void setStatusBar(bool show) override;
2022-09-22 18:26:05 +00:00
void useHint(const std::string& hint) override;
2022-09-22 18:26:05 +00:00
std::string getTitle() const override;
2022-09-22 18:26:05 +00:00
private:
void makeConnections(CSVRender::PagedWorldspaceWidget* widget);
2022-09-22 18:26:05 +00:00
void makeConnections(CSVRender::UnpagedWorldspaceWidget* widget);
2014-05-03 12:00:30 +00:00
2022-09-22 18:26:05 +00:00
void replaceToolbarAndWorldspace(CSVRender::WorldspaceWidget* widget, CSVWidget::SceneToolbar* toolbar);
2014-05-03 12:00:30 +00:00
2022-09-22 18:26:05 +00:00
enum widgetType
{
widget_Paged,
widget_Unpaged
};
2014-05-03 12:00:30 +00:00
2022-09-22 18:26:05 +00:00
CSVWidget::SceneToolbar* makeToolbar(CSVRender::WorldspaceWidget* widget, widgetType type);
2014-05-03 12:00:30 +00:00
2022-09-22 18:26:05 +00:00
private slots:
2022-09-22 18:26:05 +00:00
void cellSelectionChanged(const CSMWorld::CellSelection& selection);
2014-05-03 12:00:30 +00:00
2022-09-22 18:26:05 +00:00
void cellSelectionChanged(const CSMWorld::UniversalId& id);
2022-09-22 18:26:05 +00:00
void handleDrop(const std::vector<CSMWorld::UniversalId>& data);
2022-09-22 18:26:05 +00:00
signals:
2022-09-22 18:26:05 +00:00
void requestFocus(const std::string& id);
};
}
#endif