retro-imager/drivelistitem.cpp
Floris Bos 39abeb239d Improve drive listing
- Show write protected SD cards greyed out.
  Show message if user select one of those. Closes #59
- Do show virtual drive types on Windows.
  Do keep them hidden on Mac OS X as that seems to
  cover .dmg file and timemachine stuff. Closes #79
2020-07-03 21:16:49 +02:00

17 lines
522 B
C++

/*
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2020 Raspberry Pi (Trading) Limited
*/
#include "drivelistitem.h"
DriveListItem::DriveListItem(QString device, QString description, quint64 size, bool isUsb, bool isScsi, bool readOnly, QStringList mountpoints, QObject *parent)
: QObject(parent), _device(device), _description(description), _mountpoints(mountpoints), _size(size), _isUsb(isUsb), _isScsi(isScsi), _isReadOnly(readOnly)
{
}
int DriveListItem::sizeInGb()
{
return _size / 1000000000;
}