mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Qt/QML edition
This commit is contained in:
commit
d7b361ba44
2168 changed files with 721948 additions and 0 deletions
39
drivelistitem.h
Normal file
39
drivelistitem.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#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, 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_INVOKABLE int sizeInGb();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
QString _device;
|
||||
QString _description;
|
||||
QStringList _mountpoints;
|
||||
quint64 _size;
|
||||
bool _isUsb;
|
||||
bool _isScsi;
|
||||
};
|
||||
|
||||
#endif // DRIVELISTITEM_H
|
Loading…
Add table
Add a link
Reference in a new issue