2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 2.1.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef CRUNCONFIGURATION_H
19
#define CRUNCONFIGURATION_H
23
namespace CordovaUbuntuProjectManager {
25
class CRunConfiguration : public ProjectExplorer::RunConfiguration {
28
CRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) : ProjectExplorer::RunConfiguration(parent, id) {}
30
QWidget *createConfigurationWidget() {
34
bool isEnabled() const {
38
ProjectExplorer::Abi Qabi() const {
39
ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi();
40
return ProjectExplorer::Abi(hostAbi.architecture(), hostAbi.os(), hostAbi.osFlavor(),
41
ProjectExplorer::Abi::RuntimeQmlFormat, hostAbi.wordWidth());
44
~CRunConfiguration() {}
47
class CRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory {
51
explicit CRunConfigurationFactory() {
52
setObjectName(QLatin1String("CRunConfigurationFactory"));
55
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
56
QString displayNameForId(const Core::Id id) const;
58
bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
59
ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
60
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
61
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
62
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
63
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source);
66
bool canHandle(ProjectExplorer::Target *parent) const;