2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
2021-07-07 20:54:45 +01:00
|
|
|
namespace Bloom::Widgets::InsightTargetWidgets::Qfp
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
|
|
|
|
class BodyWidget: public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PROPERTY(QColor bodyColor READ getBodyColor WRITE setBodyColor DESIGNABLE true)
|
|
|
|
|
Q_PROPERTY(int disableAlphaLevel READ getDisableAlphaLevel WRITE setDisableAlphaLevel DESIGNABLE true)
|
|
|
|
|
|
|
|
|
|
private:
|
2021-04-09 20:33:24 +01:00
|
|
|
// These properties can be modified via Qt style sheets (see Stylesheets/QuadFlatPackage.qss)
|
2021-09-23 21:15:24 +01:00
|
|
|
QColor bodyColor = QColor("#8E8B83");
|
2021-04-04 21:04:12 +01:00
|
|
|
int disableAlphaLevel = 100;
|
|
|
|
|
|
|
|
|
|
protected:
|
2021-06-21 00:14:31 +01:00
|
|
|
void paintEvent(QPaintEvent* event) override;
|
2021-04-04 21:04:12 +01:00
|
|
|
void drawWidget(QPainter& painter);
|
|
|
|
|
|
|
|
|
|
public:
|
2021-06-21 00:14:31 +01:00
|
|
|
explicit BodyWidget(QWidget* parent): QWidget(parent) {
|
2021-04-04 21:04:12 +01:00
|
|
|
this->setObjectName("target-body");
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 00:14:31 +01:00
|
|
|
[[nodiscard]] QColor getBodyColor() const {
|
2021-04-04 21:04:12 +01:00
|
|
|
return this->bodyColor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setBodyColor(QColor color) {
|
|
|
|
|
this->bodyColor = color;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-21 00:14:31 +01:00
|
|
|
[[nodiscard]] int getDisableAlphaLevel() const {
|
2021-04-04 21:04:12 +01:00
|
|
|
return this->disableAlphaLevel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setDisableAlphaLevel(int level) {
|
|
|
|
|
this->disableAlphaLevel = level;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|