Applets
WindowTaskItem Class Reference
#include <windowtaskitem.h>

Detailed Description
A task item for a task which represents a window on the desktop.Definition at line 52 of file windowtaskitem.h.
Public Types | |
enum | TaskFlag { TaskWantsAttention = 1, TaskHasFocus = 2, TaskIsMinimized = 4 } |
Public Slots | |
virtual void | activate () |
Signals | |
void | activated (WindowTaskItem *) |
void | windowSelected (WindowTaskItem *) |
Public Member Functions | |
virtual void | close () |
QIcon | icon () const |
void | publishIconGeometry () |
void | setGeometry (const QRectF &geometry) |
void | setIcon (const QIcon &icon) |
void | setShowTooltip (const bool showit) |
void | setStartupTask (TaskManager::StartupPtr task) |
void | setTaskFlags (TaskFlags flags) |
void | setText (const QString &text) |
void | setWindowTask (TaskManager::TaskPtr task) |
TaskFlags | taskFlags () const |
QString | text () const |
TaskManager::TaskPtr | windowTask () const |
WindowTaskItem (Tasks *parent, const bool showTooltip) | |
Protected Member Functions | |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
virtual void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | drawBackground (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
virtual void | drawTask (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
void | drawTextLayout (QPainter *painter, const QTextLayout &layout, const QRect &rect) const |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
QSize | layoutText (QTextLayout &layout, const QString &text, const QSize &constraints) const |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
void | queueUpdate () |
virtual void | resizeEvent (QGraphicsSceneResizeEvent *event) |
QTextOption | textOption () const |
virtual void | timerEvent (QTimerEvent *event) |
Member Enumeration Documentation
This enum describes the generic flags which are currently set by the task.
- Enumerator:
Definition at line 84 of file windowtaskitem.h.
Constructor & Destructor Documentation
WindowTaskItem::WindowTaskItem | ( | Tasks * | parent, | |
const bool | showTooltip | |||
) |
Constructs a new representation for a window task.
Definition at line 47 of file windowtaskitem.cpp.
Member Function Documentation
void WindowTaskItem::activate | ( | ) | [virtual, slot] |
Definition at line 70 of file windowtaskitem.cpp.
void WindowTaskItem::activated | ( | WindowTaskItem * | ) | [signal] |
void WindowTaskItem::close | ( | ) | [virtual] |
Definition at line 90 of file windowtaskitem.cpp.
void WindowTaskItem::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) | [protected, virtual] |
Definition at line 625 of file windowtaskitem.cpp.
void WindowTaskItem::dragEnterEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected, virtual] |
Definition at line 636 of file windowtaskitem.cpp.
void WindowTaskItem::dragLeaveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected, virtual] |
Definition at line 657 of file windowtaskitem.cpp.
void WindowTaskItem::dragMoveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected, virtual] |
Definition at line 648 of file windowtaskitem.cpp.
void WindowTaskItem::drawBackground | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget | |||
) | [protected, virtual] |
void WindowTaskItem::drawTask | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget | |||
) | [protected, virtual] |
Draws the icon and text which represent the task item.
Definition at line 388 of file windowtaskitem.cpp.
void WindowTaskItem::drawTextLayout | ( | QPainter * | painter, | |
const QTextLayout & | layout, | |||
const QRect & | rect | |||
) | const [protected] |
Draws the text layout (which must already have the text laid out) in the rect using the supplied painter.
If the layout contains text lines that are longer than the rect is wide, they will be elided by fading the text out.
Definition at line 458 of file windowtaskitem.cpp.
void WindowTaskItem::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected, virtual] |
Definition at line 152 of file windowtaskitem.cpp.
void WindowTaskItem::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected, virtual] |
Definition at line 166 of file windowtaskitem.cpp.
QIcon WindowTaskItem::icon | ( | ) | const |
Returns the current icon for this task.
QSize WindowTaskItem::layoutText | ( | QTextLayout & | layout, | |
const QString & | text, | |||
const QSize & | constraints | |||
) | const [protected] |
Lays the text out in the text layout using the constraints, and returns the actual size required.
The returned size may be wider than the constraints if the text contains a non-breakable word that is wider than the maximum width. If more height is needed than what's available, the last line that will fit will be extended to hold the remainder of the text.
Definition at line 421 of file windowtaskitem.cpp.
void WindowTaskItem::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 185 of file windowtaskitem.cpp.
void WindowTaskItem::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 180 of file windowtaskitem.cpp.
void WindowTaskItem::paint | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget | |||
) | [protected, virtual] |
Definition at line 215 of file windowtaskitem.cpp.
void WindowTaskItem::publishIconGeometry | ( | ) |
Tells the window manager the minimized task's geometry.
Definition at line 671 of file windowtaskitem.cpp.
void WindowTaskItem::queueUpdate | ( | ) | [protected] |
void WindowTaskItem::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected, virtual] |
Definition at line 208 of file windowtaskitem.cpp.
void WindowTaskItem::setGeometry | ( | const QRectF & | geometry | ) |
void WindowTaskItem::setIcon | ( | const QIcon & | icon | ) |
void WindowTaskItem::setShowTooltip | ( | const bool | showit | ) |
void WindowTaskItem::setStartupTask | ( | TaskManager::StartupPtr | task | ) |
void WindowTaskItem::setTaskFlags | ( | TaskFlags | flags | ) |
void WindowTaskItem::setText | ( | const QString & | text | ) |
void WindowTaskItem::setWindowTask | ( | TaskManager::TaskPtr | task | ) |
WindowTaskItem::TaskFlags WindowTaskItem::taskFlags | ( | ) | const |
QString WindowTaskItem::text | ( | ) | const |
Returns current text for this task.
QTextOption WindowTaskItem::textOption | ( | ) | const [protected] |
Returns a QTextOption object for the icon label QTtextLayout.
Definition at line 409 of file windowtaskitem.cpp.
void WindowTaskItem::timerEvent | ( | QTimerEvent * | event | ) | [protected, virtual] |
Definition at line 190 of file windowtaskitem.cpp.
void WindowTaskItem::windowSelected | ( | WindowTaskItem * | ) | [signal] |
Emitted when a window is selected for activation, minimization, iconification.
TaskManager::TaskPtr WindowTaskItem::windowTask | ( | ) | const |
The documentation for this class was generated from the following files: