aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprojectmanager/qmlproject.h
diff options
context:
space:
mode:
authorTobias Hunger <[email protected]>2010-02-08 15:50:06 +0100
committerTobias Hunger <[email protected]>2010-02-09 16:57:37 +0100
commitd1bdfcc363970eca53077cdab79de2d3cf24218a (patch)
tree100cc0dc41f660b72277fa018c8a46454d0686b4 /src/plugins/qmlprojectmanager/qmlproject.h
parent8ee2521fe53cec55534b079b0d5b21b6b028676f (diff)
Integrate target support
* Ease cross device development by introducing 'targets' which group build- and runsettings that are valid for this one target Most of the kudos for the code review go to dt. Con, thorbjorn, ckandler and others did also review parts of this patch. Reviewed-by: dt
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlproject.h')
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.h57
1 files changed, 26 insertions, 31 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h
index b229221f196..cd9edd84f92 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.h
+++ b/src/plugins/qmlprojectmanager/qmlproject.h
@@ -33,6 +33,7 @@
#include "qmlprojectmanager.h"
#include "qmlprojectnodes.h"
#include "qmlprojectmanager_global.h"
+#include "qmltarget.h"
#include "fileformat/qmlprojectitem.h"
#include <projectexplorer/project.h>
@@ -55,8 +56,6 @@ class QmlRunConfiguration;
namespace Internal {
-class QmlMakeStep;
-
class QmlProjectFile : public Core::IFile
{
Q_OBJECT
@@ -89,22 +88,17 @@ class QmlRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFact
public:
explicit QmlRunConfigurationFactory(QObject *parent = 0);
- virtual ~QmlRunConfigurationFactory();
-
- // used to show the list of possible additons to a project, returns a list of types
- virtual QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
- // used to translate the types to names to display to the user
- virtual QString displayNameForId(const QString &id) const;
+ ~QmlRunConfigurationFactory();
- virtual bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &id);
+ QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const QString &id) const;
- // used to recreate the runConfigurations when restoring settings
- virtual bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
- virtual ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
-
- virtual bool canClone(ProjectExplorer::Project *parent, ProjectExplorer::RunConfiguration *source) const;
- virtual ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Project *parent, ProjectExplorer::RunConfiguration *source);
+ bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
+ ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
+ bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
+ ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source);
};
class QmlRunControl : public ProjectExplorer::RunControl {
@@ -157,22 +151,22 @@ public:
QString filesFileName() const;
- virtual QString displayName() const;
- virtual QString id() const;
- virtual Core::IFile *file() const;
- virtual Internal::Manager *projectManager() const;
- virtual ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
+ QString displayName() const;
+ QString id() const;
+ Core::IFile *file() const;
+ Internal::Manager *projectManager() const;
+ Internal::QmlTargetFactory *targetFactory() const;
+ Internal::QmlTarget *activeTarget() const;
- virtual QList<ProjectExplorer::Project *> dependsOn();
+ QList<ProjectExplorer::Project *> dependsOn();
- virtual bool isApplication() const;
- virtual bool hasBuildSettings() const;
+ bool isApplication() const;
- virtual ProjectExplorer::BuildConfigWidget *createConfigWidget();
- virtual QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
+ ProjectExplorer::BuildConfigWidget *createConfigWidget();
+ QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
- virtual Internal::QmlProjectNode *rootProjectNode() const;
- virtual QStringList files(FilesMode fileMode) const;
+ Internal::QmlProjectNode *rootProjectNode() const;
+ QStringList files(FilesMode fileMode) const;
enum RefreshOption {
ProjectFile = 0x01,
@@ -215,6 +209,7 @@ private:
ProjectExplorer::FileWatcher *m_fileWatcher;
Internal::QmlProjectNode *m_rootNode;
+ Internal::QmlTargetFactory *m_targetFactory;
};
class QMLPROJECTMANAGER_EXPORT QmlRunConfiguration : public ProjectExplorer::RunConfiguration
@@ -223,10 +218,10 @@ class QMLPROJECTMANAGER_EXPORT QmlRunConfiguration : public ProjectExplorer::Run
friend class Internal::QmlRunConfigurationFactory;
public:
- QmlRunConfiguration(QmlProject *parent);
+ QmlRunConfiguration(Internal::QmlTarget *parent);
virtual ~QmlRunConfiguration();
- QmlProject *qmlProject() const;
+ Internal::QmlTarget *qmlTarget() const;
QString viewerPath() const;
QStringList viewerArguments() const;
@@ -246,7 +241,7 @@ private slots:
void onDebugServerPortChanged();
protected:
- QmlRunConfiguration(QmlProject *parent, QmlRunConfiguration *source);
+ QmlRunConfiguration(Internal::QmlTarget *parent, QmlRunConfiguration *source);
virtual bool fromMap(const QVariantMap &map);
private: