summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebenginefindtextresult.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/api/qwebenginefindtextresult.h')
-rw-r--r--src/core/api/qwebenginefindtextresult.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/api/qwebenginefindtextresult.h b/src/core/api/qwebenginefindtextresult.h
new file mode 100644
index 000000000..d506a50f5
--- /dev/null
+++ b/src/core/api/qwebenginefindtextresult.h
@@ -0,0 +1,46 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QWEBENGINEFINDTEXTRESULT_H
+#define QWEBENGINEFINDTEXTRESULT_H
+
+#include <QtWebEngineCore/qtwebenginecoreglobal.h>
+#include <QtCore/qobject.h>
+#include <QtCore/qshareddata.h>
+
+namespace QtWebEngineCore {
+class FindTextHelper;
+}
+
+QT_BEGIN_NAMESPACE
+
+class QWebEngineFindTextResultPrivate;
+
+class Q_WEBENGINECORE_EXPORT QWebEngineFindTextResult
+{
+ Q_GADGET
+ Q_PROPERTY(int numberOfMatches READ numberOfMatches CONSTANT FINAL)
+ Q_PROPERTY(int activeMatch READ activeMatch CONSTANT FINAL)
+
+public:
+ int numberOfMatches() const;
+ int activeMatch() const;
+
+ QWebEngineFindTextResult();
+ QWebEngineFindTextResult(const QWebEngineFindTextResult &other);
+ QWebEngineFindTextResult &operator=(const QWebEngineFindTextResult &other);
+ ~QWebEngineFindTextResult();
+
+private:
+ QWebEngineFindTextResult(int numberOfMatches, int activeMatch);
+
+ QSharedDataPointer<QWebEngineFindTextResultPrivate> d;
+
+ friend class QtWebEngineCore::FindTextHelper;
+};
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(QWebEngineFindTextResult)
+
+#endif // QWEBENGINEFINDTEXTRESULT_H