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

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • 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 
31 namespace Plasma
32 {
33 
34 class ToolTipManagerPrivate;
35 class Applet;
36 class Corona;
37 
69 class PLASMA_EXPORT ToolTipManager : public QObject
70 {
71  Q_OBJECT
72 public:
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 
168 Q_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 
189 private:
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
QObject
Plasma::ToolTipManager::State
State
Definition: tooltipmanager.h:74
Plasma::ToolTipManager
Manages tooltips for QGraphicsWidgets in Plasma.
Definition: tooltipmanager.h:69
Plasma::ToolTipContent
Definition: tooltipcontent.h:47
tooltipcontent.h
plasma.h
plasma_export.h
Plasma::Corona
A QGraphicsScene for Plasma::Applets.
Definition: corona.h:48
QGraphicsWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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