forked from qt-creator/qt-creator
QmlPreview: A dedicated class for the QmlPreviewRunWorkerFactory
Change-Id: I994f339ac1ca35e9b1dc7e2572682c4bcdb485ea Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -15,15 +15,18 @@
|
||||
|
||||
namespace Core { class IEditor; }
|
||||
|
||||
namespace ProjectExplorer { class RunControl; }
|
||||
|
||||
namespace QmlDebug { class QmlDebugConnection; }
|
||||
|
||||
namespace QmlPreview {
|
||||
|
||||
typedef bool (*QmlPreviewFileClassifier) (const QString &);
|
||||
typedef QByteArray (*QmlPreviewFileLoader)(const QString &, bool *);
|
||||
typedef void (*QmlPreviewFpsHandler)(quint16[8]);
|
||||
typedef QList<ProjectExplorer::RunControl *> QmlPreviewRunControlList;
|
||||
typedef std::function<std::unique_ptr<QmlDebugTranslationClient>(QmlDebug::QmlDebugConnection *)> QmlDebugTranslationClientCreator;
|
||||
using QmlPreviewFileClassifier = bool (*)(const QString &);
|
||||
using QmlPreviewFileLoader = QByteArray (*)(const QString &, bool *);
|
||||
using QmlPreviewFpsHandler = void (*)(quint16[8]);
|
||||
using QmlPreviewRunControlList = QList<ProjectExplorer::RunControl *>;
|
||||
using QmlDebugTranslationClientCreator =
|
||||
std::function<std::unique_ptr<QmlDebugTranslationClient>(QmlDebug::QmlDebugConnection *)>;
|
||||
|
||||
class QMLPREVIEW_EXPORT QmlPreviewPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
@@ -70,6 +73,10 @@ public:
|
||||
|
||||
void setQmlDebugTranslationClientCreator(QmlDebugTranslationClientCreator creator);
|
||||
|
||||
void previewCurrentFile();
|
||||
void addPreview(ProjectExplorer::RunControl *preview);
|
||||
void removePreview(ProjectExplorer::RunControl *preview);
|
||||
|
||||
signals:
|
||||
void checkDocument(const QString &name, const QByteArray &contents,
|
||||
QmlJS::Dialect::Enum dialect);
|
||||
|
||||
Reference in New Issue
Block a user