forked from mirror/openmw-tes3mp
specialising WorldspaceWdiget into paged and unpaged subclasses
This commit is contained in:
parent
7386d3eb0b
commit
397921e457
6 changed files with 55 additions and 3 deletions
|
@ -64,7 +64,7 @@ opencs_units (view/world
|
|||
)
|
||||
|
||||
opencs_units (view/render
|
||||
scenewidget worldspacewidget
|
||||
scenewidget worldspacewidget pagedworldspacewidget unpagedworldspacewidget
|
||||
)
|
||||
|
||||
opencs_units_noqt (view/render
|
||||
|
|
6
apps/opencs/view/render/pagedworldspacewidget.cpp
Normal file
6
apps/opencs/view/render/pagedworldspacewidget.cpp
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
#include "pagedworldspacewidget.hpp"
|
||||
|
||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget *parent)
|
||||
: WorldspaceWidget (parent)
|
||||
{}
|
18
apps/opencs/view/render/pagedworldspacewidget.hpp
Normal file
18
apps/opencs/view/render/pagedworldspacewidget.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef OPENCS_VIEW_PAGEDWORLDSPACEWIDGET_H
|
||||
#define OPENCS_VIEW_PAGEDWORLDSPACEWIDGET_H
|
||||
|
||||
#include "worldspacewidget.hpp"
|
||||
|
||||
namespace CSVRender
|
||||
{
|
||||
class PagedWorldspaceWidget : public WorldspaceWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
PagedWorldspaceWidget (QWidget *parent);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
6
apps/opencs/view/render/unpagedworldspacewidget.cpp
Normal file
6
apps/opencs/view/render/unpagedworldspacewidget.cpp
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
#include "unpagedworldspacewidget.hpp"
|
||||
|
||||
CSVRender::UnpagedWorldspaceWidget::UnpagedWorldspaceWidget (QWidget *parent)
|
||||
: WorldspaceWidget (parent)
|
||||
{}
|
18
apps/opencs/view/render/unpagedworldspacewidget.hpp
Normal file
18
apps/opencs/view/render/unpagedworldspacewidget.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef OPENCS_VIEW_UNPAGEDWORLDSPACEWIDGET_H
|
||||
#define OPENCS_VIEW_UNPAGEDWORLDSPACEWIDGET_H
|
||||
|
||||
#include "worldspacewidget.hpp"
|
||||
|
||||
namespace CSVRender
|
||||
{
|
||||
class UnpagedWorldspaceWidget : public WorldspaceWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
UnpagedWorldspaceWidget (QWidget *parent);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
#include "../filter/filterbox.hpp"
|
||||
|
||||
#include "../render/worldspacewidget.hpp"
|
||||
#include "../render/pagedworldspacewidget.hpp"
|
||||
#include "../render/unpagedworldspacewidget.hpp"
|
||||
|
||||
#include "tablebottombox.hpp"
|
||||
#include "creator.hpp"
|
||||
|
@ -33,7 +34,10 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
|||
|
||||
SceneToolbar *toolbar = new SceneToolbar (48, this);
|
||||
|
||||
mScene = new CSVRender::WorldspaceWidget (this);
|
||||
if (id.getId()[0]=='#')
|
||||
mScene = new CSVRender::PagedWorldspaceWidget (this);
|
||||
else
|
||||
mScene = new CSVRender::UnpagedWorldspaceWidget (this);
|
||||
|
||||
SceneToolMode *tool = mScene->makeNavigationSelector (toolbar);
|
||||
toolbar->addTool (tool);
|
||||
|
|
Loading…
Reference in a new issue