forked from raspberrypi/rpi-imager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drivelistitem.h
41 lines (33 loc) · 1.09 KB
/
drivelistitem.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
#ifndef DRIVELISTITEM_H
#define DRIVELISTITEM_H
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2020 Raspberry Pi (Trading) Limited
*/
#include <QObject>
#include <QStringList>
class DriveListItem : public QObject
{
Q_OBJECT
public:
explicit DriveListItem(QString device, QString description, quint64 size, bool isUsb = false, bool isScsi = false, bool readOnly = false, QStringList mountpoints = QStringList(), QObject *parent = nullptr);
Q_PROPERTY(QString device MEMBER _device CONSTANT)
Q_PROPERTY(QString description MEMBER _description CONSTANT)
Q_PROPERTY(quint64 size MEMBER _size CONSTANT)
Q_PROPERTY(QStringList mountpoints MEMBER _mountpoints CONSTANT)
Q_PROPERTY(bool isUsb MEMBER _isUsb CONSTANT)
Q_PROPERTY(bool isScsi MEMBER _isScsi CONSTANT)
Q_PROPERTY(bool isReadOnly MEMBER _isReadOnly CONSTANT)
Q_INVOKABLE int sizeInGb();
signals:
public slots:
protected:
QString _device;
QString _description;
QStringList _mountpoints;
quint64 _size;
bool _isUsb;
bool _isScsi;
bool _isReadOnly;
};
#endif // DRIVELISTITEM_H