1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/opencs/view/widget/scenetoolbar.cpp

34 lines
689 B
C++
Raw Normal View History

#include "scenetoolbar.hpp"
#include <QVBoxLayout>
#include "scenetool.hpp"
CSVWidget::SceneToolbar::SceneToolbar (int buttonSize, QWidget *parent)
2014-04-03 13:30:22 +02:00
: QWidget (parent), mButtonSize (buttonSize), mIconSize (buttonSize-6)
{
setFixedWidth (mButtonSize);
mLayout = new QVBoxLayout (this);
mLayout->setAlignment (Qt::AlignTop);
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
setLayout (mLayout);
}
void CSVWidget::SceneToolbar::addTool (SceneTool *tool)
{
mLayout->addWidget (tool, 0, Qt::AlignTop);
}
int CSVWidget::SceneToolbar::getButtonSize() const
{
return mButtonSize;
2014-04-03 13:00:19 +02:00
}
int CSVWidget::SceneToolbar::getIconSize() const
2014-04-03 13:00:19 +02:00
{
return mIconSize;
}