Initial commit of BudgetPro
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#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()
|
||||
{}
|
||||
Reference in New Issue
Block a user