1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 18:32:44 +01:00
openrw/rwviewer/views/ModelViewer.hpp

60 lines
1.1 KiB
C++
Raw Normal View History

2015-04-13 02:48:29 +02:00
#pragma once
#ifndef _MODELVIEWER_HPP_
#define _MODELVIEWER_HPP_
#include <engine/GameData.hpp>
#include <engine/GameWorld.hpp>
#include "AnimationListWidget.hpp"
#include "ViewerInterface.hpp"
2015-04-13 02:48:29 +02:00
#include <QLabel>
#include <QLayout>
2016-09-09 22:13:21 +02:00
#include <QSplitter>
#include <QTreeView>
#include <QVBoxLayout>
2015-04-13 02:48:29 +02:00
class ViewerWidget;
class Model;
class Skeleton;
2015-04-13 02:48:29 +02:00
class ModelFramesWidget;
class Animation;
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
class ModelViewer : public ViewerInterface {
Q_OBJECT
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
Model* viewing;
Skeleton* skeleton;
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
QSplitter* mainSplit;
QVBoxLayout* mainLayout;
ViewerWidget* viewerWidget;
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
ModelFramesWidget* frames;
2016-09-09 22:13:21 +02:00
AnimationList loadedAnimations;
AnimationListWidget* animationWidget;
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
public:
ModelViewer(ViewerWidget* viewer = 0, QWidget* parent = 0,
Qt::WindowFlags f = 0);
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
void setViewerWidget(ViewerWidget* widget) override;
2015-04-13 02:48:29 +02:00
public slots:
2016-09-09 22:13:21 +02:00
/**
* Display a raw model
*/
void showModel(Model* model);
2015-04-13 02:48:29 +02:00
2016-09-09 22:13:21 +02:00
/**
* Display a game object's model
*/
void showObject(uint16_t object);
2016-09-09 22:13:21 +02:00
void loadAnimations(const QString& file);
void playAnimation(Animation* anim);
2015-04-13 02:48:29 +02:00
};
#endif