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

Plasma

  • Plasma
  • ToolTipContent
Public Types | Public Member Functions

Plasma::ToolTipContent Class Reference

#include <tooltipcontent.h>

List of all members.

Public Types

enum  ResourceType { ImageResource = 0, HtmlResource, CssResource }

Public Member Functions

 ToolTipContent ()
 ToolTipContent (const QString &mainText, const QString &subText, const QPixmap &image=QPixmap())
 ToolTipContent (const QString &mainText, const QString &subText, const QIcon &icon)
 ToolTipContent (const ToolTipContent &other)
 ~ToolTipContent ()
void addResource (ResourceType type, const QUrl &path, const QVariant &resource)
bool autohide () const
QGraphicsWidget * graphicsWidget () const
bool highlightWindows () const
QPixmap image () const
bool isClickable () const
bool isEmpty () const
QString mainText () const
ToolTipContent & operator= (const ToolTipContent &other)
void registerResources (QTextDocument *document) const
void setAutohide (bool autohide)
void setClickable (bool clickable)
void setGraphicsWidget (QGraphicsWidget *widget)
void setHighlightWindows (bool highlight)
void setImage (const QPixmap &image)
void setImage (const QIcon &icon)
void setMainText (const QString &text)
void setSubText (const QString &text)
void setWindowsToPreview (const QList< WId > &ids)
void setWindowToPreview (WId id)
QString subText () const
QList< WId > windowsToPreview () const
WId windowToPreview () const

Detailed Description

Definition at line 47 of file tooltipcontent.h.


Member Enumeration Documentation

enum Plasma::ToolTipContent::ResourceType
Enumerator:
ImageResource 
HtmlResource 
CssResource 

Definition at line 50 of file tooltipcontent.h.


Constructor & Destructor Documentation

Plasma::ToolTipContent::ToolTipContent ( )

Creates an empty Content.

Definition at line 71 of file tooltipcontent.cpp.

Plasma::ToolTipContent::~ToolTipContent ( )

Definition at line 81 of file tooltipcontent.cpp.

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

Copy constructor.

Definition at line 76 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 92 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 102 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 204 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::autohide ( ) const

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

Definition at line 199 of file tooltipcontent.cpp.

QGraphicsWidget * Plasma::ToolTipContent::graphicsWidget ( ) const

the graphicsWidget used for positioning the tooltip, if any

Since:
4.6

Definition at line 252 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::highlightWindows ( ) const

true if when the mouse will be over a thumbnail the corresponding window will be highlighted by reducing opacity of all the other windows

Since:
4.4

Definition at line 189 of file tooltipcontent.cpp.

QPixmap Plasma::ToolTipContent::image ( ) const

An icon to display.

Definition at line 154 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::isClickable ( ) const
Returns:
true if the tooltip is clickabel
Since:
4.3

Definition at line 242 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::isEmpty ( ) const
Returns:
true if all the fields are empty

Definition at line 112 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::mainText ( ) const

Important information, e.g.

the title

Definition at line 125 of file tooltipcontent.cpp.

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

Definition at line 86 of file tooltipcontent.cpp.

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

Registers all resources with a given document.

Definition at line 209 of file tooltipcontent.cpp.

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

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

Definition at line 194 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setClickable ( bool  clickable)

Sets whether or not the tooltip contains clickable content, such as window previews.

Defaults to false, or not clickable.

Since:
4.3

Definition at line 237 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setGraphicsWidget ( QGraphicsWidget *  widget)

Sets an optional graphicsWidget that will be used for positioning the tooltip.

Since:
4.6

Definition at line 247 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setHighlightWindows ( bool  highlight)

sets if when the mouse will be over a thumbnail the corresponding window will be highlighted by reducing opacity of all the other windows

Since:
4.4

Definition at line 184 of file tooltipcontent.cpp.

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

Sets the icon to show.

Definition at line 149 of file tooltipcontent.cpp.

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

Sets the icon to show.

Definition at line 144 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 120 of file tooltipcontent.cpp.

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

Sets text which elaborates on the mainText.

Definition at line 132 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setWindowsToPreview ( const QList< WId > &  ids)

Sets the IDS of the windows to show a preview for.

Since:
4.3

Definition at line 174 of file tooltipcontent.cpp.

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

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

Deprecated:
See also:
setWindowsToPreview

Definition at line 159 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::subText ( ) const

Elaborates on the mainText.

Definition at line 137 of file tooltipcontent.cpp.

QList< WId > Plasma::ToolTipContent::windowsToPreview ( ) const

Ids of a windows if you want to show a preview.

Since:
4.3

Definition at line 179 of file tooltipcontent.cpp.

WId Plasma::ToolTipContent::windowToPreview ( ) const

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

Deprecated:
See also:
windowsToPreview

Definition at line 165 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
  • 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