2014-03-04 13:47:43 +00:00
|
|
|
#ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H
|
|
|
|
#define OPENCS_VIEW_WORLDSPACEWIDGET_H
|
|
|
|
|
|
|
|
#include "scenewidget.hpp"
|
|
|
|
|
2014-03-06 09:01:23 +00:00
|
|
|
#include "navigation1st.hpp"
|
|
|
|
#include "navigationfree.hpp"
|
|
|
|
#include "navigationorbit.hpp"
|
2014-05-01 13:09:47 +00:00
|
|
|
#include <apps/opencs/model/doc/document.hpp>
|
2014-03-06 09:01:23 +00:00
|
|
|
|
2014-05-01 13:09:47 +00:00
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class UniversalId;
|
|
|
|
}
|
2014-03-06 09:01:23 +00:00
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class SceneToolMode;
|
|
|
|
class SceneToolbar;
|
|
|
|
}
|
|
|
|
|
2014-03-04 13:47:43 +00:00
|
|
|
namespace CSVRender
|
|
|
|
{
|
|
|
|
class WorldspaceWidget : public SceneWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2014-03-06 09:01:23 +00:00
|
|
|
CSVRender::Navigation1st m1st;
|
|
|
|
CSVRender::NavigationFree mFree;
|
|
|
|
CSVRender::NavigationOrbit mOrbit;
|
|
|
|
|
2014-03-04 13:47:43 +00:00
|
|
|
public:
|
|
|
|
|
2014-05-01 13:09:47 +00:00
|
|
|
WorldspaceWidget (const CSMDoc::Document& document, QWidget *parent = 0);
|
2014-03-06 09:01:23 +00:00
|
|
|
|
|
|
|
CSVWorld::SceneToolMode *makeNavigationSelector (CSVWorld::SceneToolbar *parent);
|
2014-03-23 14:14:26 +00:00
|
|
|
///< \attention The created tool is not added to the toolbar (via addTool). Doing that
|
2014-03-06 09:01:23 +00:00
|
|
|
/// is the responsibility of the calling function.
|
|
|
|
|
|
|
|
void selectDefaultNavigationMode();
|
|
|
|
|
2014-04-01 08:04:14 +00:00
|
|
|
virtual void useViewHint (const std::string& hint);
|
|
|
|
///< Default-implementation: ignored.
|
|
|
|
|
2014-05-01 13:09:47 +00:00
|
|
|
protected:
|
|
|
|
const CSMDoc::Document& mDocument; //for checking if drop comes from same document
|
|
|
|
|
|
|
|
enum dropType
|
|
|
|
{
|
|
|
|
cellsMixed,
|
|
|
|
cellsInterior,
|
|
|
|
cellsExterior,
|
|
|
|
notCells
|
|
|
|
};
|
|
|
|
|
|
|
|
dropType getDropType(const std::vector<CSMWorld::UniversalId>& data) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
|
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
|
|
|
|
2014-03-06 09:01:23 +00:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void selectNavigationMode (const std::string& mode);
|
2014-03-06 15:40:08 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void closeRequest();
|
2014-03-04 13:47:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|