[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kst/2.0.4-rc2/src
From: Peter Kümmel <syntheticpp () gmx ! net>
Date: 2011-09-12 10:43:20
Message-ID: 20110912104320.2C496AC87F () svn ! kde ! org
[Download RAW message or body]
SVN commit 1253020 by kuemmel:
backport fix for 272576
M +1 -4 libkst/datavector.cpp
M +3 -2 libkst/labelinfo.h
M +12 -1 libkstapp/legenditem.cpp
M +2 -3 libkstmath/histogram.cpp
M +1 -0 libkstmath/psd.cpp
--- branches/work/kst/2.0.4-rc2/src/libkst/datavector.cpp #1253019:1253020
@@ -330,10 +330,7 @@
label_info.name = descriptiveName();// _field;
- // un-escape escaped special characters so they aren't escaped 2x.
- //label_info.name.replace("\\_", "_").replace("\\^","^").replace("\\[", \
"[").replace("\\]", "]");
- // now escape the special characters.
- //label_info.name.replace('_', "\\_").replace('^', "\\^").replace('[', \
"\\[").replace(']', "\\]"); + label_info.file = filename();
return label_info;
}
--- branches/work/kst/2.0.4-rc2/src/libkst/labelinfo.h #1253019:1253020
@@ -29,12 +29,13 @@
struct KSTCORE_EXPORT LabelInfo
{
- LabelInfo() : name(QString()), quantity(QString()), units(QString()) {}
- bool operator==(const LabelInfo &l) const { return (l.name==name) && \
(l.quantity==quantity) && (l.units==units); } + LabelInfo() : name(QString()), \
quantity(QString()), units(QString()), file(QString()) {} + bool operator==(const \
LabelInfo &l) const { return (l.name==name) && (l.quantity==quantity) && \
(l.units==units) && (l.file==file); } bool operator!=(const LabelInfo &l) const { \
return !(*this==l); } QString name;
QString quantity;
QString units;
+ QString file;
QString singleRenderItemLabel() const;
};
--- branches/work/kst/2.0.4-rc2/src/libkstapp/legenditem.cpp #1253019:1253020
@@ -24,7 +24,7 @@
#include <QGraphicsItem>
#include <QGraphicsScene>
-#define LEGENDITEMMAXWIDTH 400
+#define LEGENDITEMMAXWIDTH 900
#define LEGENDITEMMAXHEIGHT 100
namespace Kst {
@@ -150,9 +150,20 @@
label = relation->descriptiveName();
}
}
+ int i_dup = names.indexOf(label);
+ if (i_dup<0) {
names.append(label);
+ } else {
+ RelationPtr dup_relation = legendItems.at(i_dup);
+ if (!dup_relation->yLabelInfo().file.isEmpty()) {
+ names.replace(i_dup, label + " (" + dup_relation->yLabelInfo().file + \
')'); }
+ if (!relation->yLabelInfo().file.isEmpty()) {
+ names.append(label + " (" + relation->yLabelInfo().file + ')');
}
+ }
+ }
+ }
for (int i = 0; i<count; i++) {
RelationPtr relation = legendItems.at(i);
--- branches/work/kst/2.0.4-rc2/src/libkstmath/histogram.cpp #1253019:1253020
@@ -200,14 +200,13 @@
break;
}
- label_info.name.clear();
- label_info.units.clear();
- _hVector->setLabelInfo(label_info);
_bVector->setLabelInfo(_inputVectors[RAWVECTOR]->labelInfo());
label_info.quantity.clear();
label_info.units.clear();
label_info.name = i18n( "Histogram of %1").arg(_bVector->labelInfo().name);
+ label_info.file = _bVector->labelInfo().file;
+
_hVector->setTitleInfo(label_info);
double *bins = _bVector->value();
--- branches/work/kst/2.0.4-rc2/src/libkstmath/psd.cpp #1253019:1253020
@@ -453,6 +453,7 @@
label_info.quantity.clear();
label_info.units.clear();
label_info.name = _inputVectors[INVECTOR]->labelInfo().name;
+ label_info.file = _inputVectors[INVECTOR]->labelInfo().file;
_sVector->setTitleInfo(label_info);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic