Files
qt-creator/src/plugins/qmljstools/qmljsmodelmanager.h

90 lines
3.0 KiB
C
Raw Normal View History

/****************************************************************************
2009-09-04 16:51:11 +02:00
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
2009-09-04 16:51:11 +02:00
**
** This file is part of Qt Creator.
2009-09-04 16:51:11 +02:00
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
2009-09-04 16:51:11 +02:00
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
2009-09-04 16:51:11 +02:00
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
2010-12-17 16:01:08 +01:00
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
2009-09-04 16:51:11 +02:00
2010-02-15 13:49:00 +01:00
#ifndef QMLJSMODELMANAGER_H
#define QMLJSMODELMANAGER_H
2009-09-04 16:51:11 +02:00
#include "qmljstools_global.h"
2010-06-09 15:56:03 +02:00
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsqrcparser.h>
#include <qmljs/qmljsconstants.h>
2011-01-20 14:03:07 +01:00
#include <cplusplus/CppDocument.h>
#include <utils/qtcoverride.h>
#include <QFuture>
#include <QFutureSynchronizer>
#include <QMutex>
2009-09-04 16:51:11 +02:00
QT_FORWARD_DECLARE_CLASS(QTimer)
QT_FORWARD_DECLARE_CLASS(QLocale)
namespace Core { class MimeType; }
2009-09-04 16:51:11 +02:00
namespace CPlusPlus { class CppModelManagerInterface; }
namespace QmlJS { class QrcParser; }
namespace QmlJSTools {
2009-09-04 16:51:11 +02:00
namespace Internal {
class PluginDumper;
class QMLJSTOOLS_EXPORT ModelManager: public QmlJS::ModelManagerInterface
2009-09-04 16:51:11 +02:00
{
Q_OBJECT
public:
2010-02-15 13:49:00 +01:00
ModelManager(QObject *parent = 0);
~ModelManager();
2009-09-04 16:51:11 +02:00
void delayedInitialization();
2009-09-04 16:51:11 +02:00
protected:
QHash<QString, QmlJS::Language::Enum> languageForSuffix() const QTC_OVERRIDE;
void writeMessageInternal(const QString &msg) const QTC_OVERRIDE;
WorkingCopy workingCopyInternal() const QTC_OVERRIDE;
void addTaskInternal(QFuture<void> result, const QString &msg, const char *taskId) const QTC_OVERRIDE;
ProjectInfo defaultProjectInfoForProject(ProjectExplorer::Project *project) const QTC_OVERRIDE;
private slots:
void updateDefaultProjectInfo();
2009-09-04 16:51:11 +02:00
private:
void loadDefaultQmlTypeDescriptions();
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
2009-09-04 16:51:11 +02:00
};
} // namespace Internal
QMLJSTOOLS_EXPORT void setupProjectInfoQmlBundles(QmlJS::ModelManagerInterface::ProjectInfo &projectInfo);
} // namespace QmlJSTools
2009-09-04 16:51:11 +02:00
2010-02-15 13:49:00 +01:00
#endif // QMLJSMODELMANAGER_H