]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Naming of operators.
authoradv <adv@opencascade.com>
Wed, 11 Sep 2013 07:27:33 +0000 (07:27 +0000)
committeradv <adv@opencascade.com>
Wed, 11 Sep 2013 07:27:33 +0000 (07:27 +0000)
src/ImageComposer/ImageComposer_ColorMaskOperator.cxx
src/ImageComposer/ImageComposer_ColorMaskOperator.h
src/ImageComposer/ImageComposer_CropOperator.cxx
src/ImageComposer/ImageComposer_CropOperator.h
src/ImageComposer/ImageComposer_CutOperator.cxx
src/ImageComposer/ImageComposer_CutOperator.h
src/ImageComposer/ImageComposer_FuseOperator.cxx
src/ImageComposer/ImageComposer_FuseOperator.h
src/ImageComposer/ImageComposer_Operator.cxx
src/ImageComposer/ImageComposer_Operator.h

index 45ee5c901880ac8f1421233d601d0db9a4244844..3a788f54f6d99a0163bdb1df2e5e2a1fa62a69e1 100644 (file)
@@ -45,7 +45,7 @@ void ImageComposer_ColorMaskOperator::setArgs( const QColor& theRefColor,
 */
 QString ImageComposer_ColorMaskOperator::name() const
 {
-  return "colormask";
+  return Type();
 }
 
 QStringList ImageComposer_ColorMaskOperator::dumpArgsToPython( QString& theArrayName ) const
index 1e51315602cd5277682c120b9748022d0f978534..d7903449134cb8747a6c88386cfc62bf87a595f5 100644 (file)
@@ -20,6 +20,8 @@ public:
                 int theRGBThreshold,
                 int theAlphaThreshold );
 
+  static QString Type() { return "colormask"; }
+
   virtual QString name() const;
 
   /**
index 7519788b742f93570dd9739d2435065983e0fec1..65aed89de5844d6545a97c010c3dea5b3eb4e605 100644 (file)
@@ -54,7 +54,7 @@ QPainterPath ImageComposer_CropOperator::clipPath() const
 */
 QString ImageComposer_CropOperator::name() const
 {
-  return "crop";
+  return Type();
 }
 
 /**
index 1a2525efe2bf035b9893869b2d99b5e682c901d1..e1740c3327d79d032087f5f67c2e65a92c79afcc 100644 (file)
@@ -21,7 +21,10 @@ public:
 
   QPainterPath clipPath() const;
 
+  static QString Type() { return "crop"; }
+
   virtual QString name() const;
+
   virtual ImageComposer_Image process( const ImageComposer_Image& theImage1,
                                        const ImageComposer_Image& theImage2 ) const;
 
index 3ecf2265e6b29b0ed9ee84f9c5c6bc87ac404fe3..25ceb4c83c040337198f0b0e9d46fdcadcb9c946 100644 (file)
@@ -23,7 +23,7 @@ ImageComposer_CutOperator::~ImageComposer_CutOperator()
 */
 QString ImageComposer_CutOperator::name() const
 {
-  return "cut";
+  return Type();
 }
 
 /**
index d85923c41c60d7e6f428b7e604ea25bc2444a93c..15026dc3c80be09ae10b4f278cc9a1b39ceca3ae 100644 (file)
@@ -15,6 +15,8 @@ public:
   ImageComposer_CutOperator();
   virtual ~ImageComposer_CutOperator();
 
+  static QString Type() { return "cut"; }
+
   virtual QString name() const;
 
 protected:
index b68ad1741bf9f1fbdf0c522952fffbff79f4fe61..e23d58296bb83ec34622fa303c0f741a90f715df 100644 (file)
@@ -23,7 +23,7 @@ ImageComposer_FuseOperator::~ImageComposer_FuseOperator()
 */
 QString ImageComposer_FuseOperator::name() const
 {
-  return "fuse";
+  return Type();
 }
 
 /**
index 857ad54e983372f2248fb48c83b723c152717a9b..ac9c5f60b7f303b8d9f72774234a94252d459570 100644 (file)
@@ -15,6 +15,8 @@ public:
   ImageComposer_FuseOperator();
   virtual ~ImageComposer_FuseOperator();
 
+  static QString Type() { return "fuse"; }
+
   virtual QString name() const;
 
 protected:
index c9cdc77358929b5a7d50f91d38aa62680c875d49..e296b4d4dab40b0c05b7586b1a8faf74e70e0160 100644 (file)
@@ -37,15 +37,6 @@ void ImageComposer_Operator::setArgs( const QColor& theBackground )
   myBackground = theBackground;
 }
 
-/**
-  Return name of the operator
-   @return name of the operator
-*/
-QString ImageComposer_Operator::name() const
-{
-  return "";
-}
-
 /**
   Perform the composing of images
   @param theImage1 the first image to compose
index cfece776de8abfe85bf3bc1e81d46f94ffa7dbb1..ab29b6359819a7d29c88aa770096fe52e55d1fa4 100644 (file)
@@ -36,7 +36,12 @@ public:
   **/
   QStringList dumpArgsToPython( QString& theArrayName ) const;
 
-  virtual QString name() const;
+  /**
+    Return name of the operator.
+    @return name of the operator
+  */
+  virtual QString name() const = 0;
+
   virtual ImageComposer_Image process( const ImageComposer_Image& theImage1,
                                        const ImageComposer_Image& theImage2 ) const;