diff --git a/src/jsapi/barcode.h b/src/jsapi/barcode.h index 366f333..bce0cf6 100644 --- a/src/jsapi/barcode.h +++ b/src/jsapi/barcode.h @@ -1,52 +1,52 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef KITINERARY_JSAPI_BARCODE_H #define KITINERARY_JSAPI_BARCODE_H #include namespace KItinerary { namespace JsApi { /** Barcode decoding functions. */ class Barcode : public QObject { Q_OBJECT public: /** Decode a PDF417 barcode image. - * @param img An image containing the barcode, e.g. a PDFImage instance. + * @param img An image containing the barcode, e.g. a PdfImage instance. */ Q_INVOKABLE QString decodePdf417(const QVariant &img) const; /** Decode a Aztec barcode image. - * @param img An image containing the barcode, e.g. a PDFImage instance. + * @param img An image containing the barcode, e.g. a PdfImage instance. */ Q_INVOKABLE QString decodeAztec(const QVariant &img) const; /** Decode a Aztec barcode image containing binary data. - * @param img An image containing the barcode, e.g. a PDFImage instance. + * @param img An image containing the barcode, e.g. a PdfImage instance. */ Q_INVOKABLE QString decodeAztecBinary(const QVariant &img) const; /** Decode an UIC 918.3 message from a train ticket Aztec code. * @returns An instance of Uic9183Parser. */ Q_INVOKABLE QVariant decodeUic9183(const QString &s) const; }; } } #endif // KITINERARY_JSAPI_BARCODE_H diff --git a/src/jsapi/context.h b/src/jsapi/context.h index 663bbd0..4d84ef0 100644 --- a/src/jsapi/context.h +++ b/src/jsapi/context.h @@ -1,51 +1,53 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef KITINERARY_JSAPI_CONTEXT_H #define KITINERARY_JSAPI_CONTEXT_H #include #include namespace KItinerary { -/** JavaScript API exposed to extractor scripts. */ +/** JavaScript API exposed to extractor scripts. + * @see ExtractorEngine + */ namespace JsApi { /** The extraction context. * This object contains information about what is being extracted, * or where the extracted information is coming from. */ class Context : public QObject { Q_OBJECT /** The time the email containing the extracted data was sent. * This can be useful if the extracted data only contains dates without * specifying a year. The year can then be infered out of this context. */ Q_PROPERTY(QDateTime senderDate MEMBER m_senderDate) public: ///@cond internal QDateTime m_senderDate; ///@endcond }; } } #endif // KITINERARY_JSAPI_CONTEXT_H diff --git a/src/jsapi/jsonld.h b/src/jsapi/jsonld.h index 165dfed..d675143 100644 --- a/src/jsapi/jsonld.h +++ b/src/jsapi/jsonld.h @@ -1,61 +1,63 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef KITINERARY_JSAPI_JSONLD_H #define KITINERARY_JSAPI_JSONLD_H #include class QJSEngine; class QJSValue; namespace KItinerary { namespace JsApi { /** Methods to create JSON-LD objects. */ class JsonLd : public QObject { Q_OBJECT public: + ///@cond internal explicit JsonLd(QJSEngine *engine); ~JsonLd(); + ///@endcond - /** Create a new JSON-LD object of type @typeName. */ + /** Create a new JSON-LD object of type @p typeName. */ Q_INVOKABLE QJSValue newObject(const QString &typeName) const; /** Convert a date/time string to a date/time value. * @param dtStr The input string containing a date/time value. * @param format The format of the input string. Same format specification as * used by QLocale and QDateTime. * @param localeName The locale in which the string is formatted. This is * relevant when the input contains for example localized month names or * month abbreviations. */ Q_INVOKABLE QDateTime toDateTime(const QString &dtStr, const QString &format, const QString &localeName) const; /** Convert object @p v to a JSON-LD object. * This is useful when interacting with API returning regular data types, * such as Uic9183Parser. */ Q_INVOKABLE QJSValue toJson(const QVariant &v) const; private: QJSEngine *m_engine; }; } } #endif // KITINERARY_JSAPI_JSONLD_H