diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-01-18 23:37:04 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2013-01-18 23:37:04 +0000 |
| commit | 686ddfefd34634a2d3ccacee4c5d243bbe47629f (patch) | |
| tree | ec9fd88a0acc73cfadb5668becdc2dba7b98e50d /src/live_effects/parameter | |
| parent | Delete bspline node whith node tool and fix 1 segment continue shift error (diff) | |
| parent | Some Corrections (diff) | |
| download | inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.tar.gz inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.zip | |
Merge from branch
(bzr r11950.1.18)
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/bool.h | 5 | ||||
| -rw-r--r-- | src/live_effects/parameter/enum.h | 5 | ||||
| -rw-r--r-- | src/live_effects/parameter/originalpath.h | 2 | ||||
| -rw-r--r-- | src/live_effects/parameter/parameter.h | 7 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.h | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/point.h | 2 | ||||
| -rw-r--r-- | src/live_effects/parameter/powerstrokepointarray.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/parameter/powerstrokepointarray.h | 6 | ||||
| -rw-r--r-- | src/live_effects/parameter/random.h | 3 | ||||
| -rw-r--r-- | src/live_effects/parameter/text.h | 2 | ||||
| -rw-r--r-- | src/live_effects/parameter/unit.cpp | 2 | ||||
| -rw-r--r-- | src/live_effects/parameter/unit.h | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/vector.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/vector.h | 2 |
16 files changed, 30 insertions, 32 deletions
diff --git a/src/live_effects/parameter/bool.h b/src/live_effects/parameter/bool.h index d7aa299aa..fafb1beca 100644 --- a/src/live_effects/parameter/bool.h +++ b/src/live_effects/parameter/bool.h @@ -36,10 +36,9 @@ public: void param_setValue(bool newvalue); virtual void param_set_default(); - bool get_value() { return value; }; + bool get_value() const { return value; }; - inline operator bool() - { return value; }; + inline operator bool() const { return value; }; private: BoolParam(const BoolParam&); diff --git a/src/live_effects/parameter/enum.h b/src/live_effects/parameter/enum.h index 2a1b07b47..2340663c3 100644 --- a/src/live_effects/parameter/enum.h +++ b/src/live_effects/parameter/enum.h @@ -68,8 +68,9 @@ public: return value; } - inline operator E() - { return value; }; + inline operator E() const { + return value; + }; void param_set_default() { param_set_value(defvalue); diff --git a/src/live_effects/parameter/originalpath.h b/src/live_effects/parameter/originalpath.h index 7dd17edb0..b3feec41f 100644 --- a/src/live_effects/parameter/originalpath.h +++ b/src/live_effects/parameter/originalpath.h @@ -31,7 +31,7 @@ public: /** Disable the canvas indicators of parent class by overriding this method */ virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; /** Disable the canvas indicators of parent class by overriding this method */ - virtual void addCanvasIndicators(SPLPEItem * /*lpeitem*/, std::vector<Geom::PathVector> & /*hp_vec*/) {}; + virtual void addCanvasIndicators(SPLPEItem const* /*lpeitem*/, std::vector<Geom::PathVector> & /*hp_vec*/) {}; protected: virtual void linked_modified_callback(SPObject *linked_obj, guint flags); diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index 4785d5455..785ada92e 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -59,9 +59,9 @@ public: virtual Glib::ustring * param_getTooltip() { return ¶m_tooltip; }; // overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths - virtual bool providesKnotHolderEntities() { return false; } + virtual bool providesKnotHolderEntities() const { return false; } virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {}; - virtual void addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {}; + virtual void addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {}; virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; virtual void param_setup_nodepath(Inkscape::NodePath::Path */*np*/) {}; @@ -112,8 +112,7 @@ public: virtual Gtk::Widget * param_newWidget(); - inline operator gdouble() - { return value; }; + inline operator gdouble() const { return value; }; protected: gdouble value; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 1b3d7417d..eca0d7a22 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -77,7 +77,7 @@ PathParam::~PathParam() } std::vector<Geom::Path> const & -PathParam::get_pathvector() +PathParam::get_pathvector() const { return _pathvector; } @@ -231,7 +231,7 @@ PathParam::param_setup_nodepath(Inkscape::NodePath::Path *) } void -PathParam::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec) +PathParam::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &hp_vec) { hp_vec.push_back(_pathvector); } diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h index a4f46f11f..112a1ea13 100644 --- a/src/live_effects/parameter/path.h +++ b/src/live_effects/parameter/path.h @@ -31,7 +31,7 @@ public: const gchar * default_value = "M0,0 L1,1"); virtual ~PathParam(); - std::vector<Geom::Path> const & get_pathvector(); + std::vector<Geom::Path> const & get_pathvector() const; Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2(); virtual Gtk::Widget * param_newWidget(); @@ -46,7 +46,7 @@ public: virtual void param_editOncanvas(SPItem * item, SPDesktop * dt); virtual void param_setup_nodepath(Inkscape::NodePath::Path *np); - virtual void addCanvasIndicators(SPLPEItem *lpeitem, std::vector<Geom::PathVector> &hp_vec); + virtual void addCanvasIndicators(SPLPEItem const* lpeitem, std::vector<Geom::PathVector> &hp_vec); virtual void param_transform_multiply(Geom::Affine const& /*postmul*/, bool /*set*/); diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 2be87e048..53866f278 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -133,7 +133,7 @@ public: virtual ~PointParamKnotHolderEntity() {} virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); - virtual Geom::Point knot_get(); + virtual Geom::Point knot_get() const; virtual void knot_click(guint state); private: @@ -149,7 +149,7 @@ PointParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &/* } Geom::Point -PointParamKnotHolderEntity::knot_get() +PointParamKnotHolderEntity::knot_get() const { return *pparam; } diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index f2397753e..319835bb3 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -47,7 +47,7 @@ public: void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); - virtual bool providesKnotHolderEntities() { return true; } + virtual bool providesKnotHolderEntities() const { return true; } virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); private: diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index 93161ec0d..fecdfeda8 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -124,11 +124,11 @@ public: virtual ~PowerStrokePointArrayParamKnotHolderEntity() {} virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); - virtual Geom::Point knot_get(); + virtual Geom::Point knot_get() const; virtual void knot_click(guint state); /** Checks whether the index falls within the size of the parameter's vector */ - bool valid_index(unsigned int index) { + bool valid_index(unsigned int index) const { return (_pparam->_vector.size() > index); }; @@ -164,7 +164,7 @@ PowerStrokePointArrayParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom: } Geom::Point -PowerStrokePointArrayParamKnotHolderEntity::knot_get() +PowerStrokePointArrayParamKnotHolderEntity::knot_get() const { using namespace Geom; diff --git a/src/live_effects/parameter/powerstrokepointarray.h b/src/live_effects/parameter/powerstrokepointarray.h index 0e08d78fe..e1fa440f2 100644 --- a/src/live_effects/parameter/powerstrokepointarray.h +++ b/src/live_effects/parameter/powerstrokepointarray.h @@ -37,12 +37,12 @@ public: void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); - virtual bool providesKnotHolderEntities() { return true; } + virtual bool providesKnotHolderEntities() const { return true; } virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); void set_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in, Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_normal_in); - Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2() { return last_pwd2; } - Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2_normal() { return last_pwd2_normal; } + Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2() const { return last_pwd2; } + Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2_normal() const { return last_pwd2_normal; } void recalculate_controlpoints_for_new_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in); diff --git a/src/live_effects/parameter/random.h b/src/live_effects/parameter/random.h index b72f6f976..ca4440336 100644 --- a/src/live_effects/parameter/random.h +++ b/src/live_effects/parameter/random.h @@ -42,8 +42,7 @@ public: void resetRandomizer(); operator gdouble(); - inline gdouble get_value() - { return value; } ; + inline gdouble get_value() { return value; } ; protected: long startseed; diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h index 85833885e..62de70eec 100644 --- a/src/live_effects/parameter/text.h +++ b/src/live_effects/parameter/text.h @@ -46,7 +46,7 @@ public: const double t, const double length, bool use_curvature = false); void setAnchor(double x_value, double y_value); - const Glib::ustring get_value() { return defvalue; }; + const Glib::ustring get_value() const { return defvalue; }; private: TextParam(const TextParam&); diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp index 36b6efacc..7a2ce6f65 100644 --- a/src/live_effects/parameter/unit.cpp +++ b/src/live_effects/parameter/unit.cpp @@ -59,7 +59,7 @@ UnitParam::param_set_value(SPUnit const *val) } const gchar * -UnitParam::get_abbreviation() +UnitParam::get_abbreviation() const { return sp_unit_get_abbreviation(unit); } diff --git a/src/live_effects/parameter/unit.h b/src/live_effects/parameter/unit.h index 3d417fcd6..ea7a0112a 100644 --- a/src/live_effects/parameter/unit.h +++ b/src/live_effects/parameter/unit.h @@ -30,11 +30,11 @@ public: virtual gchar * param_getSVGValue() const; virtual void param_set_default(); void param_set_value(SPUnit const *val); - const gchar *get_abbreviation(); + const gchar *get_abbreviation() const; virtual Gtk::Widget * param_newWidget(); - operator SPUnit const *() { return unit; } + operator SPUnit const *() const { return unit; } private: SPUnit const *unit; diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp index a20c46042..edd6b863f 100644 --- a/src/live_effects/parameter/vector.cpp +++ b/src/live_effects/parameter/vector.cpp @@ -154,7 +154,7 @@ public: param->setOrigin(s); sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false); }; - virtual Geom::Point knot_get(){ + virtual Geom::Point knot_get() const { return param->origin; }; virtual void knot_click(guint /*state*/){ @@ -176,7 +176,7 @@ public: param->setVector(s); sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false); }; - virtual Geom::Point knot_get(){ + virtual Geom::Point knot_get() const { return param->origin + param->vector; }; virtual void knot_click(guint /*state*/){ diff --git a/src/live_effects/parameter/vector.h b/src/live_effects/parameter/vector.h index f82affe16..35ca04437 100644 --- a/src/live_effects/parameter/vector.h +++ b/src/live_effects/parameter/vector.h @@ -52,7 +52,7 @@ public: void set_origin_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); void set_oncanvas_color(guint32 color); - virtual bool providesKnotHolderEntities() { return true; } + virtual bool providesKnotHolderEntities() const { return true; } virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); private: |
