File indexing completed on 2024-05-12 04:33:33
0001 /* 0002 SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org> 0003 SPDX-FileCopyrightText: 2008 Harri Porten <porten@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef OKULAR_SCRIPT_JS_UTIL_P_H 0009 #define OKULAR_SCRIPT_JS_UTIL_P_H 0010 0011 #include <QJSValue> 0012 #include <QObject> 0013 0014 namespace Okular 0015 { 0016 class JSUtil : public QObject 0017 { 0018 Q_OBJECT 0019 public: 0020 Q_INVOKABLE QJSValue crackURL(const QString &cURL) const; 0021 Q_INVOKABLE QJSValue printd(const QJSValue &oFormat, const QDateTime &oDate) const; 0022 Q_INVOKABLE double stringToNumber(const QString &number) const; 0023 Q_INVOKABLE QString numberToString(double number, const QString &fmt = QStringLiteral("g"), int precision = 6, const QString &localeName = {}) const; 0024 }; 0025 0026 } 0027 0028 #endif