This commit is contained in:
Nav
2022-04-03 17:00:40 +01:00
parent a0c493abaa
commit ffd57c94fa
5 changed files with 15 additions and 9 deletions

View File

@@ -6,8 +6,6 @@ namespace Bloom::Widgets
const std::map<std::size_t, std::vector<ByteItem*>>& byteItemsByRowIndex
) {
static constexpr int leftMargin = 10;
static const auto margins = QMargins(0, 10, 0, 0);
const auto newRowCount = byteItemsByRowIndex.size();
const auto layoutItemMaxIndex = static_cast<int>(this->addressItemsByRowIndex.size() - 1);

View File

@@ -15,17 +15,17 @@ namespace Bloom::Widgets
static constexpr int WIDTH = 75;
static constexpr int HEIGHT = ByteItem::HEIGHT;
ByteAddressItem(QGraphicsItem* parent): QGraphicsItem(parent) {};
explicit ByteAddressItem(QGraphicsItem* parent): QGraphicsItem(parent) {};
void setAddressHex(const QString& address);
[[nodiscard]] QRectF boundingRect() const override {
return QRectF(
return {
0,
0,
ByteAddressItem::WIDTH,
ByteAddressItem::HEIGHT
);
};
}
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;