mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 21:40:42 +00:00
added scene toolbar buttons (still not doing anything)
This commit is contained in:
parent
9ea092927f
commit
84cadc10f4
@ -59,7 +59,7 @@ opencs_hdrs_noqt (view/doc
|
|||||||
|
|
||||||
opencs_units (view/world
|
opencs_units (view/world
|
||||||
table tablesubview scriptsubview util regionmapsubview tablebottombox creator genericcreator
|
table tablesubview scriptsubview util regionmapsubview tablebottombox creator genericcreator
|
||||||
cellcreator referenceablecreator referencecreator scenesubview scenetoolbar
|
cellcreator referenceablecreator referencecreator scenesubview scenetoolbar scenetool
|
||||||
)
|
)
|
||||||
|
|
||||||
opencs_units_noqt (view/world
|
opencs_units_noqt (view/world
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "tablebottombox.hpp"
|
#include "tablebottombox.hpp"
|
||||||
#include "creator.hpp"
|
#include "creator.hpp"
|
||||||
#include "scenetoolbar.hpp"
|
#include "scenetoolbar.hpp"
|
||||||
|
#include "scenetool.hpp"
|
||||||
|
|
||||||
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||||
: SubView (id)
|
: SubView (id)
|
||||||
@ -29,6 +30,10 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
|||||||
layout2->setContentsMargins (QMargins (0, 0, 0, 0));
|
layout2->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||||
|
|
||||||
SceneToolbar *toolbar = new SceneToolbar (this);
|
SceneToolbar *toolbar = new SceneToolbar (this);
|
||||||
|
toolbar->addTool (new SceneTool (this)); // test
|
||||||
|
toolbar->addTool (new SceneTool (this));
|
||||||
|
toolbar->addTool (new SceneTool (this));
|
||||||
|
toolbar->addTool (new SceneTool (this));
|
||||||
layout2->addWidget (toolbar, 0);
|
layout2->addWidget (toolbar, 0);
|
||||||
|
|
||||||
/// \todo replace with rendering widget
|
/// \todo replace with rendering widget
|
||||||
|
9
apps/opencs/view/world/scenetool.cpp
Normal file
9
apps/opencs/view/world/scenetool.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
#include "scenetool.hpp"
|
||||||
|
|
||||||
|
CSVWorld::SceneTool::SceneTool (QWidget *parent) : QPushButton (parent)
|
||||||
|
{
|
||||||
|
setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||||
|
setFixedSize (48, 48);
|
||||||
|
|
||||||
|
}
|
19
apps/opencs/view/world/scenetool.hpp
Normal file
19
apps/opencs/view/world/scenetool.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef CSV_WORLD_SCENETOOL_H
|
||||||
|
#define CSV_WORLD_SCENETOOL_H
|
||||||
|
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
|
namespace CSVWorld
|
||||||
|
{
|
||||||
|
class SceneTool : public QPushButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SceneTool (QWidget *parent = 0);
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,8 +1,23 @@
|
|||||||
|
|
||||||
#include "scenetoolbar.hpp"
|
#include "scenetoolbar.hpp"
|
||||||
|
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
#include "scenetool.hpp"
|
||||||
|
|
||||||
CSVWorld::SceneToolbar::SceneToolbar (QWidget *parent) : QWidget (parent)
|
CSVWorld::SceneToolbar::SceneToolbar (QWidget *parent) : QWidget (parent)
|
||||||
{
|
{
|
||||||
setFixedWidth (52);
|
setFixedWidth (48);
|
||||||
|
|
||||||
|
mLayout = new QVBoxLayout (this);
|
||||||
|
mLayout->setAlignment (Qt::AlignTop);
|
||||||
|
|
||||||
|
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||||
|
|
||||||
|
setLayout (mLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSVWorld::SceneToolbar::addTool (SceneTool *tool)
|
||||||
|
{
|
||||||
|
mLayout->addWidget (tool, 0, Qt::AlignTop);
|
||||||
|
}
|
@ -3,17 +3,23 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
namespace CSVWorld
|
namespace CSVWorld
|
||||||
{
|
{
|
||||||
|
class SceneTool;
|
||||||
|
|
||||||
class SceneToolbar : public QWidget
|
class SceneToolbar : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
QVBoxLayout *mLayout;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SceneToolbar (QWidget *parent);
|
SceneToolbar (QWidget *parent);
|
||||||
|
|
||||||
|
void addTool (SceneTool *tool);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user