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

« back to all changes in this revision

Viewing changes to ubuntudeviceswidget.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
 
 * Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
17
 
 */
18
 
 
19
 
#ifndef UBUNTUDEVICESWIDGET_H
20
 
#define UBUNTUDEVICESWIDGET_H
21
 
 
22
 
#include <QWidget>
23
 
#include "ubuntuprocess.h"
24
 
 
25
 
namespace Ui {
26
 
class UbuntuDevicesWidget;
27
 
}
28
 
 
29
 
class UbuntuDevicesWidget : public QWidget
30
 
{
31
 
    Q_OBJECT
32
 
    
33
 
public:
34
 
    explicit UbuntuDevicesWidget(QWidget *parent = 0);
35
 
    ~UbuntuDevicesWidget();
36
 
 
37
 
    static UbuntuDevicesWidget* instance();
38
 
 
39
 
    bool deviceDetected() { return m_deviceDetected; }
40
 
    QString serialNumber();
41
 
 
42
 
 
43
 
signals:
44
 
    void updateDeviceActions();
45
 
    
46
 
protected slots:
47
 
    void onMessage(QString msg);
48
 
    void onFinished(QString cmd, int code);
49
 
    void onError(QString msg);
50
 
    void onStarted(QString cmd);
51
 
 
52
 
    void on_pushButtonRefresh_clicked();
53
 
    void on_pushButtonRefresh_2_clicked() { on_pushButtonRefresh_clicked(); }
54
 
    void on_pushButtonSshInstall_clicked();
55
 
    void on_pushButtonSshRemove_clicked();
56
 
    void on_pushButtonSshSetupPublicKey_clicked();
57
 
    void on_pushButtonPortForward_clicked();
58
 
    void on_pushButtonSshConnect_clicked();
59
 
    void on_pushButtonReboot_clicked();
60
 
    void on_pushButtonShutdown_clicked();
61
 
    void on_pushButtonRebootToBootloader_clicked();
62
 
    void on_pushButtonRebootToRecovery_clicked();
63
 
    void on_pushButtonUpgradeToDailyImage_clicked();
64
 
    void on_pushButtonUpgradeToDailyImageWithBootstrap_clicked();
65
 
    void on_pushButtonCloneNetworkConfig_clicked();
66
 
    void on_pushButtonCloneTimeConfig_clicked();
67
 
    void on_pushButtonCloneNetworkConfig_2_clicked() { on_pushButtonCloneNetworkConfig_clicked(); }
68
 
    void on_comboBoxSerialNumber_currentIndexChanged( const QString & text );
69
 
 
70
 
    void detectDevices();
71
 
    void detectOpenSsh();
72
 
    void detectHasNetworkConnection();
73
 
    void detectDeviceVersion();
74
 
 
75
 
private:
76
 
    void beginAction(QString);
77
 
    void endAction(QString);
78
 
 
79
 
    Ui::UbuntuDevicesWidget *ui;
80
 
 
81
 
    Ubuntu::Internal::UbuntuProcess m_ubuntuProcess;
82
 
    QString m_reply;
83
 
 
84
 
    bool m_aboutToClose;
85
 
    bool m_deviceDetected;
86
 
    QString m_deviceSerialNumber;
87
 
 
88
 
    static UbuntuDevicesWidget *m_instance;
89
 
};
90
 
 
91
 
 
92
 
#endif // UBUNTUDEVICESWIDGET_H