diff --git a/examples/callout/callout.cpp b/demos/callout/callout.cpp similarity index 100% rename from examples/callout/callout.cpp rename to demos/callout/callout.cpp diff --git a/examples/callout/callout.h b/demos/callout/callout.h similarity index 100% rename from examples/callout/callout.h rename to demos/callout/callout.h diff --git a/examples/callout/callout.pro b/demos/callout/callout.pro similarity index 91% rename from examples/callout/callout.pro rename to demos/callout/callout.pro index b0da66d..ebe7b46 100644 --- a/examples/callout/callout.pro +++ b/demos/callout/callout.pro @@ -1,4 +1,4 @@ -!include( ../examples.pri ) { +!include( ../demos.pri ) { error( "Couldn't find the examples.pri file!" ) } diff --git a/examples/callout/main.cpp b/demos/callout/main.cpp similarity index 100% rename from examples/callout/main.cpp rename to demos/callout/main.cpp diff --git a/examples/callout/view.cpp b/demos/callout/view.cpp similarity index 99% rename from examples/callout/view.cpp rename to demos/callout/view.cpp index 9e2c328..5dc3f98 100644 --- a/examples/callout/view.cpp +++ b/demos/callout/view.cpp @@ -89,6 +89,8 @@ void View::resizeEvent(QResizeEvent *event) m_chart->resize(event->size()); m_coordX->setPos(m_chart->size().width()/2 - 50, m_chart->size().height() - 20); m_coordY->setPos(m_chart->size().width()/2 + 50, m_chart->size().height() - 20); +// for (int i = 0; i < children().count(); i++) +// if () } QGraphicsView::resizeEvent(event); } diff --git a/examples/callout/view.h b/demos/callout/view.h similarity index 100% rename from examples/callout/view.h rename to demos/callout/view.h diff --git a/demos/demos.pro b/demos/demos.pro index 1af6225..eb09747 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -14,7 +14,8 @@ SUBDIRS += piechartcustomization \ qmlcustommodel \ chartinteractions \ qmlaxes \ - qmlcustomlegend + qmlcustomlegend \ + callout contains(QT_CONFIG, opengl) { SUBDIRS += chartthemes \ diff --git a/doc/images/examples_callout.png b/doc/images/demos_callout.png similarity index 100% rename from doc/images/examples_callout.png rename to doc/images/demos_callout.png Binary files a/doc/images/examples_callout.png and b/doc/images/demos_callout.png differ diff --git a/doc/src/demos-audio.qdoc b/doc/src/demos-audio.qdoc new file mode 100644 index 0000000..feda61e --- /dev/null +++ b/doc/src/demos-audio.qdoc @@ -0,0 +1,8 @@ +/*! + \example demos/audio + \title Audio demo + \subtitle + + This demos shows drawing of the dynamic data (microphon input) + \image demos_audio.png +*/ diff --git a/doc/src/demos-callout.qdoc b/doc/src/demos-callout.qdoc new file mode 100644 index 0000000..5f6bb42 --- /dev/null +++ b/doc/src/demos-callout.qdoc @@ -0,0 +1,12 @@ +/*! + \example demos/callout + \title Callout demo + \subtitle + + This demo shows how to draw an additional element (a callout) on top of the chart. + \image demos_callout.png + + QChart class provides two methods that map between the scene coordinates and the series' domain (defines by the axes ranges). + QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series) + QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series) +*/ diff --git a/doc/src/demos.qdoc b/doc/src/demos.qdoc index e448c64..7c7a568 100644 --- a/doc/src/demos.qdoc +++ b/doc/src/demos.qdoc @@ -59,6 +59,14 @@ Qml Weather Qml Custom Legend + + Callout + Audio + + + Callout + Audio + diff --git a/examples/examples.pro b/examples/examples.pro index 969f351..ecc1b5f 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -31,7 +31,6 @@ SUBDIRS += \ temperaturerecords \ donutchart \ multiaxis \ - callout \ legendmarkers !linux-arm*: {