Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickitemgrabresult.h
Go to the documentation of this file.
1// Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKITEMGRABRESULT_H
5#define QQUICKITEMGRABRESULT_H
6
7#include <QtCore/QObject>
8#include <QtCore/QSize>
9#include <QtCore/QUrl>
10#include <QtGui/QImage>
11#include <QtQml/QJSValue>
12#include <QtQml/qqml.h>
13#include <QtQuick/qtquickglobal.h>
14
16
17class QImage;
18
20
21class Q_QUICK_EXPORT QQuickItemGrabResult : public QObject
22{
24 Q_DECLARE_PRIVATE(QQuickItemGrabResult)
25
27 Q_PROPERTY(QUrl url READ url CONSTANT)
30
31public:
32 QImage image() const;
33 QUrl url() const;
34
35#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
36#if QT_DEPRECATED_SINCE(5, 15)
37 QT_DEPRECATED_X("This overload is deprecated. Use the const member function instead")
38 Q_INVOKABLE bool saveToFile(const QString &fileName);
39#endif
40#endif
41 Q_INVOKABLE bool saveToFile(const QString &fileName) const;
42 Q_REVISION(6, 2) Q_INVOKABLE bool saveToFile(const QUrl &fileName) const;
43
44protected:
45 bool event(QEvent *) override;
46
48 void ready();
49
51 void setup();
52 void render();
53
55 friend class QQuickItem;
56
57 QQuickItemGrabResult(QObject *parent = nullptr);
58};
59
61
62#endif
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore
Definition qobject.h:103
Q_REVISION(6, 2) Q_INVOKABLE bool saveToFile(const QUrl &fileName) const
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
Definition image.cpp:4
struct _cl_event * event
#define QML_ANONYMOUS
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_DEPRECATED_X(text)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
QUrl url("example.com")
[constructor-url-reference]
myWidget render(this)