Changeset View
Changeset View
Standalone View
Standalone View
tools/polygonal/kpToolPolygonalBase.cpp
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 107 | { | |||
---|---|---|---|---|---|
108 | kpToolToolBar *tb = toolToolBar (); | 108 | kpToolToolBar *tb = toolToolBar (); | ||
109 | Q_ASSERT (tb); | 109 | Q_ASSERT (tb); | ||
110 | 110 | | |||
111 | #if DEBUG_KP_TOOL_POLYGON | 111 | #if DEBUG_KP_TOOL_POLYGON | ||
112 | qCDebug(kpLogTools) << "kpToolPolygonalBase::begin() tb=" << tb; | 112 | qCDebug(kpLogTools) << "kpToolPolygonalBase::begin() tb=" << tb; | ||
113 | #endif | 113 | #endif | ||
114 | 114 | | |||
115 | d->toolWidgetLineWidth = tb->toolWidgetLineWidth (); | 115 | d->toolWidgetLineWidth = tb->toolWidgetLineWidth (); | ||
116 | connect (d->toolWidgetLineWidth, SIGNAL (lineWidthChanged(int)), | 116 | connect (d->toolWidgetLineWidth, &kpToolWidgetLineWidth::lineWidthChanged, | ||
117 | this, SLOT (updateShape())); | 117 | this, &kpToolPolygonalBase::updateShape); | ||
118 | d->toolWidgetLineWidth->show (); | 118 | d->toolWidgetLineWidth->show (); | ||
119 | 119 | | |||
120 | viewManager ()->setCursor (QCursor (Qt::ArrowCursor)); | 120 | viewManager ()->setCursor (QCursor (Qt::ArrowCursor)); | ||
121 | 121 | | |||
122 | d->originatingMouseButton = -1; | 122 | d->originatingMouseButton = -1; | ||
123 | 123 | | |||
124 | setUserMessage (/*virtual*/haventBegunShapeUserMessage ()); | 124 | setUserMessage (/*virtual*/haventBegunShapeUserMessage ()); | ||
125 | } | 125 | } | ||
126 | 126 | | |||
127 | //--------------------------------------------------------------------- | 127 | //--------------------------------------------------------------------- | ||
128 | 128 | | |||
129 | // virtual | 129 | // virtual | ||
130 | void kpToolPolygonalBase::end () | 130 | void kpToolPolygonalBase::end () | ||
131 | { | 131 | { | ||
132 | // TODO: needed? | 132 | // TODO: needed? | ||
133 | endShape (); | 133 | endShape (); | ||
134 | 134 | | |||
135 | disconnect (d->toolWidgetLineWidth, | 135 | disconnect (d->toolWidgetLineWidth, &kpToolWidgetLineWidth::lineWidthChanged, | ||
136 | SIGNAL (lineWidthChanged(int)), | 136 | this, &kpToolPolygonalBase::updateShape); | ||
137 | this, | | |||
138 | SLOT (updateShape())); | | |||
139 | d->toolWidgetLineWidth = nullptr; | 137 | d->toolWidgetLineWidth = nullptr; | ||
140 | 138 | | |||
141 | viewManager ()->unsetCursor (); | 139 | viewManager ()->unsetCursor (); | ||
142 | } | 140 | } | ||
143 | 141 | | |||
144 | 142 | | |||
145 | void kpToolPolygonalBase::beginDraw () | 143 | void kpToolPolygonalBase::beginDraw () | ||
146 | { | 144 | { | ||
▲ Show 20 Lines • Show All 349 Lines • Show Last 20 Lines |