11 #include "RubberBandTool.h"
15 #include "ViewportMainWindow.h"
34 QString tempFileName =
FileName(
"$base/icons").expanded();
60 result = m_toolList->rubberBandTool();
67 void Tool::setList(ToolList *currentList) {
68 m_toolList = currentList;
113 QStackedWidget *activeToolBarStack = m_toolList->toolBarStack(toolbar);
132 emit clearWarningSignal();
148 emit toolActivated();
178 emit viewportChanged();
190 connect(
m_cvp, SIGNAL(scaleChanged()),
191 this, SLOT(scaleChanged()));
193 if (rubberBandTool()) {
194 connect(rubberBandTool(), SIGNAL(measureChange()),
195 this, SLOT(updateMeasure()));
197 connect(rubberBandTool(), SIGNAL(bandingComplete()),
198 this, SLOT(rubberBandComplete()));
201 connect(
m_cvp, SIGNAL(mouseEnter()),
202 this, SLOT(mouseEnter()));
208 this, SLOT(
mouseMove(QPoint)), Qt::DirectConnection);
211 this, SLOT(
mouseMove(QPoint, Qt::MouseButton)), Qt::DirectConnection);
213 connect(
m_cvp, SIGNAL(mouseLeave()),
214 this, SLOT(mouseLeave()));
241 disconnect(
m_cvp, SIGNAL(scaleChanged()),
242 this, SLOT(scaleChanged()));
244 if (rubberBandTool()) {
245 disconnect(rubberBandTool(), SIGNAL(measureChange()),
246 this, SLOT(updateMeasure()));
248 disconnect(rubberBandTool(), SIGNAL(bandingComplete()),
249 this, SLOT(rubberBandComplete()));
252 disconnect(
m_cvp, SIGNAL(mouseEnter()),
253 this, SLOT(mouseEnter()));
262 this, SLOT(
mouseMove(QPoint, Qt::MouseButton)));
264 disconnect(
m_cvp, SIGNAL(mouseLeave()),
265 this, SLOT(mouseLeave()));
307 if (m_toolList && m_toolList->toolBarStack()) {
358 emit clearWarningSignal();
367 emit clearWarningSignal();
380 emit clearWarningSignal();