add rule in page bottom
--HG-- branch : develop
This commit is contained in:
parent
82bad42a3c
commit
bc26d545d1
|
@ -84,7 +84,9 @@ QVector<QGraphicsItem *> VPoster::Borders(QGraphicsItem *parent, const PosterDat
|
||||||
|
|
||||||
QVector<QGraphicsItem *> data;
|
QVector<QGraphicsItem *> data;
|
||||||
QPen pen(Qt::NoBrush, 1, Qt::DashLine);
|
QPen pen(Qt::NoBrush, 1, Qt::DashLine);
|
||||||
|
QPen rulePen(Qt::NoBrush, 1, Qt::SolidLine);
|
||||||
pen.setColor(Qt::black);
|
pen.setColor(Qt::black);
|
||||||
|
rulePen.setColor(Qt::black);
|
||||||
|
|
||||||
if (img.columns == 1 && img.rows == 1)
|
if (img.columns == 1 && img.rows == 1)
|
||||||
{
|
{
|
||||||
|
@ -132,6 +134,21 @@ QVector<QGraphicsItem *> VPoster::Borders(QGraphicsItem *parent, const PosterDat
|
||||||
rec.x() + rec.width(), rec.y() + rec.height()-static_cast<int>(allowance));
|
rec.x() + rec.width(), rec.y() + rec.height()-static_cast<int>(allowance));
|
||||||
data.append(line);
|
data.append(line);
|
||||||
|
|
||||||
|
double marksCount = rec.width() / ToPixel(10);
|
||||||
|
int i = 0;
|
||||||
|
while (i < marksCount)
|
||||||
|
{
|
||||||
|
auto *ruleLine = new QGraphicsLineItem(parent);
|
||||||
|
ruleLine->setPen(rulePen);
|
||||||
|
ruleLine->setLine(rec.x() + ToPixel(10) * i,
|
||||||
|
rec.y() + rec.height()-static_cast<int>(allowance),
|
||||||
|
rec.x() + ToPixel(10) * i,
|
||||||
|
rec.y() + rec.height()-static_cast<int>(allowance) + ToPixel(2));
|
||||||
|
data.append(ruleLine);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
auto *labels = new QGraphicsTextItem(parent);
|
auto *labels = new QGraphicsTextItem(parent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user