A bit more clang-format

This commit is contained in:
Jasmine Iwanek
2022-11-19 08:49:04 -05:00
parent b04dd8cc8b
commit 3fe4f75108
223 changed files with 8047 additions and 7456 deletions

View File

@@ -24,7 +24,9 @@ extern "C" {
#include <QAbstractItemModel>
void Harddrives::populateBuses(QAbstractItemModel *model) {
void
Harddrives::populateBuses(QAbstractItemModel *model)
{
model->removeRows(0, model->rowCount());
model->insertRows(0, 6);
model->setData(model->index(0, 0), "MFM/RLL");
@@ -42,7 +44,9 @@ void Harddrives::populateBuses(QAbstractItemModel *model) {
model->setData(model->index(5, 0), HDD_BUS_SCSI, Qt::UserRole);
}
void Harddrives::populateRemovableBuses(QAbstractItemModel *model) {
void
Harddrives::populateRemovableBuses(QAbstractItemModel *model)
{
model->removeRows(0, model->rowCount());
model->insertRows(0, 3);
model->setData(model->index(0, 0), QObject::tr("Disabled"));
@@ -54,7 +58,9 @@ void Harddrives::populateRemovableBuses(QAbstractItemModel *model) {
model->setData(model->index(2, 0), HDD_BUS_SCSI, Qt::UserRole);
}
void Harddrives::populateSpeeds(QAbstractItemModel *model, int bus) {
void
Harddrives::populateSpeeds(QAbstractItemModel *model, int bus)
{
int num_preset;
switch (bus) {
@@ -76,29 +82,31 @@ void Harddrives::populateSpeeds(QAbstractItemModel *model, int bus) {
}
}
void Harddrives::populateBusChannels(QAbstractItemModel *model, int bus) {
void
Harddrives::populateBusChannels(QAbstractItemModel *model, int bus)
{
model->removeRows(0, model->rowCount());
int busRows = 0;
int shifter = 1;
int orer = 1;
int busRows = 0;
int shifter = 1;
int orer = 1;
int subChannelWidth = 1;
switch (bus) {
case HDD_BUS_MFM:
case HDD_BUS_XTA:
case HDD_BUS_ESDI:
busRows = 2;
break;
case HDD_BUS_IDE:
case HDD_BUS_ATAPI:
busRows = 8;
break;
case HDD_BUS_SCSI:
shifter = 4;
orer = 15;
busRows = 64;
subChannelWidth = 2;
break;
case HDD_BUS_MFM:
case HDD_BUS_XTA:
case HDD_BUS_ESDI:
busRows = 2;
break;
case HDD_BUS_IDE:
case HDD_BUS_ATAPI:
busRows = 8;
break;
case HDD_BUS_SCSI:
shifter = 4;
orer = 15;
busRows = 64;
subChannelWidth = 2;
break;
}
model->insertRows(0, busRows);
@@ -109,30 +117,32 @@ void Harddrives::populateBusChannels(QAbstractItemModel *model, int bus) {
}
}
QString Harddrives::BusChannelName(uint8_t bus, uint8_t channel) {
QString
Harddrives::BusChannelName(uint8_t bus, uint8_t channel)
{
QString busName;
switch(bus) {
case HDD_BUS_DISABLED:
busName = QString(QObject::tr("Disabled"));
break;
case HDD_BUS_MFM:
busName = QString("MFM/RLL (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_XTA:
busName = QString("XTA (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_ESDI:
busName = QString("ESDI (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_IDE:
busName = QString("IDE (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_ATAPI:
busName = QString("ATAPI (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_SCSI:
busName = QString("SCSI (%1:%2)").arg(channel >> 4).arg(channel & 15, 2, 10, QChar('0'));
break;
switch (bus) {
case HDD_BUS_DISABLED:
busName = QString(QObject::tr("Disabled"));
break;
case HDD_BUS_MFM:
busName = QString("MFM/RLL (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_XTA:
busName = QString("XTA (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_ESDI:
busName = QString("ESDI (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_IDE:
busName = QString("IDE (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_ATAPI:
busName = QString("ATAPI (%1:%2)").arg(channel >> 1).arg(channel & 1);
break;
case HDD_BUS_SCSI:
busName = QString("SCSI (%1:%2)").arg(channel >> 4).arg(channel & 15, 2, 10, QChar('0'));
break;
}
return busName;