forked from qt-creator/qt-creator
The template code is similar to the Qt Quick App wizard template code. It has a Viewer class +.pri which wrap the "dirty stuff", a main .pro file and main.cpp file. In this case, there is also a "Hello World" index.html file. The "dirty stuff" code exposes a quit() function to the JavaScript in the webview, which can be triggerd via the index.html. As the 1-line-summary of this commit states, it is a dummy. Some- one with proper knowlede about QtWebkit please provide better template code. Task-Number: QTCREATORBUG-3284
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/*
|
|
This file was generated by the Html5 Application wizard of Qt Creator.
|
|
Html5ApplicationViewer is a convenience class containing mobile device specific
|
|
code such as screen orientation handling.
|
|
It is recommended not to modify this file, since newer versions of Qt Creator
|
|
may offer an updated version of it.
|
|
*/
|
|
|
|
#ifndef HTML5APPLICATIONVIEWER_H
|
|
#define HTML5APPLICATIONVIEWER_H
|
|
|
|
#include <QtGui/QWidget>
|
|
#include <QtCore/QUrl>
|
|
|
|
class QGraphicsWebView;
|
|
|
|
class Html5ApplicationViewer : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum ScreenOrientation {
|
|
ScreenOrientationLockPortrait,
|
|
ScreenOrientationLockLandscape,
|
|
ScreenOrientationAuto
|
|
};
|
|
|
|
explicit Html5ApplicationViewer(QWidget *parent = 0);
|
|
virtual ~Html5ApplicationViewer();
|
|
|
|
void loadFile(const QString &fileName);
|
|
void loadUrl(const QUrl &url);
|
|
|
|
void setOrientation(ScreenOrientation orientation);
|
|
void showExpanded();
|
|
|
|
QGraphicsWebView *webView() const;
|
|
|
|
private:
|
|
class Html5ApplicationViewerPrivate *m_d;
|
|
};
|
|
|
|
#endif // HTML5APPLICATIONVIEWER_H
|