Tidying
This commit is contained in:
@@ -6,15 +6,21 @@
|
|||||||
|
|
||||||
using namespace Bloom::Widgets;
|
using namespace Bloom::Widgets;
|
||||||
|
|
||||||
AnnotationItem::AnnotationItem(std::uint32_t startAddress, std::size_t size, QString labelText, AnnotationItemPosition position)
|
AnnotationItem::AnnotationItem(
|
||||||
: QGraphicsItem(nullptr),
|
std::uint32_t startAddress,
|
||||||
startAddress(startAddress),
|
std::size_t size,
|
||||||
size(size),
|
QString labelText,
|
||||||
endAddress(static_cast<std::uint32_t>(startAddress + size - 1)),
|
AnnotationItemPosition position
|
||||||
labelText(std::move(labelText)),
|
):
|
||||||
position(position),
|
QGraphicsItem(nullptr),
|
||||||
width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)),
|
startAddress(startAddress),
|
||||||
height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT) {
|
size(size),
|
||||||
|
endAddress(static_cast<std::uint32_t>(startAddress + size - 1)),
|
||||||
|
labelText(std::move(labelText)),
|
||||||
|
position(position),
|
||||||
|
width(static_cast<int>((ByteItem::WIDTH + ByteItem::RIGHT_MARGIN) * size - ByteItem::RIGHT_MARGIN)),
|
||||||
|
height(position == AnnotationItemPosition::TOP ? AnnotationItem::TOP_HEIGHT : AnnotationItem::BOTTOM_HEIGHT
|
||||||
|
) {
|
||||||
this->setAcceptHoverEvents(true);
|
this->setAcceptHoverEvents(true);
|
||||||
this->setToolTip(this->labelText);
|
this->setToolTip(this->labelText);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user