| 14 | namespace tc |
| 15 | { |
| 16 | FloatController::FloatController(const std::shared_ptr<ClientContext>& ctx, QWidget* parent) : BaseWidget(ctx, parent){ |
| 17 | auto image = new QImage(":resources/tc_icon.png"); |
| 18 | pixmap_ = QPixmap::fromImage(*image); |
| 19 | pixmap_ = pixmap_.scaled(25, 25, Qt::KeepAspectRatio, Qt::SmoothTransformation); |
| 20 | setMouseTracking(true); |
| 21 | this->setStyleSheet("background:#00000000;"); |
| 22 | QTimer::singleShot(200, [=, this]() { |
| 23 | ReCalculatePosition(); |
| 24 | }); |
| 25 | } |
| 26 | |
| 27 | void FloatController::paintEvent(QPaintEvent *event) { |
| 28 | QPainter painter(this); |
nothing calls this directly
no outgoing calls
no test coverage detected