Plasma-framework

tooltipdialog.h
1/*
2 SPDX-FileCopyrightText: 2013 Sebastian Kügler <sebas@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef TOOLTIPDIALOG_H
8#define TOOLTIPDIALOG_H
9
10#include "popupplasmawindow.h"
11
12#include <QQuickWindow>
13#include <QTimer>
14#include <QVariant>
15
16class QQuickItem;
17
18namespace PlasmaQuick
19{
20class SharedQmlEngine;
21}
22
23/**
24 * Internally used by Tooltip
25 */
26class ToolTipDialog : public PlasmaQuick::PopupPlasmaWindow
27{
29
30public:
31 explicit ToolTipDialog();
32 ~ToolTipDialog() override;
33
34 QQuickItem *loadDefaultItem();
35
36 void dismiss();
37 void keepalive();
38
39 bool interactive();
40 void setInteractive(bool interactive);
41
42 int hideTimeout() const;
43 void setHideTimeout(int timeout);
44
45 /**
46 * Basically the last one who has shown the dialog
47 */
48 QObject *owner() const;
49 void setOwner(QObject *owner);
50
51protected:
52 void showEvent(QShowEvent *event) override;
53 void hideEvent(QHideEvent *event) override;
54 bool event(QEvent *e) override;
55
56private Q_SLOTS:
57 void valueChanged(const QVariant &value);
58
59private:
60 void updateSize();
61
62 QPointer<QQuickItem> m_lastMainItem;
64 QTimer *m_showTimer;
65 int m_hideTimeout;
66 bool m_interactive;
67 QObject *m_owner;
68};
69
70#endif
The PopupPlasmaWindow class is a styled Plasma window that can be positioned relative to an existing ...
An object that instantiates an entire QML context, with its own declarative engine.
The EdgeEventForwarder class This class forwards edge events to be replayed within the given margin T...
Definition action.h:20
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
virtual void hideEvent(QHideEvent *) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:54:11 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.