@@ -27,7 +27,7 | |||
|
27 | 27 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
28 | 28 | |
|
29 | 29 | DeclarativeBoxSet::DeclarativeBoxSet(QObject *parent) |
|
30 | : QBoxSet(parent) | |
|
30 | : QBoxSet("", parent) | |
|
31 | 31 | { |
|
32 | 32 | connect(this, SIGNAL(valuesAdded(int,int)), this, SLOT(handleCountChanged(int,int))); |
|
33 | 33 | connect(this, SIGNAL(valuesRemoved(int,int)), this, SLOT(handleCountChanged(int,int))); |
@@ -50,9 +50,6 QVariantList DeclarativeBoxSet::values() | |||
|
50 | 50 | |
|
51 | 51 | void DeclarativeBoxSet::setValues(QVariantList values) |
|
52 | 52 | { |
|
53 | while (count()) | |
|
54 | remove(count() - 1); | |
|
55 | ||
|
56 | 53 | for (int i(0); i < values.count(); i++) { |
|
57 | 54 | if (values.at(i).canConvert(QVariant::Double)) |
|
58 | 55 | QBoxSet::append(values[i].toDouble()); |
@@ -42,7 +42,6 public: | |||
|
42 | 42 | |
|
43 | 43 | public: // From QBoxSet |
|
44 | 44 | Q_INVOKABLE void append(qreal value) { QBoxSet::append(value); } |
|
45 | Q_INVOKABLE void remove(const int index, const int count = 1) { QBoxSet::remove(index, count); } | |
|
46 | 45 | Q_INVOKABLE void replace(int index, qreal value) { QBoxSet::replace(index, value); } |
|
47 | 46 | Q_INVOKABLE qreal at(int index) { return QBoxSet::at(index); } |
|
48 | 47 |
General Comments 0
You need to be logged in to leave comments.
Login now