|
Krita Source Code Documentation
|
A widget for configuring the stroke of a shape. More...
#include <KoStrokeConfigWidget.h>
Inheritance diagram for KoStrokeConfigWidget:Signals | |
| void | sigStrokeChanged () |
Public Member Functions | |
| void | activate () |
| Qt::PenCapStyle | capStyle () const |
| QColor | color () const |
| KoShapeStrokeSP | createShapeStroke () |
| void | deactivate () |
| KoMarker * | endMarker () const |
| Qt::PenJoinStyle | joinStyle () const |
| KoStrokeConfigWidget (KoCanvasBase *canvas, QWidget *parent) | |
| QVector< qreal > | lineDashes () const |
| Qt::PenStyle | lineStyle () const |
| qreal | lineWidth () const |
| qreal | miterLimit () const |
| Private () | |
| void | setActive (bool active) |
| void | setNoSelectionTrackingMode (bool value) |
| void | setUnitManagers (KisSpinBoxUnitManager *managerLineWidth, KisSpinBoxUnitManager *managerMitterLimit) |
| KoMarker * | startMarker () const |
| void | updateStyleControlsAvailability (bool enabled) |
| ~KoStrokeConfigWidget () override | |
Public Attributes | |
| bool | active {true} |
| bool | allowLocalUnitManagement {false} |
| KoCanvasBase * | canvas {0} |
| CapNJoinMenu * | capNJoinMenu {0} |
| std::vector< KisAcyclicSignalConnector::Blocker > | deactivationLocks |
| KoMarkerSelector * | endMarkerSelector {0} |
| KoFillConfigWidget * | fillConfigWidget {0} |
| KoLineStyleSelector * | lineStyle {0} |
| KisDoubleParseUnitSpinBox * | lineWidth {0} |
| KoMarkerSelector * | midMarkerSelector {0} |
| bool | noSelectionTrackingMode {false} |
| KisAcyclicSignalConnector | resourceManagerAcyclicConnector |
| KisSignalCompressor | selectionChangedCompressor |
| QFrame * | separatorLine |
| KisAcyclicSignalConnector | shapeChangedAcyclicConnector |
| QWidget * | spacer {0} |
| KoMarkerSelector * | startMarkerSelector {0} |
| QLabel * | strokeStyleLabel |
| QLabel * | thicknessLabel |
| QScopedPointer< Ui_KoStrokeConfigWidget > | ui |
Private Slots | |
| void | applyDashStyleChanges () |
| apply line changes to the selected shapes | |
| void | applyJoinCapChanges () |
| void | applyLineWidthChanges () |
| void | applyMarkerChanges (int rawPosition) |
| apply marker changes to the selected shape | |
| void | canvasResourceChanged (int key, const QVariant &value) |
| void | selectionChanged () |
| selection has changed | |
| void | updateMarkers (const QList< KoMarker * > &markers) |
Private Member Functions | |
| void | blockChildSignals (bool block) |
| void | loadCurrentStrokeFillFromResourceServer () |
| void | setUnit (const KoUnit &unit, KoShape *representativeShape) |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
A widget for configuring the stroke of a shape.
Definition at line 154 of file KoStrokeConfigWidget.cpp.
|
explicit |
Definition at line 190 of file KoStrokeConfigWidget.cpp.
References applyDashStyleChanges(), applyJoinCapChanges(), applyLineWidthChanges(), applyMarkerChanges(), Private::canvas, canvas, canvasResourceChanged(), d, KoFlake::EndMarker, KoDocumentResourceManager::MarkerCollection, KoMarkerCollection::markers, KoFlake::MidMarker, KoUnit::Point, KoDocumentResourceManager::resource(), KoCanvasBase::resourceManager, KoCanvasBase::selectedShapesProxy(), selectionChanged(), KisSignalMapper::setMapping(), KoCanvasBase::shapeController, sigStrokeChanged(), KoFlake::StartMarker, KoFlake::StrokeFill, and updateMarkers().
|
override |
| void KoStrokeConfigWidget::activate | ( | ) |
Definition at line 455 of file KoStrokeConfigWidget.cpp.
References d, KIS_SAFE_ASSERT_RECOVER_NOOP, and loadCurrentStrokeFillFromResourceServer().
|
privateslot |
apply line changes to the selected shapes
Definition at line 513 of file KoStrokeConfigWidget.cpp.
References applyChangeToStrokes(), Private::canvas, d, and sigStrokeChanged().
|
privateslot |
Definition at line 535 of file KoStrokeConfigWidget.cpp.
References applyChangeToStrokes(), Private::canvas, d, and sigStrokeChanged().
|
privateslot |
Definition at line 524 of file KoStrokeConfigWidget.cpp.
References applyChangeToStrokes(), Private::canvas, d, and sigStrokeChanged().
|
privateslot |
apply marker changes to the selected shape
Definition at line 549 of file KoStrokeConfigWidget.cpp.
References KisCanvas2::addCommand(), Private::canvas, d, KoFlake::EndMarker, KoFlake::MidMarker, KoSelection::selectedEditableShapes(), KisCanvas2::selectedShapesProxy, KisSelectedShapesProxy::selection(), sigStrokeChanged(), and KoFlake::StartMarker.
|
private |
Definition at line 477 of file KoStrokeConfigWidget.cpp.
References d.
|
privateslot |
Definition at line 770 of file KoStrokeConfigWidget.cpp.
References Private::canvas, d, KoUnit::fromUserValue(), KoCanvasResource::Size, KoCanvasResource::Unit, KisCanvas2::unit(), and value().
| Qt::PenCapStyle KoStrokeConfigWidget::capStyle | ( | ) | const |
Definition at line 373 of file KoStrokeConfigWidget.cpp.
References d.
| QColor KoStrokeConfigWidget::color | ( | ) | const |
| KoShapeStrokeSP KoStrokeConfigWidget::createShapeStroke | ( | ) |
Creates KoShapeStroke object filled with the options configured by the widget. The caller is in charge of deletion of the returned object
Definition at line 383 of file KoStrokeConfigWidget.cpp.
References capStyle(), d, joinStyle(), lineDashes(), lineStyle, lineWidth, and miterLimit().
| void KoStrokeConfigWidget::deactivate | ( | ) |
Definition at line 468 of file KoStrokeConfigWidget.cpp.
References d, and KIS_SAFE_ASSERT_RECOVER_NOOP.
| KoMarker * KoStrokeConfigWidget::endMarker | ( | ) | const |
Definition at line 368 of file KoStrokeConfigWidget.cpp.
References d.
| Qt::PenJoinStyle KoStrokeConfigWidget::joinStyle | ( | ) | const |
Definition at line 378 of file KoStrokeConfigWidget.cpp.
References d.
| QVector< qreal > KoStrokeConfigWidget::lineDashes | ( | ) | const |
Definition at line 348 of file KoStrokeConfigWidget.cpp.
References d.
| Qt::PenStyle KoStrokeConfigWidget::lineStyle | ( | ) | const |
| qreal KoStrokeConfigWidget::lineWidth | ( | ) | const |
|
private |
Definition at line 786 of file KoStrokeConfigWidget.cpp.
References Private::canvas, canvasResourceChanged(), d, KoCanvasBase::resourceManager, sigStrokeChanged(), KoCanvasResource::Size, updateStyleControlsAvailability(), and value().
| qreal KoStrokeConfigWidget::miterLimit | ( | ) | const |
Definition at line 358 of file KoStrokeConfigWidget.cpp.
References d.
|
inline |
Definition at line 157 of file KoStrokeConfigWidget.cpp.
|
privateslot |
selection has changed
Definition at line 656 of file KoStrokeConfigWidget.cpp.
References blockChildSignals(), button(), Private::canvas, capStyle(), KoFlake::compareShapePropertiesEqual(), d, KoFlake::EndMarker, joinStyle(), KIS_SAFE_ASSERT_RECOVER_RETURN, KoPathShape::marker(), KoFlake::MidMarker, KoSelection::selectedEditableShapes(), KisCanvas2::selectedShapesProxy, KisSelectedShapesProxy::selection(), setUnit(), KoFlake::StartMarker, KoShape::stroke(), KisCanvas2::unit(), and updateStyleControlsAvailability().
| void KoStrokeConfigWidget::setActive | ( | bool | active | ) |
Definition at line 489 of file KoStrokeConfigWidget.cpp.
| void KoStrokeConfigWidget::setNoSelectionTrackingMode | ( | bool | value | ) |
KoStrokeShape knows nothing about the transformations applied to the shape, which doesn't prevent the shape to apply them and display the stroke differently. So just take that into account and show the user correct values using the multiplier in KoUnit.
Definition at line 410 of file KoStrokeConfigWidget.cpp.
References KoShape::absoluteTransformation(), KoUnit::adjustByPixelTransform(), blockChildSignals(), and d.
| void KoStrokeConfigWidget::setUnitManagers | ( | KisSpinBoxUnitManager * | managerLineWidth, |
| KisSpinBoxUnitManager * | managerMitterLimit ) |
Definition at line 438 of file KoStrokeConfigWidget.cpp.
References blockChildSignals(), and d.
|
signal |
| KoMarker * KoStrokeConfigWidget::startMarker | ( | ) | const |
Definition at line 363 of file KoStrokeConfigWidget.cpp.
References d.
| void KoStrokeConfigWidget::updateStyleControlsAvailability | ( | bool | enabled | ) |
Definition at line 399 of file KoStrokeConfigWidget.cpp.
References d.
| bool KoStrokeConfigWidget::active {true} |
Definition at line 174 of file KoStrokeConfigWidget.cpp.
| bool KoStrokeConfigWidget::allowLocalUnitManagement {false} |
Definition at line 175 of file KoStrokeConfigWidget.cpp.
| KoCanvasBase* KoStrokeConfigWidget::canvas {0} |
Definition at line 172 of file KoStrokeConfigWidget.cpp.
| CapNJoinMenu* KoStrokeConfigWidget::capNJoinMenu {0} |
Definition at line 168 of file KoStrokeConfigWidget.cpp.
|
private |
Definition at line 102 of file KoStrokeConfigWidget.h.
| std::vector<KisAcyclicSignalConnector::Blocker> KoStrokeConfigWidget::deactivationLocks |
Definition at line 184 of file KoStrokeConfigWidget.cpp.
| KoMarkerSelector* KoStrokeConfigWidget::endMarkerSelector {0} |
Definition at line 166 of file KoStrokeConfigWidget.cpp.
| KoFillConfigWidget* KoStrokeConfigWidget::fillConfigWidget {0} |
Definition at line 177 of file KoStrokeConfigWidget.cpp.
| Qt::PenStyle KoStrokeConfigWidget::lineStyle {0} |
Definition at line 162 of file KoStrokeConfigWidget.cpp.
| qreal KoStrokeConfigWidget::lineWidth {0} |
Definition at line 163 of file KoStrokeConfigWidget.cpp.
| KoMarkerSelector* KoStrokeConfigWidget::midMarkerSelector {0} |
Definition at line 165 of file KoStrokeConfigWidget.cpp.
| bool KoStrokeConfigWidget::noSelectionTrackingMode {false} |
Definition at line 178 of file KoStrokeConfigWidget.cpp.
| KisAcyclicSignalConnector KoStrokeConfigWidget::resourceManagerAcyclicConnector |
Definition at line 181 of file KoStrokeConfigWidget.cpp.
| KisSignalCompressor KoStrokeConfigWidget::selectionChangedCompressor |
Definition at line 182 of file KoStrokeConfigWidget.cpp.
| QFrame* KoStrokeConfigWidget::separatorLine |
Definition at line 58 of file KoStrokeConfigWidget.h.
| KisAcyclicSignalConnector KoStrokeConfigWidget::shapeChangedAcyclicConnector |
Definition at line 180 of file KoStrokeConfigWidget.cpp.
| QWidget* KoStrokeConfigWidget::spacer {0} |
Definition at line 170 of file KoStrokeConfigWidget.cpp.
| KoMarkerSelector* KoStrokeConfigWidget::startMarkerSelector {0} |
Definition at line 164 of file KoStrokeConfigWidget.cpp.
| QLabel* KoStrokeConfigWidget::strokeStyleLabel |
Definition at line 57 of file KoStrokeConfigWidget.h.
| QLabel* KoStrokeConfigWidget::thicknessLabel |
Definition at line 56 of file KoStrokeConfigWidget.h.
| QScopedPointer<Ui_KoStrokeConfigWidget> KoStrokeConfigWidget::ui |
Definition at line 186 of file KoStrokeConfigWidget.cpp.