KSeExpr
6.0.0.0
KSeExprUI
ExprPopupDoc.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2011-2019 Disney Enterprises, Inc.
2
// SPDX-License-Identifier: LicenseRef-Apache-2.0
3
// SPDX-FileCopyrightText: 2020 L. E. Segovia <amy@amyspark.me>
4
// SPDX-License-Identifier: GPL-3.0-or-later
5
6
#include "
ExprPopupDoc.h
"
7
#include <QHBoxLayout>
8
#include <QLabel>
9
10
11
ExprPopupDoc::ExprPopupDoc
(QWidget *parent,
const
QPoint &placecr,
const
QString &msg)
12
{
13
Q_UNUSED(parent);
14
label
=
new
QLabel(msg);
15
auto
*layout =
new
QHBoxLayout;
16
setLayout(layout);
17
layout->addWidget(
label
);
18
19
setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::X11BypassWindowManagerHint);
20
setAttribute(Qt::WA_ShowWithoutActivating);
21
setFocusPolicy(Qt::NoFocus);
22
move(placecr);
23
raise();
24
show();
25
}
26
27
void
ExprPopupDoc::mousePressEvent
(QMouseEvent *event)
28
{
29
Q_UNUSED(event);
30
hide();
31
}
ExprPopupDoc.h
ExprPopupDoc::ExprPopupDoc
ExprPopupDoc(QWidget *parent, const QPoint &cr, const QString &msg)
Definition
ExprPopupDoc.cpp:11
ExprPopupDoc::label
QLabel * label
Definition
ExprPopupDoc.h:16
ExprPopupDoc::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
Definition
ExprPopupDoc.cpp:27
Generated by
1.9.8