• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Plasma

Plasma::ToolTipContent

Plasma::ToolTipContent Class Reference

#include <tooltipcontent.h>

List of all members.


Public Types

enum  ResourceType { ImageResource = 0, HtmlResource, CssResource }

Public Member Functions

void addResource (ResourceType type, const QUrl &path, const QVariant &resource)
bool autohide () const
QPixmap image () const
bool isEmpty () const
QString mainText () const
ToolTipContent & operator= (const ToolTipContent &other)
void registerResources (QTextDocument *document) const
void setAutohide (bool autohide)
void setImage (const QIcon &icon)
void setImage (const QPixmap &image)
void setMainText (const QString &text)
void setSubText (const QString &text)
void setWindowToPreview (WId id)
QString subText () const
 ToolTipContent (const QString &mainText, const QString &subText, const QIcon &icon)
 ToolTipContent (const QString &mainText, const QString &subText, const QPixmap &image=QPixmap())
 ToolTipContent (const ToolTipContent &other)
 ToolTipContent ()
WId windowToPreview () const
 ~ToolTipContent ()

Detailed Description

Definition at line 45 of file tooltipcontent.h.


Member Enumeration Documentation

enum Plasma::ToolTipContent::ResourceType

Enumerator:
ImageResource 
HtmlResource 
CssResource 

Definition at line 48 of file tooltipcontent.h.


Constructor & Destructor Documentation

Plasma::ToolTipContent::ToolTipContent (  ) 

Creates an empty Content.

Definition at line 62 of file tooltipcontent.cpp.

Plasma::ToolTipContent::~ToolTipContent (  ) 

Definition at line 72 of file tooltipcontent.cpp.

Plasma::ToolTipContent::ToolTipContent ( const ToolTipContent &  other  ) 

Copy constructor.

Definition at line 67 of file tooltipcontent.cpp.

Plasma::ToolTipContent::ToolTipContent ( const QString &  mainText,
const QString &  subText,
const QPixmap &  image = QPixmap() 
)

Constructor that sets the common fields.

Definition at line 83 of file tooltipcontent.cpp.

Plasma::ToolTipContent::ToolTipContent ( const QString &  mainText,
const QString &  subText,
const QIcon &  icon 
)

Constructor that sets the common fields.

Definition at line 93 of file tooltipcontent.cpp.


Member Function Documentation

void Plasma::ToolTipContent::addResource ( ResourceType  type,
const QUrl &  path,
const QVariant &  resource 
)

Adds a resource that can then be referenced from the text elements using rich text.

Definition at line 166 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::autohide (  )  const

Whether or not to autohide the tooltip, defaults to true.

Definition at line 161 of file tooltipcontent.cpp.

QPixmap Plasma::ToolTipContent::image (  )  const

An icon to display.

Definition at line 141 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::isEmpty (  )  const

Returns:
true if all the fields are empty

Definition at line 103 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::mainText (  )  const

Important information, e.g.

the title

Definition at line 116 of file tooltipcontent.cpp.

ToolTipContent & Plasma::ToolTipContent::operator= ( const ToolTipContent &  other  ) 

Definition at line 77 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::registerResources ( QTextDocument *  document  )  const

Registers all resources with a given document.

Definition at line 171 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setAutohide ( bool  autohide  ) 

Sets whether or not to autohide the tooltip, defaults to true.

Definition at line 156 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setImage ( const QIcon &  icon  ) 

Sets the icon to show.

Definition at line 136 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setImage ( const QPixmap &  image  ) 

Sets the icon to show.

Definition at line 131 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setMainText ( const QString &  text  ) 

Sets the main text which containts important information, e.g.

the title

Definition at line 111 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setSubText ( const QString &  text  ) 

Sets text which elaborates on the mainText.

Definition at line 121 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setWindowToPreview ( WId  id  ) 

Sets the ID of the window to show a preview for.

Definition at line 146 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::subText (  )  const

Elaborates on the mainText.

Definition at line 126 of file tooltipcontent.cpp.

WId Plasma::ToolTipContent::windowToPreview (  )  const

Id of a window if you want to show a preview.

Definition at line 151 of file tooltipcontent.cpp.


The documentation for this class was generated from the following files:
  • tooltipcontent.h
  • tooltipcontent.cpp

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