Commit 04d8434a authored by Martin Flöser's avatar Martin Flöser
Browse files

KWin: tooltips

Summary:
BUG: 383040

KDecoration part of the patch:
https://phabricator.kde.org/D7246

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: cfeck, graesslin, luebking, broulik, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9294
parent 87f0a119
......@@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDecoration2/Decoration>
#include <QDebug>
#include <QToolTip>
namespace KWin
{
......@@ -200,6 +201,17 @@ QColor DecoratedClientImpl::color(KDecoration2::ColorGroup group, KDecoration2::
return QColor();
}
void DecoratedClientImpl::requestShowToolTip(const QString &text)
{
QPoint pos = Cursor::pos();
QToolTip::showText(pos, text);
}
void DecoratedClientImpl::requestHideToolTip()
{
QToolTip::hideText();
}
void DecoratedClientImpl::requestShowWindowMenu()
{
// TODO: add rect to requestShowWindowMenu
......
......@@ -72,6 +72,8 @@ public:
bool hasApplicationMenu() const override;
bool isApplicationMenuActive() const override;
void requestShowToolTip(const QString &text) override;
void requestHideToolTip() override;
void requestClose() override;
void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override;
......
......@@ -351,6 +351,16 @@ void PreviewClient::setBordersTopEdge(bool enabled)
emit bordersTopEdgeChanged(enabled);
}
void PreviewClient::requestShowToolTip(const QString &text)
{
qDebug() << "tooltip show requested with text:" << text;
}
void PreviewClient::requestHideToolTip()
{
qDebug() << "tooltip hide requested";
}
void PreviewClient::requestClose()
{
emit closeRequested();
......
......@@ -97,6 +97,8 @@ public:
bool hasApplicationMenu() const override;
bool isApplicationMenuActive() const override;
void requestShowToolTip(const QString &text) override;
void requestHideToolTip() override;
void requestClose() override;
void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment