Added tooltips to pin body widgets and moved constructors to implementation files

This commit is contained in:
Nav
2021-12-30 18:10:40 +00:00
parent b9a43b4f39
commit 3b4284be5f
6 changed files with 24 additions and 22 deletions

View File

@@ -7,6 +7,11 @@
using namespace Bloom::Widgets::InsightTargetWidgets::Dip;
using namespace Bloom::Targets;
PinBodyWidget::PinBodyWidget(QWidget* parent, Targets::TargetPinDescriptor pinDescriptor)
: TargetPinBodyWidget(parent, std::move(pinDescriptor)) {
this->setFixedSize(PinBodyWidget::WIDTH, PinBodyWidget::HEIGHT);
}
void PinBodyWidget::paintEvent(QPaintEvent* event) {
auto painter = QPainter(this);
this->drawWidget(painter);

View File

@@ -17,13 +17,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip
static const int WIDTH = 19;
static const int HEIGHT = 28;
PinBodyWidget(
QWidget* parent,
Targets::TargetPinDescriptor pinDescriptor
): TargetPinBodyWidget(parent, std::move(pinDescriptor)) {
this->setFixedSize(PinBodyWidget::WIDTH, PinBodyWidget::HEIGHT);
this->setObjectName("target-pin-body");
}
PinBodyWidget(QWidget* parent, Targets::TargetPinDescriptor pinDescriptor);
protected:
void paintEvent(QPaintEvent* event) override;