34 #include "../canvas/MultiThreadMapDisplay.h"
38 #include <QtGui/QPainter>
39 #include <QtGui/QColor>
40 #include <QtGui/QApplication>
41 #include <QtGui/QMessageBox>
42 #include <QtGui/QInputDialog>
43 #include <QtCore/QDir>
48 m_paperSize(QSize(210, 297)),
49 m_horizontalRulerWidth(30),
50 m_verticalRulerWidth(38),
51 m_layoutObjectSelected(0),
53 m_showRulerGrid(true),
55 m_undoBufferSize(100),
60 setMouseTracking(
true);
61 setWindowTitle(
"Layout Editor");
81 int frameX = qRound((
double)a/8);
83 int frameWidth = qRound((
double)a * .75);
84 int frameHeight = frameWidth;
85 QRectF frameRect(frameX, frameY, frameWidth, frameHeight);
108 m_paperSize(paperSize),
109 m_horizontalRulerWidth(30),
110 m_verticalRulerWidth(38),
111 m_layoutObjectSelected(0),
113 m_showRulerGrid(true),
115 m_undoBufferSize(100),
120 setMouseTracking(
true);
121 setWindowTitle(
"Layout Editor");
142 delete m_draftLayoutEditor;
143 delete m_editorState;
145 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
146 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
148 m_layoutObjects.clear();
150 for(it = m_undoLayoutObjects.begin(); it != m_undoLayoutObjects.end(); ++it)
152 m_undoLayoutObjects.clear();
154 delete m_zoomInPixmap;
155 delete m_zoomOutPixmap;
161 int delta = qRound((
double)m_paperSize.width() / 100);
162 m_paperViewRect.setWidth(m_paperSize.width() + delta + delta);
163 m_paperViewRect.setHeight(m_paperSize.height() + delta + delta);
164 m_paperViewRect.moveCenter(QPointF(((
double)m_paperSize.width()/2.), (double)m_paperSize.height()/2.));
166 m_paperViewReseted =
true;
173 m_editorState->m_paperViewRect = m_paperViewRect;
174 m_editorState->m_paperSize = m_paperSize;
175 m_editorState->m_rulerGridLines = m_rulerGridLines;
176 m_editorState->m_showRulerGrid = m_showRulerGrid;
177 m_editorState->m_rect = m_rect;
178 m_editorState->m_resize = m_resize;
179 m_editorState->m_move = m_move;
185 if(m_paperViewRect.isValid() ==
false)
189 int tw = size().width();
190 int w = tw - 2 * m_verticalRulerWidth;
191 int th = size().height();
192 int h = th - 2 * m_horizontalRulerWidth;
194 if(m_paperViewReseted)
196 double relw = (double)w / (
double)m_paperViewRect.width();
197 double relh = (double)h / (
double)m_paperViewRect.height();
199 int nw, nh, ntw, nth;
203 nh = qRound((
double)(w) * m_paperViewRect.height() / m_paperViewRect.width());
204 nth = h + 2 * m_horizontalRulerWidth;
206 QPointF c = m_paperViewRect.center();
207 double v = (double)h / (
double)nh;
208 double d = (double)m_paperViewRect.height() * v;
209 m_paperViewRect = QRect(0., 0., m_paperViewRect.width(), d);
210 m_paperViewRect.moveCenter(c);
214 nw = qRound((
double)(h) * m_paperViewRect.width() / m_paperViewRect.height());
215 ntw = w + 2 * m_verticalRulerWidth;
217 QPointF c = m_paperViewRect.center();
218 double v = (double)w / (
double)nw;
219 double d = (double)m_paperViewRect.width() * v;
220 m_paperViewRect = QRect(0., 0., d, m_paperViewRect.height());
221 m_paperViewRect.moveCenter(c);
225 m_totalPixmap = QPixmap(tw, th);
226 m_totalPixmap.fill(Qt::gray);
229 m_viewPixmap = QPixmap(w, h);
235 if(m_difTopLeft != QPointF(0., 0.))
237 QRectF r(m_difTopLeft, QSize(w, h));
238 m_paperViewRect = m_matrixPaperViewToVp.inverted().mapRect(r);
240 else if(m_difBottomRight != QPointF(0., 0.))
242 QRectF r(QPoint(0., 0.), QSize(w, h));
243 m_paperViewRect = m_matrixPaperViewToVp.inverted().mapRect(r);
248 double scalePaperViewToVp = (double)m_viewPixmap.width() / m_paperViewRect.width();
251 QMatrix matrixOld = m_matrixPaperViewToVp;
252 m_matrixPaperViewToVp.reset();
253 m_matrixPaperViewToVp.scale(scalePaperViewToVp, -scalePaperViewToVp);
254 m_matrixPaperViewToVp.translate(-m_paperViewRect.left(), -m_paperViewRect.bottom());
257 m_matrix.scale(scalePaperViewToVp, -scalePaperViewToVp);
258 double tx = m_paperViewRect.left() + (double)m_verticalRulerWidth / scalePaperViewToVp;
259 double ty = m_paperViewRect.bottom() - (double)m_horizontalRulerWidth / scalePaperViewToVp;
260 m_matrix.translate(-tx, -ty);
265 QPainter painter(&m_viewPixmap);
266 painter.setMatrix(m_matrixPaperViewToVp);
269 painter.setBrush(Qt::NoBrush);
270 QPen pen(QColor(0, 0, 255, 255));
273 painter.drawRect(QRect(0, 0, m_paperSize.width(), m_paperSize.height()));
283 m_paperViewReseted =
false;
285 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
286 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
299 if(m_editorState == 0)
307 while(m_undoLayoutObjects.size() >= (
unsigned int)m_undoBufferSize)
309 std::vector<te::qt::widgets::LayoutObject*>::iterator it = m_undoLayoutObjects.begin();
311 m_undoLayoutObjects.erase(it);
316 if(m_resize || m_move)
319 std::vector<te::qt::widgets::LayoutObject*>::reverse_iterator it = m_undoLayoutObjects.rbegin();
320 if(it != m_undoLayoutObjects.rend())
324 if(it != m_undoLayoutObjects.rend())
330 if(fu->
getId() == 0 && fap->getId() == 0)
337 m_undoLayoutObjects.pop_back();
339 if(m_undoLayoutObjects.size() > 1)
341 m_undoLayoutObjects.pop_back();
351 m_undoLayoutObjects.push_back(ei);
360 return m_horizontalRulerWidth;
365 return m_verticalRulerWidth;
370 int s = m_undoBufferSize - size;
374 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
375 for(
int i = 0; i != s; ++i)
377 it = m_undoLayoutObjects.begin();
379 m_undoLayoutObjects.erase(it);
387 return m_undoBufferSize;
393 int horizontalRulerWidth = qRound((
double)(m_totalPixmap.height() - m_viewPixmap.height()) / 2);
396 int verticalRulerWidth = qRound((
double)(m_totalPixmap.width() - m_viewPixmap.width()) / 2);
399 double xmin = m_paperViewRect.left();
400 double xmax = m_paperViewRect.right();
401 double ymin = m_paperViewRect.top();
402 double ymax = m_paperViewRect.bottom();
405 double scale = m_matrixPaperViewToVp.m11();
436 else if(scale > .125)
450 QPixmap rulerBottom(m_viewPixmap.width(), horizontalRulerWidth);
451 rulerBottom.fill(Qt::gray);
452 QPixmap rulerTop(rulerBottom);
455 QPainter painter1(&rulerBottom);
457 painter1.setPen(pen);
460 font.setPixelSize(fontSize);
461 painter1.setFont(font);
463 QPainter painter2(&rulerTop);
464 painter2.setPen(pen);
465 painter2.setFont(font);
473 QPoint pb3(0, medio);
474 QPoint pb4(0, grande);
475 QPoint pb5(0, fontSize + grande);
476 QPoint pt1(0, horizontalRulerWidth - ini);
477 QPoint pt2(0, horizontalRulerWidth - peq);
478 QPoint pt3(0, horizontalRulerWidth - medio);
479 QPoint pt4(0, horizontalRulerWidth - grande);
480 QPoint pt5(0, horizontalRulerWidth - fontSize - grande);
484 int xp = qRound(m_matrixPaperViewToVp.map(QPoint(a, m_paperViewRect.top())).x());
495 if((a % m_rulerLarge) == 0)
497 painter1.drawLine(pb1, pb4);
499 QRectF br = painter1.boundingRect(QRectF(0, 0, rulerBottom.width(), rulerBottom.height()), Qt::AlignHCenter, num);
501 painter1.drawText(br, num);
503 painter2.drawLine(pt1, pt4);
505 painter2.drawText(br, num);
507 else if((a % m_rulerMedium) == 0)
509 painter1.drawLine(pb1, pb3);
510 painter2.drawLine(pt1, pt3);
512 else if((a % m_rulerSmall) == 0)
514 painter1.drawLine(pb1, pb2);
515 painter2.drawLine(pt1, pt2);
524 QPixmap rulerRight(verticalRulerWidth, m_viewPixmap.height());
525 rulerRight.fill(Qt::gray);
526 QPixmap rulerLeft(rulerRight);
528 painter1.begin(&rulerRight);
529 painter1.setPen(pen);
530 painter1.setFont(font);
532 painter2.begin(&rulerLeft);
533 painter2.setPen(pen);
534 painter2.setFont(font);
538 QPoint pr3(medio, 0);
539 QPoint pr4(grande, 0);
540 QPoint pr5(fontSize + grande, 0);
541 QPoint pl1(verticalRulerWidth - ini, 0);
542 QPoint pl2(verticalRulerWidth - peq, 0);
543 QPoint pl3(verticalRulerWidth - medio, 0);
544 QPoint pl4(verticalRulerWidth - grande, 0);
545 QPoint pl5(verticalRulerWidth - fontSize - grande, 0);
549 int yp = m_matrixPaperViewToVp.map(QPoint(0, a)).y();
560 if((a % m_rulerLarge) == 0)
562 painter1.drawLine(pr1, pr4);
564 QRectF br = painter1.boundingRect(QRectF(0, 0, rulerRight.width(), rulerRight.height()), Qt::AlignHCenter, num);
566 painter1.drawText(br, num);
568 painter2.drawLine(pl1, pl4);
570 painter2.drawText(br, num);
572 else if((a % m_rulerMedium) == 0)
574 painter1.drawLine(pr1, pr3);
575 painter2.drawLine(pl1, pl3);
577 else if((a % m_rulerSmall) == 0)
579 painter1.drawLine(pr1, pr2);
580 painter2.drawLine(pl1, pl2);
586 painter1.begin(&m_totalPixmap);
588 painter1.drawPixmap(verticalRulerWidth, m_totalPixmap.height() - horizontalRulerWidth, rulerBottom);
589 painter1.drawPixmap(verticalRulerWidth, 0, rulerTop);
590 painter1.drawPixmap(m_totalPixmap.width() - verticalRulerWidth, horizontalRulerWidth, rulerRight);
591 painter1.drawPixmap(0, horizontalRulerWidth, rulerLeft);
599 if(m_showRulerGrid ==
true)
601 m_showRulerGrid =
true;
607 if(m_showRulerGrid ==
false)
609 m_showRulerGrid =
false;
615 m_rulerGridPixmap = QPixmap(m_viewPixmap.width(), m_viewPixmap.height());
616 m_rulerGridPixmap.fill(Qt::white);
619 int xmin = qRound(m_paperViewRect.left()) - m_rulerLarge;
620 int xmax = qRound(m_paperViewRect.right()) + m_rulerLarge;
621 int ymin = qRound(m_paperViewRect.top()) - m_rulerLarge;
622 int ymax = qRound(m_paperViewRect.bottom()) + m_rulerLarge;
626 if((xmin % m_rulerSmall) == 0)
633 if((ymin % m_rulerSmall) == 0)
638 QPainter painter(&m_rulerGridPixmap);
639 painter.setMatrix(m_matrixPaperViewToVp);
644 QPoint p1(xmin, ymin);
645 QPoint p2(xmin, ymax);
646 while(p1.x() <= xmax)
648 painter.setPen(QPen(Qt::blue));
650 if((p1.x() % m_rulerLarge) == 0)
653 painter.setPen(QPen(Qt::red));
655 else if((p1.x() % m_rulerMedium) == 0)
658 painter.setPen(QPen(Qt::green));
661 if(line >= m_rulerGridLines)
662 painter.drawLine(p1, p2);
664 p1.setX(p1.x() + m_rulerSmall);
665 p2.setX(p2.x() + m_rulerSmall);
669 p1 = QPoint(xmin, ymin);
670 p2 = QPoint(xmax, ymin);
671 while(p1.y() <= ymax)
673 painter.setPen(QPen(Qt::blue));
675 if((p1.y() % m_rulerLarge) == 0)
678 painter.setPen(QPen(Qt::red));
680 else if((p1.y() % m_rulerMedium) == 0)
683 painter.setPen(QPen(Qt::green));
686 if(line >= m_rulerGridLines)
687 painter.drawLine(p1, p2);
689 p1.setY(p1.y() + m_rulerSmall);
690 p2.setY(p2.y() + m_rulerSmall);
696 QPainter painter(
this);
701 if(size().width() > m_totalPixmap.width())
702 x = qRound((
double)(size().width() - m_totalPixmap.width()) / 2);
703 if(size().height() > m_totalPixmap.height())
704 y = qRound((
double)(size().height() - m_totalPixmap.height()) / 2);
706 painter.drawPixmap(x, y, m_totalPixmap);
707 m_draftLayoutEditor->update();
714 int w = width() - m_verticalRulerWidth - m_verticalRulerWidth;
715 int h = height() - m_horizontalRulerWidth - m_horizontalRulerWidth;
716 m_auxWidget->resize(w, h);
717 m_auxWidget->move(m_verticalRulerWidth, m_horizontalRulerWidth);
720 m_draftLayoutEditor->resize(w, h);
721 m_draftLayoutEditor->getDraftPixmap()->fill(Qt::transparent);
723 m_difTopLeft = QPointF(0., 0.);
724 m_difBottomRight = QPointF(0., 0.);
726 QRect rec(pos().x(), pos().y(), size().width(), size().height());
729 if(rec.topLeft() != m_rect.topLeft())
730 m_difTopLeft = rec.topLeft() - m_rect.topLeft();
732 m_difBottomRight = rec.bottomRight() - m_rect.bottomRight();
736 createWorkingArea(m_putUndo);
739 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
740 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
758 m_difTopLeft = pos() - m_rect.topLeft();
760 m_rect.moveTopLeft(pos());
761 createWorkingArea(m_putUndo);
764 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
765 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
785 return m_paperViewRect;
790 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
791 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
793 if((*it)->getId() == id)
803 f->
setId(m_idCount++);
804 m_layoutObjects.push_back(f);
809 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
810 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
814 m_layoutObjects.erase(it);
823 if(f->windowTitle() ==
"TextFrame")
825 else if(f->windowTitle() ==
"DataFrame")
830 while(m_undoLayoutObjects.size() >= (
unsigned int)m_undoBufferSize)
832 std::vector<te::qt::widgets::LayoutObject*>::iterator it = m_undoLayoutObjects.begin();
834 m_undoLayoutObjects.erase(it);
844 m_undoLayoutObjects.push_back(cf);
852 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
853 for(it = m_undoLayoutObjects.begin(); it != m_undoLayoutObjects.end(); ++it)
857 m_undoLayoutObjects.erase(it);
865 QPointF pp = m_matrixPaperViewToVp.inverted().map(p);
866 QPointF ps = m_matrixPaperViewToVp.inverted().map(m_startPan);
869 QPointF dif = pp - ps;
870 QPointF c = m_paperViewRect.center();
872 m_paperViewRect.moveCenter(c);
880 m_viewPixmap.fill(Qt::white);
882 QPainter painter(&m_viewPixmap);
884 painter.drawPixmap(0, 0, m_rulerGridPixmap);
886 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
887 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
889 if((*it)->windowTitle() ==
"DataFrame")
897 QRect pr = m_matrixPaperViewToVp.mapRect(QRect(0, 0, m_paperSize.width(), m_paperSize.height()));
900 painter.setBrush(Qt::NoBrush);
901 QPen pen(QColor(0, 0, 255, 255));
905 painter.drawRect(pr);
909 painter.begin(&m_totalPixmap);
910 painter.drawPixmap(m_verticalRulerWidth, m_horizontalRulerWidth, m_viewPixmap);
919 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
920 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
922 if((*it)->windowTitle() ==
"DataFrame")
932 if(e->button() == Qt::MidButton)
934 int i = m_zmouseMode + 1;
941 m_difTopLeft = QPointF(0., 0.);
942 m_difBottomRight = QPointF(0., 0.);
945 m_zpressPoint = e->pos();
946 if(m_zmouseMode == 3)
952 m_zpixmap = QPixmap(m_totalPixmap);
955 QPoint p(m_verticalRulerWidth, m_horizontalRulerWidth);
956 QPainter painter(&m_zpixmap);
958 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
959 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
961 QRectF r = (*it)->getFrameRect();
964 QPixmap* pixmap = (*it)->getPixmap();
965 if(pixmap && pixmap->isNull() ==
false)
967 r = m_matrixPaperViewToVp.mapRect(r);
968 r.moveCenter(r.center() + p);
969 painter.drawPixmap(r, *pixmap, pixmap->rect());
971 if((*it)->windowTitle() ==
"DataFrame")
978 if(pixmap && pixmap->isNull() ==
false)
980 r = m_matrixPaperViewToVp.mapRect(r);
981 r.moveCenter(r.center() + p);
982 painter.drawPixmap(r, *pixmap, pixmap->rect());
989 if(pixmap && pixmap->isNull() ==
false)
991 r = m_matrixPaperViewToVp.mapRect(r);
992 r.moveCenter(r.center() + p);
993 painter.drawPixmap(r, *pixmap, pixmap->rect());
1000 if(pixmap && pixmap->isNull() ==
false)
1002 r = m_matrixPaperViewToVp.mapRect(r);
1003 r.moveCenter(r.center() + p);
1004 painter.drawPixmap(r, *pixmap, pixmap->rect());
1012 if(e->modifiers() == Qt::ControlModifier)
1016 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
1017 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
1019 if((*it)->windowTitle() ==
"DataFrame")
1023 QPointF p = QPoint(e->pos().x(), e->pos().y());
1024 p = m_matrixPaperViewToVp.inverted().map(p);
1043 if(e->modifiers() == Qt::ControlModifier && m_zdataFrame == 0)
1046 m_zpoint = e->pos();
1048 if(e->buttons() == Qt::LeftButton)
1050 if(m_zmouseMode == 3)
1052 if(cursor().shape() != Qt::ClosedHandCursor)
1055 QCursor cursor(Qt::ClosedHandCursor);
1059 if(e->modifiers() == Qt::NoModifier)
1063 QPoint pfrom(m_zpressPoint.x(), m_zpressPoint.y());
1064 QPoint pto(e->pos().x(), e->pos().y());
1065 QPoint dif = pto - pfrom;
1067 m_totalPixmap.fill(Qt::white);
1068 QPainter painter(&m_totalPixmap);
1069 QRect r = m_totalPixmap.rect();
1070 QPoint c(r.center() + dif);
1072 painter.drawPixmap(r, m_zpixmap, m_zpixmap.rect());
1076 else if(e->modifiers() == Qt::ControlModifier && m_zdataFrame)
1079 QPoint pfrom(m_zpressPoint.x(), m_zpressPoint.y());
1080 QPoint pto(e->pos().x(), e->pos().y());
1081 QPoint dif = pto - pfrom;
1083 QPixmap* pix = m_zdataFrame->getMapDisplay()->getDisplayPixmap();
1084 pix->fill(Qt::white);
1085 QPainter painter(pix);
1086 QRect r = m_zpixmap.rect();
1087 QPoint c(r.center() + dif);
1089 painter.drawPixmap(r, m_zpixmap, m_zpixmap.rect());
1091 m_zdataFrame->getMapDisplay()->update();
1094 else if(m_zmouseMode == 2)
1098 else if(m_zmouseMode == 1)
1100 int w = abs(m_zpoint.x() - m_zpressPoint.x()) + 1;
1101 int h = abs(m_zpoint.y() - m_zpressPoint.y()) + 1;
1102 if(m_zpoint.x() > m_zpressPoint.x() && m_zpoint.y() > m_zpressPoint.y())
1103 m_zrect.setRect(m_zpressPoint.x(), m_zpressPoint.y(), w, h);
1104 else if(m_zpoint.x() > m_zpressPoint.x() && m_zpoint.y() < m_zpressPoint.y())
1105 m_zrect.setRect(m_zpressPoint.x(), m_zpoint.y(), w, h);
1106 else if(m_zpoint.x() < m_zpressPoint.x() && m_zpoint.y() < m_zpressPoint.y())
1107 m_zrect.setRect(m_zpoint.x(), m_zpoint.y(), w, h);
1109 m_zrect.setRect(m_zpoint.x(), m_zpressPoint.y(), w, h);
1117 double zoomFat = 1.5;
1119 if(m_zmouseMode == 3)
1122 QCursor cursor(Qt::OpenHandCursor);
1127 if(e->modifiers() == Qt::NoModifier)
1129 if(e->button() == Qt::LeftButton)
1131 if(m_zmouseMode == 1)
1133 if(m_zrect.isValid() && m_zrect.width() > 2 && m_zrect.height() > 2)
1135 QRectF r(m_zrect.left(), m_zrect.top(), m_zrect.width(), m_zrect.height());
1136 r = m_matrixPaperViewToVp.inverted().mapRect(r);
1137 adjustAspectRatio(r, m_paperViewRect);
1138 m_paperViewRect = r;
1139 createWorkingArea();
1144 QPointF c(m_zpressPoint.x(), m_zpressPoint.y());
1145 QPointF cf = m_matrixPaperViewToVp.inverted().map(c);
1146 double w = m_paperViewRect.width() / zoomFat;
1147 double h = m_paperViewRect.height() / zoomFat;
1148 m_paperViewRect = QRectF(0, 0, w, h);
1149 m_paperViewRect.moveCenter(cf);
1150 createWorkingArea();
1156 else if(m_zmouseMode == 2)
1158 QPointF c(m_zpressPoint.x(), m_zpressPoint.y());
1159 QPointF cf = m_matrixPaperViewToVp.inverted().map(c);
1160 double w = m_paperViewRect.width() * zoomFat;
1161 double h = m_paperViewRect.height() * zoomFat;
1162 m_paperViewRect = QRectF(0, 0, w, h);
1163 m_paperViewRect.moveCenter(cf);
1164 createWorkingArea();
1167 else if(m_zmouseMode == 3)
1170 QPointF pfrom(m_zpressPoint.x(), m_zpressPoint.y());
1171 pfrom = m_matrixPaperViewToVp.inverted().map(pfrom);
1173 QPointF pto(e->pos().x(), e->pos().y());
1174 pto = m_matrixPaperViewToVp.inverted().map(pto);
1176 QPointF dif = pto - pfrom;
1177 QPointF c = m_paperViewRect.center();
1179 m_paperViewRect.moveCenter(c);
1180 createWorkingArea();
1188 else if(e->modifiers() == Qt::ControlModifier && m_zdataFrame)
1191 QRectF fr = m_zdataFrame->getFrameRect();
1193 QRectF frp = m_matrixPaperViewToVp.mapRect(fr);
1195 double magDecl = m_zdataFrame->getMagneticDeclination();
1197 auxMatrix.translate(frp.width()/2., frp.height()/2.);
1198 auxMatrix.rotate(magDecl);
1199 auxMatrix.translate(-frp.width()/2., -frp.height()/2.);
1201 if(e->button() == Qt::LeftButton)
1203 if(m_zmouseMode == 1)
1205 if(m_zrect.isValid() && m_zrect.width() > 2 && m_zrect.height() > 2)
1207 insertCopy2Undo(m_zdataFrame);
1211 QPoint cc = m_zrect.center();
1212 cc -= m_zdataFrame->pos();
1213 m_zrect.moveCenter(cc);
1216 cc = auxMatrix.inverted().map(cc);
1219 cc += m_zdataFrame->pos();
1220 m_zrect.moveCenter(cc);
1222 QRectF zr(m_zrect.left(), m_zrect.top(), m_zrect.width(), m_zrect.height());
1225 zr = m_matrixPaperViewToVp.inverted().mapRect(zr);
1227 adjustAspectRatio(zr, fr);
1230 QRectF r = m_zdataFrame->getDataRect();
1233 double x1 = r.left() + ((zr.left() - fr.left()) / fr.width()) * r.width();
1234 double y1 = r.top() + ((zr.top() - fr.top()) / fr.height()) * r.height();
1235 double w = r.width() * (zr.width() / fr.width());
1236 double h = r.height() * (zr.height() / fr.height());
1237 QRectF nr(x1, y1, w, h);
1238 m_zdataFrame->setDataRect(nr);
1239 if(m_zdataFrame->getGraphicScaleFrame())
1241 double step = m_zdataFrame->getGraphicScaleFrame()->getStep();
1242 step *= zr.width() / fr.width();
1243 m_zdataFrame->getGraphicScaleFrame()->findNiceStep(step);
1245 createWorkingArea(
false);
1250 insertCopy2Undo(m_zdataFrame);
1253 QPointF c(m_zpressPoint.x(), m_zpressPoint.y());
1256 c -= m_zdataFrame->pos();
1259 c = auxMatrix.inverted().map(c);
1262 c += m_zdataFrame->pos();
1265 QPointF cf = m_matrixPaperViewToVp.inverted().map(c);
1268 QRectF r = m_zdataFrame->getDataRect();
1271 double x1 = r.left() + ((cf.x() - fr.left()) / fr.width()) * r.width();
1272 double y1 = r.top() + ((cf.y() - fr.top()) / fr.height()) * r.height();
1275 double w = r.width() / zoomFat;
1276 double h = r.height() / zoomFat;
1277 QRectF nr(0, 0, w, h);
1278 nr.moveCenter(QPointF(x1, y1));
1280 m_zdataFrame->setDataRect(nr);
1281 if(m_zdataFrame->getGraphicScaleFrame())
1283 double step = m_zdataFrame->getGraphicScaleFrame()->getStep();
1285 m_zdataFrame->getGraphicScaleFrame()->findNiceStep(step);
1287 createWorkingArea(
false);
1293 else if(m_zmouseMode == 2)
1295 insertCopy2Undo(m_zdataFrame);
1298 QPointF c(m_zpressPoint.x(), m_zpressPoint.y());
1301 c -= m_zdataFrame->pos();
1304 c = auxMatrix.inverted().map(c);
1307 c += m_zdataFrame->pos();
1310 QPointF cf = m_matrixPaperViewToVp.inverted().map(c);
1313 QRectF r = m_zdataFrame->getDataRect();
1316 double x1 = r.left() + ((cf.x() - fr.left()) / fr.width()) * r.width();
1317 double y1 = r.top() + ((cf.y() - fr.top()) / fr.height()) * r.height();
1320 double w = r.width() * zoomFat;
1321 double h = r.height() * zoomFat;
1322 QRectF nr(0, 0, w, h);
1323 nr.moveCenter(QPointF(x1, y1));
1325 m_zdataFrame->setDataRect(nr);
1326 if(m_zdataFrame->getGraphicScaleFrame())
1328 double step = m_zdataFrame->getGraphicScaleFrame()->getStep();
1330 m_zdataFrame->getGraphicScaleFrame()->findNiceStep(step);
1332 createWorkingArea(
false);
1335 else if(m_zmouseMode == 3)
1337 insertCopy2Undo(m_zdataFrame);
1340 QPointF pfrom(m_zpressPoint.x(), m_zpressPoint.y());
1341 QPointF pto(e->pos().x(), e->pos().y());
1344 pfrom = auxMatrix.inverted().map(pfrom);
1345 pto = auxMatrix.inverted().map(pto);
1348 pfrom = m_matrixPaperViewToVp.inverted().map(pfrom);
1349 pto = m_matrixPaperViewToVp.inverted().map(pto);
1352 QPointF dif = pto - pfrom;
1354 QPointF fc = fr.center();
1361 QRectF r = m_zdataFrame->getDataRect();
1362 double x1 = r.left() + ((fc.x() - fr.left()) / fr.width()) * r.width();
1363 double y1 = r.top() + ((fc.y() - fr.top()) / fr.height()) * r.height();
1366 r.moveCenter(QPointF(x1, y1));
1368 m_zdataFrame->setDataRect(r);
1378 QPixmap* pixmap = getDraftPixmap();
1379 pixmap->fill(QColor(0, 0, 0, 0));
1381 if(m_zrect.isValid())
1383 QPainter painter(pixmap);
1386 painter.setPen(Qt::red);
1387 painter.setBrush(QColor(255, 0, 0, 80));
1391 painter.setPen(Qt::blue);
1392 painter.setBrush(QColor(0, 0, 255, 80));
1394 painter.drawRect(m_zrect);
1403 if(m_zmouseMode == 0)
1404 sendEventToChildren(
true);
1406 sendEventToChildren(
false);
1409 if(dir.exists(
"../../../terralib5/resources/themes/terralib/32x32/zoomInCursor.png"))
1410 if(m_zoomInPixmap == 0)
1411 m_zoomInPixmap =
new QPixmap(
"../../../terralib5/resources/themes/terralib/32x32/zoomInCursor.png");
1413 if(dir.exists(
"../../../terralib5/resources/themes/terralib/32x32/zoomOutCursor.png"))
1414 if(m_zoomOutPixmap == 0)
1415 m_zoomOutPixmap =
new QPixmap(
"../../../terralib5/resources/themes/terralib/32x32/zoomOutCursor.png");
1422 QCursor* cursor = 0;
1424 if(m_zmouseMode == 0)
1425 cursor =
new QCursor(Qt::ArrowCursor);
1426 else if(m_zmouseMode == 1)
1429 cursor =
new QCursor(*m_zoomInPixmap, 9, 9);
1431 cursor =
new QCursor(Qt::PointingHandCursor);
1433 else if(m_zmouseMode == 2)
1436 cursor =
new QCursor(*m_zoomOutPixmap, 9, 9);
1438 cursor =
new QCursor(Qt::SizeAllCursor);
1440 else if(m_zmouseMode == 3)
1446 cursor =
new QCursor(Qt::OpenHandCursor);
1456 double llx = r.left();
1457 double lly = r.top();
1458 double urx = r.right();
1459 double ury = r.bottom();
1460 double ww = r.width();
1461 double wh = r.height();
1463 double widthByHeight = ref.width() / ref.height();
1465 if(widthByHeight > ww / wh)
1469 ww = wh * widthByHeight;
1470 llx = llx - (ww - v) / 2.0;
1477 wh = ww / widthByHeight;
1478 lly = lly - (wh - v) / 2.0;
1482 r = QRectF(llx, lly, urx-llx, ury-lly);
1487 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
1488 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
1494 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
1495 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
1501 int i = m_zmouseMode;
1517 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
1518 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
1519 (*it)->sendEventToChildren(b);
1521 for(it = m_undoLayoutObjects.begin(); it != m_undoLayoutObjects.end(); ++it)
1522 (*it)->sendEventToChildren(b);
1526 setFrameSelected(0);
1527 while(QApplication::overrideCursor())
1528 QApplication::restoreOverrideCursor();
1530 raiseDraftLayoutEditor();
1531 m_draftLayoutEditor->installEventFilter(
this);
1535 lowerDraftLayoutEditor();
1536 m_draftLayoutEditor->removeEventFilter(
this);
1542 if(e->type() == QEvent::Paint)
1546 if(obj == m_draftLayoutEditor)
1548 if(e->type() == QEvent::DragEnter)
1550 QDragEnterEvent* dragEnterEvent = (QDragEnterEvent*)e;
1551 const QMimeData* mime = dragEnterEvent->mimeData();
1552 QString s = mime->data(
"application/x-terralib;value=\"DraggedItems\"").constData();
1553 if(s.isEmpty() ==
false)
1555 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
1556 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
1558 if((*it)->windowTitle() ==
"DataFrame")
1560 (*it)->sendEventToChildren(
true);
1567 else if(e->type() == QEvent::DragMove)
1569 else if(e->type() == QEvent::Drop)
1571 else if(e->type() == QEvent::Resize)
1574 m_draftLayoutEditor->raise();
1576 if(e->type() == QEvent::MouseButtonPress)
1577 mousePressEvent((QMouseEvent*)e);
1578 else if(e->type() == QEvent::MouseMove)
1579 mouseMoveEvent((QMouseEvent*)e);
1580 else if(e->type() == QEvent::MouseButtonRelease)
1581 mouseReleaseEvent((QMouseEvent*)e);
1582 else if(e->type() == QEvent::Wheel)
1583 wheelEvent((QWheelEvent*)e);
1591 m_difTopLeft = QPointF(0., 0.);
1592 m_difBottomRight = QPointF(0., 0.);
1595 int modifier = e->modifiers();
1596 QString text = e->text();
1602 if(m_layoutObjectSelected)
1604 double scale = m_layoutObjectSelected->getScale() * 1.2;
1605 m_layoutObjectSelected->setScale(scale);
1610 double w = m_paperViewRect.width() * 1.2;
1611 double h = m_paperViewRect.height() * 1.2;
1612 QPointF c = m_paperViewRect.center();
1613 m_paperViewRect.setWidth(w);
1614 m_paperViewRect.setHeight(h);
1615 m_paperViewRect.moveCenter(c);
1616 createWorkingArea();
1623 if(m_layoutObjectSelected)
1625 double scale = m_layoutObjectSelected->getScale() / 1.2;
1626 m_layoutObjectSelected->setScale(scale);
1631 double w = m_paperViewRect.width() / 1.2;
1632 double h = m_paperViewRect.height() / 1.2;
1633 QPointF c = m_paperViewRect.center();
1634 m_paperViewRect.setWidth(w);
1635 m_paperViewRect.setHeight(h);
1636 m_paperViewRect.moveCenter(c);
1637 createWorkingArea();
1644 if(m_layoutObjectSelected)
1646 double scale = m_layoutObjectSelected->getScale() * 2;
1647 m_layoutObjectSelected->setScale(scale);
1652 double w = m_paperViewRect.width() * 2;
1653 double h = m_paperViewRect.height() * 2;
1654 QPointF c = m_paperViewRect.center();
1655 m_paperViewRect.setWidth(w);
1656 m_paperViewRect.setHeight(h);
1657 m_paperViewRect.moveCenter(c);
1658 createWorkingArea();
1663 case Qt::Key_Asterisk:
1665 if(m_layoutObjectSelected)
1667 double scale = m_layoutObjectSelected->getScale() / 2;
1668 m_layoutObjectSelected->setScale(scale);
1673 double w = m_paperViewRect.width() / 2;
1674 double h = m_paperViewRect.height() / 2;
1675 QPointF c = m_paperViewRect.center();
1676 m_paperViewRect.setWidth(w);
1677 m_paperViewRect.setHeight(h);
1678 m_paperViewRect.moveCenter(c);
1679 createWorkingArea();
1686 if(m_rulerGridLines != 1 || m_showRulerGrid ==
false)
1689 m_undoLayoutObjects.push_back(f);
1691 m_rulerGridLines = 1;
1693 m_showRulerGrid =
false;
1701 if(m_rulerGridLines != 2 || m_showRulerGrid ==
false)
1704 m_undoLayoutObjects.push_back(f);
1706 m_rulerGridLines = 2;
1708 m_showRulerGrid =
false;
1716 if(m_rulerGridLines != 3 || m_showRulerGrid ==
false)
1719 m_undoLayoutObjects.push_back(f);
1721 m_rulerGridLines = 3;
1723 m_showRulerGrid =
false;
1731 if(m_showRulerGrid ==
true)
1734 m_undoLayoutObjects.push_back(f);
1743 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1756 else if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
1760 double w = r.width();
1761 r = QRectF(r.left() - w / 5, r.top(), w, r.height());
1767 double w = m_paperViewRect.width();
1768 m_paperViewRect = QRectF(m_paperViewRect.left() - w / 5, m_paperViewRect.top(), w, m_paperViewRect.height());
1769 createWorkingArea();
1776 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1779 if(f->
getAlign() != Qt::AlignRight)
1789 else if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
1793 double w = r.width();
1794 r = QRectF(r.left() + w / 5, r.top(), w, r.height());
1800 double w = m_paperViewRect.width();
1801 m_paperViewRect = QRectF(m_paperViewRect.left() + w / 5, m_paperViewRect.top(), w, m_paperViewRect.height());
1802 createWorkingArea();
1809 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1812 if(f->
getAlign() != Qt::AlignHCenter)
1822 else if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
1826 double h = r.height();
1827 r = QRectF(r.left(), r.top() + h / 5, r.width(), h);
1833 double h = m_paperViewRect.height();
1834 m_paperViewRect = QRectF(m_paperViewRect.left(), m_paperViewRect.top() + h/5, m_paperViewRect.width(), h);
1835 createWorkingArea();
1842 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1845 if(f->
getAlign() != Qt::AlignHCenter)
1855 else if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
1859 double h = r.height();
1860 r = QRectF(r.left(), r.top() - h / 5, r.width(), h);
1866 double h = m_paperViewRect.height();
1867 m_paperViewRect = QRectF(m_paperViewRect.left(), m_paperViewRect.top() - h/5, m_paperViewRect.width(), h);
1868 createWorkingArea();
1875 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1879 if(modifier == Qt::NoModifier)
1882 weight = QFont::Normal;
1883 else if(weight == QFont::Normal)
1901 weight = QFont::Normal;
1916 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1920 if(cap == QFont::MixedCase)
1921 cap = QFont::AllUppercase;
1922 else if(cap == QFont::AllUppercase)
1923 cap = QFont::AllLowercase;
1924 else if(cap == QFont::AllLowercase)
1925 cap = QFont::SmallCaps;
1926 else if(cap == QFont::SmallCaps)
1927 cap = QFont::Capitalize;
1929 cap = QFont::MixedCase;
1941 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1958 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1975 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1992 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
1995 QFont::Style style = f->
getStyle();
1996 if(style == QFont::StyleNormal)
1997 style = QFont::StyleItalic;
1998 else if(style == QFont::StyleItalic)
1999 style = QFont::StyleOblique;
2001 style = QFont::StyleNormal;
2013 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
2017 if(modifier == Qt::NoModifier)
2018 letterSpacing = letterSpacing * 1.1;
2020 letterSpacing = letterSpacing / 1.1;
2032 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
2036 if(modifier == Qt::NoModifier)
2051 if(modifier == Qt::AltModifier)
2053 if(m_layoutObjectSelected)
2055 if(m_layoutObjectSelected->windowTitle() ==
"TextFrame")
2060 QString text = QInputDialog::getText(
this, tr(
"QInputDialog::getText()"),
2061 tr(
"Change Text:"), QLineEdit::Normal,
2063 if(ok && !text.isEmpty())
2073 if(m_layoutObjectSelected->windowTitle() ==
"DataFrame")
2075 QMessageBox::information(
this,
"Change Geographical Data",
"Use drag drop...");
2081 QPointF c = m_paperViewRect.center();
2083 nf->
setId(m_idCount++);
2085 insertCopy2Undo(nf);
2089 m_layoutObjectSelected = nf;
2095 case Qt::Key_Delete:
2097 if(m_layoutObjectSelected)
2099 m_layoutObjectSelected->hideSelectionPoints();
2100 remove(m_layoutObjectSelected);
2101 insertCopy2Undo(m_layoutObjectSelected);
2102 m_layoutObjectSelected->hide();
2103 delete m_layoutObjectSelected;
2104 m_layoutObjectSelected = 0;
2108 setFrameSelected(0);
2115 if(modifier == Qt::ControlModifier)
2117 m_layoutObjectSelected = 0;
2118 while(QApplication::overrideCursor())
2119 QApplication::restoreOverrideCursor();
2122 std::vector<te::qt::widgets::LayoutObject*>::reverse_iterator it = m_undoLayoutObjects.rbegin();
2123 if(it == m_undoLayoutObjects.rend())
2125 QMessageBox::information(
this,
"Undo",
"Undo Buffer is Empty");
2128 getDraftPixmap()->fill(Qt::transparent);
2131 if(undof->
getId() != 0)
2162 if(undof->windowTitle() ==
"DataFrame")
2186 if(r.topLeft() != pos())
2188 if(r.size() != rect().size())
2189 resize(r.width(), r.height());
2191 createWorkingArea(
false);
2196 m_showRulerGrid =
false;
2210 if(modifier == Qt::ControlModifier)
2212 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"TextFrame")
2216 nf->
setId(m_idCount++);
2218 insertCopy2Undo(nf);
2222 m_layoutObjectSelected = nf;
2225 else if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
2229 nf->
setId(m_idCount++);
2231 insertCopy2Undo(nf);
2235 m_layoutObjectSelected = nf;
2243 sendEventToChildren(
false);
2246 sendEventToChildren(
true);
2250 if(m_layoutObjectSelected && m_layoutObjectSelected->windowTitle() ==
"DataFrame")
2265 setPaperSize(QSize(m_paperSize.height(), m_paperSize.width()));
2273 setPaperSize(m_paperSize);
2279 if(m_paperSize.width() > m_paperSize.height())
2280 m_paperSize = QSize(1189, 841);
2282 m_paperSize = QSize(841, 1189);
2283 setPaperSize(m_paperSize);
2290 if(m_paperSize.width() > m_paperSize.height())
2291 m_paperSize = QSize(841, 594);
2293 m_paperSize = QSize(594, 841);
2294 setPaperSize(m_paperSize);
2301 if(m_paperSize.width() > m_paperSize.height())
2302 m_paperSize = QSize(594, 420);
2304 m_paperSize = QSize(420, 594);
2305 setPaperSize(m_paperSize);
2312 if(m_paperSize.width() > m_paperSize.height())
2313 m_paperSize = QSize(420, 297);
2315 m_paperSize = QSize(297, 420);
2316 setPaperSize(m_paperSize);
2323 if(m_paperSize.width() > m_paperSize.height())
2324 m_paperSize = QSize(297, 210);
2326 m_paperSize = QSize(210, 297);
2327 setPaperSize(m_paperSize);
2339 return m_matrixPaperViewToVp;
2349 if(m_layoutObjectSelected)
2350 m_layoutObjectSelected->hideSelectionPoints();
2352 m_layoutObjectSelected = f;
2353 if(m_layoutObjectSelected)
2359 return m_layoutObjectSelected;
2399 return m_draftLayoutEditor->getDraftPixmap();
2404 m_draftLayoutEditor->raise();
2405 m_draftLayoutEditor->getDraftPixmap()->fill(Qt::transparent);
2410 m_draftLayoutEditor->lower();
2415 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
2416 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
2418 if((*it)->windowTitle() ==
"DataFrame")
2423 content->fill(Qt::transparent);
2425 QPainter painter(content);
2426 painter.drawPixmap(0, 0, *pixmap);
2437 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
2438 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
2440 if((*it)->windowTitle() ==
"DataFrame")
2450 std::vector<te::qt::widgets::LayoutObject*>::iterator it;
2451 for(it = m_layoutObjects.begin(); it != m_layoutObjects.end(); ++it)
2453 if((*it)->windowTitle() ==
"DataFrame")
te::qt::widgets::GraphicScaleFrame * getGraphicScaleFrame()
virtual QPixmap * getDisplayPixmap() const
It returns the map display pixmap.
void mouseMoveEvent(QMouseEvent *e)
int getHorizontalRulerWidth()
QPixmap * getLastDisplayContent()
QPoint getGlobalPositionCenter()
virtual QPixmap * getPixmap()
void keyPressEvent(QKeyEvent *e)
void remove(te::qt::widgets::LayoutObject *)
QFont::Capitalization getCapitalization()
mydialect insert("+", new te::da::BinaryOpEncoder("+"))
void moveEvent(QMoveEvent *event)
virtual void setBackgroundColor(const QColor &color)
Sets the map display background color.
void setSelectionColor(QColor selColor)
QFont::Weight getWeight()
int getVerticalRulerWidth()
void setDataRect(QRectF &r)
te::map::AbstractLayer * getData()
bool eventFilter(QObject *, QEvent *)
void paintEvent(QPaintEvent *event)
void setWeight(QFont::Weight)
void insert(te::qt::widgets::LayoutObject *)
void mousePressEvent(QMouseEvent *e)
void showSelectionPoints()
QPixmap * m_zoomOutPixmap
void createWorkingArea(bool undo=true)
QPixmap * getDraftPixmap()
virtual int getSRID() const
It return the Spatial Reference System used by the Map Display.
te::qt::widgets::LayoutObject * find(unsigned int)
void setPaperSize(const QSize &size)
void drawLayersSelection()
void setSelectionColor(QColor selColor)
te::qt::widgets::UTMGridFrame * getUTMGridFrame()
void setDisplayBackgroundColor(QColor)
te::qt::widgets::LayoutObject * getFrameSelected()
QRectF getPaperViewRect()
QMatrix getMatrixPaperViewToVp()
void removeUndo(te::qt::widgets::LayoutObject *)
virtual void hideSelectionPoints()
void drawLayerSelection()
void pan(const QPointF &p)
virtual void showSelectionPoints()
void lowerDraftLayoutEditor()
void wheelEvent(QWheelEvent *e)
void adjustAspectRatio(QRectF &r, const QRectF &ref)
void setLetterSpacing(double)
virtual void setSRID(const int &srid, bool doRefresh=true)
It sets a new Spatial Reference System to be used by the Map Display.
void refresh()
It updates the contents in the map display.
void setStyle(QFont::Style)
void setUndoBufferSize(const int &size)
void insertCopy2Undo(te::qt::widgets::LayoutObject *)
void showSelectionPoints()
void setFrameSelected(te::qt::widgets::LayoutObject *)
void raiseDraftLayoutEditor()
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void sendEventToChildren(bool b)
void mouseReleaseEvent(QMouseEvent *e)
void setWordSpacing(double)
void setCapitalization(QFont::Capitalization)
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
void toolTip(const QPoint &, const QString &)
DraftLayoutEditor * m_draftLayoutEditor
double getLetterSpacing()
LayoutEditor(QWidget *parent=0, Qt::WindowFlags f=Qt::Window)
te::qt::widgets::GeographicGridFrame * getGeoGridFrame()
void resizeEvent(QResizeEvent *event)
void setText(const QString &t)
void setData(te::map::AbstractLayerPtr d, int nsrid=TE_UNKNOWN_SRS, QRectF r=QRectF())
te::qt::widgets::MultiThreadMapDisplay * getMapDisplay()