13 #ifndef __STARTCENTER_H__ 14 #define __STARTCENTER_H__ 18 #include "ui_startcenter.h" 24 class MyWebUrlRequestInterceptor :
public QWebEngineUrlRequestInterceptor {
28 MyWebUrlRequestInterceptor(QObject* p = Q_NULLPTR)
29 : QWebEngineUrlRequestInterceptor(p) {}
31 void interceptRequest(QWebEngineUrlRequestInfo& info)
33 info.setHttpHeader(
"Accept-Language",
34 QString(
"%1;q=0.8,en-US;q=0.6,en;q=0.4").arg(
mscore->getLocaleISOCode()).toUtf8());
42 class MyWebEnginePage :
public QWebEnginePage {
46 MyWebEnginePage(QObject* parent = Q_NULLPTR)
47 : QWebEnginePage(parent) {}
49 bool acceptNavigationRequest(
const QUrl& url, QWebEnginePage::NavigationType type,
bool isMainFrame);
56 class MyWebView :
public QWebEngineView {
62 MyWebView(QWidget* parent = 0);
64 virtual QSize sizeHint()
const;
67 #endif //USE_WEBENGINE 78 virtual void closeEvent(QCloseEvent*);
81 void loadScore(QString);
83 void openScoreClicked();
94 void updateRecentScores();
97 void keyPressEvent(QKeyEvent*)
override;
98 void keyReleaseEvent(QKeyEvent*)
override;
101 #endif //__STARTCENTER_H__
Definition: abstractdialog.h:29
Definition: aeolus.cpp:26
Definition: startcenter.h:73
virtual void retranslate()
Definition: startcenter.h:86
MScore * mscore
Definition: musescore.cpp:171