~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta

« back to all changes in this revision

Viewing changes to src/cordovaubuntuprojectmanager/crunconfiguration.h

  • Committer: Juhapekka Piiroinen
  • Date: 2013-09-04 15:30:00 UTC
  • mto: (23.1.14 binary-plugin)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: juhapekka.piiroinen@canonical.com-20130904153000-r4lhfhrjlwmop277
Added cordova plugin from ubuntu-qtcreator-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 *
 
16
 */
 
17
 
 
18
#ifndef CRUNCONFIGURATION_H
 
19
#define CRUNCONFIGURATION_H
 
20
 
 
21
#include "common.h"
 
22
 
 
23
namespace CordovaUbuntuProjectManager {
 
24
 
 
25
class CRunConfiguration : public ProjectExplorer::RunConfiguration {
 
26
    Q_OBJECT
 
27
public:
 
28
    CRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) : ProjectExplorer::RunConfiguration(parent, id) {}
 
29
 
 
30
    QWidget *createConfigurationWidget() {
 
31
        return NULL;
 
32
    }
 
33
 
 
34
    bool isEnabled() const {
 
35
        return true;
 
36
    }
 
37
 
 
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());
 
42
    }
 
43
 
 
44
    ~CRunConfiguration() {}
 
45
};
 
46
 
 
47
class CRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory {
 
48
    Q_OBJECT
 
49
 
 
50
public:
 
51
    explicit CRunConfigurationFactory() {
 
52
        setObjectName(QLatin1String("CRunConfigurationFactory"));
 
53
    }
 
54
 
 
55
    QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
 
56
    QString displayNameForId(const Core::Id id) const;
 
57
 
 
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);
 
64
 
 
65
private:
 
66
    bool canHandle(ProjectExplorer::Target *parent) const;
 
67
};
 
68
 
 
69
 
 
70
}
 
71
 
 
72
#endif