/* * File: QCefEvent.h * Project: QCefView * Created: 29th March 2016 * Author: Sheen * Source: https://github.com/cefview/qcefview * Docs: https://cefview.github.io/QCefView/ */ #ifndef QCEFEVENT_H #define QCEFEVENT_H #pragma once #include #pragma region qt_headers #include #include #include #pragma endregion class QCefEventPrivate; /// /// Represents the event sent from native context(C/C++ code) to the web context(javascript) /// class QCEFVIEW_EXPORT QCefEvent { Q_DECLARE_PRIVATE(QCefEvent) QScopedPointer d_ptr; friend class QCefView; public: /// /// Constructs an event instance /// QCefEvent(); /// /// Constructs an event instance with name /// /// The event name QCefEvent(const QString& name); /// /// Constructs an event instance from existing one /// /// The other event instance QCefEvent(const QCefEvent& other); /// /// Assigns an existing event instance to current /// /// The other event instance QCefEvent& operator=(const QCefEvent& other); /// /// Destructs the event instance /// ~QCefEvent(); /// /// Sets the event name /// /// The name to be set void setEventName(const QString& name); /// /// Gets the event name /// /// The event name const QString eventName() const; /// /// Sets the argument list /// /// The argument list void setArguments(const QVariantList& args); /// /// Gets the argument list /// /// The argument list QVariantList& arguments(); }; Q_DECLARE_METATYPE(QCefEvent); #endif // QCEFEVENT_H