Changeset View
Changeset View
Standalone View
Standalone View
tools/rectangular/kpToolRectangularBase.cpp
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 127 | #endif | |||
---|---|---|---|---|---|
129 | kpToolToolBar *tb = toolToolBar (); | 129 | kpToolToolBar *tb = toolToolBar (); | ||
130 | Q_ASSERT (tb); | 130 | Q_ASSERT (tb); | ||
131 | 131 | | |||
132 | #if DEBUG_KP_TOOL_RECTANGULAR_BASE | 132 | #if DEBUG_KP_TOOL_RECTANGULAR_BASE | ||
133 | qCDebug(kpLogTools) << "\ttoolToolBar=" << tb; | 133 | qCDebug(kpLogTools) << "\ttoolToolBar=" << tb; | ||
134 | #endif | 134 | #endif | ||
135 | 135 | | |||
136 | d->toolWidgetLineWidth = tb->toolWidgetLineWidth (); | 136 | d->toolWidgetLineWidth = tb->toolWidgetLineWidth (); | ||
137 | connect (d->toolWidgetLineWidth, | 137 | connect (d->toolWidgetLineWidth, &kpToolWidgetLineWidth::lineWidthChanged, | ||
138 | SIGNAL (lineWidthChanged(int)), | 138 | this, &kpToolRectangularBase::slotLineWidthChanged); | ||
139 | this, | | |||
140 | SLOT (slotLineWidthChanged())); | | |||
141 | d->toolWidgetLineWidth->show (); | 139 | d->toolWidgetLineWidth->show (); | ||
142 | 140 | | |||
143 | d->toolWidgetFillStyle = tb->toolWidgetFillStyle (); | 141 | d->toolWidgetFillStyle = tb->toolWidgetFillStyle (); | ||
144 | connect (d->toolWidgetFillStyle, | 142 | connect (d->toolWidgetFillStyle, &kpToolWidgetFillStyle::fillStyleChanged, | ||
145 | SIGNAL (fillStyleChanged(kpToolWidgetFillStyle::FillStyle)), | 143 | this, &kpToolRectangularBase::slotFillStyleChanged); | ||
146 | this, | | |||
147 | SLOT (slotFillStyleChanged())); | | |||
148 | d->toolWidgetFillStyle->show (); | 144 | d->toolWidgetFillStyle->show (); | ||
149 | 145 | | |||
150 | viewManager ()->setCursor (QCursor (Qt::ArrowCursor)); | 146 | viewManager ()->setCursor (QCursor (Qt::ArrowCursor)); | ||
151 | 147 | | |||
152 | setUserMessage (haventBegunDrawUserMessage ()); | 148 | setUserMessage (haventBegunDrawUserMessage ()); | ||
153 | } | 149 | } | ||
154 | 150 | | |||
155 | //--------------------------------------------------------------------- | 151 | //--------------------------------------------------------------------- | ||
156 | 152 | | |||
157 | // virtual | 153 | // virtual | ||
158 | void kpToolRectangularBase::end () | 154 | void kpToolRectangularBase::end () | ||
159 | { | 155 | { | ||
160 | #if DEBUG_KP_TOOL_RECTANGULAR_BASE | 156 | #if DEBUG_KP_TOOL_RECTANGULAR_BASE | ||
161 | qCDebug(kpLogTools) << "kpToolRectangularBase::end ()"; | 157 | qCDebug(kpLogTools) << "kpToolRectangularBase::end ()"; | ||
162 | #endif | 158 | #endif | ||
163 | 159 | | |||
164 | if (d->toolWidgetLineWidth) | 160 | if (d->toolWidgetLineWidth) | ||
165 | { | 161 | { | ||
166 | disconnect (d->toolWidgetLineWidth, | 162 | disconnect (d->toolWidgetLineWidth, &kpToolWidgetLineWidth::lineWidthChanged, | ||
167 | SIGNAL (lineWidthChanged(int)), | 163 | this, &kpToolRectangularBase::slotLineWidthChanged); | ||
168 | this, | | |||
169 | SLOT (slotLineWidthChanged())); | | |||
170 | d->toolWidgetLineWidth = nullptr; | 164 | d->toolWidgetLineWidth = nullptr; | ||
171 | } | 165 | } | ||
172 | 166 | | |||
173 | if (d->toolWidgetFillStyle) | 167 | if (d->toolWidgetFillStyle) | ||
174 | { | 168 | { | ||
175 | disconnect (d->toolWidgetFillStyle, | 169 | disconnect (d->toolWidgetFillStyle, &kpToolWidgetFillStyle::fillStyleChanged, | ||
176 | SIGNAL (fillStyleChanged(kpToolWidgetFillStyle::FillStyle)), | 170 | this, &kpToolRectangularBase::slotFillStyleChanged); | ||
177 | this, | | |||
178 | SLOT (slotFillStyleChanged())); | | |||
179 | d->toolWidgetFillStyle = nullptr; | 171 | d->toolWidgetFillStyle = nullptr; | ||
180 | } | 172 | } | ||
181 | 173 | | |||
182 | viewManager ()->unsetCursor (); | 174 | viewManager ()->unsetCursor (); | ||
183 | } | 175 | } | ||
184 | 176 | | |||
185 | //--------------------------------------------------------------------- | 177 | //--------------------------------------------------------------------- | ||
186 | 178 | | |||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |