• 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
tooltipcontent.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 by Aaron Seigo <aseigo@kde.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef PLASMA_TOOLTIPCONTENT_H
21 #define PLASMA_TOOLTIPCONTENT_H
22 
23 #include <QtCore/QString>
24 #include <QtCore/QUrl>
25 #include <QtCore/QVariant>
26 #include <QtCore/QList>
27 #include <QtGui/QPixmap>
28 #include <QtGui/QIcon>
29 
30 #include <plasma/plasma_export.h>
31 
32 class QTextDocument;
33 class QGraphicsWidget;
34 
42 namespace Plasma
43 {
44 
45 class ToolTipContentPrivate;
46 
47 class PLASMA_EXPORT ToolTipContent
48 {
49 public:
50  enum ResourceType { ImageResource = 0, HtmlResource, CssResource };
51 
55  ToolTipContent();
56 
57  ~ToolTipContent();
58 
62  ToolTipContent(const ToolTipContent &other);
63 
67  ToolTipContent(const QString &mainText,
68  const QString &subText,
69  const QPixmap &image = QPixmap());
70 
74  ToolTipContent(const QString &mainText,
75  const QString &subText,
76  const QIcon &icon);
77 
78  ToolTipContent &operator=(const ToolTipContent &other);
79 
83  bool isEmpty() const;
84 
88  void setMainText(const QString &text);
89 
93  QString mainText() const;
94 
98  void setSubText(const QString &text) ;
99 
103  QString subText() const;
104 
108  void setImage(const QPixmap &image);
109 
113  void setImage(const QIcon &icon);
114 
118  QPixmap image() const;
119 
125  KDE_DEPRECATED void setWindowToPreview(WId id);
126 
132  KDE_DEPRECATED WId windowToPreview() const;
133 
138  void setWindowsToPreview(const QList<WId> &ids);
139 
144  QList<WId> windowsToPreview() const;
145 
151  void setHighlightWindows(bool highlight);
152 
158  bool highlightWindows() const;
159 
162  void setAutohide(bool autohide);
163 
167  bool autohide() const;
168 
175  void setInstantPopup(bool enabled);
176 
183  bool isInstantPopup() const;
184 
189  void addResource(ResourceType type, const QUrl &path, const QVariant &resource);
190 
194  void registerResources(QTextDocument *document) const;
195 
202  void setClickable(bool clickable);
203 
209  bool isClickable() const;
210 
215  void setGraphicsWidget(QGraphicsWidget *widget);
216 
221  QGraphicsWidget *graphicsWidget() const;
222 
223 private:
224  ToolTipContentPrivate * const d;
225 };
226 
227 } // namespace Plasma
228 
229 #endif
230 
Plasma::WindowEffects::highlightWindows
void highlightWindows(WId controller, const QList< WId > &ids)
Highlight the selected windows, making all the others translucent.
Definition: windoweffects.cpp:262
Plasma::ToolTipContent::ResourceType
ResourceType
Definition: tooltipcontent.h:50
Plasma::ToolTipContent
Definition: tooltipcontent.h:47
Plasma::type
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:63
plasma_export.h
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