mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-19 21:55:11 +00:00
debugging the debugger
This commit is contained in:
@@ -69,16 +69,18 @@ QVariant CGramModel::data(const QModelIndex &index, int role) const
|
|||||||
uint8_t green;
|
uint8_t green;
|
||||||
uint8_t blue;
|
uint8_t blue;
|
||||||
//std::cout << "test1" << std::endl;
|
//std::cout << "test1" << std::endl;
|
||||||
//if (role == Qt::TextAlignmentRole)
|
if (role == Qt::TextAlignmentRole)
|
||||||
// return Qt::AlignCenter;
|
return Qt::AlignCenter;
|
||||||
//std::cout << "test2" << std::endl;
|
//std::cout << "test2" << std::endl;
|
||||||
//if (role == Qt::BackgroundRole) {
|
|
||||||
// std::cout << "test" << std::endl;
|
|
||||||
// return 1;
|
|
||||||
//}
|
|
||||||
//std::cout << "test3" << std::endl;
|
//std::cout << "test3" << std::endl;
|
||||||
if (role != Qt::DisplayRole)
|
if (role != Qt::DisplayRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
if (role == Qt::BackgroundRole) {
|
||||||
|
// std::cout << "test" << std::endl;
|
||||||
|
//unreachable
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
addressValue = this->_ppu.cgramRead(index.column() * 16 + index.row());
|
addressValue = this->_ppu.cgramRead(index.column() * 16 + index.row());
|
||||||
|
|
||||||
blue = (addressValue & 0x7D00U) >> 10U;
|
blue = (addressValue & 0x7D00U) >> 10U;
|
||||||
@@ -88,5 +90,5 @@ QVariant CGramModel::data(const QModelIndex &index, int role) const
|
|||||||
red = (red * 255U / 31U) << 24U;
|
red = (red * 255U / 31U) << 24U;
|
||||||
green = (green * 255U / 31U) << 16U;
|
green = (green * 255U / 31U) << 16U;
|
||||||
blue = (blue * 255U / 31U) << 8U;
|
blue = (blue * 255U / 31U) << 8U;
|
||||||
return QColor(red, green,blue,255);
|
return QColor(red, green, blue);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user