[Kst] extragear/graphics/kst/kst

Ted Kisner tskisner.public at gmail.com
Wed Nov 2 01:04:58 CET 2005


SVN commit 476771 by tskisner:

Ok, hopefully this is all correct now...

 M  +15 -15    kstimage.cpp  


--- trunk/extragear/graphics/kst/kst/kstimage.cpp #476770:476771
@@ -174,7 +174,7 @@
   QString l2 = indent + "  ";
   ts << indent << "<image>" << endl;
   ts << l2 << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     ts << l2 << "<matrixtag>" << QStyleSheet::escape(_inputMatrices[THEMATRIX]->tagName()) << "</matrixtag>" << endl;
   }
   ts << l2 << "<hascolormap>" << _hasColorMap << "</hascolormap>" <<endl;
@@ -200,7 +200,7 @@
     return lastUpdateResult();
   }
 
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     KstMatrixPtr mp = _inputMatrices[THEMATRIX];
     bool updated = UPDATE == mp->update(update_counter);
   
@@ -248,7 +248,7 @@
 
 
 QString KstImage::propertyString() const {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     return i18n("Using matrix %1" ).arg(_inputMatrices[THEMATRIX]->tagName());
   } else {
     return QString();
@@ -259,7 +259,7 @@
 QColor KstImage::getMappedColor(double x, double y) {
   bool ok;
   
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     double z = _inputMatrices[THEMATRIX]->value(x, y, &ok);
     if (ok) {
       int index;
@@ -307,7 +307,7 @@
 void KstImage::changeToColorOnly(const QString &in_tag, KstMatrixPtr in_matrix,
                                      double lowerZ, double upperZ, bool autoThreshold, KPalette* pal) {
   setTagName(in_tag);
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     _inputMatrices[THEMATRIX] = in_matrix;
   }
   _zLower = lowerZ;
@@ -326,7 +326,7 @@
 void KstImage::changeToContourOnly(const QString &in_tag, KstMatrixPtr in_matrix,
                                        int numContours, const QColor& contourColor, int contourWeight) {
   setTagName(in_tag);
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     _inputMatrices[THEMATRIX] = in_matrix;
   }
   _numContourLines = numContours;
@@ -347,7 +347,7 @@
                                                double lowerZ, double upperZ, bool autoThreshold, KPalette* pal,
                                                int numContours, const QColor& contourColor, int contourWeight) {
   setTagName(in_tag);
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     _inputMatrices[THEMATRIX] = in_matrix;
   }
   _zLower = lowerZ;
@@ -367,7 +367,7 @@
 
 
 void KstImage::matrixDimensions(double &x, double &y, double &width, double &height) {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     KstMatrixPtr mp = _inputMatrices[THEMATRIX];
     if (_inputMatrices.contains(THEMATRIX)) {
       x = mp->minX();
@@ -405,7 +405,7 @@
 
 bool KstImage::getNearestZ(double x, double y, double& z) {
   bool ok;
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     z = _inputMatrices[THEMATRIX]->value(x,y,&ok);
     return ok;
   } else {
@@ -458,7 +458,7 @@
 
 
 QString KstImage::matrixTag() const {
-  if (_inputMatrices[THEMATRIX]) { 
+  if (_inputMatrices.contains(THEMATRIX)) { 
     return _inputMatrices[THEMATRIX]->tagName(); 
   } else {
     return QString();
@@ -467,7 +467,7 @@
 
 
 KstMatrixPtr KstImage::matrix() const {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     return _inputMatrices[THEMATRIX]; 
   } else {
     return NULL;
@@ -476,7 +476,7 @@
 
 
 QString KstImage::xLabel() const {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     return _inputMatrices[THEMATRIX]->xLabel();  
   } else {
     return QString();
@@ -485,7 +485,7 @@
 
 
 QString KstImage::yLabel() const {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     return _inputMatrices[THEMATRIX]->yLabel();  
   } else {
     return QString();
@@ -494,7 +494,7 @@
 
 
 QString KstImage::topLabel() const {
-  if (_inputMatrices[THEMATRIX]) {
+  if (_inputMatrices.contains(THEMATRIX)) {
     return _inputMatrices[THEMATRIX]->label();  
   } else {
     return QString();
@@ -544,7 +544,7 @@
 
   KstImagePtr image = this;
   
-  if (_inputMatrices[THEMATRIX]) { // don't paint if we have no matrix
+  if (_inputMatrices.contains(THEMATRIX)) { // don't paint if we have no matrix
     image->matrixDimensions(x, y, width, height);
 
     // figure out where the image will be on the plot


More information about the Kst mailing list