2013-09-28 09:25:54 +02:00
|
|
|
|
|
|
|
#include "scenetoolbar.hpp"
|
|
|
|
|
2013-09-28 11:06:56 +02:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include "scenetool.hpp"
|
|
|
|
|
2014-07-08 12:39:12 +02:00
|
|
|
CSVWidget::SceneToolbar::SceneToolbar (int buttonSize, QWidget *parent)
|
2014-04-03 13:30:22 +02:00
|
|
|
: QWidget (parent), mButtonSize (buttonSize), mIconSize (buttonSize-6)
|
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
|
|
|
|
2014-07-08 12:39:12 +02:00
|
|
|
void CSVWidget::SceneToolbar::addTool (SceneTool *tool)
|
2013-09-28 11:06:56 +02:00
|
|
|
{
|
|
|
|
mLayout->addWidget (tool, 0, Qt::AlignTop);
|
2013-10-07 11:14:11 +02:00
|
|
|
}
|
|
|
|
|
2014-07-08 12:39:12 +02:00
|
|
|
int CSVWidget::SceneToolbar::getButtonSize() const
|
2013-10-07 11:14:11 +02:00
|
|
|
{
|
|
|
|
return mButtonSize;
|
2014-04-03 13:00:19 +02:00
|
|
|
}
|
|
|
|
|
2014-07-08 12:39:12 +02:00
|
|
|
int CSVWidget::SceneToolbar::getIconSize() const
|
2014-04-03 13:00:19 +02:00
|
|
|
{
|
|
|
|
return mIconSize;
|
2013-09-28 11:06:56 +02:00
|
|
|
}
|