df114f189c
1) fix some bugs which appear in runtime: replace QString::tostdstring() to Foo.toUtf8().constData(). 2) Enable start center online community. To use it you need download webengine in your QT lib. see instruction https://musescore.org/en/handbook/developers-handbook/compilation/compile-instructions-windows-visual-studio-2017-wip 3) update install steps. Add additional dlls for webEngine. Add copying dlls and musescore.exe to /msvc.install/bin folder. Run project will work with the "$(ProjectDir)\..\..\msvc.install\bin\MuseScore.exe" specified in Debugging field in mscore project 4) Moving AppVeyor from MinGW to MSVC. Exclude ALL MSVC project from INSTALL project. Exclude ALL from PACKAGE. Remove migw-cmake in script build, add .bat instead. Remove xcopy from 7z archive step 5) Fix warning : Warning C4703 potentially uninitialized local pointer variable '' used; Warning C4456 declaration of '' hides previous local declaration; Warning C4458 declaration of '' hides class member 6) Change path to 11 version wix toolset which created .msi installer package
99 lines
2.6 KiB
C++
99 lines
2.6 KiB
C++
//=============================================================================
|
|
// MuseScore
|
|
// Music Composition & Notation
|
|
//
|
|
// Copyright (C) 2014-2016 Werner Schweer
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License version 2
|
|
// as published by the Free Software Foundation and appearing in
|
|
// the file LICENCE.GPL
|
|
//=============================================================================
|
|
|
|
#ifndef __STARTCENTER_H__
|
|
#define __STARTCENTER_H__
|
|
|
|
#include "config.h"
|
|
#include "abstractdialog.h"
|
|
#include "ui_startcenter.h"
|
|
|
|
namespace Ms {
|
|
|
|
#ifdef USE_WEBENGINE
|
|
|
|
class MyWebUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MyWebUrlRequestInterceptor(QObject* p = Q_NULLPTR)
|
|
: QWebEngineUrlRequestInterceptor(p) {}
|
|
|
|
void interceptRequest(QWebEngineUrlRequestInfo& info)
|
|
{
|
|
info.setHttpHeader("Accept-Language",
|
|
QString("%1;q=0.8,en-US;q=0.6,en;q=0.4").arg(mscore->getLocaleISOCode()).toUtf8());
|
|
}
|
|
};
|
|
|
|
//---------------------------------------------------------
|
|
// MyWebEnginePage
|
|
//---------------------------------------------------------
|
|
|
|
class MyWebEnginePage : public QWebEnginePage {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MyWebEnginePage(QObject* parent = Q_NULLPTR)
|
|
: QWebEnginePage(parent) {}
|
|
|
|
bool acceptNavigationRequest(const QUrl& url, QWebEnginePage::NavigationType type, bool isMainFrame);
|
|
};
|
|
|
|
//---------------------------------------------------------
|
|
// MyWebEngineView
|
|
//---------------------------------------------------------
|
|
|
|
class MyWebView : public QWebEngineView {
|
|
Q_OBJECT
|
|
|
|
public slots:
|
|
|
|
public:
|
|
MyWebView(QWidget* parent = 0);
|
|
~MyWebView();
|
|
virtual QSize sizeHint() const;
|
|
};
|
|
|
|
#endif //USE_WEBENGINE
|
|
|
|
//---------------------------------------------------------
|
|
// Startcenter
|
|
//---------------------------------------------------------
|
|
|
|
class Startcenter : public AbstractDialog, public Ui::Startcenter {
|
|
Q_OBJECT
|
|
#ifdef USE_WEBENGINE
|
|
MyWebView* _webView;
|
|
#endif
|
|
virtual void closeEvent(QCloseEvent*);
|
|
|
|
private slots:
|
|
void loadScore(QString);
|
|
void newScore();
|
|
void openScoreClicked();
|
|
|
|
protected:
|
|
virtual void retranslate() { retranslateUi(this); }
|
|
|
|
signals:
|
|
void closed(bool);
|
|
|
|
public:
|
|
Startcenter();
|
|
~Startcenter();
|
|
void updateRecentScores();
|
|
void writeSettings();
|
|
void readSettings();
|
|
};
|
|
}
|
|
#endif //__STARTCENTER_H__
|