• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • 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 <QtGui/QPixmap>
00027 #include <QtGui/QIcon>
00028 
00029 #include <plasma/plasma_export.h>
00030 
00031 class QTextDocument;
00032 
00040 namespace Plasma
00041 {
00042 
00043 class ToolTipContentPrivate;
00044 
00045 class PLASMA_EXPORT ToolTipContent
00046 {
00047 public:
00048     enum ResourceType { ImageResource = 0, HtmlResource, CssResource };
00049 
00051     ToolTipContent();
00052 
00053     ~ToolTipContent();
00054 
00056     ToolTipContent(const ToolTipContent &other);
00057 
00059     ToolTipContent(const QString &mainText,
00060                    const QString &subText,
00061                    const QPixmap &image = QPixmap());
00062 
00064     ToolTipContent(const QString &mainText,
00065                    const QString &subText,
00066                    const QIcon &icon);
00067 
00068     ToolTipContent &operator=(const ToolTipContent &other);
00069 
00071     bool isEmpty() const;
00072 
00074     void setMainText(const QString &text);
00075 
00077     QString mainText() const;
00078 
00080     void setSubText(const QString &text) ;
00081 
00083     QString subText() const;
00084 
00086     void setImage(const QPixmap &image);
00087 
00089     void setImage(const QIcon &icon);
00090 
00092     QPixmap image() const;
00093 
00095     void setWindowToPreview(WId id);
00096 
00098     WId windowToPreview() const;
00099 
00101     void setAutohide(bool autohide);
00102 
00104     bool autohide() const;
00105 
00108     void addResource(ResourceType type, const QUrl &path, const QVariant &resource);
00109 
00111     void registerResources(QTextDocument *document) const;
00112 
00113 private:
00114     ToolTipContentPrivate * const d;
00115 };
00116 
00117 } // namespace Plasma
00118 
00119 #endif
00120 

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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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