summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@digia.com>2012-04-17 11:12:03 +0300
committerMichal Klocek <michal.klocek@digia.com>2012-04-17 11:12:03 +0300
commit4e3b4d91073782ef2889c542ca9c287c877dbc50 (patch)
tree7cfa28dd0a0b8da64c011d08f4c8b6ce1ff2e79b
parent91742fa35f1c125268b61966b0a5ee0d8da4f423 (diff)
minor. Release polishingpre-alpha
-rw-r--r--README53
-rw-r--r--licenses/LICENSE-ALLOS (renamed from Licenses/LICENSE-ALLOS)0
-rw-r--r--licenses/LICENSE-ALLOS-US (renamed from Licenses/LICENSE-ALLOS-US)0
-rw-r--r--licenses/LICENSE-DESKTOP (renamed from Licenses/LICENSE-DESKTOP)0
-rw-r--r--licenses/LICENSE-DESKTOP-US (renamed from Licenses/LICENSE-DESKTOP-US)0
-rw-r--r--licenses/LICENSE-EVALUATION (renamed from Licenses/LICENSE-EVALUATION)0
-rw-r--r--licenses/LICENSE-EVALUATION-US (renamed from Licenses/LICENSE-EVALUATION-US)0
-rw-r--r--licenses/LICENSE.COMMERCIAL.FI (renamed from Licenses/LICENSE.COMMERCIAL.FI)0
-rw-r--r--licenses/LICENSE.COMMERCIAL.US (renamed from Licenses/LICENSE.COMMERCIAL.US)0
-rw-r--r--src/scroller.cpp4
-rw-r--r--src/splinechart/qsplineseries.cpp74
-rw-r--r--src/splinechart/qsplineseries_p.h2
12 files changed, 58 insertions, 75 deletions
diff --git a/README b/README
index a8383008..26613cd5 100644
--- a/README
+++ b/README
@@ -2,7 +2,6 @@
Commercial Charts Add-on Preview
--------------------------------
-
Whats in Qt Commercial Charts
=============================
@@ -19,19 +18,25 @@ demos/
combine several chart types and implement interaction in charts
doc/
Documentation
-Licensing/
+licenses/
Licensing infromation
-
-Building
+Building
========
-qmake
-make (linux), mingw32-make (Windows with MinGw) or nmake (Visual Studio)
+Configure project with qmake:
+ qmake CONFIG+=release
+
+Build poject with make:
+ (Linux) make
+ (Windows with MinGw) mingw32-make
+ (Visual Studio) namke
If you want to install the libraries to your Qt library directory use:
-make install
+ make install
+If you want to uninstall the libraries
+ make uninstall
Documentation
=============
@@ -41,27 +46,15 @@ into "doc/html" in the build directory.
KNOWN ISSUES
============
-- General
- * The preview version of Qt Commercial Charts is still under development
+ * The preview version of Qt Commercial Charts is still under development
and thus should not be used in e.g. product development
- * The Charts API might change between the Preview and first official release
- * Some areas will be refactored before the first official release
- * Qt Designer plugin is missing
- * Enable/disable tooltip is missing from the API
-
-- QML API
- * The QML Bindings are still under development and to be considered as early preview
- * All the current QML APIs are shown in qmlchart demo app
- * If doing a developer build (not installing into your Qt instance) you
- need to copy qmldir file to the qmlplugin installation folder; it is not
- copied during build.
-
-- Model based
-
-- Bar Chart
- * Modifying bar categories is not possible
-
-- Pie Chart
- * Slice labels drawn on top of the label arm
-
-- Line Chart
+ * The Charts API might change between the Preview and first official release
+ * Some areas will be refactored before the first official release
+ * Qt Designer plugin is missing
+ * Enable/disable tooltip is missing from the API
+ * Mutliple axis are not suported at the moment.
+ * Logartmic, polar axis are not supported at the moment.
+ * Getting data from QAbstractItemModel is not feature complete.
+ * Interlnal layout hadnling is not working properly.
+ * The QML Bindings are still under development and to be considered as early draft
+ * All the current QML APIs are shown in qmlchart demo app \ No newline at end of file
diff --git a/Licenses/LICENSE-ALLOS b/licenses/LICENSE-ALLOS
index 49dcd367..49dcd367 100644
--- a/Licenses/LICENSE-ALLOS
+++ b/licenses/LICENSE-ALLOS
diff --git a/Licenses/LICENSE-ALLOS-US b/licenses/LICENSE-ALLOS-US
index 022562b0..022562b0 100644
--- a/Licenses/LICENSE-ALLOS-US
+++ b/licenses/LICENSE-ALLOS-US
diff --git a/Licenses/LICENSE-DESKTOP b/licenses/LICENSE-DESKTOP
index 50e164e2..50e164e2 100644
--- a/Licenses/LICENSE-DESKTOP
+++ b/licenses/LICENSE-DESKTOP
diff --git a/Licenses/LICENSE-DESKTOP-US b/licenses/LICENSE-DESKTOP-US
index 7655f54b..7655f54b 100644
--- a/Licenses/LICENSE-DESKTOP-US
+++ b/licenses/LICENSE-DESKTOP-US
diff --git a/Licenses/LICENSE-EVALUATION b/licenses/LICENSE-EVALUATION
index c18e4b5f..c18e4b5f 100644
--- a/Licenses/LICENSE-EVALUATION
+++ b/licenses/LICENSE-EVALUATION
diff --git a/Licenses/LICENSE-EVALUATION-US b/licenses/LICENSE-EVALUATION-US
index 34762e01..34762e01 100644
--- a/Licenses/LICENSE-EVALUATION-US
+++ b/licenses/LICENSE-EVALUATION-US
diff --git a/Licenses/LICENSE.COMMERCIAL.FI b/licenses/LICENSE.COMMERCIAL.FI
index 5db6afd3..5db6afd3 100644
--- a/Licenses/LICENSE.COMMERCIAL.FI
+++ b/licenses/LICENSE.COMMERCIAL.FI
diff --git a/Licenses/LICENSE.COMMERCIAL.US b/licenses/LICENSE.COMMERCIAL.US
index 351cf985..351cf985 100644
--- a/Licenses/LICENSE.COMMERCIAL.US
+++ b/licenses/LICENSE.COMMERCIAL.US
diff --git a/src/scroller.cpp b/src/scroller.cpp
index 8bf3f6c7..66319b80 100644
--- a/src/scroller.cpp
+++ b/src/scroller.cpp
@@ -139,9 +139,9 @@ void Scroller::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
m_state = Idle;
}
else {
- m_speed /= 4;
+ m_speed /= 3.75;
m_state = Scroll;
- m_ticker.start(20);
+ m_ticker.start(25);
}
event->accept();
break;
diff --git a/src/splinechart/qsplineseries.cpp b/src/splinechart/qsplineseries.cpp
index 3f6f52b9..9c009150 100644
--- a/src/splinechart/qsplineseries.cpp
+++ b/src/splinechart/qsplineseries.cpp
@@ -100,24 +100,19 @@ QSplineSeriesPrivate::QSplineSeriesPrivate(QSplineSeries* q):QLineSeriesPrivate(
};
/*!
- \internal
Calculates control points which are needed by QPainterPath.cubicTo function to draw the cubic Bezier cureve between two points.
*/
void QSplineSeriesPrivate::calculateControlPoints()
{
Q_Q(QSplineSeries);
- // Based on http://www.codeproject.com/Articles/31859/Draw-a-Smooth-Curve-through-a-Set-of-2D-Points-wit
- // CPOL License
int n = q->count() - 1;
+
if (n == 1)
- { // Special case: Bezier curve should be a straight line.
- // firstControlPoints = new Point[1];
- // 3P1 = 2P0 + P3
+ {
+ //for n==1
m_controlPoints.append(QPointF((2 * q->x(0) + q->x(1)) / 3, (2 * q->y(0) + q->y(1)) / 3));
-
- // P2 = 2P1 P0
m_controlPoints.append(QPointF(2 * m_controlPoints[0].x() - q->x(0), 2 * m_controlPoints[0].y() - q->y(0)));
return;
}
@@ -135,31 +130,31 @@ void QSplineSeriesPrivate::calculateControlPoints()
// | 0 0 0 0 0 0 0 0 ... 1 4 1 | | P1_(n-1)| | 4 * P(n-2) + 2 * P(n-1) |
// | 0 0 0 0 0 0 0 0 ... 0 2 7 | | P1_n | | 8 * P(n-1) + Pn |
//
- QList<qreal> rhs;
- rhs.append(q->x(0) + 2 * q->x(1));
+ QList<qreal> points;
- // Set right hand side X values
- for (int i = 1; i < n - 1; ++i)
- rhs.append(4 * q->x(i) + 2 * q->x(i + 1));
+ points.append(q->x(0) + 2 * q->x(1));
- rhs.append((8 * q->x(n - 1) + q->x(n)) / 2.0);
- // Get first control points X-values
- QList<qreal> xControl = getFirstControlPoints(rhs);
- rhs[0] = q->y(0) + 2 * q->y(1);
- // Set right hand side Y values
for (int i = 1; i < n - 1; ++i)
- rhs[i] = 4 * q->y(i) + 2 * q->y(i + 1);
+ points.append(4 * q->x(i) + 2 * q->x(i + 1));
+
+ points.append((8 * q->x(n - 1) + q->x(n)) / 2.0);
+
+ QList<qreal> xControl = firstControlPoints(points);
+ points[0] = q->y(0) + 2 * q->y(1);
+
+ for (int i = 1; i < n - 1; ++i) {
+ points[i] = 4 * q->y(i) + 2 * q->y(i + 1);
+ }
+
+ points[n - 1] = (8 * q->y(n - 1) + q->y(n)) / 2.0;
- rhs[n - 1] = (8 * q->y(n - 1) + q->y(n)) / 2.0;
- // Get first control points Y-values
- QList<qreal> yControl = getFirstControlPoints(rhs);
+ QList<qreal> yControl = firstControlPoints(points);
- // Fill output arrays.
for (int i = 0; i < n; ++i) {
- // First control point
+
m_controlPoints.append(QPointF(xControl[i], yControl[i]));
- // Second control point
+
if (i < n - 1)
m_controlPoints.append(QPointF(2 * q->x(i + 1) - xControl[i + 1], 2 * q->y(i + 1) - yControl[i + 1]));
else
@@ -167,31 +162,26 @@ void QSplineSeriesPrivate::calculateControlPoints()
}
}
-/*!
- \internal
- */
-QList<qreal> QSplineSeriesPrivate::getFirstControlPoints(QList<qreal> rhs)
+QList<qreal> QSplineSeriesPrivate::firstControlPoints(QList<qreal> list)
{
- QList<qreal> x; // Solution vector.
- QList<qreal> tmp; // Temp workspace.
+ QList<qreal> result;
+ QList<qreal> temp;
qreal b = 2.0;
- x.append(rhs[0] / b);
- tmp.append(0);
- for (int i = 1; i < rhs.size(); i++) {
- // Decomposition and forward substitution.
- tmp.append(1 / b);
- b = (i < rhs.size() - 1 ? 4.0 : 3.5) - tmp[i];
- x.append((rhs[i] - x[i - 1]) / b);
+ result.append(list[0] / b);
+ temp.append(0);
+ for (int i = 1; i < list.size(); i++) {
+ temp.append(1 / b);
+ b = (i < list.size() - 1 ? 4.0 : 3.5) - temp[i];
+ result.append((list[i] - result[i - 1]) / b);
}
- for (int i = 1; i < rhs.size(); i++)
- x[rhs.size() - i - 1] -= tmp[rhs.size() - i] * x[rhs.size() - i]; // Backsubstitution.
+ for (int i = 1; i < list.size(); i++)
+ result[list.size() - i - 1] -= temp[list.size() - i] * result[list.size() - i];
- return x;
+ return result;
}
/*!
- \internal
Updates the control points, besed on currently avaiable knots.
*/
void QSplineSeriesPrivate::updateControlPoints()
diff --git a/src/splinechart/qsplineseries_p.h b/src/splinechart/qsplineseries_p.h
index a22caaa9..4f38eb75 100644
--- a/src/splinechart/qsplineseries_p.h
+++ b/src/splinechart/qsplineseries_p.h
@@ -42,7 +42,7 @@ public:
Chart* createGraphics(ChartPresenter* presenter);
QSplineSeriesPrivate(QSplineSeries* q);
void calculateControlPoints();
- QList<qreal> getFirstControlPoints(QList<qreal> rhs);
+ QList<qreal> firstControlPoints(QList<qreal> rhs);
public Q_SLOTS:
void updateControlPoints();