Files
BudgetPro/widget/arrowrectangle.cpp
2026-05-24 23:21:33 +02:00

25 lines
542 B
C++

#include "arrowrectangle.h"
#include <DApplication>
ArrowRectangle::ArrowRectangle(ArrowDirection direction, QWidget *parent)
: DArrowRectangle(direction, DArrowRectangle::FloatWindow, parent)
{
connect(qApp, &DApplication::focusChanged, this, [=](QWidget* old, QWidget* now){
Q_UNUSED(old);
if (now != this && !this->isAncestorOf(now))
{
hide();
}
});
}
void ArrowRectangle::hideEvent(QHideEvent *e)
{
Q_UNUSED(e);
emit hideWindow();
}
ArrowRectangle::~ArrowRectangle()
{}