Differential D20653 Diff 56543 plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
Show All 36 Lines | 34 | public: | |||
---|---|---|---|---|---|
37 | 37 | | |||
38 | KisDuplicateOpSettings(); | 38 | KisDuplicateOpSettings(); | ||
39 | ~KisDuplicateOpSettings() override; | 39 | ~KisDuplicateOpSettings() override; | ||
40 | bool paintIncremental() override; | 40 | bool paintIncremental() override; | ||
41 | QString indirectPaintingCompositeOp() const override; | 41 | QString indirectPaintingCompositeOp() const override; | ||
42 | 42 | | |||
43 | QPointF offset() const; | 43 | QPointF offset() const; | ||
44 | QPointF position() const; | 44 | QPointF position() const; | ||
45 | /** | ||||
46 | * This function is called by a tool when the mouse is pressed. | ||||
47 | * Returns false if picking new origin is in action, | ||||
48 | * and returns true otherwise (i.e. if brush is starting a new stroke). | ||||
49 | * See kis_tool_freehand:tryPickByPaintOp() | ||||
50 | */ | ||||
45 | bool mousePressEvent(const KisPaintInformation& pos, Qt::KeyboardModifiers modifiers, KisNodeWSP currentNode) override; | 51 | bool mousePressEvent(const KisPaintInformation& pos, Qt::KeyboardModifiers modifiers, KisNodeWSP currentNode) override; | ||
52 | /** | ||||
53 | * This function is called by a tool when the mouse is released. | ||||
54 | * If the tool is supposed to ignore the event, the paint op should return true | ||||
55 | * and if the tool is supposed to use the event, return false. | ||||
56 | */ | ||||
57 | bool mouseReleaseEvent() override; | ||||
46 | void activate() override; | 58 | void activate() override; | ||
47 | 59 | | |||
48 | void fromXML(const QDomElement& elt) override; | 60 | void fromXML(const QDomElement& elt) override; | ||
49 | void toXML(QDomDocument& doc, QDomElement& rootElt) const override; | 61 | void toXML(QDomDocument& doc, QDomElement& rootElt) const override; | ||
50 | 62 | | |||
51 | KisPaintOpSettingsSP clone() const override; | 63 | KisPaintOpSettingsSP clone() const override; | ||
52 | using KisBrushBasedPaintOpSettings::brushOutline; | 64 | using KisBrushBasedPaintOpSettings::brushOutline; | ||
53 | QPainterPath brushOutline(const KisPaintInformation &info, const OutlineMode &mode) override; | 65 | QPainterPath brushOutline(const KisPaintInformation &info, const OutlineMode &mode) override; | ||
54 | 66 | | |||
55 | KisNodeWSP sourceNode() const; | 67 | KisNodeWSP sourceNode() const; | ||
56 | 68 | | |||
57 | QList<KisUniformPaintOpPropertySP> uniformProperties(KisPaintOpSettingsSP settings) override; | 69 | QList<KisUniformPaintOpPropertySP> uniformProperties(KisPaintOpSettingsSP settings) override; | ||
58 | 70 | | |||
59 | public: | 71 | public: | ||
60 | 72 | | |||
61 | Q_DISABLE_COPY(KisDuplicateOpSettings) | 73 | Q_DISABLE_COPY(KisDuplicateOpSettings) | ||
62 | 74 | | |||
63 | QPointF m_offset; | 75 | QPointF m_offset; | ||
64 | bool m_isOffsetNotUptodate; | 76 | bool m_isOffsetNotUptodate; // true between the act of setting a new origin and the first stroke | ||
77 | bool m_duringPaintingStroke; // true if the stroke is begin painted now, false otherwise | ||||
65 | QPointF m_position; // Give the position of the last alt-click | 78 | QPointF m_position; // Give the position of the last alt-click | ||
66 | KisNodeWSP m_sourceNode; | 79 | KisNodeWSP m_sourceNode; // Give the node of the source point (origin) | ||
67 | QList<KisUniformPaintOpPropertyWSP> m_uniformProperties; | 80 | QList<KisUniformPaintOpPropertyWSP> m_uniformProperties; | ||
68 | }; | 81 | }; | ||
69 | 82 | | |||
70 | typedef KisSharedPtr<KisDuplicateOpSettings> KisDuplicateOpSettingsSP; | 83 | typedef KisSharedPtr<KisDuplicateOpSettings> KisDuplicateOpSettingsSP; | ||
71 | 84 | | |||
72 | 85 | | |||
73 | #endif // KIS_DUPLICATEOP_SETTINGS_H_ | 86 | #endif // KIS_DUPLICATEOP_SETTINGS_H_ |