0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-23 08:29:07 +03:00

Ruler has been fixed

This commit is contained in:
Arin Alexander
2019-06-27 10:45:26 +03:00
parent ac154dbc03
commit 69369e3b0c
14 changed files with 14 additions and 24 deletions

View File

@@ -49,7 +49,7 @@ BarcodeItem::BarcodeItem(QObject* owner,QGraphicsItem* parent)
: ContentItemDesignIntf(xmlTag,owner,parent),m_designTestValue("1"), m_barcodeType(CODE128),
m_foregroundColor(Qt::black), m_backgroundColor(Qt::white), m_whitespace(10), m_angle(Angle0),
m_barcodeWidth(0), m_securityLevel(0), m_pdf417CodeWords(928), m_inputMode(UNICODE_INPUT_MODE),
m_option3(0)
m_hideText(false), m_option3(0)
{}
BarcodeItem::~BarcodeItem()

View File

@@ -515,15 +515,13 @@ void PieChart::paintChart(QPainter *painter, QRectF chartRect)
}
qreal onePercent = sum / 100;
qreal currentDegree = 0;
int currentColor = 0;
for(int i=0; i<si->data()->values().count();++i){
for(int i=0; i<si->data()->values().count(); ++i){
qreal value = si->data()->values().at(i);
qreal sectorDegree = (value/onePercent)*3.6;
painter->setBrush(si->data()->colors().at(i));
painter->drawPie(chartRect,currentDegree*16,sectorDegree*16);
drawPercent(painter, chartRect, currentDegree, sectorDegree);
currentDegree += sectorDegree;
currentColor++;
}
} else {
painter->setBrush(color_map[0]);
@@ -768,7 +766,6 @@ void VerticalBarChart::paintSerialLines(QPainter* painter, QRectF barsRect)
qreal topShift = (delta - (maxValue()-minValue())) * vStep +barsRect.top();
if (!m_chartItem->series().isEmpty() && !m_chartItem->series().at(0)->data()->labels().isEmpty()){
int curSeries = 0;
foreach (SeriesItem* series, m_chartItem->series()) {
if (series->preferredType() == SeriesItem::Line){
QPen pen(series->color());
@@ -791,7 +788,6 @@ void VerticalBarChart::paintSerialLines(QPainter* painter, QRectF barsRect)
}
}
curSeries++;
}
}
painter->restore();
@@ -803,7 +799,6 @@ void VerticalBarChart::paintLabels(QPainter *painter, QRectF labelsRect)
{
painter->save();
qreal hStep = (labelsRect.width() / valuesCount());
int curLabel = 0;
if (!m_chartItem->labels().isEmpty()){
painter->rotate(270);
@@ -811,7 +806,6 @@ void VerticalBarChart::paintLabels(QPainter *painter, QRectF labelsRect)
foreach (QString label, m_chartItem->labels()) {
painter->drawText(QRectF(QPoint(0,0),
QSize(labelsRect.height()-4,hStep)),Qt::AlignVCenter|Qt::AlignRight,label);
curLabel++;
painter->translate(0,hStep);
}
painter->rotate(-270);

View File

@@ -134,8 +134,8 @@ BaseDesignIntf* VerticalLayout::cloneBottomPart(int height, QObject* owner, QGra
}
}
int currentHeight = 0;
if (!bottomPart->isEmpty()){
int currentHeight = 0;
foreach (BaseDesignIntf* item, bottomPart->childBaseItems()) {
currentHeight+=item->height();
}