2016-10-04 03:21:22 +03:00
|
|
|
#include "lrtearoffband.h"
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-10-04 03:21:22 +03:00
|
|
|
#include "lrdesignelementsfactory.h"
|
|
|
|
#include "lrglobal.h"
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
const QString xmlTag = "TearOffBand";
|
2016-10-04 03:21:22 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
namespace {
|
|
|
|
LimeReport::BaseDesignIntf* createBand(QObject* owner, LimeReport::BaseDesignIntf* parent)
|
|
|
|
{
|
|
|
|
return new LimeReport::TearOffBand(owner, parent);
|
2016-10-04 03:21:22 +03:00
|
|
|
}
|
2016-10-18 15:00:26 +03:00
|
|
|
bool VARIABLE_IS_NOT_USED registred = LimeReport::DesignElementsFactory::instance().registerCreator(
|
2024-09-04 17:31:16 +03:00
|
|
|
xmlTag, LimeReport::ItemAttribs(QObject::tr("Tear-off Band"), LimeReport::Const::bandTAG),
|
|
|
|
createBand);
|
|
|
|
} // namespace
|
2016-10-04 03:21:22 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
namespace LimeReport {
|
2016-10-04 03:21:22 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
TearOffBand::TearOffBand(QObject* owner, QGraphicsItem* parent):
|
|
|
|
BandDesignIntf(LimeReport::BandDesignIntf::TearOffBand, xmlTag, owner, parent)
|
2016-10-04 03:21:22 +03:00
|
|
|
{
|
|
|
|
setBandTypeText(tr("Tear-off Band"));
|
|
|
|
setMarkerColor(bandColor());
|
|
|
|
}
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
BaseDesignIntf* TearOffBand::createSameTypeItem(QObject* owner, QGraphicsItem* parent)
|
2016-10-04 03:21:22 +03:00
|
|
|
{
|
2024-09-04 17:31:16 +03:00
|
|
|
return new TearOffBand(owner, parent);
|
2016-10-04 03:21:22 +03:00
|
|
|
}
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
QColor TearOffBand::bandColor() const { return QColor(200, 200, 200); }
|
2016-10-04 03:21:22 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
} // namespace LimeReport
|