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

Plasma

  • 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
32class QTextDocument;
33class QGraphicsWidget;
34
42namespace Plasma
43{
44
45class ToolTipContentPrivate;
46
47class PLASMA_EXPORT ToolTipContent
48{
49public:
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
223private:
224 ToolTipContentPrivate * const d;
225};
226
227} // namespace Plasma
228
229#endif
230
Plasma::ToolTipContent
Definition: tooltipcontent.h:48
Plasma::ToolTipContent::ResourceType
ResourceType
Definition: tooltipcontent.h:50
QGraphicsWidget
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
plasma_export.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