1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 09:36:37 +00:00
OpenMW/apps/opencs/view/render/previewwidget.hpp

63 lines
1.5 KiB
C++
Raw Normal View History

2014-03-16 11:44:01 +00:00
#ifndef OPENCS_VIEW_PREVIEWWIDGET_H
#define OPENCS_VIEW_PREVIEWWIDGET_H
#include <components/nifogre/ogrenifloader.hpp>
#include "scenewidget.hpp"
#include "navigationorbit.hpp"
class QModelIndex;
2014-03-16 11:44:01 +00:00
namespace CSMWorld
{
class Data;
}
namespace CSVRender
{
class PreviewWidget : public SceneWidget
{
Q_OBJECT
CSMWorld::Data& mData;
2014-03-16 11:44:01 +00:00
CSVRender::NavigationOrbit mOrbit;
NifOgre::ObjectScenePtr mObject;
Ogre::SceneNode *mNode;
std::string mReferenceId;
std::string mReferenceableId;
void setup();
2014-03-16 11:44:01 +00:00
void setModel();
2014-03-16 11:44:01 +00:00
void adjust();
///< Adjust referenceable preview according to the reference
2014-03-16 11:44:01 +00:00
public:
PreviewWidget (CSMWorld::Data& data, const std::string& referenceableId,
2014-03-16 11:44:01 +00:00
QWidget *parent = 0);
PreviewWidget (CSMWorld::Data& data, const std::string& referenceableId,
2014-03-16 11:44:01 +00:00
const std::string& referenceId, QWidget *parent = 0);
signals:
void closeRequest();
private slots:
void ReferenceableDataChanged (const QModelIndex& topLeft,
const QModelIndex& bottomRight);
void ReferenceableAboutToBeRemoved (const QModelIndex& parent, int start, int end);
void ReferenceDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
void ReferenceAboutToBeRemoved (const QModelIndex& parent, int start, int end);
2014-03-16 11:44:01 +00:00
};
}
#endif