From 42ea81971f2d246f1c59a9757c52034908070aa4 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 26 Dec 2021 00:15:24 +0000 Subject: [PATCH] Tidying --- .../HexViewerWidget/AnnotationItem.cpp | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/AnnotationItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/AnnotationItem.cpp index 36baa423..97069cd2 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/AnnotationItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/AnnotationItem.cpp @@ -6,15 +6,21 @@ using namespace Bloom::Widgets; -AnnotationItem::AnnotationItem(std::uint32_t startAddress, std::size_t size, QString labelText, AnnotationItemPosition position) -: QGraphicsItem(nullptr), -startAddress(startAddress), -size(size), -endAddress(static_cast(startAddress + size - 1)), -labelText(std::move(labelText)), -position(position), -width(static_cast((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)), -height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT) { +AnnotationItem::AnnotationItem( + std::uint32_t startAddress, + std::size_t size, + QString labelText, + AnnotationItemPosition position +): + QGraphicsItem(nullptr), + startAddress(startAddress), + size(size), + endAddress(static_cast(startAddress + size - 1)), + labelText(std::move(labelText)), + position(position), + width(static_cast((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)), + height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT +) { this->setAcceptHoverEvents(true); this->setToolTip(this->labelText); }