|
@@
-119,7
+119,7
void LegendLayout::setAttachedGeometry(const QRectF& rect)
|
|
119
|
QPointF point(0,0);
|
|
119
|
QPointF point(0,0);
|
|
120
|
foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
|
|
120
|
foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
|
|
121
|
if (marker->isVisible()) {
|
|
121
|
if (marker->isVisible()) {
|
|
122
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
122
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
123
|
marker->setPos(point.x(),rect.height()/2 - marker->boundingRect().height()/2);
|
|
123
|
marker->setPos(point.x(),rect.height()/2 - marker->boundingRect().height()/2);
|
|
124
|
const QRectF& rect = marker->boundingRect();
|
|
124
|
const QRectF& rect = marker->boundingRect();
|
|
125
|
size = size.expandedTo(rect.size());
|
|
125
|
size = size.expandedTo(rect.size());
|
|
@@
-143,7
+143,7
void LegendLayout::setAttachedGeometry(const QRectF& rect)
|
|
143
|
QPointF point(0,0);
|
|
143
|
QPointF point(0,0);
|
|
144
|
foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
|
|
144
|
foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
|
|
145
|
if (marker->isVisible()) {
|
|
145
|
if (marker->isVisible()) {
|
|
146
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
146
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
147
|
marker->setPos(point);
|
|
147
|
marker->setPos(point);
|
|
148
|
const QRectF& rect = marker->boundingRect();
|
|
148
|
const QRectF& rect = marker->boundingRect();
|
|
149
|
qreal h = rect.height();
|
|
149
|
qreal h = rect.height();
|
|
@@
-195,7
+195,7
void LegendLayout::setDettachedGeometry(const QRectF& rect)
|
|
195
|
for (int i=0; i<markers.count(); i++) {
|
|
195
|
for (int i=0; i<markers.count(); i++) {
|
|
196
|
LegendMarker *marker = markers.at(i);
|
|
196
|
LegendMarker *marker = markers.at(i);
|
|
197
|
if (marker->isVisible()) {
|
|
197
|
if (marker->isVisible()) {
|
|
198
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
198
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
199
|
marker->setPos(point.x(),point.y());
|
|
199
|
marker->setPos(point.x(),point.y());
|
|
200
|
const QRectF& boundingRect = marker->boundingRect();
|
|
200
|
const QRectF& boundingRect = marker->boundingRect();
|
|
201
|
qreal w = boundingRect.width();
|
|
201
|
qreal w = boundingRect.width();
|
|
@@
-228,7
+228,7
void LegendLayout::setDettachedGeometry(const QRectF& rect)
|
|
228
|
for (int i=0; i<markers.count(); i++) {
|
|
228
|
for (int i=0; i<markers.count(); i++) {
|
|
229
|
LegendMarker *marker = markers.at(i);
|
|
229
|
LegendMarker *marker = markers.at(i);
|
|
230
|
if (marker->isVisible()) {
|
|
230
|
if (marker->isVisible()) {
|
|
231
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
231
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
232
|
const QRectF& boundingRect = marker->boundingRect();
|
|
232
|
const QRectF& boundingRect = marker->boundingRect();
|
|
233
|
qreal w = boundingRect.width();
|
|
233
|
qreal w = boundingRect.width();
|
|
234
|
qreal h = boundingRect.height();
|
|
234
|
qreal h = boundingRect.height();
|
|
@@
-262,7
+262,7
void LegendLayout::setDettachedGeometry(const QRectF& rect)
|
|
262
|
for (int i=0; i<markers.count(); i++) {
|
|
262
|
for (int i=0; i<markers.count(); i++) {
|
|
263
|
LegendMarker *marker = markers.at(i);
|
|
263
|
LegendMarker *marker = markers.at(i);
|
|
264
|
if (marker->isVisible()) {
|
|
264
|
if (marker->isVisible()) {
|
|
265
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
265
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
266
|
const QRectF& boundingRect = marker->boundingRect();
|
|
266
|
const QRectF& boundingRect = marker->boundingRect();
|
|
267
|
qreal w = boundingRect.width();
|
|
267
|
qreal w = boundingRect.width();
|
|
268
|
qreal h = boundingRect.height();
|
|
268
|
qreal h = boundingRect.height();
|
|
@@
-298,7
+298,7
void LegendLayout::setDettachedGeometry(const QRectF& rect)
|
|
298
|
for (int i=0; i<markers.count(); i++) {
|
|
298
|
for (int i=0; i<markers.count(); i++) {
|
|
299
|
LegendMarker *marker = markers.at(i);
|
|
299
|
LegendMarker *marker = markers.at(i);
|
|
300
|
if (marker->isVisible()) {
|
|
300
|
if (marker->isVisible()) {
|
|
301
|
marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
301
|
marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
|
|
302
|
const QRectF& boundingRect = marker->boundingRect();
|
|
302
|
const QRectF& boundingRect = marker->boundingRect();
|
|
303
|
qreal w = boundingRect.width();
|
|
303
|
qreal w = boundingRect.width();
|
|
304
|
qreal h = boundingRect.height();
|
|
304
|
qreal h = boundingRect.height();
|