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

Plasma

tooltipcontent.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 by Aaron Seigo <aseigo@kde.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00017  * Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifndef PLASMA_TOOLTIPCONTENT_H
00021 #define PLASMA_TOOLTIPCONTENT_H
00022 
00023 #include <QtCore/QString>
00024 #include <QtCore/QUrl>
00025 #include <QtCore/QVariant>
00026 #include <QtCore/QList>
00027 #include <QtGui/QPixmap>
00028 #include <QtGui/QIcon>
00029 
00030 #include <plasma/plasma_export.h>
00031 
00032 class QTextDocument;
00033 class QGraphicsWidget;
00034 
00042 namespace Plasma
00043 {
00044 
00045 class ToolTipContentPrivate;
00046 
00047 class PLASMA_EXPORT ToolTipContent
00048 {
00049 public:
00050     enum ResourceType { ImageResource = 0, HtmlResource, CssResource };
00051 
00055     ToolTipContent();
00056 
00057     ~ToolTipContent();
00058 
00062     ToolTipContent(const ToolTipContent &other);
00063 
00067     ToolTipContent(const QString &mainText,
00068                    const QString &subText,
00069                    const QPixmap &image = QPixmap());
00070 
00074     ToolTipContent(const QString &mainText,
00075                    const QString &subText,
00076                    const QIcon &icon);
00077 
00078     ToolTipContent &operator=(const ToolTipContent &other);
00079 
00083     bool isEmpty() const;
00084 
00088     void setMainText(const QString &text);
00089 
00093     QString mainText() const;
00094 
00098     void setSubText(const QString &text) ;
00099 
00103     QString subText() const;
00104 
00108     void setImage(const QPixmap &image);
00109 
00113     void setImage(const QIcon &icon);
00114 
00118     QPixmap image() const;
00119 
00125     void setWindowToPreview(WId id);
00126 
00132     WId windowToPreview() const;
00133 
00138     void setWindowsToPreview(const QList<WId> &ids);
00139 
00144     QList<WId> windowsToPreview() const;
00145 
00151     void setHighlightWindows(bool highlight);
00152 
00158     bool highlightWindows() const;
00159 
00162     void setAutohide(bool autohide);
00163 
00167     bool autohide() const;
00168 
00173     void addResource(ResourceType type, const QUrl &path, const QVariant &resource);
00174 
00178     void registerResources(QTextDocument *document) const;
00179 
00186     void setClickable(bool clickable);
00187 
00193     bool isClickable() const;
00194 
00199     void setGraphicsWidget(QGraphicsWidget *widget);
00200 
00205     QGraphicsWidget *graphicsWidget() const;
00206 
00207 private:
00208     ToolTipContentPrivate * const d;
00209 };
00210 
00211 } // namespace Plasma
00212 
00213 #endif
00214 

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal