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

libtaskmanager

TaskManager::Task

TaskManager::Task Class Reference

#include <task.h>

Inheritance diagram for TaskManager::Task:

Inheritance graph
[legend]

List of all members.


Detailed Description

A dynamic interface to a task (main window).

See also:
TaskManager

Definition at line 53 of file task.h.


Public Slots

void activate ()
void activateRaiseOrIconify ()
void close ()
void lower ()
void move ()
void publishIconGeometry (QRect)
void raise ()
void resize ()
void restore ()
void setAlwaysOnTop (bool)
void setFullScreen (bool)
void setIconified (bool)
void setKeptBelowOthers (bool)
void setMaximized (bool)
void setShaded (bool)
void toCurrentDesktop ()
void toDesktop (int)
void toggleAlwaysOnTop ()
void toggleFullScreen ()
void toggleIconified ()
void toggleKeptBelowOthers ()
void toggleMaximized ()
void toggleShaded ()
void updateThumbnail ()

Signals

void activated ()
void changed ()
void deactivated ()
void iconChanged ()
void thumbnailChanged ()

Public Member Functions

void addTransient (WId w, const NETWinInfo &info)
QPixmap bestIcon (int size, bool &isStaticIcon)
QString classClass ()
QString className ()
bool demandsAttention () const
int desktop () const
QRect geometry () const
bool hasThumbnail () const
bool hasTransient (WId w) const
QPixmap icon (int width, int height, bool allowResize=false)
KWindowInfo info () const
bool isActive () const
bool isAlwaysOnTop () const
bool isFullScreen () const
bool isIconified () const
bool isKeptBelowOthers () const
bool isMaximized () const
bool isMinimized () const
bool isModified () const
bool isOnAllDesktops () const
bool isOnCurrentDesktop () const
bool isOnScreen (int screen) const
bool isOnTop () const
bool isShaded () const
QString name () const
QPixmap pixmap () const
void refresh (unsigned int dirty)
void refreshIcon ()
void removeTransient (WId w)
void setActive (bool a)
void setThumbnailSize (double size)
bool showInPager () const
bool showInTaskbar () const
 Task (WId win, QObject *parent, const char *name=0)
QPixmap thumbnail (int maxDimension)
QPixmap thumbnail () const
double thumbnailSize () const
WindowList transients () const
void updateDemandsAttentionState (WId w)
void updateWindowPixmap ()
QString visibleName () const
QString visibleNameWithState () const
WId window () const
virtual ~Task ()

Static Public Member Functions

static bool idMatch (const QString &, const QString &)

Protected Slots

void generateThumbnail ()

Protected Member Functions

void findWindowFrameId ()

Properties

bool active
bool alwaysOnTop
QString className
bool demandsAttention
int desktop
bool hasThumbnail
bool iconified
bool maximized
bool minimized
bool modified
QString name
bool onAllDesktops
bool onCurrentDesktop
QPixmap pixmap
bool shaded
QPixmap thumbnail
double thumbnailSize
QString visibleName
QString visibleNameWithState

Constructor & Destructor Documentation

TaskManager::Task::Task ( WId  win,
QObject *  parent,
const char *  name = 0 
)

Definition at line 85 of file task.cpp.

TaskManager::Task::~Task (  )  [virtual]

Definition at line 121 of file task.cpp.


Member Function Documentation

void TaskManager::Task::activate (  )  [slot]

Activate the task's window.

Definition at line 699 of file task.cpp.

void TaskManager::Task::activated (  )  [signal]

Indicates that this task is now the active task.

void TaskManager::Task::activateRaiseOrIconify (  )  [slot]

Perform the action that is most appropriate for this task.

If it is not active, activate it. Else if it is not the top window, raise it. Otherwise, iconify it.

Definition at line 710 of file task.cpp.

void TaskManager::Task::addTransient ( WId  w,
const NETWinInfo &  info 
)

Definition at line 354 of file task.cpp.

QPixmap TaskManager::Task::bestIcon ( int  size,
bool &  isStaticIcon 
)

Returns the best icon for any of the KIconLoader::StdSizes.

If there is no icon of the specified size specified in the WM hints, it will try to get one using KIconLoader.

   bool gotStaticIcon;
   QPixmap icon = myTask->icon( KIconLoader::SizeMedium, gotStaticIcon );
 

Parameters:
size Any of the constants in KIconLoader::StdSizes.
isStaticIcon Set to true if KIconLoader was used, false otherwise.

Definition at line 453 of file task.cpp.

void TaskManager::Task::changed (  )  [signal]

Indicates that this task has changed in some way.

QString TaskManager::Task::classClass (  ) 

Definition at line 412 of file task.cpp.

QString TaskManager::Task::className (  ) 

Reimplemented from QObject.

void TaskManager::Task::close (  )  [slot]

Close the task's window.

Definition at line 681 of file task.cpp.

void TaskManager::Task::deactivated (  )  [signal]

Indicates that this task is no longer the active task.

bool TaskManager::Task::demandsAttention (  )  const

Returns true if the task is not active but demands user's attention.

int TaskManager::Task::desktop (  )  const

Returns the desktop on which this task's window resides.

void TaskManager::Task::findWindowFrameId (  )  [protected]

Definition at line 137 of file task.cpp.

void TaskManager::Task::generateThumbnail (  )  [protected, slot]

Definition at line 867 of file task.cpp.

QRect TaskManager::Task::geometry (  )  const

Returns the geometry for this window.

Definition at line 329 of file task.cpp.

bool TaskManager::Task::hasThumbnail (  )  const

Returns true if this task has a thumbnail.

Note that this method can only ever return true after a call to updateThumbnail().

bool TaskManager::Task::hasTransient ( WId  w  )  const

Definition at line 370 of file task.cpp.

QPixmap TaskManager::Task::icon ( int  width,
int  height,
bool  allowResize = false 
)

Tries to find an icon for the task with the specified size.

If there is no icon that matches then it will either resize the closest available icon or return a null pixmap depending on the value of allowResize.

Note that the last icon is cached, so a sequence of calls with the same parameters will only query the NET properties if the icon has changed or none was found.

Definition at line 424 of file task.cpp.

void TaskManager::Task::iconChanged (  )  [signal]

Indicates that the icon for this task has changed.

bool TaskManager::Task::idMatch ( const QString &  id1,
const QString &  id2 
) [static]

Returns true iff the windows with the specified ids should be grouped together in the task list.

Definition at line 530 of file task.cpp.

KWindowInfo TaskManager::Task::info (  )  const

Definition at line 380 of file task.cpp.

bool TaskManager::Task::isActive (  )  const

Returns true if the task's window is the active window.

Definition at line 283 of file task.cpp.

bool TaskManager::Task::isAlwaysOnTop (  )  const

Returns true if the task's window will remain at the top of the stacking order.

Definition at line 253 of file task.cpp.

bool TaskManager::Task::isFullScreen (  )  const

Returns true if the task's window is in full screen mode.

Definition at line 263 of file task.cpp.

bool TaskManager::Task::isIconified (  )  const

Deprecated:
Returns true if the task's window is minimized(iconified).

Definition at line 248 of file task.cpp.

bool TaskManager::Task::isKeptBelowOthers (  )  const

Returns true if the task's window will remain at the bottom of the stacking order.

Definition at line 258 of file task.cpp.

bool TaskManager::Task::isMaximized (  )  const

Returns true if the task's window is maximized.

Definition at line 238 of file task.cpp.

bool TaskManager::Task::isMinimized (  )  const

Returns true if the task's window is minimized.

Definition at line 243 of file task.cpp.

bool TaskManager::Task::isModified (  )  const

Returns true if the document the task is editing has been modified.

This is currently handled heuristically by looking for the string '[i18n_modified]' in the window title where i18n_modified is the word 'modified' in the current language.

Definition at line 293 of file task.cpp.

bool TaskManager::Task::isOnAllDesktops (  )  const

Returns true if the task's window is on all virtual desktops.

Definition at line 278 of file task.cpp.

bool TaskManager::Task::isOnCurrentDesktop (  )  const

Returns true if the task's window is on the current virtual desktop.

Definition at line 273 of file task.cpp.

bool TaskManager::Task::isOnScreen ( int  screen  )  const

Returns true if the window is on the specified screen of a multihead configuration.

Definition at line 314 of file task.cpp.

bool TaskManager::Task::isOnTop (  )  const

Returns true if the task's window is the topmost non-iconified, non-always-on-top window.

Definition at line 288 of file task.cpp.

bool TaskManager::Task::isShaded (  )  const

Returns true if the task's window is shaded.

Definition at line 268 of file task.cpp.

void TaskManager::Task::lower (  )  [slot]

Lower the task's window.

Definition at line 693 of file task.cpp.

void TaskManager::Task::move (  )  [slot]

Move the window of this task.

Definition at line 544 of file task.cpp.

QString TaskManager::Task::name (  )  const

QPixmap TaskManager::Task::pixmap (  )  const

Returns a 16x16 (KIconLoader::Small) icon for the task.

This method will only fall back to a static icon if there is no icon of any size in the WM hints.

void TaskManager::Task::publishIconGeometry ( QRect  rect  )  [slot]

This method informs the window manager of the location at which this task will be displayed when iconised.

It is used, for example by the KWin inconify animation.

Definition at line 819 of file task.cpp.

void TaskManager::Task::raise (  )  [slot]

Raise the task's window.

Definition at line 687 of file task.cpp.

void TaskManager::Task::refresh ( unsigned int  dirty  ) 

Definition at line 197 of file task.cpp.

void TaskManager::Task::refreshIcon (  ) 

Definition at line 172 of file task.cpp.

void TaskManager::Task::removeTransient ( WId  w  ) 

Definition at line 364 of file task.cpp.

void TaskManager::Task::resize (  )  [slot]

Resize the window of this task.

Definition at line 567 of file task.cpp.

void TaskManager::Task::restore (  )  [slot]

Restore the main window of the task (if it was iconified).

Definition at line 627 of file task.cpp.

void TaskManager::Task::setActive ( bool  a  ) 

Definition at line 210 of file task.cpp.

void TaskManager::Task::setAlwaysOnTop ( bool  stay  )  [slot]

If true, the task's window will remain at the top of the stacking order.

Definition at line 753 of file task.cpp.

void TaskManager::Task::setFullScreen ( bool  fullscreen  )  [slot]

If true, the task's window will enter full screen mode.

Definition at line 786 of file task.cpp.

void TaskManager::Task::setIconified ( bool  iconify  )  [slot]

Iconify the task.

Definition at line 651 of file task.cpp.

void TaskManager::Task::setKeptBelowOthers ( bool  below  )  [slot]

If true, the task's window will remain at the bottom of the stacking order.

Definition at line 767 of file task.cpp.

void TaskManager::Task::setMaximized ( bool  maximize  )  [slot]

Maximise the main window of this task.

Definition at line 590 of file task.cpp.

void TaskManager::Task::setShaded ( bool  shade  )  [slot]

If true then the task's window will be shaded.

Most window managers represent this state by displaying on the window's title bar.

Definition at line 805 of file task.cpp.

void TaskManager::Task::setThumbnailSize ( double  size  ) 

Sets the size for the window thumbnail.

For example a size of 0.2 indicates the thumbnail will be 20% of the original window size.

Definition at line 223 of file task.cpp.

bool TaskManager::Task::showInPager (  )  const

Returns true if the task should be shown in pager-like apps.

Definition at line 324 of file task.cpp.

bool TaskManager::Task::showInTaskbar (  )  const

Returns true if the task should be shown in taskbar-like apps.

Definition at line 319 of file task.cpp.

QPixmap TaskManager::Task::thumbnail ( int  maxDimension  ) 

Definition at line 971 of file task.cpp.

QPixmap TaskManager::Task::thumbnail (  )  const

Returns the thumbnail for this task (or a null image if there is none).

void TaskManager::Task::thumbnailChanged (  )  [signal]

Indicates that the thumbnail for this task has changed.

double TaskManager::Task::thumbnailSize (  )  const

Returns the current thumbnail size.

void TaskManager::Task::toCurrentDesktop (  )  [slot]

Moves the task's window to the current virtual desktop.

Definition at line 748 of file task.cpp.

void TaskManager::Task::toDesktop ( int  desk  )  [slot]

Moves the task's window to the specified virtual desktop.

Definition at line 726 of file task.cpp.

void TaskManager::Task::toggleAlwaysOnTop (  )  [slot]

Definition at line 762 of file task.cpp.

void TaskManager::Task::toggleFullScreen (  )  [slot]

Definition at line 800 of file task.cpp.

void TaskManager::Task::toggleIconified (  )  [slot]

Definition at line 676 of file task.cpp.

void TaskManager::Task::toggleKeptBelowOthers (  )  [slot]

Definition at line 781 of file task.cpp.

void TaskManager::Task::toggleMaximized (  )  [slot]

Definition at line 622 of file task.cpp.

void TaskManager::Task::toggleShaded (  )  [slot]

Definition at line 814 of file task.cpp.

WindowList TaskManager::Task::transients (  )  const

A list of the window ids of all transient windows (dialogs) associated with this task.

Definition at line 443 of file task.cpp.

void TaskManager::Task::updateDemandsAttentionState ( WId  w  ) 

Definition at line 334 of file task.cpp.

void TaskManager::Task::updateThumbnail (  )  [slot]

Tells the task to generate a new thumbnail.

When the thumbnail is ready the thumbnailChanged() signal will be emitted.

Definition at line 840 of file task.cpp.

void TaskManager::Task::updateWindowPixmap (  ) 

Definition at line 977 of file task.cpp.

QString TaskManager::Task::visibleName (  )  const

QString TaskManager::Task::visibleNameWithState (  )  const

WId TaskManager::Task::window (  )  const

Definition at line 375 of file task.cpp.


Property Documentation

bool TaskManager::Task::active [read]

Definition at line 66 of file task.h.

bool TaskManager::Task::alwaysOnTop [read, write]

Definition at line 69 of file task.h.

QString TaskManager::Task::className [read]

Definition at line 58 of file task.h.

bool TaskManager::Task::demandsAttention [read]

Definition at line 71 of file task.h.

int TaskManager::Task::desktop [read]

Definition at line 72 of file task.h.

bool TaskManager::Task::hasThumbnail [read]

Definition at line 74 of file task.h.

bool TaskManager::Task::iconified [read]

Definition at line 64 of file task.h.

bool TaskManager::Task::maximized [read]

Definition at line 61 of file task.h.

bool TaskManager::Task::minimized [read]

Definition at line 62 of file task.h.

bool TaskManager::Task::modified [read]

Definition at line 70 of file task.h.

QString TaskManager::Task::name [read]

Definition at line 57 of file task.h.

bool TaskManager::Task::onAllDesktops [read]

Definition at line 68 of file task.h.

bool TaskManager::Task::onCurrentDesktop [read]

Definition at line 67 of file task.h.

QPixmap TaskManager::Task::pixmap [read]

Definition at line 60 of file task.h.

bool TaskManager::Task::shaded [read, write]

Definition at line 65 of file task.h.

QPixmap TaskManager::Task::thumbnail [read]

Definition at line 75 of file task.h.

double TaskManager::Task::thumbnailSize [read, write]

Definition at line 73 of file task.h.

QString TaskManager::Task::visibleName [read]

Definition at line 56 of file task.h.

QString TaskManager::Task::visibleNameWithState [read]

Definition at line 59 of file task.h.


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

libtaskmanager

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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