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

Plasma

  • Plasma
  • ToolTipContent
Public Types | Public Member Functions | List of all members
Plasma::ToolTipContent Class Reference

#include <tooltipcontent.h>

Public Types

enum  ResourceType { ImageResource = 0, HtmlResource, CssResource }
 

Public Member Functions

 ToolTipContent ()
 
 ToolTipContent (const ToolTipContent &other)
 
 ToolTipContent (const QString &mainText, const QString &subText, const QPixmap &image=QPixmap())
 
 ToolTipContent (const QString &mainText, const QString &subText, const QIcon &icon)
 
 ~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
 
bool isInstantPopup () 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 setInstantPopup (bool enabled)
 
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 72 of file tooltipcontent.cpp.

Plasma::ToolTipContent::~ToolTipContent ( )

Definition at line 82 of file tooltipcontent.cpp.

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

Copy constructor.

Definition at line 77 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 93 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 103 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 215 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::autohide ( ) const

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

Definition at line 200 of file tooltipcontent.cpp.

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

the graphicsWidget used for positioning the tooltip, if any

Since
4.6

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

QPixmap Plasma::ToolTipContent::image ( ) const

An icon to display.

Definition at line 155 of file tooltipcontent.cpp.

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

Definition at line 252 of file tooltipcontent.cpp.

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

Definition at line 113 of file tooltipcontent.cpp.

bool Plasma::ToolTipContent::isInstantPopup ( ) const

Whether or not the tooltip should popup instantly when the widget is hovered, defaults to false.

Since
4.7

Definition at line 210 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::mainText ( ) const

Important information, e.g.

the title

Definition at line 126 of file tooltipcontent.cpp.

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

Definition at line 87 of file tooltipcontent.cpp.

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

Registers all resources with a given document.

Definition at line 220 of file tooltipcontent.cpp.

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

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

Definition at line 195 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 247 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 257 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 185 of file tooltipcontent.cpp.

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

Sets the icon to show.

Definition at line 145 of file tooltipcontent.cpp.

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

Sets the icon to show.

Definition at line 150 of file tooltipcontent.cpp.

void Plasma::ToolTipContent::setInstantPopup ( bool  enabled)

Sets whether or not the tooltip should popup instantly when the widget is hovered, defaults to false.

Since
4.7

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

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

Sets text which elaborates on the mainText.

Definition at line 133 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 175 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 160 of file tooltipcontent.cpp.

QString Plasma::ToolTipContent::subText ( ) const

Elaborates on the mainText.

Definition at line 138 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 180 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 166 of file tooltipcontent.cpp.


The documentation for this class was generated from the following files:
  • tooltipcontent.h
  • tooltipcontent.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal