-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevicemanager.h
50 lines (37 loc) · 1.07 KB
/
devicemanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef DEVICESYNCHRONIZER_H
#define DEVICESYNCHRONIZER_H
#include <QObject>
#include <coreplugin/id.h>
#include <projectexplorer/devicesupport/idevice.h>
QT_BEGIN_NAMESPACE
class QStandardItemModel;
class QStandardItem;
QT_END_NAMESPACE
namespace RemoteDev {
namespace Internal {
/**
* @brief The DeviceManager class
* Utility class for keeping devices synchronized between
* ProjectExplorer::Devicemanager and plugin's internal storage
*/
class DeviceManager : public QObject
{
Q_OBJECT
public:
explicit DeviceManager(QObject *parent = 0);
void startDeviceSync();
QStandardItemModel *devices() const;
private slots:
void onDeviceAdded(Core::Id id);
void onDeviceUpdated(Core::Id id);
void onDeviceRemoved(Core::Id id);
void onDeviceListReplaced();
private:
QStandardItem * createNameItem(ProjectExplorer::IDevice::ConstPtr device);
QStandardItem * createIdItem(ProjectExplorer::IDevice::ConstPtr device);
private:
QStandardItemModel *m_devices;
};
} // namespace Internal
} // namespace RemoteDev
#endif // DEVICESYNCHRONIZER_H