|
| void | activate (const QSet< KoShape * > &shapes) override |
| |
| void | beginPrimaryAction (KoPointerEvent *event) override |
| |
| void | continuePrimaryAction (KoPointerEvent *event) override |
| |
| QWidget * | createOptionWidget () override |
| |
| | KisToolDyna (KoCanvasBase *canvas) |
| |
| | ~KisToolDyna () override |
| |
Public Member Functions inherited from KisToolFreehand |
| int | flags () const override |
| |
| | KisToolFreehand (KoCanvasBase *canvas, const QCursor &cursor, const KUndo2MagicString &transactionText, bool useSavedSmoothing=true) |
| |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| |
| | ~KisToolFreehand () override |
| |
| int | flags () const override |
| |
| | KisToolPaint (KoCanvasBase *canvas, const QCursor &cursor) |
| |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| |
| void | mousePressEvent (KoPointerEvent *event) override |
| |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| |
| KisPopupWidgetInterface * | popupWidget () override |
| |
| | ~KisToolPaint () override |
| |
| virtual bool | alternateActionSupportsHiResEvents (AlternateAction action) const |
| |
| virtual void | beginAlternateDoubleClickAction (KoPointerEvent *event, AlternateAction action) |
| |
| virtual void | beginPrimaryDoubleClickAction (KoPointerEvent *event) |
| |
| void | deleteSelection () override |
| |
| bool | isActive () const |
| |
| | KisTool (KoCanvasBase *canvas, const QCursor &cursor) |
| |
| void | mouseDoubleClickEvent (KoPointerEvent *event) override |
| |
| void | mouseTripleClickEvent (KoPointerEvent *event) override |
| |
| virtual void | newActivationWithExternalSource (KisPaintDeviceSP externalSource) |
| | newActivationWithExternalSource Makes sure that the tool is active and starts a new stroke, which will be able to access the pixels from the specified external source.
|
| |
| KisTool::NodePaintAbility | nodePaintAbility () |
| |
| | ~KisTool () override |
| |
| | Private (KisCanvas2 *c) |
| |
| QAction * | action (const QString &name) const |
| |
| KoCanvasBase * | canvas () const |
| | Returns the canvas the tool is working on.
|
| |
| virtual void | copy () const |
| |
| QCursor | cursor () const |
| | return the last emitted cursor
|
| |
| virtual void | customMoveEvent (KoPointerEvent *event) |
| |
| virtual void | customPressEvent (KoPointerEvent *event) |
| |
| virtual void | customReleaseEvent (KoPointerEvent *event) |
| |
| virtual void | cut () |
| |
| virtual QRectF | decorationsRect () const |
| |
| int | decorationThickness () const |
| | decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true);
|
| |
| virtual void | deselect () |
| | deselect the tool should clear the selection if it has one.
|
| |
| virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
| |
| virtual void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| |
| virtual void | dropEvent (QDropEvent *event, const QPointF &point) |
| |
| virtual void | explicitUserStrokeEndRequest () |
| | explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source.
|
| |
| KoToolFactoryBase * | factory () const |
| |
| virtual void | focusInEvent (QFocusEvent *event) |
| |
| virtual void | focusOutEvent (QFocusEvent *event) |
| |
| virtual bool | hasSelection () |
| |
| virtual void | inputMethodEvent (QInputMethodEvent *event) |
| |
| virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
| |
| bool | isInTextMode () const |
| |
| bool | isOpacityPresetMode () const |
| |
| virtual void | keyPressEvent (QKeyEvent *event) |
| |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| |
| | KoToolBase (KoCanvasBase *canvas) |
| |
| bool | maskSyntheticEvents () const |
| |
| QList< QPointer< QWidget > > | optionWidgets () |
| |
| virtual bool | paste () |
| |
| virtual QMenu * | popupActionsMenu () |
| |
| virtual bool | selectAll () |
| | selectAll select all data the tool can select.
|
| |
| virtual KoToolSelection * | selection () |
| |
| Q_INVOKABLE QString | toolId () const |
| |
| | ~KoToolBase () override |
| |
|
| void | initStroke (KoPointerEvent *event) override |
| |
Protected Member Functions inherited from KisToolFreehand |
| void | activateAlternateAction (AlternateAction action) override |
| |
| void | beginAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | beginPrimaryAction (KoPointerEvent *event) override |
| |
| void | continueAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | continuePrimaryAction (KoPointerEvent *event) override |
| |
| void | deactivateAlternateAction (AlternateAction action) override |
| |
| virtual void | doStroke (KoPointerEvent *event) |
| |
| void | endAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | endPrimaryAction (KoPointerEvent *event) override |
| |
| virtual void | endStroke () |
| |
| KisOptimizedBrushOutline | getOutlinePath (const QPointF &documentPos, const KoPointerEvent *event, KisPaintOpSettings::OutlineMode outlineMode) override |
| |
| KisPaintingInformationBuilder * | paintingInformationBuilder () const |
| |
| bool | primaryActionSupportsHiResEvents () const override |
| |
| void | resetHelper (KisToolFreehandHelper *helper) |
| |
| KisSmoothingOptionsSP | smoothingOptions () const |
| |
| bool | supportsPaintingAssistants () const override |
| |
| bool | trySampleByPaintOp (KoPointerEvent *event, AlternateAction action) |
| |
| bool | wantsAutoScroll () const override |
| |
| void | activateAlternateAction (AlternateAction action) override |
| |
| void | activatePrimaryAction () override |
| |
| void | addOptionWidgetLayout (QLayout *layout) |
| | Add the tool-specific layout to the default option widget layout.
|
| |
| virtual void | addOptionWidgetOption (QWidget *control, QWidget *label=nullptr) |
| | Add a widget and a label to the current option widget layout.
|
| |
| void | beginAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| void | canvasResourceChanged (int key, const QVariant &v) override |
| |
| void | continueAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| QWidget * | createOptionWidget () override |
| |
| void | deactivateAlternateAction (AlternateAction action) override |
| |
| void | deactivatePrimaryAction () override |
| |
| void | enableControl (QWidget *control, bool value) |
| |
| void | endAlternateAction (KoPointerEvent *event, AlternateAction action) override |
| |
| bool | isEraser () const |
| |
| bool | isOutlineEnabled () const |
| |
| bool | isOutlineVisible () const |
| |
| void | paint (QPainter &gc, const KoViewConverter &converter) override |
| |
| virtual QString | quickHelp () const |
| |
| virtual void | requestUpdateOutline (const QPointF &outlineDocPoint, const KoPointerEvent *event) |
| |
| void | setMode (ToolMode mode) override |
| |
| void | setOutlineEnabled (bool enabled) |
| |
| void | setOutlineVisible (bool visible) |
| |
| void | setSupportOutline (bool supportOutline) |
| |
| void | showControl (QWidget *control, bool value) |
| |
| bool | blockUntilOperationsFinished () |
| |
| void | blockUntilOperationsFinishedForced () |
| |
| QPointF | convertDocumentToWidget (const QPointF &pt) |
| |
| QPoint | convertToImagePixelCoordFloored (KoPointerEvent *e) |
| |
| QPointF | convertToPixelCoord (const QPointF &pt) |
| |
| QPointF | convertToPixelCoord (KoPointerEvent *e) |
| |
| QPointF | convertToPixelCoordAndAlignOnWidget (const QPointF &pt) |
| |
| QPointF | convertToPixelCoordAndSnap (const QPointF &pt, const QPointF &offset=QPointF()) |
| |
| QPointF | convertToPixelCoordAndSnap (KoPointerEvent *e, const QPointF &offset=QPointF(), bool useModifiers=true) |
| |
| QRectF | convertToPt (const QRectF &rect) |
| |
| qreal | convertToPt (qreal value) |
| |
| KoColor | currentBgColor () |
| |
| KoColor | currentFgColor () |
| |
| KisFilterConfigurationSP | currentGenerator () |
| |
| KoAbstractGradientSP | currentGradient () |
| |
| KisImageWSP | currentImage () |
| |
| KisNodeSP | currentNode () const |
| |
| KisPaintOpPresetSP | currentPaintOpPreset () |
| |
| KoPatternSP | currentPattern () |
| |
| QCursor | cursor () const |
| |
| KisImageWSP | image () const |
| |
| virtual bool | listeningToModifiers () |
| |
| virtual void | listenToModifiers (bool listen) |
| |
| virtual ToolMode | mode () const |
| |
| bool | nodeEditable () |
| | Checks checks if the current node is editable.
|
| |
| bool | overrideCursorIfNotEditable () |
| | Override the cursor appropriately if current node is not editable.
|
| |
| void | paintToolOutline (QPainter *painter, const KisOptimizedBrushOutline &path) |
| |
| KisOptimizedBrushOutline | pixelToView (const KisOptimizedBrushOutline &path) const |
| |
| QPainterPath | pixelToView (const QPainterPath &pixelPath) const |
| | Convert a pixel path into a view path.
|
| |
| QPointF | pixelToView (const QPoint &pixelCoord) const |
| |
| QPointF | pixelToView (const QPointF &pixelCoord) const |
| | Convert a floating point pixel coordinate into a view coordinate.
|
| |
| QPolygonF | pixelToView (const QPolygonF &pixelPolygon) const |
| | Convert a pixel polygon into a view path.
|
| |
| QRectF | pixelToView (const QRectF &pixelRect) const |
| | Convert a pixel rectangle into a view rectangle.
|
| |
| KisNodeList | selectedNodes () const |
| |
| bool | selectionEditable () |
| | Checks checks if the selection is editable, only applies to local selection as global selection is always editable.
|
| |
| void | setCursor (const QCursor &cursor) |
| |
| void | updateCanvasPixelRect (const QRectF &pixelRect) |
| | Update the canvas for the given rectangle in image pixel coordinates.
|
| |
| void | updateCanvasViewRect (const QRectF &viewRect) |
| | Update the canvas for the given rectangle in view coordinates.
|
| |
| QPointF | viewToPixel (const QPointF &viewCoord) const |
| |
| QPointF | widgetCenterInWidgetPixels () |
| |
| virtual QList< QPointer< QWidget > > | createOptionWidgets () |
| |
| int | grabSensitivity () const |
| | Convenience function to get the current grab sensitivity.
|
| |
| qreal | handleDocRadius () const |
| |
| QRectF | handleGrabRect (const QPointF &position) const |
| |
| QRectF | handlePaintRect (const QPointF &position) const |
| |
| int | handleRadius () const |
| | Convenience function to get the current handle radius.
|
| |
| bool | isActivated () const |
| |
| | KoToolBase (KoToolBasePrivate &dd) |
| |
| KoPointerEvent * | lastDeliveredPointerEvent () const |
| |
| void | setAbstractResource (KoAbstractCanvasResourceInterfaceSP abstractResource) |
| |
| void | setConverter (KoDerivedResourceConverterSP converter) |
| |
| void | setIsOpacityPresetMode (bool value) |
| |
| void | setMaskSyntheticEvents (bool value) |
| |
| void | setTextMode (bool value) |
| |
| QHash< int, KoAbstractCanvasResourceInterfaceSP > | toolAbstractResources () |
| |
| QHash< int, KoDerivedResourceConverterSP > | toolConverters () |
| |
| void | useCursor (const QCursor &cursor) |
| |
|
| enum | { FLAG_USES_CUSTOM_PRESET =0x01
, FLAG_USES_CUSTOM_COMPOSITEOP =0x02
, FLAG_USES_CUSTOM_SIZE =0x04
} |
| |
| enum | AlternateAction {
ChangeSize = AlternateChangeSize
, ChangeSizeSnap = AlternateChangeSizeSnap
, SampleFgNode = AlternateSampleFgNode
, SampleBgNode = AlternateSampleBgNode
,
SampleFgImage = AlternateSampleFgImage
, SampleBgImage = AlternateSampleBgImage
, Secondary = AlternateSecondary
, Third = AlternateThird
,
Fourth = AlternateFourth
, Fifth = AlternateFifth
, NONE = 10000
} |
| |
| enum | NodePaintAbility {
VECTOR
, CLONE
, PAINT
, UNPAINTABLE
,
MYPAINTBRUSH_UNPAINTABLE
} |
| |
| enum | ToolAction {
Primary
, AlternateChangeSize
, AlternateChangeSizeSnap
, AlternateSampleFgNode
,
AlternateSampleBgNode
, AlternateSampleFgImage
, AlternateSampleBgImage
, AlternateSecondary
,
AlternateThird
, AlternateFourth
, AlternateFifth
, Alternate_NONE = 10000
} |
| |
Public Slots inherited from KisToolFreehand |
| void | activate (const QSet< KoShape * > &shapes) override |
| |
| void | deactivate () override |
| |
| void | activate (const QSet< KoShape * > &shapes) override |
| |
| void | deactivate () override |
| |
| void | activate (const QSet< KoShape * > &shapes) override |
| |
| void | canvasResourceChanged (int key, const QVariant &res) override |
| |
| void | deactivate () override |
| |
| virtual void | updateSettingsViews () |
| |
| virtual void | deactivate () |
| |
| virtual void | documentResourceChanged (int key, const QVariant &res) |
| |
| virtual void | repaintDecorations () |
| |
| virtual void | requestRedoDuringStroke () |
| |
| virtual void | requestStrokeCancellation () |
| |
| virtual void | requestStrokeEnd () |
| |
| virtual void | requestUndoDuringStroke () |
| |
| void | setStatusText (const QString &statusText) |
| |
| void | updateOptionsWidgetIcons () |
| |
| void | sigPaintingFinished () |
| |
| void | isActiveChanged (bool isActivated) |
| |
| void | activateTool (const QString &id) |
| |
| void | cursorChanged (const QCursor &cursor) |
| |
| void | selectionChanged (bool hasSelection) |
| |
| void | statusTextChanged (const QString &statusText) |
| |
| void | textModeChanged (bool inTextMode) |
| |
| static AlternateAction | actionToAlternateAction (ToolAction action) |
| |
| KoColor | currentBgColor |
| |
| float | currentExposure {1.0} |
| |
| KoColor | currentFgColor |
| |
| KisFilterConfigurationSP | currentGenerator |
| |
| KoAbstractGradientSP | currentGradient |
| |
| KoPatternSP | currentPattern |
| |
| QCursor | cursor |
| |
| bool | m_isActive {false} |
| |
| ToolMode | m_mode {HOVER_MODE} |
| |
| QWidget * | optionWidget {0} |
| |
| KisCanvas2 * | canvas |
| |
| int | displayedFrame |
| |
| int | intendedFrame |
| |
| enum | ToolMode : int {
HOVER_MODE
, PAINT_MODE
, SECONDARY_PAINT_MODE
, MIRROR_AXIS_SETUP_MODE
,
GESTURE_MODE
, PAN_MODE
, OTHER
, OTHER_1
} |
| |
Protected Attributes inherited from KisToolFreehand |
| bool | m_assistant {false} |
| |
| bool | m_eraser_snapping {false} |
| |
| double | m_magnetism {1.0} |
| |
| bool | m_only_one_assistant {true} |
| |
| KisOptimizedBrushOutline | m_currentOutline |
| |
| QRectF | m_oldColorPreviewUpdateRect |
| |
| QRectF | m_oldOutlineRect |
| |
| QPointF | m_outlineDocPoint |
| |
| bool | m_paintOutline {false} |
| |
| KoToolBasePrivate * | d_ptr |
| |
| bool | isActive |
| |
Definition at line 57 of file kis_tool_dyna.h.
| QWidget * KisToolDyna::createOptionWidget |
( |
| ) |
|
|
overridevirtual |
Reimplement this if your tool actually has an option widget. Sets the option widget to 0 by default.
Reimplemented from KisTool.
Definition at line 266 of file kis_tool_dyna.cpp.
267{
268
270 optionsWidget->setObjectName(
toolId() +
" option widget");
271
273
277
278 QLabel* massLbl = new QLabel(i18n("Mass:"), optionsWidget);
284
285 QLabel* dragLbl = new QLabel(i18n("Drag:"), optionsWidget);
291
292
293
297
304
306
307
312
313
314#if 0
315 QLabel* initWidthLbl =
new QLabel(i18n(
"Initial width:"),
optionWidget);
319
320 QLabel* widthRangeLbl =
new QLabel(i18n(
"Width range:"),
optionWidget);
323
324
325 m_initWidthSPBox->setValue(
m_configGroup.readEntry(
"initWidth", 10));
326 m_widthRangeSPBox->setValue(
m_configGroup.readEntry(
"initWidthRange", 20));
327
328
329#endif
330
331 return optionsWidget;
332}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
@ IncreasingDirection_Clockwise
A widget with several options to select an angle.
@ FlipOptionsMode_MenuButton
The flip options are shown as a menu accessible via a options button.
void setFlipOptionsMode(FlipOptionsMode newMode)
Sets the mode in which the flip options should be shown.
void setIncreasingDirection(KisAngleGauge::IncreasingDirection newIncreasingDirection)
Sets the increasing direction in the angle gauge.
void setAngle(qreal newAngle)
Sets the current angle.
void setDecimals(int newNumberOfDecimals)
Sets the number of decimals (precision) used by the angle.
This class is a spinbox in which you can click and drag to set the value. A slider like bar is displa...
void setValue(qreal newValue)
void setRange(qreal newMinimum, qreal newMaximum, int newNumberOfDecimals=0, bool computeNewFastSliderStep=true)
Set the minimum and the maximum values of the range.
References KisToolPaint::addOptionWidgetLayout(), KisToolPaint::addOptionWidgetOption(), connect(), KoToolBase::createOptionWidget(), KisAngleSelector::FlipOptionsMode_MenuButton, KisAngleGauge::IncreasingDirection_Clockwise, m_angleSelector, m_chkFixedAngle, m_configGroup, m_dragSPBox, m_massSPBox, m_optionLayout, KisTool::optionWidget, KisAngleSelector::setAngle(), KisAngleSelector::setDecimals(), KisAngleSelector::setFlipOptionsMode(), KisAngleSelector::setIncreasingDirection(), KisDoubleSliderSpinBox::setRange(), KisDoubleSliderSpinBox::setValue(), slotSetAngle(), slotSetDrag(), slotSetDynaWidth(), slotSetFixedAngle(), slotSetMass(), slotSetWidthRange(), and KoToolBase::toolId().