summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-01-17 18:23:15 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-01-17 18:23:15 +0000
commitef59716bfab870d3193fa9670f2cacc3cca39595 (patch)
tree8504673cd161ebad52ae48b5f16bed0a830e2aa0 /src/live_effects/parameter
parentTranslations. Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-ef59716bfab870d3193fa9670f2cacc3cca39595.tar.gz
inkscape-ef59716bfab870d3193fa9670f2cacc3cca39595.zip
const methods
(bzr r12037)
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/bool.h5
-rw-r--r--src/live_effects/parameter/enum.h5
-rw-r--r--src/live_effects/parameter/parameter.h5
-rw-r--r--src/live_effects/parameter/path.cpp2
-rw-r--r--src/live_effects/parameter/path.h2
-rw-r--r--src/live_effects/parameter/point.h2
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.h6
-rw-r--r--src/live_effects/parameter/random.h3
-rw-r--r--src/live_effects/parameter/text.h2
-rw-r--r--src/live_effects/parameter/unit.cpp2
-rw-r--r--src/live_effects/parameter/unit.h4
-rw-r--r--src/live_effects/parameter/vector.h2
12 files changed, 19 insertions, 21 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/parameter.h b/src/live_effects/parameter/parameter.h
index 4785d5455..526708ed7 100644
--- a/src/live_effects/parameter/parameter.h
+++ b/src/live_effects/parameter/parameter.h
@@ -59,7 +59,7 @@ public:
virtual Glib::ustring * param_getTooltip() { return &param_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*/) {};
@@ -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..d076cc5d0 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;
}
diff --git a/src/live_effects/parameter/path.h b/src/live_effects/parameter/path.h
index a4f46f11f..d48b5422d 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();
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.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.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: