summaryrefslogtreecommitdiffstats
path: root/doc/src/diagrams
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-26 07:41:06 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-26 07:41:06 (GMT)
commit12ebfedc3de64e99082ca573351bdd24b1d42370 (patch)
tree0290b22723ae07fb4b11e6f5008e5bae2050a12b /doc/src/diagrams
parent7ffe42d376b574239480b38b8f6430339b806daa (diff)
parentbaec0ecd314c6e9563bd56cf19571ca71d7d11cd (diff)
downloadQt-12ebfedc3de64e99082ca573351bdd24b1d42370.zip
Qt-12ebfedc3de64e99082ca573351bdd24b1d42370.tar.gz
Qt-12ebfedc3de64e99082ca573351bdd24b1d42370.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: src/corelib/kernel/qcoreevent.h src/gui/graphicsview/qgraphicsitem_p.h
Diffstat (limited to 'doc/src/diagrams')
-rw-r--r--doc/src/diagrams/animations-architecture.svg351
-rw-r--r--doc/src/diagrams/programs/easingcurve/easingcurve.pro13
-rw-r--r--doc/src/diagrams/programs/easingcurve/main.cpp90
3 files changed, 454 insertions, 0 deletions
diff --git a/doc/src/diagrams/animations-architecture.svg b/doc/src/diagrams/animations-architecture.svg
new file mode 100644
index 0000000..0246510
--- /dev/null
+++ b/doc/src/diagrams/animations-architecture.svg
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="950.00006"
+ height="365.28983"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="animations-architecture.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ version="1.0">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible">
+ <path
+ id="path3736"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Lend"
+ style="overflow:visible">
+ <path
+ id="path3730"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.97309,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z"
+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lend"
+ style="overflow:visible">
+ <path
+ id="path3712"
+ d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="matrix(-0.8,0,0,-0.8,-10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL"
+ style="overflow:visible">
+ <path
+ id="path3852"
+ d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+ transform="scale(0.8,0.8)" />
+ </marker>
+ <linearGradient
+ id="linearGradient3165">
+ <stop
+ style="stop-color:#c8c8dc;stop-opacity:1;"
+ offset="0"
+ id="stop3167" />
+ <stop
+ style="stop-color:#b4b4c8;stop-opacity:0;"
+ offset="1"
+ id="stop3169" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient3171"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-257.93754,-842.42203)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient3183"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-383.02298,-676.69717)"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient3191"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-382.93759,-1004.922)"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient7165"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-483.69907,-593.77419)"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient7195"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-571.87523,-1167.422)"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3165"
+ id="linearGradient7203"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2195969,0,0,3.7006494,-572.46592,-841.2256)"
+ x1="249.25"
+ y1="89.862183"
+ x2="475.75"
+ y2="89.862183" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="276.75951"
+ inkscape:cy="155.06417"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:snap-bbox="true"
+ inkscape:window-width="1592"
+ inkscape:window-height="1124"
+ inkscape:window-x="0"
+ inkscape:window-y="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2383"
+ visible="true"
+ enabled="true"
+ units="pt"
+ spacingx="2pt"
+ spacingy="2pt" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-121.77519,-152.95286)">
+ <rect
+ style="opacity:1;fill:url(#linearGradient3171);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect2385"
+ width="49.409317"
+ height="277.54871"
+ x="-203.03828"
+ y="-648.64777"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="380.311"
+ y="185.86879"
+ id="text3173"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan3175"
+ x="380.311"
+ y="185.86879">QAbstractAnimation</tspan></text>
+ <rect
+ style="opacity:1;fill:url(#linearGradient3183);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3177"
+ width="49.409317"
+ height="277.54871"
+ x="-328.12369"
+ y="-482.92297"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="221.80489"
+ y="310.95419"
+ id="text3179"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan3181"
+ x="221.80489"
+ y="310.95419">QVariantAnimation</tspan></text>
+ <rect
+ style="opacity:1;fill:url(#linearGradient3191);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3185"
+ width="49.409317"
+ height="277.54871"
+ x="-328.03827"
+ y="-811.14777"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="564.13324"
+ y="310.86877"
+ id="text3187"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan3189"
+ x="564.13324"
+ y="310.86877">QAnimationGroup</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 346.77519,279.39048 L 346.77519,241.89048 L 509.27519,241.89048 L 509.27519,204.39048"
+ id="path3195"
+ sodipodi:nodetypes="cccc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 671.77519,279.39048 L 671.77519,241.89048 L 509.27519,241.89048"
+ id="path7137"
+ sodipodi:nodetypes="ccc" />
+ <rect
+ style="opacity:1;fill:url(#linearGradient7165);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7159"
+ width="49.409317"
+ height="277.54871"
+ x="-428.7998"
+ y="-400"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="131.66315"
+ y="411.63031"
+ id="text7161"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan7163"
+ x="131.66315"
+ y="411.63031">QPropertyAnimation</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 309.27519,379.39048 L 309.27519,329.39048"
+ id="path7167"
+ sodipodi:nodetypes="cc" />
+ <rect
+ style="opacity:1;fill:url(#linearGradient7195);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7189"
+ width="49.409317"
+ height="375"
+ x="-516.97589"
+ y="-1071.0991"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="703.17139"
+ y="499.8064"
+ id="text7191"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan7193"
+ x="703.17139"
+ y="499.8064">QSequentialAnimationGroup</tspan></text>
+ <rect
+ style="opacity:1;fill:url(#linearGradient7203);fill-opacity:1;stroke:#202020;stroke-width:1.35220754;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7197"
+ width="50"
+ height="350"
+ x="-517.56659"
+ y="-647.45129"
+ ry="12.582828"
+ rx="10.562523"
+ transform="matrix(0,-1,-1,0,0,0)" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono"
+ x="306.46109"
+ y="500.39709"
+ id="text7199"
+ sodipodi:linespacing="100%"><tspan
+ sodipodi:role="line"
+ id="tspan7201"
+ x="306.46109"
+ y="500.39709">QParallelAnimationGroup</tspan></text>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 859.27519,466.89048 L 859.27519,391.89048 L 671.77519,391.89048"
+ id="path7205"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;marker-mid:none;marker-end:url(#Arrow2Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 496.77519,466.89048 L 496.77519,391.89048 L 671.77519,391.89048 L 671.77519,329.39048"
+ id="path7207"
+ sodipodi:nodetypes="cccc" />
+ </g>
+</svg>
diff --git a/doc/src/diagrams/programs/easingcurve/easingcurve.pro b/doc/src/diagrams/programs/easingcurve/easingcurve.pro
new file mode 100644
index 0000000..0b80127
--- /dev/null
+++ b/doc/src/diagrams/programs/easingcurve/easingcurve.pro
@@ -0,0 +1,13 @@
+######################################################################
+# Automatically generated by qmake (2.01a) fr 13. feb 13:26:38 2009
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+
+CONFIG += console \ No newline at end of file
diff --git a/doc/src/diagrams/programs/easingcurve/main.cpp b/doc/src/diagrams/programs/easingcurve/main.cpp
new file mode 100644
index 0000000..98e9d37
--- /dev/null
+++ b/doc/src/diagrams/programs/easingcurve/main.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the $MODULE$ of the Qt Toolkit.
+**
+** $TROLLTECH_DUAL_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+void createCurveIcons();
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ createCurveIcons();
+ return app.exit();
+}
+
+void createCurveIcons()
+{
+ QDir dir(QDir::current());
+ if (dir.dirName() == QLatin1String("debug") || dir.dirName() == QLatin1String("release")) {
+ dir.cdUp();
+ }
+ dir.cdUp();
+ dir.cdUp();
+ dir.cdUp();
+ QSize iconSize(128, 128);
+ QPixmap pix(iconSize);
+ QPainter painter(&pix);
+ QLinearGradient gradient(0,0, 0, iconSize.height());
+ gradient.setColorAt(0.0, QColor(240, 240, 240));
+ gradient.setColorAt(1.0, QColor(224, 224, 224));
+ QBrush brush(gradient);
+ const QMetaObject &mo = QEasingCurve::staticMetaObject;
+ QMetaEnum metaEnum = mo.enumerator(mo.indexOfEnumerator("Type"));
+ QFont oldFont = painter.font();
+ // Skip QEasingCurve::Custom
+ QString output(QString::fromAscii("%1/images").arg(dir.absolutePath()));
+ printf("Generating images to %s\n", qPrintable(output));
+ for (int i = 0; i < QEasingCurve::NCurveTypes - 1; ++i) {
+ painter.setFont(oldFont);
+ QString name(QLatin1String(metaEnum.key(i)));
+ painter.fillRect(QRect(QPoint(0, 0), iconSize), brush);
+ QEasingCurve curve((QEasingCurve::Type)i);
+ painter.setPen(QColor(0, 0, 255, 64));
+ qreal xAxis = iconSize.height()/1.5;
+ qreal yAxis = iconSize.width()/3;
+ painter.drawLine(0, xAxis, iconSize.width(), xAxis); // hor
+ painter.drawLine(yAxis, 0, yAxis, iconSize.height()); // ver
+
+ qreal curveScale = iconSize.height()/2;
+
+ painter.drawLine(yAxis - 2, xAxis - curveScale, yAxis + 2, xAxis - curveScale); // hor
+ painter.drawLine(yAxis + curveScale, xAxis + 2, yAxis + curveScale, xAxis - 2); // ver
+ painter.drawText(yAxis + curveScale - 8, xAxis - curveScale - 4, QLatin1String("(1,1)"));
+
+ painter.drawText(yAxis + 42, xAxis + 10, QLatin1String("progress"));
+ painter.drawText(15, xAxis - curveScale - 10, QLatin1String("ease"));
+
+ painter.setPen(QPen(Qt::red, 1, Qt::DotLine));
+ painter.drawLine(yAxis, xAxis - curveScale, yAxis + curveScale, xAxis - curveScale); // hor
+ painter.drawLine(yAxis + curveScale, xAxis, yAxis + curveScale, xAxis - curveScale); // ver
+
+ QPoint currentPos(yAxis, xAxis);
+
+ painter.setPen(Qt::black);
+ QFont font = oldFont;
+ font.setPixelSize(oldFont.pixelSize() + 15);
+ painter.setFont(font);
+ painter.drawText(0, iconSize.height() - 20, iconSize.width(), 20, Qt::AlignHCenter, name);
+
+ for (qreal t = 0; t < 1.0; t+=1.0/curveScale) {
+ QPoint to;
+ to.setX(yAxis + curveScale * t);
+ to.setY(xAxis - curveScale * curve.valueForProgress(t));
+ painter.drawLine(currentPos, to);
+ currentPos = to;
+ }
+ QString fileName(QString::fromAscii("qeasingcurve-%1.png").arg(name.toLower()));
+ printf("%s\n", qPrintable(fileName));
+ pix.save(QString::fromAscii("%1/%2").arg(output).arg(fileName), "PNG");
+ }
+}
+
+