mirror of https://github.com/OpenMW/openmw.git
added scene toolbar buttons (still not doing anything)
parent
9ea092927f
commit
84cadc10f4
@ -0,0 +1,9 @@
|
||||
|
||||
#include "scenetool.hpp"
|
||||
|
||||
CSVWorld::SceneTool::SceneTool (QWidget *parent) : QPushButton (parent)
|
||||
{
|
||||
setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||
setFixedSize (48, 48);
|
||||
|
||||
}
|
@ -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 <QVBoxLayout>
|
||||
|
||||
#include "scenetool.hpp"
|
||||
|
||||
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);
|
||||
}
|
Loading…
Reference in New Issue