You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/apps/opencs/view/world/scenesubview.hpp

91 lines
1.9 KiB
C++

#ifndef CSV_WORLD_SCENESUBVIEW_H
#define CSV_WORLD_SCENESUBVIEW_H
#include <QHBoxLayout>
#include <string>
#include <vector>
#include <apps/opencs/model/world/universalid.hpp>
#include "../doc/subview.hpp"
namespace CSMWorld
{
class CellSelection;
}
namespace CSMDoc
{
class Document;
}
namespace CSVRender
{
class WorldspaceWidget;
class PagedWorldspaceWidget;
class UnpagedWorldspaceWidget;
}
namespace CSVWidget
{
class SceneToolbar;
}
namespace CSVWorld
{
class TableBottomBox;
class SceneSubView : public CSVDoc::SubView
{
Q_OBJECT
TableBottomBox* mBottom;
CSVRender::WorldspaceWidget* mScene;
QHBoxLayout* mLayout;
CSMDoc::Document& mDocument;
CSVWidget::SceneToolbar* mToolbar;
std::string mTitle;
public:
SceneSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document);
void setEditLock(bool locked) override;
void setStatusBar(bool show) override;
void useHint(const std::string& hint) override;
std::string getTitle() const override;
private:
void makeConnections(CSVRender::PagedWorldspaceWidget* widget);
void makeConnections(CSVRender::UnpagedWorldspaceWidget* widget);
void replaceToolbarAndWorldspace(CSVRender::WorldspaceWidget* widget, CSVWidget::SceneToolbar* toolbar);
enum widgetType
{
widget_Paged,
widget_Unpaged
};
CSVWidget::SceneToolbar* makeToolbar(CSVRender::WorldspaceWidget* widget, widgetType type);
private slots:
void cellSelectionChanged(const CSMWorld::CellSelection& selection);
void cellSelectionChanged(const CSMWorld::UniversalId& id);
void handleDrop(const std::vector<CSMWorld::UniversalId>& data);
signals:
void requestFocus(const std::string& id);
};
}
#endif