-
This commit is contained in:
@@ -13,7 +13,16 @@ class WebviewWindow : public QMainWindow
|
||||
private:
|
||||
Rktwebview_qt *_container;
|
||||
WebViewQt *_view;
|
||||
QTimer _process_js_events;
|
||||
QMainWindow *_devtools;
|
||||
|
||||
QTimer _resize_timer;
|
||||
QTimer _move_timer;
|
||||
|
||||
int _x;
|
||||
int _y;
|
||||
int _w;
|
||||
int _h;
|
||||
bool _must_close;
|
||||
|
||||
public slots:
|
||||
void processJsEvents();
|
||||
@@ -22,14 +31,31 @@ protected:
|
||||
void closeEvent(QCloseEvent *evt);
|
||||
|
||||
public:
|
||||
void addView(WebViewQt *v, Rktwebview_qt *c);
|
||||
void closeView();
|
||||
|
||||
public:
|
||||
void addView(WebViewQt *v, Rktwebview_qt *c);
|
||||
WebViewQt *view();
|
||||
|
||||
public:
|
||||
void runJs(const QString &js);
|
||||
void openDevTools();
|
||||
|
||||
public:
|
||||
explicit WebviewWindow(QWidget *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void triggerResize();
|
||||
void triggerMove();
|
||||
|
||||
signals:
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
void moveEvent(QMoveEvent *event);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
};
|
||||
|
||||
#endif // WEBVIEWWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user