diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-25 10:17:39 +0200 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-27 13:03:06 +0200 |
commit | fcb72898b2c8f05ee1a5d2e2e192cc3b9afba486 (patch) | |
tree | 47772886667b9f43f146cbf5cbb35b6c908ee98c /examples | |
parent | 7e9e9d00f0e3def86f679d38e9f30aa5e32e682a (diff) |
Fix example naming and categories
Remove 2 more irrelevant examples
Pick-to: 6.5
Fixes: QTBUG-110463
Change-Id: I9597f311d36fb79db45f6f64fb97bc5376372980
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples')
44 files changed, 82 insertions, 1410 deletions
diff --git a/examples/datavisualization/CMakeLists.txt b/examples/datavisualization/CMakeLists.txt index f7059079..6081fe25 100644 --- a/examples/datavisualization/CMakeLists.txt +++ b/examples/datavisualization/CMakeLists.txt @@ -5,9 +5,7 @@ if(TARGET Qt::Quick) qt_internal_add_example(qmlbars) qt_internal_add_example(qmlscatter) qt_internal_add_example(qmlsurface) - qt_internal_add_example(qmlmultigraph) qt_internal_add_example(qml3doscilloscope) - qt_internal_add_example(qmlsurfacelayers) qt_internal_add_example(qmlaxisformatter) qt_internal_add_example(qmlaxisdrag) qt_internal_add_example(qmlspectrogram) @@ -15,7 +13,6 @@ endif() if(NOT ANDROID AND NOT IOS AND NOT WINRT) qt_internal_add_example(bars) qt_internal_add_example(customproxy) - qt_internal_add_example(itemmodel) qt_internal_add_example(scatter) qt_internal_add_example(surface) qt_internal_add_example(draggableaxes) diff --git a/examples/datavisualization/bars/doc/src/bars.qdoc b/examples/datavisualization/bars/doc/src/bars.qdoc index 884408de..b3cb8df8 100644 --- a/examples/datavisualization/bars/doc/src/bars.qdoc +++ b/examples/datavisualization/bars/doc/src/bars.qdoc @@ -3,7 +3,9 @@ /*! \example bars - \title Bars Example + \meta tags {DataVisualization, Q3DBars} + \meta category {Graphics} + \title Bar Graph \ingroup qtdatavisualization_examples \brief Using Q3DBars in a widget application. diff --git a/examples/datavisualization/bars/main.cpp b/examples/datavisualization/bars/main.cpp index f2ead896..69e7e8a7 100644 --- a/examples/datavisualization/bars/main.cpp +++ b/examples/datavisualization/bars/main.cpp @@ -51,6 +51,7 @@ int main(int argc, char **argv) QComboBox *themeList = new QComboBox(widget); themeList->addItem(QStringLiteral("Qt")); themeList->addItem(QStringLiteral("Primary Colors")); + themeList->addItem(QStringLiteral("Digia")); themeList->addItem(QStringLiteral("Stone Moss")); themeList->addItem(QStringLiteral("Army Blue")); themeList->addItem(QStringLiteral("Retro")); diff --git a/examples/datavisualization/customitems/doc/src/customitems.qdoc b/examples/datavisualization/customitems/doc/src/customitems.qdoc index 9cc3ba25..3ff39332 100644 --- a/examples/datavisualization/customitems/doc/src/customitems.qdoc +++ b/examples/datavisualization/customitems/doc/src/customitems.qdoc @@ -3,7 +3,9 @@ /*! \example customitems - \title Custom Items Example + \meta tags {DataVisualization, Q3DSurface, QCustom3DItem, Surface Graph} + \meta category {Graphics} + \title Custom Items in Graph \ingroup qtdatavisualization_examples \brief Adding custom items to a surface graph. \since QtDataVisualization 1.1 diff --git a/examples/datavisualization/customitems/main.cpp b/examples/datavisualization/customitems/main.cpp index 55f91ee4..c71d093a 100644 --- a/examples/datavisualization/customitems/main.cpp +++ b/examples/datavisualization/customitems/main.cpp @@ -90,7 +90,7 @@ int main(int argc, char **argv) label4->setFont(font); vLayoutRight->addWidget(label4); - widget->setWindowTitle(QStringLiteral("Custom Items Example")); + widget->setWindowTitle(QStringLiteral("Custom Items in Graph")); widget->show(); diff --git a/examples/datavisualization/customproxy/doc/src/customproxy.qdoc b/examples/datavisualization/customproxy/doc/src/customproxy.qdoc index bdaa7502..42cd2768 100644 --- a/examples/datavisualization/customproxy/doc/src/customproxy.qdoc +++ b/examples/datavisualization/customproxy/doc/src/customproxy.qdoc @@ -3,7 +3,9 @@ /*! \example customproxy - \title Custom Proxy Example + \meta tags {DataVisualization, Q3DBars, Bar Graph} + \meta category {Graphics} + \title Data from Custom Proxy \ingroup qtdatavisualization_examples \brief Using Q3DBars with a custom proxy. @@ -11,9 +13,8 @@ \image customproxy-example.png - The interesting thing about custom proxy example is the custom dataset and the corresponding - proxy usage, so we concentrate on that and skip explaining the basic Q3DBars functionality - - for that see \l{Bars Example}. + This example describes how to use a custom dataset and the corresponding proxy. For more + information about basic Q3DBars functionality, see the \l{Bar Graph} example. This example defines a simple flexible data set \c VariantDataSet where each data item is a a variant list. Each item can have multiple different values, identified by their index in diff --git a/examples/datavisualization/datavisualization.pro b/examples/datavisualization/datavisualization.pro index f00231f3..3d108577 100644 --- a/examples/datavisualization/datavisualization.pro +++ b/examples/datavisualization/datavisualization.pro @@ -3,9 +3,7 @@ qtHaveModule(quick) { SUBDIRS += qmlbars \ qmlscatter \ qmlsurface \ - qmlmultigraph \ qml3doscilloscope \ - qmlsurfacelayers \ qmlaxisformatter \ qmlaxisdrag \ qmlspectrogram @@ -14,7 +12,6 @@ qtHaveModule(quick) { !android:!ios:!winrt { SUBDIRS += bars \ customproxy \ - itemmodel \ scatter \ surface \ draggableaxes \ diff --git a/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc b/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc index 3a03a5bd..53810bb2 100644 --- a/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc +++ b/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc @@ -3,12 +3,14 @@ /*! \example draggableaxes - \title Axis Range Dragging With Labels Example + \meta tags {DataVisualization, Q3DScatter, Custom Input Handler, Scatter Graph} + \meta category {Graphics} + \title Input Handling for Axes \ingroup qtdatavisualization_examples \brief Implementing a custom input handler to support axis dragging. \since QtDataVisualization 1.1 - The Axis Range Dragging example shows how to customize the 3D graph controls in a widget + The Input Handling for Axes example shows how to customize the 3D graph controls in a widget application to allow changing axis ranges by clicking on an axis label and dragging. This is done by implementing a custom input handler to react to selection signals emitted from the graph. diff --git a/examples/datavisualization/itemmodel/CMakeLists.txt b/examples/datavisualization/itemmodel/CMakeLists.txt deleted file mode 100644 index a65ad071..00000000 --- a/examples/datavisualization/itemmodel/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(itemmodel LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") - -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Widgets) -find_package(Qt6 COMPONENTS DataVisualization) - -qt_add_executable(itemmodel - main.cpp -) -set_target_properties(itemmodel PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_link_libraries(itemmodel PUBLIC - Qt::Core - Qt::Gui - Qt::Widgets - Qt::DataVisualization -) - -install(TARGETS itemmodel - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png b/examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png Binary files differdeleted file mode 100644 index 677b7eec..00000000 --- a/examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png +++ /dev/null diff --git a/examples/datavisualization/itemmodel/doc/images/itemmodel-example.png b/examples/datavisualization/itemmodel/doc/images/itemmodel-example.png Binary files differdeleted file mode 100644 index c042f84d..00000000 --- a/examples/datavisualization/itemmodel/doc/images/itemmodel-example.png +++ /dev/null diff --git a/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc b/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc deleted file mode 100644 index bc428f4d..00000000 --- a/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \example itemmodel - \title Item Model Example - \ingroup qtdatavisualization_examples - \brief Using an item model as data source for Q3DBars. - - The item model example shows how to make a simple 3D bar graph using Q3DBars and how to modify - the data being drawn at run-time. The example shows how to: - - \list - \li Create an application with Q3DBars and widgets - \li Use QItemModelBarDataProxy to set data to the graph - \li Use a table widget to modify the data in the graph - \endlist - - For instructions about how to interact with the graph, see \l{Qt Data Visualization Interacting with Data}{this page}. - - \image itemmodel-example-2.png - - \include examples-run.qdocinc - - \section1 Creating the Application - - First, in main.cpp, we create a QApplication, instantiate Q3DBars and a window container for it: - - \snippet itemmodel/main.cpp 0 - - The call to QWidget::createWindowContainer is required, as all data visualization graph classes - (Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used - as a widget any other way. - - Then we'll create a layout and add the graph and the table widget into it: - - \snippet itemmodel/main.cpp 1 - - The table widget is going to be used to display the numerical data being inserted into the - graph, and to modify it (See \l {Adding data to the graph} and \l {Interacting with the data}). - - We need to instantiate QItemModelBarDataProxy and a QBar3DSeries for it, and give the series - to the graph: - - \snippet itemmodel/main.cpp 2 - - Here we tell the proxy to directly map the model's rows and columns into the proxy's rows and - columns instead of defining row and column roles to map for them. Then we give the model from - the table widget to the proxy. We also create a series instance and set the proxy to it. - We customize the series visuals a bit by changing the object mesh to pyramids, and finally - add the series to the graph. - - Next, let's create another class to handle the data addition and other interaction with the - graph. Let's call it \c GraphDataGenerator (See \l {Setting up the graph} and - \l {Adding data to the graph} for details) and connect some signals between QBar3DSeries, - \c GraphDataGenerator, and QTableWidget (See \l {Interacting with the data} for a closer look): - - \snippet itemmodel/main.cpp 3 - - The application main is done and we can show the graph and start the event loop: - - \snippet itemmodel/main.cpp 4 - - \section1 Setting up the Graph - - Let's set up the visual attributes for the graph in the constructor of \c GraphDataGenerator: - - \snippet itemmodel/main.cpp 5 - \snippet itemmodel/main.cpp 6 - \snippet itemmodel/main.cpp 7 - - First we set bar thickness ratio to 1.0, which means bars will be as wide as they are deep. 1.0 - is also the default value, so the line is basically unnecessary. It's left there so you could - easily try how changing it affects the graph. The second line sets bar spacings to 0.2, which - means there will be a gap of 20% of the bar's thickness between the bars in both directions. - - We want to be able to select rows of data for a closer inspection, so we set the selection mode - to slice item and row. This means that whenever we select a bar in the graph, the whole row will be - displayed separately and the selected bar will be highlighted. - - We don't want to use the default colors, so we set one of the predefined themes as the active theme. - - Next line sets the font to \c Impact. If your system doesn't have it, it will be replaced by - the system default. - - And finally, we set the camera position to one of the predefined camera positions. - Now the initial graph settings are done. - - \note You do not need to set any of these in case you're happy with the defaults. You can - easily try them by commenting out the contents of the constructor. - - \section1 Adding Data to the Graph - - We created the data generator in the application main and gave it the graph and the table - widget as parameters: - - \code - GraphDataGenerator generator(graph, tableWidget); - \endcode - - We added a separate start method to the generator, so that it wouldn't start doing anything - until everything else is set up. We then called the method when starting the application: - - \code - generator.start(); - \endcode - - Let's have a look at the contents of the \c start() method: - - \snippet itemmodel/main.cpp 8 - - The main thing \c start() does is set up the data model. It also activates a timer for getting - the accurate dimensions of the table widget after it's been filled with data. The reason we - do this is that the widget doesn't know its final visual domensions until all the data has been - inserted to it and it has been shown. The data timer usage is not vital for the - application, so we won't take a closer look at it. It's just there to make QTableWidget look better. - - In \c setupModel() we first introduce the row and column labels, and the actual data: - - \snippet itemmodel/main.cpp 9 - - Then we set up the axes: - - \snippet itemmodel/main.cpp 10 - - Next we will set up the table widget: - - \snippet itemmodel/main.cpp 11 - - After that all that's left is adding the data to the table widget: - - \snippet itemmodel/main.cpp 12 - - Now we have a bar graph and a table widget, both displaying the same data. - - You're probably wondering how the data can be displayed in the graph, as the only thing we did - was add it to the table widget? That's because of what we did earlier, in the application main: - - \snippet itemmodel/main.cpp 2 - - We created QItemModelBarDataProxy instance, and gave the proxy the model of the table widget - we just created. The proxy maps the rows and the columns in the model of the table widget into - rows and columns for itself directly, as we set the QItemModelBarDataProxy::useModelCategories - property to true, and the graph gets the data to be displayed via the series that owns the proxy. - - \section1 Interacting with the Data - - We made a couple of signal connections in the application main earlier: - - \snippet itemmodel/main.cpp 3 - - Now we'll find out what these were for. - - The first one connects a signal from Q3DBars to the \c GraphDataGenerator. Signal - QBar3DSeries::selectedBarChanged() is emitted when a bar is selected from the series. We connect - that to a method in the data generator that selects the same data item in the table widget: - - \snippet itemmodel/main.cpp 13 - - The second connection does the opposite; it connects a signal from the table widget to a - method in the data generator. The method then selects the corresponding bar in the series: - - \snippet itemmodel/main.cpp 14 - - You can even select an item in the widget and change the value of it, and the new value is - updated to the graph. This is handled again by the proxy with mapping between the data - in the table widget and itself. - - \image itemmodel-example.png - - \section1 Example Contents -*/ diff --git a/examples/datavisualization/itemmodel/itemmodel.pro b/examples/datavisualization/itemmodel/itemmodel.pro deleted file mode 100644 index 60b36b98..00000000 --- a/examples/datavisualization/itemmodel/itemmodel.pro +++ /dev/null @@ -1,15 +0,0 @@ -android|ios|winrt { - error( "This example is not supported for android, ios, or winrt." ) -} - -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -SOURCES += main.cpp - -QT += widgets -requires(qtConfig(tablewidget)) - -OTHER_FILES += doc/src/* \ - doc/images/* diff --git a/examples/datavisualization/itemmodel/main.cpp b/examples/datavisualization/itemmodel/main.cpp deleted file mode 100644 index de6d8713..00000000 --- a/examples/datavisualization/itemmodel/main.cpp +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -#include <QtDataVisualization/q3dbars.h> -#include <QtDataVisualization/qcategory3daxis.h> -#include <QtDataVisualization/qitemmodelbardataproxy.h> -#include <QtDataVisualization/qvalue3daxis.h> -#include <QtDataVisualization/q3dscene.h> -#include <QtDataVisualization/q3dcamera.h> -#include <QtDataVisualization/qbar3dseries.h> -#include <QtDataVisualization/q3dtheme.h> - -#include <QtWidgets/QApplication> -#include <QtWidgets/QVBoxLayout> -#include <QtWidgets/QTableWidget> -#include <QtGui/QScreen> -#include <QtCore/QRandomGenerator> -#include <QtCore/QTimer> -#include <QtGui/QFont> -#include <QtCore/QDebug> -#include <QtWidgets/QHeaderView> -#include <QtWidgets/QMessageBox> - -#define USE_STATIC_DATA - -class GraphDataGenerator : public QObject -{ -public: - explicit GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWidget); - ~GraphDataGenerator(); - - void setupModel(); - void addRow(); - void changeStyle(); - void changePresetCamera(); - void changeTheme(); - void start(); - void selectFromTable(const QPoint &selection); - void selectedFromTable(int currentRow, int currentColumn, int previousRow, int previousColumn); - void fixTableSize(); - -private: - Q3DBars *m_graph; - QTimer *m_dataTimer; - int m_columnCount; - int m_rowCount; - QTableWidget *m_tableWidget; // not owned -}; - -GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWidget) - : m_graph(bargraph), - m_dataTimer(0), - m_columnCount(100), - m_rowCount(50), - m_tableWidget(tableWidget) -{ - //! [5] - // Set up bar specifications; make the bars as wide as they are deep, - // and add a small space between them - m_graph->setBarThickness(1.0f); - m_graph->setBarSpacing(QSizeF(0.2, 0.2)); - - //! [5] -#ifndef USE_STATIC_DATA - // Set up sample space; make it as deep as it's wide - m_graph->rowAxis()->setRange(0, m_rowCount); - m_graph->columnAxis()->setRange(0, m_columnCount); - m_tableWidget->setColumnCount(m_columnCount); - - // Set selection mode to full - m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemRowAndColumn); - - // Hide axis labels by explicitly setting one empty string as label list - m_graph->rowAxis()->setLabels(QStringList(QString())); - m_graph->columnAxis()->setLabels(QStringList(QString())); - - m_graph->seriesList().at(0)->setItemLabelFormat(QStringLiteral("@valueLabel")); -#else - //! [6] - // Set selection mode to slice row - m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow | QAbstract3DGraph::SelectionSlice); - - //! [6] -#endif - - //! [7] - // Set theme - m_graph->activeTheme()->setType(Q3DTheme::ThemeDigia); - - // Set font - QFont font = QFont("Impact", 20); - font.setStyleHint(QFont::SansSerif); - m_graph->activeTheme()->setFont(font); - - // Set preset camera position - m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront); - //! [7] -} - -GraphDataGenerator::~GraphDataGenerator() -{ - if (m_dataTimer) { - m_dataTimer->stop(); - delete m_dataTimer; - } - delete m_graph; -} - -void GraphDataGenerator::start() -{ -#ifndef USE_STATIC_DATA - m_dataTimer = new QTimer(); - m_dataTimer->setTimerType(Qt::CoarseTimer); - QObject::connect(m_dataTimer, &QTimer::timeout, this, &GraphDataGenerator::addRow); - m_dataTimer->start(0); - m_tableWidget->setFixedWidth(m_graph->width()); -#else - //! [8] - setupModel(); - - // Table needs to be shown before the size of its headers can be accurately obtained, - // so we postpone it a bit - m_dataTimer = new QTimer(); - m_dataTimer->setSingleShot(true); - QObject::connect(m_dataTimer, &QTimer::timeout, this, &GraphDataGenerator::fixTableSize); - m_dataTimer->start(0); - //! [8] -#endif -} - -void GraphDataGenerator::setupModel() -{ - //! [9] - // Set up row and column names - QStringList days; - days << "Monday" << "Tuesday" << "Wednesday" << "Thursday" << "Friday" << "Saturday" << "Sunday"; - QStringList weeks; - weeks << "week 1" << "week 2" << "week 3" << "week 4" << "week 5"; - - // Set up data Mon Tue Wed Thu Fri Sat Sun - float hours[5][7] = {{2.0f, 1.0f, 3.0f, 0.2f, 1.0f, 5.0f, 10.0f}, // week 1 - {0.5f, 1.0f, 3.0f, 1.0f, 2.0f, 2.0f, 3.0f}, // week 2 - {1.0f, 1.0f, 2.0f, 1.0f, 4.0f, 4.0f, 4.0f}, // week 3 - {0.0f, 1.0f, 0.0f, 0.0f, 2.0f, 2.0f, 0.3f}, // week 4 - {3.0f, 3.0f, 6.0f, 2.0f, 2.0f, 1.0f, 1.0f}}; // week 5 - //! [9] - - // Add labels - //! [10] - m_graph->rowAxis()->setTitle("Week of year"); - m_graph->rowAxis()->setTitleVisible(true); - m_graph->columnAxis()->setTitle("Day of week"); - m_graph->columnAxis()->setTitleVisible(true); - m_graph->valueAxis()->setTitle("Hours spent on the Internet"); - m_graph->valueAxis()->setTitleVisible(true); - m_graph->valueAxis()->setLabelFormat("%.1f h"); - //! [10] - - //! [11] - m_tableWidget->setRowCount(5); - m_tableWidget->setColumnCount(7); - m_tableWidget->setHorizontalHeaderLabels(days); - m_tableWidget->setVerticalHeaderLabels(weeks); - m_tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_tableWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_tableWidget->setCurrentCell(-1, -1); - m_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); - //! [11] - - //! [12] - for (int week = 0; week < weeks.size(); week++) { - for (int day = 0; day < days.size(); day++) { - QModelIndex index = m_tableWidget->model()->index(week, day); - m_tableWidget->model()->setData(index, hours[week][day]); - } - } - //! [12] -} - -void GraphDataGenerator::addRow() -{ - m_tableWidget->model()->insertRow(0); - if (m_tableWidget->model()->rowCount() > m_rowCount) - m_tableWidget->model()->removeRow(m_rowCount); - for (int i = 0; i < m_columnCount; i++) { - QModelIndex index = m_tableWidget->model()->index(0, i); - m_tableWidget->model()->setData(index, - ((float)i / (float)m_columnCount) / 2.0f + - (float)(QRandomGenerator::global()->bounded(30)) / 100.0f); - } - m_tableWidget->resizeColumnsToContents(); -} - -//! [13] -void GraphDataGenerator::selectFromTable(const QPoint &selection) -{ - m_tableWidget->setFocus(); - m_tableWidget->setCurrentCell(selection.x(), selection.y()); -} -//! [13] - -//! [14] -void GraphDataGenerator::selectedFromTable(int currentRow, int currentColumn, - int previousRow, int previousColumn) -{ - Q_UNUSED(previousRow); - Q_UNUSED(previousColumn); - m_graph->seriesList().at(0)->setSelectedBar(QPoint(currentRow, currentColumn)); -} -//! [14] - -void GraphDataGenerator::fixTableSize() -{ - int width = m_tableWidget->horizontalHeader()->length(); - width += m_tableWidget->verticalHeader()->width(); - m_tableWidget->setFixedWidth(width + 2); - int height = m_tableWidget->verticalHeader()->length(); - height += m_tableWidget->horizontalHeader()->height(); - m_tableWidget->setFixedHeight(height + 2); -} - -int main(int argc, char **argv) -{ - qputenv("QSG_RHI_BACKEND", "opengl"); - //! [0] - QApplication app(argc, argv); - Q3DBars *graph = new Q3DBars(); - QWidget *container = QWidget::createWindowContainer(graph); - //! [0] - - if (!graph->hasContext()) { - QMessageBox msgBox; - msgBox.setText("Couldn't initialize the OpenGL context."); - msgBox.exec(); - return -1; - } - - QSize screenSize = graph->screen()->size(); - container->setMinimumSize(QSize(screenSize.width() / 2, screenSize.height() / 2)); - container->setMaximumSize(screenSize); - container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - container->setFocusPolicy(Qt::StrongFocus); - - //! [1] - QWidget widget; - QVBoxLayout *layout = new QVBoxLayout(&widget); - QTableWidget *tableWidget = new QTableWidget(&widget); - layout->addWidget(container, 1); - layout->addWidget(tableWidget, 1, Qt::AlignHCenter); - //! [1] - - tableWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - tableWidget->setAlternatingRowColors(true); - widget.setWindowTitle(QStringLiteral("Hours spent on the Internet")); - - //! [2] - // Since we are dealing with QTableWidget, the model will already have data sorted properly - // into rows and columns, so we simply set useModelCategories property to true to utilize this. - QItemModelBarDataProxy *proxy = new QItemModelBarDataProxy(tableWidget->model()); - proxy->setUseModelCategories(true); - QBar3DSeries *series = new QBar3DSeries(proxy); - series->setMesh(QAbstract3DSeries::MeshPyramid); - graph->addSeries(series); - //! [2] - - //! [3] - GraphDataGenerator generator(graph, tableWidget); - QObject::connect(series, &QBar3DSeries::selectedBarChanged, &generator, - &GraphDataGenerator::selectFromTable); - QObject::connect(tableWidget, &QTableWidget::currentCellChanged, &generator, - &GraphDataGenerator::selectedFromTable); - //! [3] - - //! [4] - widget.show(); - generator.start(); - return app.exec(); - //! [4] -} diff --git a/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc b/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc index 7acfc40b..4abafce1 100644 --- a/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc +++ b/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc @@ -3,18 +3,20 @@ /*! \example qml3doscilloscope - \title Qt Quick 2 Oscilloscope Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Surface3D, Dynamic Data, Surface Graph} + \meta category {Graphics} + \title Surface Oscilloscope + \ingroup qtdatavisualization_qmlexamples \brief Example of a hybrid C++ and QML application. - The Qt Quick 2 oscilloscope example shows how to combine C++ and QML in an application, + The oscilloscope example shows how to combine C++ and QML in an application, as well as showing data that changes realtime. \image qml3doscilloscope-example.png The interesting thing about this example is combining C++ and QML, so we'll concentrate on - that and skip explaining the basic functionality - for - more detailed QML example documentation, see \l{Qt Quick 2 Scatter Example}. + that and skip explaining the basic functionality - for more detailed QML example documentation, + see \l{Simple Scatter Graph}. \include examples-run.qdocinc diff --git a/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc b/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc index 67c9d019..70eaa9ca 100644 --- a/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc +++ b/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc @@ -3,12 +3,14 @@ /*! \example qmlaxisdrag - \title Qt Quick 2 Axis Dragging Example - \ingroup qtdatavisualization_examples - \brief Implementing axis dragging in QML. + \meta tags {DataVisualization, Scatter3D, Custom Input Handler, Dynamic Data, Scatter Graph} + \meta category {Graphics} + \title Axis Dragging + \ingroup qtdatavisualization_qmlexamples + \brief Implementing axis dragging with a custom input handler in QML. \since QtDataVisualization 1.1 - The Qt Quick 2 axis dragging example concentrates on showing how to implement axis range + The axis dragging example concentrates on showing how to implement axis range changing by dragging axis labels in QML. It also gives a quick peek to two other new features in Qt Data Visualization 1.1: orthographic projection and dynamic custom item handling. @@ -71,7 +73,7 @@ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 7 For a more sophisticated conversion from mouse movement to axis range update, see - \l{Axis Range Dragging With Labels Example}{this example}. + \l{Input Handling for Axes}. \section1 Other Features diff --git a/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc b/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc index 6b72270b..3dd1075f 100644 --- a/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc +++ b/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc @@ -3,19 +3,21 @@ /*! \example qmlaxisformatter - \title Qt Quick 2 Axis Formatter Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Scatter3D, Custom Axis Formatter, Scatter Graph} + \meta category {Graphics} + \title Axis Formatters + \ingroup qtdatavisualization_qmlexamples \brief Example of a hybrid C++ and QML application demonstrating different axis formatters. \since QtDataVisualization 1.1 - The Qt Quick axis formatter example shows how to use predefined axis formatters and how to + The Qt Quick axis formatters example shows how to use predefined axis formatters and how to create a custom one. \image qmlaxisformatter-example.png The interesting thing about this example is axis formatters, so we'll concentrate on that and skip explaining the basic functionality - for - more detailed QML example documentation, see \l{Qt Quick 2 Scatter Example}. + more detailed QML example documentation, see \l{Simple Scatter Graph}. \include examples-run.qdocinc @@ -73,7 +75,7 @@ \snippet qmlaxisformatter/customformatter.cpp 3 To expose our new custom formatter to the QML, we must declare it and make it a QML module. - Doing this was introduced in the \l{Qt Quick 2 Oscilloscope Example} so we will skip it here. + Doing this was introduced in the \l{Surface Oscilloscope} so we will skip it here. \section1 QML diff --git a/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc index 09175f4d..42b0854a 100644 --- a/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc +++ b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc @@ -3,18 +3,20 @@ /*! \example qmlbars - \title Qt Quick 2 Bars Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Barsr3D, Multiple Series} + \meta category {Graphics} + \title Simple Bar Graph + \ingroup qtdatavisualization_qmlexamples \brief Using Bars3D in a QML application. - The Qt Quick 2 bars example shows how to make a simple 3D bar graph using Bars3D and Qt + The bars example shows how to make a simple 3D bar graph using Bars3D and Qt Quick 2. \image qmlbars-example.png The interesting thing about this example is switching series and displaying more than one series at once. We'll concentrate on those and skip explaining the basic Bars3D functionality - for - more detailed QML example documentation, see \l{Qt Quick 2 Scatter Example}. + more detailed QML example documentation, see \l{Simple Scatter Graph}. \include examples-run.qdocinc diff --git a/examples/datavisualization/qmlmultigraph/CMakeLists.txt b/examples/datavisualization/qmlmultigraph/CMakeLists.txt deleted file mode 100644 index d697e398..00000000 --- a/examples/datavisualization/qmlmultigraph/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(qmlmultigraph LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") - -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Qml) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS DataVisualization) - -qt_add_executable(qmlmultigraph - main.cpp -) -set_target_properties(qmlmultigraph PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_link_libraries(qmlmultigraph PUBLIC - Qt::Core - Qt::Gui - Qt::Qml - Qt::Quick - Qt::DataVisualization -) - -qt6_add_qml_module(qmlmultigraph - URI MultiGraph - VERSION 1.0 - NO_RESOURCE_TARGET_PATH - QML_FILES - qml/qmlmultigraph/Data.qml - qml/qmlmultigraph/main.qml -) - -install(TARGETS qmlmultigraph - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png b/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png Binary files differdeleted file mode 100644 index 79073f5f..00000000 --- a/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png +++ /dev/null diff --git a/examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc b/examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc deleted file mode 100644 index 4cdcadff..00000000 --- a/examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \example qmlmultigraph - \title Qt Quick 2 Multiple Graphs Example - \ingroup qtdatavisualization_examples - \brief Showing multiple graphs simultaneously in a QML application. - - The Qt Quick 2 multiple graphs example demonstrates using multiple graphs in single window. - - \image qmlmultigraph-example.png - - The interesting thing about this example is demonstrating that multiple graphs can be used - simultaneously, so most functionality is not explained in detail. - For more detailed QML example documentation, see \l{Qt Quick 2 Scatter Example}. - - \include examples-run.qdocinc - - \section1 Multiple Graphs - - Using multiple graphs in a single application doesn't require anything special, simply define - and position the graphs as normal. In this example the graphs are shown in a 2 x 2 grid with - \c{GridLayout}: - - \snippet qmlmultigraph/qml/qmlmultigraph/main.qml 0 - - Each graph has a parent \c Rectangle item to provide it with a border. - - Note that one of the grid cells is used for buttons in an another \c{GridLayout}. -*/ diff --git a/examples/datavisualization/qmlmultigraph/main.cpp b/examples/datavisualization/qmlmultigraph/main.cpp deleted file mode 100644 index 9693de32..00000000 --- a/examples/datavisualization/qmlmultigraph/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -#include <QtGui/QGuiApplication> -#include <QtCore/QDir> -#include <QtQuick/QQuickView> -#include <QtQml/QQmlEngine> - -int main(int argc, char *argv[]) -{ - qputenv("QSG_RHI_BACKEND", "opengl"); - QGuiApplication app(argc, argv); - - QQuickView viewer; - - // The following are needed to make examples run without having to install the module - // in desktop environments. -#ifdef Q_OS_WIN - QString extraImportPath(QStringLiteral("%1/../../../../%2")); -#else - QString extraImportPath(QStringLiteral("%1/../../../%2")); -#endif - viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(), - QString::fromLatin1("qml"))); - QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close); - - viewer.setTitle(QStringLiteral("QML multigraph example")); - viewer.setSource(QUrl("qrc:/qml/qmlmultigraph/main.qml")); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - viewer.show(); - - return app.exec(); -} diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml deleted file mode 100644 index 46ebef17..00000000 --- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -import QtQuick - -Item { - property alias sharedData: dataModel - - ListModel { - id: dataModel - ListElement{ row: "0"; col: "0"; longitude: "20.0"; latitude: "10.0"; pop_density: "4.75"; } - ListElement{ row: "1"; col: "0"; longitude: "21.1"; latitude: "10.3"; pop_density: "3.00"; } - ListElement{ row: "2"; col: "0"; longitude: "22.5"; latitude: "10.7"; pop_density: "1.24"; } - ListElement{ row: "3"; col: "0"; longitude: "24.0"; latitude: "10.5"; pop_density: "2.53"; } - ListElement{ row: "0"; col: "1"; longitude: "20.2"; latitude: "11.2"; pop_density: "3.55"; } - ListElement{ row: "1"; col: "1"; longitude: "21.3"; latitude: "11.5"; pop_density: "3.03"; } - ListElement{ row: "2"; col: "1"; longitude: "22.6"; latitude: "11.7"; pop_density: "3.46"; } - ListElement{ row: "3"; col: "1"; longitude: "23.4"; latitude: "11.5"; pop_density: "4.12"; } - ListElement{ row: "0"; col: "2"; longitude: "20.2"; latitude: "12.3"; pop_density: "3.37"; } - ListElement{ row: "1"; col: "2"; longitude: "21.1"; latitude: "12.4"; pop_density: "2.98"; } - ListElement{ row: "2"; col: "2"; longitude: "22.5"; latitude: "12.1"; pop_density: "3.33"; } - ListElement{ row: "3"; col: "2"; longitude: "23.3"; latitude: "12.7"; pop_density: "3.23"; } - ListElement{ row: "0"; col: "3"; longitude: "20.7"; latitude: "13.3"; pop_density: "5.34"; } - ListElement{ row: "1"; col: "3"; longitude: "21.5"; latitude: "13.2"; pop_density: "4.54"; } - ListElement{ row: "2"; col: "3"; longitude: "22.4"; latitude: "13.6"; pop_density: "4.65"; } - ListElement{ row: "3"; col: "3"; longitude: "23.2"; latitude: "13.4"; pop_density: "6.67"; } - ListElement{ row: "0"; col: "4"; longitude: "20.6"; latitude: "15.0"; pop_density: "6.01"; } - ListElement{ row: "1"; col: "4"; longitude: "21.3"; latitude: "14.6"; pop_density: "5.83"; } - ListElement{ row: "2"; col: "4"; longitude: "22.5"; latitude: "14.8"; pop_density: "7.32"; } - ListElement{ row: "3"; col: "4"; longitude: "23.7"; latitude: "14.3"; pop_density: "6.90"; } - } -} - diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml deleted file mode 100644 index 2a8a03ec..00000000 --- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import QtDataVisualization - -Item { - id: mainView - width: 800 - height: 600 - - property bool portraitMode: width < height - - Data { - id: data - } - - //! [0] - GridLayout { - id: gridLayout - columns: 2 - Layout.fillHeight: true - Layout.fillWidth: true - anchors.top: mainView.top - anchors.bottom: mainView.bottom - anchors.left: mainView.left - anchors.right: mainView.right - - Rectangle { - Layout.fillHeight: true - Layout.fillWidth: true - border.color: surfaceGraph.theme.gridLineColor - border.width: 2 - color: "#00000000" - - Surface3D { - id: surfaceGraph - anchors.fill: parent - anchors.margins: parent.border.width - theme: Theme3D { - type: Theme3D.ThemePrimaryColors - font.pointSize: 60 - } - scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh - - Surface3DSeries { - itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel" - ItemModelSurfaceDataProxy { - itemModel: data.sharedData - // The surface data points are not neatly lined up in rows and columns, - // so we define explicit row and column roles. - rowRole: "row" - columnRole: "col" - xPosRole: "latitude" - zPosRole: "longitude" - yPosRole: "pop_density" - } - } - } - } - - // We'll use one grid cell for buttons - Rectangle { - Layout.fillHeight: true - Layout.fillWidth: true - - GridLayout { - anchors.right: parent.right - anchors.left: parent.left - anchors.top: parent.top - anchors.bottom: parent.bottom - columns: 2 - - Button { - Layout.minimumWidth: parent.width / 2 - Layout.fillHeight: true - Layout.fillWidth: true - text: mainView.portraitMode ? "Clear\nSelections" : "Clear Selections" - onClicked: mainView.clearSelections() // call a helper function to keep button itself simpler - } - - Button { - Layout.minimumWidth: parent.width / 2 - Layout.fillHeight: true - Layout.fillWidth: true - text: "Quit" - onClicked: Qt.quit(); - } - - Button { - Layout.fillHeight: true - Layout.fillWidth: true - text: mainView.portraitMode ? "Reset\nCameras" : "Reset Cameras" - onClicked: mainView.resetCameras() // call a helper function to keep button itself simpler - } - - Button { - Layout.fillHeight: true - Layout.fillWidth: true - text: mainView.portraitMode ? "Toggle\nMesh\nStyles" : "Toggle Mesh Styles" - onClicked: mainView.toggleMeshStyle() // call a helper function to keep button itself simpler - } - } - } - - Rectangle { - Layout.fillHeight: true - Layout.fillWidth: true - border.color: scatterGraph.theme.gridLineColor - border.width: 2 - color: "#00000000" - - Scatter3D { - id: scatterGraph - anchors.fill: parent - anchors.margins: parent.border.width - theme: Theme3D { - type: Theme3D.ThemeDigia - font.pointSize: 60 - } - scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh - - Scatter3DSeries { - itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel" - ItemModelScatterDataProxy { - itemModel: data.sharedData - // Mapping model roles to scatter series item coordinates. - xPosRole: "latitude" - zPosRole: "longitude" - yPosRole: "pop_density" - } - } - } - } - - Rectangle { - Layout.fillHeight: true - Layout.fillWidth: true - border.color: barGraph.theme.gridLineColor - border.width: 2 - color: "#00000000" - - Bars3D { - id: barGraph - anchors.fill: parent - anchors.margins: parent.border.width - theme: Theme3D { - type: Theme3D.ThemeQt - font.pointSize: 60 - } - selectionMode: AbstractGraph3D.SelectionItemAndRow | AbstractGraph3D.SelectionSlice - scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh - - Bar3DSeries { - itemLabelFormat: "@seriesName: @valueLabel" - name: "Population density" - - ItemModelBarDataProxy { - itemModel: data.sharedData - // Mapping model roles to bar series rows, columns, and values. - rowRole: "row" - columnRole: "col" - valueRole: "pop_density" - } - } - } - } - } - //! [0] - - function clearSelections() { - barGraph.clearSelection() - scatterGraph.clearSelection() - surfaceGraph.clearSelection() - } - - function resetCameras() { - surfaceGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh - scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh - barGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh - surfaceGraph.scene.activeCamera.zoomLevel = 100.0 - scatterGraph.scene.activeCamera.zoomLevel = 100.0 - barGraph.scene.activeCamera.zoomLevel = 100.0 - } - - function toggleMeshStyle() { - if (barGraph.seriesList[0].meshSmooth === true) { - barGraph.seriesList[0].meshSmooth = false - if (surfaceGraph.seriesList[0].flatShadingSupported) - surfaceGraph.seriesList[0].flatShadingEnabled = true - scatterGraph.seriesList[0].meshSmooth = false - } else { - barGraph.seriesList[0].meshSmooth = true - surfaceGraph.seriesList[0].flatShadingEnabled = false - scatterGraph.seriesList[0].meshSmooth = true - } - } -} diff --git a/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro b/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro deleted file mode 100644 index 8cc4c60c..00000000 --- a/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro +++ /dev/null @@ -1,12 +0,0 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -# The .cpp file which was generated for your project. Feel free to hack it. -SOURCES += main.cpp - -RESOURCES += qmlmultigraph.qrc - -OTHER_FILES += doc/src/* \ - doc/images/* \ - qml/qmlmultigraph/* diff --git a/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc b/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc deleted file mode 100644 index a1ac4cc0..00000000 --- a/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>qml/qmlmultigraph/Data.qml</file> - <file>qml/qmlmultigraph/main.qml</file> - </qresource> -</RCC> diff --git a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc index 18263edc..2055102e 100644 --- a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc +++ b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc @@ -3,16 +3,18 @@ /*! \example qmlscatter - \title Qt Quick 2 Scatter Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Scatter3D, Multiple Series} + \meta category {Graphics} + \title Simple Scatter Graph + \ingroup qtdatavisualization_qmlexamples \brief Using Scatter3D in a QML application. - The Qt Quick 2 scatter example shows how to make a simple scatter graph visualization using - Scatter3D and Qt Quick 2. + The scatter graph example shows how to make a simple scatter graph visualization using + Scatter3D and QML. For instructions about how to interact with the graph, see \l{Qt Data Visualization Interacting with Data}{this page}. - For instructions how to create a new Qt Quick 2 application of your own, see Qt Creator help. + For instructions how to create a new Qt Quick application of your own, see Qt Creator help. \image qmlscatter-example.png diff --git a/examples/datavisualization/qmlspectrogram/doc/src/qmlspectrogram.qdoc b/examples/datavisualization/qmlspectrogram/doc/src/qmlspectrogram.qdoc index 712db2a2..b56e784c 100644 --- a/examples/datavisualization/qmlspectrogram/doc/src/qmlspectrogram.qdoc +++ b/examples/datavisualization/qmlspectrogram/doc/src/qmlspectrogram.qdoc @@ -3,12 +3,14 @@ /*! \example qmlspectrogram - \title Qt Quick 2 Spectrogram Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Surface3D, Polar Graph, Surface Graph} + \meta category {Graphics} + \title Surface Spectrogram + \ingroup qtdatavisualization_qmlexamples \brief Showing spectrogram graph in a QML application. - The Qt Quick 2 Spectrogram example demonstrates how to show a polar and cartesian spectrograms - and how to utilize orthographic projection to show them in 2D. + The Surface Spectrogram example demonstrates how to show a polar and cartesian + spectrograms and how to utilize orthographic projection to show them in 2D. \image qmlspectrogram-example.png @@ -19,7 +21,7 @@ The focus in this example is on showing how to display spectrograms, so the basic functionality is not explained. For more detailed QML example documentation, - see \l{Qt Quick 2 Scatter Example}. + see \l{Simple Scatter Graph}. \include examples-run.qdocinc diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml index 911159d8..cc0c3a83 100644 --- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml +++ b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml @@ -8,7 +8,7 @@ import QtDataVisualization Window { id: mainview - title: "Qt Quick 2 Spectrogram Example" + title: "Qt Quick 2 Surface Spectrogram" visible: true width: 1024 height: 768 diff --git a/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc b/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc index 044f8ebb..1f338536 100644 --- a/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc +++ b/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc @@ -3,18 +3,20 @@ /*! \example qmlsurface - \title Qt Quick 2 Surface Example - \ingroup qtdatavisualization_examples + \meta tags {DataVisualization, Surface3D, Height Map} + \meta category {Graphics} + \title Surface Graph from Height Data + \ingroup qtdatavisualization_qmlexamples \brief Using Surface3D in a QML application. - The Qt Quick 2 surface example shows how to make a simple 3D surface plot using Surface3D with - Qt Quick 2. + The surface graph example shows how to make a simple 3D surface plot using Surface3D + with QML. \image qmlsurface-example.png The focus in this example is on generating a surface graph from height data, so in this section we skip explaining the application creation. For more detailed QML example documentation, - see \l{Qt Quick 2 Scatter Example}. + see \l{Simple Scatter Graph}. \include examples-run.qdocinc diff --git a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt b/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt deleted file mode 100644 index d31c1cbf..00000000 --- a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(qmlsurfacelayers LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}") - -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Qml) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS DataVisualization) - -qt_add_executable(qmlsurfacelayers - main.cpp -) -set_target_properties(qmlsurfacelayers PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_link_libraries(qmlsurfacelayers PUBLIC - Qt::Core - Qt::Gui - Qt::Qml - Qt::Quick - Qt::DataVisualization -) - -qt6_add_qml_module(qmlsurfacelayers - URI SurfaceLayers - VERSION 1.0 - NO_RESOURCE_TARGET_PATH - QML_FILES - qml/qmlsurfacelayers/main.qml - RESOURCES - layer_1.png - layer_2.png - layer_3.png -) - -install(TARGETS qmlsurfacelayers - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png b/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png Binary files differdeleted file mode 100644 index c5a48fcb..00000000 --- a/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png +++ /dev/null diff --git a/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc b/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc deleted file mode 100644 index a70d36e1..00000000 --- a/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \example qmlsurfacelayers - \title Qt Quick 2 Surface Multiseries Example - \ingroup qtdatavisualization_examples - \brief Using multiple series with Surface3D in a QML application. - - The Qt Quick 2 surface example shows how to make a 3D surface plot displaying 3 layers using - Surface3D with Qt Quick 2. - - \image qmlsurfacelayers-example.png - - The focus in this example is on generating a multiseries surface plot from 3 different height - map images, so in this section we skip explaining the application creation. For a more detailed - QML example documentation, see \l{Qt Quick 2 Scatter Example}. - - \include examples-run.qdocinc - - \section1 Adding Data to the Graph - - This example shows how to add several surface series to one graph using using - HeightMapSurfaceDataProxies and how to control their visibilities individually. - - Let's start by creating a specific gradient for each layer: - - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 0 - - Then we'll create the series themselves. It happens simply by adding 3 separate Surface3DSeries - to the Surface3D graph as children: - - \dots 0 - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 1 - \dots 0 - - You'll notice we added the created gradients to the \c baseGradient properties of the series. - We could have added them to the \c baseGradients property of the Theme3D in Surface3D instead, - but doing it this way ensures each gradient is applied to a correct series: - - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 2 - \dots - - \section1 Controlling the Graph - - Let's add some checkboxes to control the visibility of layers: - - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 3 - - We don't need to do anything on the \c onCheckedChanged as we bound the \c checked state to - the \c visible property of the series directly: - - \dots 0 - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 4 - \dots 0 - - Let's add some more checkboxes to control how the layers are displayed, when visible: - - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 5 - - In addition to these we have three buttons, one of which is of special interest to us. It is - used to control whether we want to slice into only one layer, or all of them: - - \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 6 - - \section1 Example Contents -*/ diff --git a/examples/datavisualization/qmlsurfacelayers/layer_1.png b/examples/datavisualization/qmlsurfacelayers/layer_1.png Binary files differdeleted file mode 100644 index 9138c710..00000000 --- a/examples/datavisualization/qmlsurfacelayers/layer_1.png +++ /dev/null diff --git a/examples/datavisualization/qmlsurfacelayers/layer_2.png b/examples/datavisualization/qmlsurfacelayers/layer_2.png Binary files differdeleted file mode 100644 index 3af154e2..00000000 --- a/examples/datavisualization/qmlsurfacelayers/layer_2.png +++ /dev/null diff --git a/examples/datavisualization/qmlsurfacelayers/layer_3.png b/examples/datavisualization/qmlsurfacelayers/layer_3.png Binary files differdeleted file mode 100644 index 796df64d..00000000 --- a/examples/datavisualization/qmlsurfacelayers/layer_3.png +++ /dev/null diff --git a/examples/datavisualization/qmlsurfacelayers/main.cpp b/examples/datavisualization/qmlsurfacelayers/main.cpp deleted file mode 100644 index eec92367..00000000 --- a/examples/datavisualization/qmlsurfacelayers/main.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -#include <QtDataVisualization/qutils.h> - -#include <QtGui/QGuiApplication> -#include <QtCore/QDir> -#include <QtQuick/QQuickView> -#include <QtQml/QQmlEngine> - -int main(int argc, char *argv[]) -{ - qputenv("QSG_RHI_BACKEND", "opengl"); - QGuiApplication app(argc, argv); - - QQuickView viewer; - - // Enable antialiasing in direct rendering mode - viewer.setFormat(qDefaultSurfaceFormat(true)); - - // The following are needed to make examples run without having to install the module - // in desktop environments. -#ifdef Q_OS_WIN - QString extraImportPath(QStringLiteral("%1/../../../../%2")); -#else - QString extraImportPath(QStringLiteral("%1/../../../%2")); -#endif - viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(), - QString::fromLatin1("qml"))); - - viewer.setSource(QUrl("qrc:/qml/qmlsurfacelayers/main.qml")); - - viewer.setTitle(QStringLiteral("3-layered Terrain")); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - viewer.show(); - - return app.exec(); -} diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml deleted file mode 100644 index 774bd3f5..00000000 --- a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import QtDataVisualization - -Item { - id: mainview - width: 1280 - height: 720 - - property real fontSize: 12 - property bool portraitMode: width < height - - Item { - id: surfaceView - width: mainview.width - settings.width - height: mainview.height - anchors.right: mainview.right - - //! [0] - ColorGradient { - id: layerOneGradient - ColorGradientStop { position: 0.0; color: "black" } - ColorGradientStop { position: 0.31; color: "tan" } - ColorGradientStop { position: 0.32; color: "green" } - ColorGradientStop { position: 0.40; color: "darkslategray" } - ColorGradientStop { position: 1.0; color: "white" } - } - - ColorGradient { - id: layerTwoGradient - ColorGradientStop { position: 0.315; color: "blue" } - ColorGradientStop { position: 0.33; color: "white" } - } - - ColorGradient { - id: layerThreeGradient - ColorGradientStop { position: 0.0; color: "red" } - ColorGradientStop { position: 0.15; color: "black" } - } - //! [0] - - Surface3D { - id: surfaceLayers - width: surfaceView.width - height: surfaceView.height - theme: Theme3D { - type: Theme3D.ThemeEbony - font.pointSize: 35 - colorStyle: Theme3D.ColorStyleRangeGradient - } - shadowQuality: AbstractGraph3D.ShadowQualityNone - selectionMode: AbstractGraph3D.SelectionRow | AbstractGraph3D.SelectionSlice - scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeft - axisY.min: 20 - axisY.max: 200 - axisX.segmentCount: 5 - axisX.subSegmentCount: 2 - axisX.labelFormat: "%i" - axisZ.segmentCount: 5 - axisZ.subSegmentCount: 2 - axisZ.labelFormat: "%i" - axisY.segmentCount: 5 - axisY.subSegmentCount: 2 - axisY.labelFormat: "%i" - - //! [1] - //! [2] - Surface3DSeries { - id: layerOneSeries - baseGradient: layerOneGradient - //! [2] - HeightMapSurfaceDataProxy { - heightMapFile: ":/layer_1.png" - } - flatShadingEnabled: false - drawMode: Surface3DSeries.DrawSurface - //! [4] - visible: layerOneToggle.checked // bind to checkbox state - //! [4] - } - - Surface3DSeries { - id: layerTwoSeries - baseGradient: layerTwoGradient - HeightMapSurfaceDataProxy { - heightMapFile: ":/layer_2.png" - } - flatShadingEnabled: false - drawMode: Surface3DSeries.DrawSurface - visible: layerTwoToggle.checked // bind to checkbox state - } - - Surface3DSeries { - id: layerThreeSeries - baseGradient: layerThreeGradient - HeightMapSurfaceDataProxy { - heightMapFile: ":/layer_3.png" - } - flatShadingEnabled: false - drawMode: Surface3DSeries.DrawSurface - visible: layerThreeToggle.checked // bind to checkbox state - } - //! [1] - } - } - - Flickable { - id: settings - width: buttonLayout.implicitWidth - contentHeight: buttonLayout.implicitHeight - height: mainview.height - - ColumnLayout { - id: buttonLayout - anchors.top: parent.top - anchors.left: parent.left - spacing: 0 - - //! [3] - GroupBox { - Layout.fillWidth: true - Column { - spacing: 10 - - Label { - font.pointSize: mainview.fontSize - font.bold: true - text: mainview.portraitMode ? "Layer\nSelection" : "Layer Selection" - } - - CheckBox { - id: layerOneToggle - checked: true - text: mainview.portraitMode ? "Show\nGround\nLayer" : "Show Ground Layer" - } - - CheckBox { - id: layerTwoToggle - checked: true - text: mainview.portraitMode ? "Show\nSea\nLayer" : "Show Sea Layer" - } - - CheckBox { - id: layerThreeToggle - checked: true - text: mainview.portraitMode ? "Show\nTectonic\nLayer" : "Show Tectonic Layer" - } - } - } - //! [3] - - //! [5] - GroupBox { - Layout.fillWidth: true - Column { - spacing: 10 - - Label { - font.pointSize: mainview.fontSize - font.bold: true - text: mainview.portraitMode ? "Layer\nStyle" : "Layer Style" - } - - CheckBox { - id: layerOneGrid - text: mainview.portraitMode ? "Show\nGround\nas Grid" : "Show Ground as Grid" - onCheckedChanged: { - if (checked) - layerOneSeries.drawMode = Surface3DSeries.DrawWireframe; - else - layerOneSeries.drawMode = Surface3DSeries.DrawSurface; - } - } - - CheckBox { - id: layerTwoGrid - text: mainview.portraitMode ? "Show\nSea\nas Grid" : "Show Sea as Grid" - - onCheckedChanged: { - if (checked) - layerTwoSeries.drawMode = Surface3DSeries.DrawWireframe; - else - layerTwoSeries.drawMode = Surface3DSeries.DrawSurface; - } - } - - CheckBox { - id: layerThreeGrid - text: mainview.portraitMode ? "Show\nTectonic\nas Grid" - : "Show Tectonic as Grid" - onCheckedChanged: { - if (checked) - layerThreeSeries.drawMode = Surface3DSeries.DrawWireframe; - else - layerThreeSeries.drawMode = Surface3DSeries.DrawSurface; - } - } - } - } - //! [5] - - //! [6] - Button { - id: sliceButton - text: mainview.portraitMode ? "Slice\nAll\nLayers" : "Slice All Layers" - Layout.fillWidth: true - Layout.minimumHeight: 40 - onClicked: { - if (surfaceLayers.selectionMode & AbstractGraph3D.SelectionMultiSeries) { - surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow - | AbstractGraph3D.SelectionSlice - text = mainview.portraitMode ? "Slice\nAll\nLayers" : "Slice All Layers"; - } else { - surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow - | AbstractGraph3D.SelectionSlice - | AbstractGraph3D.SelectionMultiSeries - text = mainview.portraitMode ? "Slice\nOne\nLayer" : "Slice One Layer"; - } - } - } - //! [6] - - Button { - id: shadowButton - Layout.fillWidth: true - Layout.minimumHeight: 40 - text: surfaceLayers.shadowsSupported ? (mainview.portraitMode ? "Show\nShadows" : "Show Shadows") - : (mainview.portraitMode ? "Shadows\nnot\nsupported" : "Shadows not supported") - enabled: surfaceLayers.shadowsSupported - onClicked: { - if (surfaceLayers.shadowQuality === AbstractGraph3D.ShadowQualityNone) { - surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityLow; - text = mainview.portraitMode ? "Hide\nShadows" : "Hide Shadows"; - } else { - surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityNone; - text = mainview.portraitMode ? "Show\nShadows" : "Show Shadows"; - } - } - } - - Button { - id: renderModeButton - text: mainview.portraitMode ? "Switch\nRender\nMode" : "Switch Render Mode" - Layout.fillWidth: true - Layout.minimumHeight: 40 - onClicked: { - var modeText = "Indirect, "; - var aaText; - if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect && - surfaceLayers.msaaSamples === 0) { - surfaceLayers.renderingMode = AbstractGraph3D.RenderDirectToBackground; - modeText = "BackGround, "; - } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect && - surfaceLayers.msaaSamples === 4) { - surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect; - surfaceLayers.msaaSamples = 0; - } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect && - surfaceLayers.msaaSamples === 8) { - surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect; - surfaceLayers.msaaSamples = 4; - } else { - surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect; - surfaceLayers.msaaSamples = 8; - } - - if (surfaceLayers.msaaSamples <= 0) { - aaText = "No AA"; - } else { - aaText = surfaceLayers.msaaSamples + "xMSAA"; - } - - renderLabel.text = modeText + aaText; - } - } - - TextField { - id: renderLabel - font.pointSize: mainview.fontSize - Layout.fillWidth: true - Layout.minimumHeight: 40 - color: "gray" - enabled: false - horizontalAlignment: TextInput.AlignHCenter - wrapMode: TextField.WrapAtWordBoundaryOrAnywhere - text: "Indirect, " + surfaceLayers.msaaSamples + "xMSAA" - } - } - } -} diff --git a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro deleted file mode 100644 index 2bfa904d..00000000 --- a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro +++ /dev/null @@ -1,12 +0,0 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -# The .cpp file which was generated for your project. Feel free to hack it. -SOURCES += main.cpp - -RESOURCES += qmlsurfacelayers.qrc - -OTHER_FILES += doc/src/* \ - doc/images/* \ - qml/qmlsurfacelayers/* diff --git a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc deleted file mode 100644 index 71c2ea33..00000000 --- a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc +++ /dev/null @@ -1,10 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>qml/qmlsurfacelayers/main.qml</file> - </qresource> - <qresource prefix="/heightmaps"> - <file>layer_1.png</file> - <file>layer_2.png</file> - <file>layer_3.png</file> - </qresource> -</RCC> diff --git a/examples/datavisualization/scatter/doc/src/scatter.qdoc b/examples/datavisualization/scatter/doc/src/scatter.qdoc index 82d45df4..6322e9cb 100644 --- a/examples/datavisualization/scatter/doc/src/scatter.qdoc +++ b/examples/datavisualization/scatter/doc/src/scatter.qdoc @@ -3,11 +3,13 @@ /*! \example scatter - \title Scatter Example + \meta tags {DataVisualization, Q3DScatter} + \meta category {Graphics} + \title Scatter Graph \ingroup qtdatavisualization_examples \brief Using Q3DScatter in a widget application. - The scatter example shows how to make a simple 3D scatter graph using Q3DScatter and + The scatter graph example shows how to make a simple 3D scatter graph using Q3DScatter and combining the use of widgets for adjusting several adjustable qualities. The example shows how to: diff --git a/examples/datavisualization/surface/doc/src/surface.qdoc b/examples/datavisualization/surface/doc/src/surface.qdoc index a0fd0f9e..7ee17fa1 100644 --- a/examples/datavisualization/surface/doc/src/surface.qdoc +++ b/examples/datavisualization/surface/doc/src/surface.qdoc @@ -3,7 +3,9 @@ /*! \example surface - \title Surface Example + \meta tags {DataVisualization, Q3DSurface} + \meta category {Graphics} + \title Surface Graph \ingroup qtdatavisualization_examples \brief Using Q3DSurface in a widget application. diff --git a/examples/datavisualization/texturesurface/doc/src/texturesurface.qdoc b/examples/datavisualization/texturesurface/doc/src/texturesurface.qdoc index 77f0044f..887d1b8f 100644 --- a/examples/datavisualization/texturesurface/doc/src/texturesurface.qdoc +++ b/examples/datavisualization/texturesurface/doc/src/texturesurface.qdoc @@ -3,13 +3,15 @@ /*! \example texturesurface - \title Textured Surface Example + \meta tags {DataVisualization, Q3DSurface, Textured Surface} + \meta category {Graphics} + \title Textured Surface Graph \ingroup qtdatavisualization_examples \brief Using texture with Q3DSurface. \since QtDataVisualization 1.2 - The textured surface example shows how to add an image as a texture for a surface. The example - shows also how to: + The textured surface graph example shows how to add an image as a texture for a surface. The + example shows also how to: \list \li Create a surface series from an image @@ -54,7 +56,7 @@ \section1 Use Custom Input Handler to Enable Zooming and Panning - For the panning the implementation is similar to the \l{Axis Range Dragging With Labels Example}. + For the panning the implementation is similar to the \l{Input Handling for Axes}. The difference is that in this example we follow only dragging of X and Z axis and we don't allow dragging the surface outside the graph. The control for this is very simple and done as on the following example for the X axis. diff --git a/examples/datavisualization/volumetric/doc/src/volumetric.qdoc b/examples/datavisualization/volumetric/doc/src/volumetric.qdoc index ec45b631..ed177c87 100644 --- a/examples/datavisualization/volumetric/doc/src/volumetric.qdoc +++ b/examples/datavisualization/volumetric/doc/src/volumetric.qdoc @@ -3,7 +3,9 @@ /*! \example volumetric - \title Volumetric rendering Example + \meta tags {DataVisualization, QCustom3DVolume, Custom Item} + \meta category {Graphics} + \title Volumetric Rendering \ingroup qtdatavisualization_examples \brief Rendering volumetric objects. \since QtDataVisualization 1.2 |