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