• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 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 QString &mainText, const QString &subText, const QIcon &icon)
 
 ToolTipContent (const QString &mainText, const QString &subText, const QPixmap &image=QPixmap())
 
 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
 
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 QIcon &icon)
 
void setImage (const QPixmap &image)
 
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

◆ ResourceType

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

Definition at line 50 of file tooltipcontent.h.

Constructor & Destructor Documentation

◆ ToolTipContent() [1/4]

Plasma::ToolTipContent::ToolTipContent ( )

Creates an empty Content.

Definition at line 72 of file tooltipcontent.cpp.

◆ ~ToolTipContent()

Plasma::ToolTipContent::~ToolTipContent ( )

Definition at line 82 of file tooltipcontent.cpp.

◆ ToolTipContent() [2/4]

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

Copy constructor.

Definition at line 77 of file tooltipcontent.cpp.

◆ ToolTipContent() [3/4]

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.

◆ ToolTipContent() [4/4]

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

◆ addResource()

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.

◆ autohide()

bool Plasma::ToolTipContent::autohide ( ) const

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

Definition at line 200 of file tooltipcontent.cpp.

◆ graphicsWidget()

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.

◆ highlightWindows()

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.

◆ image()

QPixmap Plasma::ToolTipContent::image ( ) const

An icon to display.

Definition at line 155 of file tooltipcontent.cpp.

◆ isClickable()

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

Definition at line 252 of file tooltipcontent.cpp.

◆ isEmpty()

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

Definition at line 113 of file tooltipcontent.cpp.

◆ isInstantPopup()

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.

◆ mainText()

QString Plasma::ToolTipContent::mainText ( ) const

Important information, e.g.

the title

Definition at line 126 of file tooltipcontent.cpp.

◆ operator=()

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

Definition at line 87 of file tooltipcontent.cpp.

◆ registerResources()

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

Registers all resources with a given document.

Definition at line 220 of file tooltipcontent.cpp.

◆ setAutohide()

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.

◆ setClickable()

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.

◆ setGraphicsWidget()

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.

◆ setHighlightWindows()

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.

◆ setImage() [1/2]

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

Sets the icon to show.

Definition at line 150 of file tooltipcontent.cpp.

◆ setImage() [2/2]

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

Sets the icon to show.

Definition at line 145 of file tooltipcontent.cpp.

◆ setInstantPopup()

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.

◆ setMainText()

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.

◆ setSubText()

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

Sets text which elaborates on the mainText.

Definition at line 133 of file tooltipcontent.cpp.

◆ setWindowsToPreview()

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.

◆ setWindowToPreview()

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.

◆ subText()

QString Plasma::ToolTipContent::subText ( ) const

Elaborates on the mainText.

Definition at line 138 of file tooltipcontent.cpp.

◆ windowsToPreview()

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.

◆ windowToPreview()

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-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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