2013-09-28 09:25:54 +02:00
|
|
|
|
|
|
|
#include "scenetoolbar.hpp"
|
|
|
|
|
2013-09-28 11:06:56 +02:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include "scenetool.hpp"
|
|
|
|
|
2013-10-07 11:14:11 +02:00
|
|
|
CSVWorld::SceneToolbar::SceneToolbar (int buttonSize, QWidget *parent)
|
2014-04-03 13:00:19 +02:00
|
|
|
: QWidget (parent), mButtonSize (buttonSize), mIconSize (buttonSize-8)
|
2013-09-28 09:25:54 +02:00
|
|
|
{
|
2013-10-07 11:14:11 +02:00
|
|
|
setFixedWidth (mButtonSize);
|
2013-09-28 11:06:56 +02:00
|
|
|
|
|
|
|
mLayout = new QVBoxLayout (this);
|
|
|
|
mLayout->setAlignment (Qt::AlignTop);
|
2013-09-28 09:25:54 +02:00
|
|
|
|
2013-09-28 11:06:56 +02:00
|
|
|
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
|
|
|
|
|
|
|
setLayout (mLayout);
|
2013-09-28 09:25:54 +02:00
|
|
|
}
|
2013-09-28 11:06:56 +02:00
|
|
|
|
|
|
|
void CSVWorld::SceneToolbar::addTool (SceneTool *tool)
|
|
|
|
{
|
|
|
|
mLayout->addWidget (tool, 0, Qt::AlignTop);
|
2013-10-07 11:14:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CSVWorld::SceneToolbar::getButtonSize() const
|
|
|
|
{
|
|
|
|
return mButtonSize;
|
2014-04-03 13:00:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CSVWorld::SceneToolbar::getIconSize() const
|
|
|
|
{
|
|
|
|
return mIconSize;
|
2013-09-28 11:06:56 +02:00
|
|
|
}
|