#ifndef HTML5GUIDISPLAY_H
#define HTML5GUIDISPLAY_H
#if defined(QCS_QTHTML)
#include
#include
#include
#include "csoundhtmlwrapper.h"
#include "CsoundHtmlOnlyWrapper.h"
#ifdef USE_WEBKIT
#include
#include
#include
#include
#endif
#ifdef USE_WEBENGINE
#include
#include
#include
#endif
#include
namespace Ui {
class Html5GuiDisplay;
}
class DocumentPage;
class CsoundHtmlView : public QDockWidget
{
Q_OBJECT
public:
explicit CsoundHtmlView(QWidget *parent = 0);
~CsoundHtmlView();
void loadFromUrl(const QUrl &url);
void load(DocumentPage *documentPage);
void stop();
void setCsoundEngine(CsoundEngine *csEngine);
void clear();
void setOptions(CsoundOptions * options);
#ifdef USE_WEBKIT
QWebView *webView;
#endif
#ifdef USE_WEBENGINE
QWebChannel channel ; // Channel for C++ to Javascript communications
QWebEngineView *webView;
#endif
public slots:
#ifdef USE_WEBKIT
void addJSObject();
#endif
#ifdef USE_WEBENGINE
void showDebugWindow();
#endif
void removeTemporaryHtmlFile(bool ok);
private:
Ui::Html5GuiDisplay *ui;
std::atomic documentPage;
// For performing CSD files with embedded element.
CsoundHtmlWrapper csoundHtmlWrapper;
// For performing HTML files (HTML-only performance).
CsoundHtmlOnlyWrapper csoundHtmlOnlyWrapper;
CsoundEngine *m_csoundEngine;
//QTemporaryFile tempHtml;
QFile htmlFile;
CsoundOptions * m_options;
#ifdef USE_WEBENGINE
QString m_debugPort;
#endif
};
#endif
#endif // HTML5GUIDISPLAY_H