~ubuntu-branches/ubuntu/trusty/qtcreator-plugin-ubuntu/trusty

« back to all changes in this revision

Viewing changes to src/ubuntu/ubunturemotedeployconfiguration.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Benjamin Zeller
  • Date: 2014-04-10 16:54:54 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140410165454-j9syoh0jx6azy7g1
Tags: 3.0.1+14.04.20140410.1-0ubuntu1
[ Benjamin Zeller ]
Added Toolchains and Kit support to automatically.   detect a
available click chroot Added Devicesupport, connected Ubuntu devices
are.   automatically registered in QtCreator and can be set   for
different kits Added Deploysupport(CMake), the projects contents are
uploaded.   automatically using SSH after running make install on a
local   directory Added Run and Debugsupport: the command that
should be run.   on the device is read from the desktop file in the
deployed   directory. This means C+and QML debugging work as well
as QML Profiling Dynamically forward ports, depending on adb
forward --list.   output. Adb Server is not restarted by default
anymore, only a press.   on the refresh button will trigger the
restart. That will fix   problems with failing adb scripts Added
local run support for Ubuntu projects .

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2014 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
 * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H
 
20
#define UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H
 
21
 
 
22
#include <projectexplorer/deployconfiguration.h>
 
23
#include <remotelinux/abstractremotelinuxdeploystep.h>
 
24
 
 
25
namespace RemoteLinux {
 
26
class GenericDirectUploadService;
 
27
}
 
28
 
 
29
namespace Ubuntu {
 
30
namespace Internal {
 
31
 
 
32
class UbuntuDirectUploadStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
 
33
{
 
34
    Q_OBJECT
 
35
 
 
36
public:
 
37
    UbuntuDirectUploadStep(ProjectExplorer::BuildStepList *bsl);
 
38
    UbuntuDirectUploadStep(ProjectExplorer::BuildStepList *bsl, UbuntuDirectUploadStep *other);
 
39
    ~UbuntuDirectUploadStep();
 
40
 
 
41
    // BuildStep interface
 
42
    virtual void run(QFutureInterface<bool> &fi);
 
43
 
 
44
    ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
 
45
    bool initInternal(QString *error = 0);
 
46
 
 
47
    RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const;
 
48
    bool fromMap(const QVariantMap &map);
 
49
    QVariantMap toMap() const;
 
50
 
 
51
    static Core::Id stepId();
 
52
    static QString displayName();
 
53
 
 
54
private slots:
 
55
    void projectNameChanged();
 
56
 
 
57
private:
 
58
    RemoteLinux::GenericDirectUploadService *m_deployService;
 
59
};
 
60
 
 
61
class UbuntuDeployStepFactory : public ProjectExplorer::IBuildStepFactory
 
62
{
 
63
    Q_OBJECT
 
64
 
 
65
public:
 
66
    // IBuildStepFactory interface
 
67
    virtual QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
 
68
    virtual QString displayNameForId(const Core::Id id) const;
 
69
    virtual bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
 
70
    virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
 
71
    virtual bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
 
72
    virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
 
73
    virtual bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const;
 
74
    virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product);
 
75
 
 
76
private:
 
77
    bool canHandle(const ProjectExplorer::Target *t) const;
 
78
};
 
79
 
 
80
class UbuntuRemoteDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
 
81
{
 
82
    Q_OBJECT
 
83
 
 
84
public:
 
85
    explicit UbuntuRemoteDeployConfigurationFactory(QObject *parent = 0);
 
86
 
 
87
    QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
 
88
    QString displayNameForId(const Core::Id id) const;
 
89
    bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
 
90
    ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
 
91
    bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
 
92
    ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
 
93
    ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
 
94
                                                ProjectExplorer::DeployConfiguration *product);
 
95
};
 
96
} // namespace Internal
 
97
} // namespace Ubuntu
 
98
 
 
99
#endif // UBUNTU_INTERNAL_UBUNTUDEPLOYCONFIGURATION_H