• Skip to content
  • Skip to link menu
KDE 4.3 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 <QtCore/QList>
00027 #include <QtGui/QPixmap>
00028 #include <QtGui/QIcon>
00029 
00030 #include <plasma/plasma_export.h>
00031 
00032 class QTextDocument;
00033 
00041 namespace Plasma
00042 {
00043 
00044 class ToolTipContentPrivate;
00045 
00046 class PLASMA_EXPORT ToolTipContent
00047 {
00048 public:
00049     enum ResourceType { ImageResource = 0, HtmlResource, CssResource };
00050 
00052     ToolTipContent();
00053 
00054     ~ToolTipContent();
00055 
00057     ToolTipContent(const ToolTipContent &other);
00058 
00060     ToolTipContent(const QString &mainText,
00061                    const QString &subText,
00062                    const QPixmap &image = QPixmap());
00063 
00065     ToolTipContent(const QString &mainText,
00066                    const QString &subText,
00067                    const QIcon &icon);
00068 
00069     ToolTipContent &operator=(const ToolTipContent &other);
00070 
00072     bool isEmpty() const;
00073 
00075     void setMainText(const QString &text);
00076 
00078     QString mainText() const;
00079 
00081     void setSubText(const QString &text) ;
00082 
00084     QString subText() const;
00085 
00087     void setImage(const QPixmap &image);
00088 
00090     void setImage(const QIcon &icon);
00091 
00093     QPixmap image() const;
00094 
00095     //BIC FIXME: remove when we can break BC
00097     void setWindowToPreview(WId id);
00098 
00099     //BIC FIXME: remove when we can break BC
00101     WId windowToPreview() const;
00102 
00105     void setWindowsToPreview(const QList<WId> &ids);
00106 
00109     QList<WId> windowsToPreview() const;
00110 
00112     void setAutohide(bool autohide);
00113 
00115     bool autohide() const;
00116 
00119     void addResource(ResourceType type, const QUrl &path, const QVariant &resource);
00120 
00122     void registerResources(QTextDocument *document) const;
00123 
00124 private:
00125     ToolTipContentPrivate * const d;
00126 };
00127 
00128 } // namespace Plasma
00129 
00130 #endif
00131 

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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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