// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \module QtProtobufQtCoreTypes
    \modulestate Technical Preview
    \title Protobuf Qt Core Types Module
    \ingroup frameworks-technologies
    \qtcmakepackage ProtobufQtCoreTypes
    \qtvariable protobufqtcoretypes
    \since 6.6

    \brief Provides support for using native Qt Core types in protobuf.

    Qt::ProtobufQtCoreTypes is a library with pre-defined protobuf messages
    designed to encapsulate a selection of Qt Core types.

    List of supported Qt Core types:
    \list
        \li QByteArray \note Type reflects the \e bytes protobuf type.
        \li QChar
        \li QDate
        \li QTimeZone
        \li QDateTime
        \li QPoint
        \li QPointF
        \li QRect
        \li QRectF
        \li QSize
        \li QSizeF
        \li QString \note Type reflects the \e string protobuf type.
        \li QTime
        \li QUrl
        \li QUuid
        \li QVersionNumber
    \endlist

    \section1 Qt Core usage
    To enable Qt Core types support, add ProtobufQtCoreTypes as a dependency
    to your CMake project:
    \badcode
        ...
        find_package(Qt REQUIRED COMPONENTS Protobuf ProtobufQtCoreTypes)
        ... # After target creation
        target_link_libraries(${TARGET} PRIVATE Qt::ProtobufQtCoreTypes)
    \endcode

    Before any serialization or deserialization of messages that use Qt Core
    types as fields, call the registration method:
    \code
        // e.g. in main.cpp
        QtProtobuf::qRegisterProtobufQtCoreTypes();
        ...
    \endcode

    All supported messages are described in a special .proto file,
    \e {QtCore.proto}, that describes Qt types from the Qt Core module.

    You can also use the file to generate code for other
    languages or frameworks.

    Import the required Qt Core types module in your interface .proto file.
    For example:
    \badcode
        syntax = "proto3";

        package project.module.component;

        import "QtCore/QtCore.proto";

        message QUrlMessage {
            QtCore.QUrl url = 1;
        }
    \endcode

    The Qt Protobuf generator detects Qt Core types, supplied by the
    ProtobufQtCoreTypes package, and uses them directly. This gives
    you the flexibility to use these types without additional conversion.
*/
