Tidying
This commit is contained in:
@@ -58,7 +58,7 @@ void EnvironmentConfig::init(std::string name, QJsonObject jsonObject) {
|
|||||||
throw Exceptions::InvalidConfig("No target configuration provided.");
|
throw Exceptions::InvalidConfig("No target configuration provided.");
|
||||||
}
|
}
|
||||||
|
|
||||||
this->name = name;
|
this->name = std::move(name);
|
||||||
this->debugToolConfig.init(jsonObject.find("debugTool")->toObject());
|
this->debugToolConfig.init(jsonObject.find("debugTool")->toObject());
|
||||||
this->targetConfig.init(jsonObject.find("target")->toObject());
|
this->targetConfig.init(jsonObject.find("target")->toObject());
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace Bloom::Widgets
|
|||||||
std::size_t currentColumnIndex = 0;
|
std::size_t currentColumnIndex = 0;
|
||||||
|
|
||||||
ByteItem(
|
ByteItem(
|
||||||
std::size_t byteNumber,
|
std::size_t byteIndex,
|
||||||
std::uint32_t address,
|
std::uint32_t address,
|
||||||
std::optional<ByteItem*>& hoveredByteItem
|
std::optional<ByteItem*>& hoveredByteItem
|
||||||
);
|
);
|
||||||
@@ -45,11 +45,6 @@ namespace Bloom::Widgets
|
|||||||
}
|
}
|
||||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
|
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
|
||||||
|
|
||||||
signals:
|
|
||||||
void selected(Bloom::Widgets::ByteItem*);
|
|
||||||
void enter(Bloom::Widgets::ByteItem*);
|
|
||||||
void leave(Bloom::Widgets::ByteItem*);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool valueChanged = false;
|
bool valueChanged = false;
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ parent(parent) {
|
|||||||
const auto memorySize = this->targetMemoryDescriptor.size();
|
const auto memorySize = this->targetMemoryDescriptor.size();
|
||||||
const auto startAddress = this->targetMemoryDescriptor.addressRange.startAddress;
|
const auto startAddress = this->targetMemoryDescriptor.addressRange.startAddress;
|
||||||
Logger::error("Constructing bytes begin");
|
Logger::error("Constructing bytes begin");
|
||||||
for (std::size_t i = 0; i < memorySize; i++) {
|
for (std::uint32_t i = 0; i < memorySize; i++) {
|
||||||
const auto address = static_cast<std::uint32_t>(startAddress + i);
|
const auto address = startAddress + i;
|
||||||
|
|
||||||
auto* byteWidget = new ByteItem(i, address, this->hoveredByteWidget);
|
auto* byteWidget = new ByteItem(i, address, this->hoveredByteWidget);
|
||||||
this->byteWidgetsByAddress.insert(std::pair(
|
this->byteWidgetsByAddress.insert(std::pair(
|
||||||
@@ -87,7 +87,7 @@ void ByteItemGraphicsScene::adjustByteWidgets() {
|
|||||||
);
|
);
|
||||||
const auto columnIndex = static_cast<std::size_t>(
|
const auto columnIndex = static_cast<std::size_t>(
|
||||||
static_cast<double>(byteWidget->byteIndex)
|
static_cast<double>(byteWidget->byteIndex)
|
||||||
- (std::floor(byteWidget->byteIndex / rowCapacity) * static_cast<double>(rowCapacity))
|
- (std::floor(byteWidget->byteIndex / rowCapacity) * static_cast<double>(rowCapacity))
|
||||||
);
|
);
|
||||||
|
|
||||||
byteWidget->setPos(
|
byteWidget->setPos(
|
||||||
|
|||||||
Reference in New Issue
Block a user