• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • plasma
tooltipmanager.h
Go to the documentation of this file.
1/*
2 * Copyright 2007 by Dan Meltzer <hydrogen@notyetimplemented.com>
3 * Copyright 2008 by Aaron Seigo <aseigo@kde.org>
4 * Copyright 2008 by Alexis Ménard <darktears31@gmail.com>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301 USA
20 */
21
22#ifndef PLASMA_TOOLTIP_MANAGER_H
23#define PLASMA_TOOLTIP_MANAGER_H
24
25#include <kurl.h>
26
27#include <plasma/plasma.h>
28#include <plasma/plasma_export.h>
29#include <plasma/tooltipcontent.h>
30
31namespace Plasma
32{
33
34class ToolTipManagerPrivate;
35class Applet;
36class Corona;
37
69class PLASMA_EXPORT ToolTipManager : public QObject
70{
71 Q_OBJECT
72public:
73
74 enum State {
75 Activated = 0 ,
76 Inhibited ,
77 Deactivated
78 };
79
83 static ToolTipManager *self();
84
90 void show(QGraphicsWidget *widget);
91
99 bool isVisible(QGraphicsWidget *widget) const;
100
106 void hide(QGraphicsWidget *widget);
107
126 void registerWidget(QGraphicsWidget *widget);
127
135 void unregisterWidget(QGraphicsWidget *widget);
136
147 void setContent(QGraphicsWidget *widget,
148 const ToolTipContent &data);
149
154 void clearContent(QGraphicsWidget *widget);
155
161 void setState(ToolTipManager::State state);
162
166 ToolTipManager::State state() const;
167
168Q_SIGNALS:
176 void windowPreviewActivated(WId window, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers,
177 const QPoint &screenPos);
178
186 void linkActivated(const QString &anchor, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers,
187 const QPoint &screenPos);
188
189private:
195 explicit ToolTipManager(QObject *parent = 0);
196
200 ~ToolTipManager();
201
202 friend class ToolTipManagerSingleton;
203 friend class Corona; // The corona needs to register itself
204 friend class ToolTipManagerPrivate;
205 bool eventFilter(QObject *watched, QEvent *event);
206
207 ToolTipManagerPrivate *const d;
208 Corona* m_corona;
209
210 Q_PRIVATE_SLOT(d, void showToolTip())
211 Q_PRIVATE_SLOT(d, void toolTipHovered(bool))
212 Q_PRIVATE_SLOT(d, void resetShownState())
213 Q_PRIVATE_SLOT(d, void onWidgetDestroyed(QObject*))
214};
215
216} // namespace Plasma
217
218#endif // PLASMA_TOOL_TIP_MANAGER_H
Plasma::Corona
A QGraphicsScene for Plasma::Applets.
Definition: corona.h:49
Plasma::ToolTipContent
Definition: tooltipcontent.h:48
Plasma::ToolTipManager
Manages tooltips for QGraphicsWidgets in Plasma.
Definition: tooltipmanager.h:70
Plasma::ToolTipManager::linkActivated
void linkActivated(const QString &anchor, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPoint &screenPos)
This signal is emitted when a link in the tooltip is clicked.
Plasma::ToolTipManager::State
State
Definition: tooltipmanager.h:74
Plasma::ToolTipManager::windowPreviewActivated
void windowPreviewActivated(WId window, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPoint &screenPos)
This signal is emitted when a window preview in the tooltip is clicked.
QGraphicsWidget
QObject
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
plasma.h
plasma_export.h
tooltipcontent.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal