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

libtaskmanager

TaskManager::Task

TaskManager::Task Class Reference

A dynamic interface to a task (main window). More...

#include <task.h>

Inheritance diagram for TaskManager::Task:

Inheritance graph
[legend]

List of all members.


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 ()

Signals

void activated ()
void changed (::TaskManager::TaskChanges change)
void deactivated ()

Public Member Functions

void addMimeData (QMimeData *mimeData) const
void addTransient (WId w, const NETWinInfo &info)
QPixmap bestIcon (int size, bool &isStaticIcon)
QString classClass () const
QString className () const
bool demandsAttention () const
int desktop () const
QRect geometry () const
bool hasTransient (WId w) const
QIcon icon ()
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
::TaskManager::TaskChanges refresh (unsigned int dirty)
void removeTransient (WId w)
void setActive (bool a)
bool showInPager () const
bool showInTaskbar () const
 Task (WId win, QObject *parent, const char *name=0)
WindowList transients () const
void updateDemandsAttentionState (WId w)
QString visibleName () const
QString visibleNameWithState () const
WId window () const
virtual ~Task ()

Static Public Member Functions

static QString groupMimetype ()
static WId idFromMimeData (const QMimeData *mimeData, bool *ok=0)
static bool idMatch (const QString &, const QString &)
static QList< WId > idsFromMimeData (const QMimeData *mimeData, bool *ok=0)
static QString mimetype ()

Protected Member Functions

void findWindowFrameId ()
void refreshIcon ()
void timerEvent (QTimerEvent *event)

Properties

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

Detailed Description

A dynamic interface to a task (main window).

See also:
TaskManager

Definition at line 50 of file task.h.


Constructor & Destructor Documentation

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

Definition at line 92 of file task.cpp.

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

Definition at line 116 of file task.cpp.


Member Function Documentation

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

Activate the task's window.

Definition at line 692 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 705 of file task.cpp.

void TaskManager::Task::addMimeData ( QMimeData *  mimeData  )  const

Adds the identifying information for this task to mime data for drags, copies, etc.

Definition at line 830 of file task.cpp.

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

Definition at line 335 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 446 of file task.cpp.

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

Indicates that this task has changed in some way.

QString TaskManager::Task::classClass (  )  const

Definition at line 392 of file task.cpp.

QString TaskManager::Task::className (  )  const

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

Close the task's window.

Definition at line 674 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]

QRect TaskManager::Task::geometry (  )  const

Returns the geometry for this window.

Definition at line 315 of file task.cpp.

QString TaskManager::Task::groupMimetype (  )  [static]

Returns the mimetype used for multiple Tasks.

Definition at line 845 of file task.cpp.

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

Definition at line 350 of file task.cpp.

QIcon TaskManager::Task::icon (  ) 

Returns:
a QIcon for the task

Definition at line 423 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 404 of file task.cpp.

WId TaskManager::Task::idFromMimeData ( const QMimeData *  mimeData,
bool *  ok = 0 
) [static]

Given mime data, will return a WId if it can decode one from the data.

Otherwise returns 0.

Definition at line 903 of file task.cpp.

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 523 of file task.cpp.

QList< WId > TaskManager::Task::idsFromMimeData ( const QMimeData *  mimeData,
bool *  ok = 0 
) [static]

Given mime data, will return a QList<WId> if it can decode WIds from the data.

Otherwise returns an empty list.

Definition at line 850 of file task.cpp.

KWindowInfo TaskManager::Task::info (  )  const

Definition at line 360 of file task.cpp.

bool TaskManager::Task::isActive (  )  const

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

Definition at line 269 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 239 of file task.cpp.

bool TaskManager::Task::isFullScreen (  )  const

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

Definition at line 249 of file task.cpp.

bool TaskManager::Task::isIconified (  )  const

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

Definition at line 234 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 244 of file task.cpp.

bool TaskManager::Task::isMaximized (  )  const

Returns true if the task's window is maximized.

Definition at line 224 of file task.cpp.

bool TaskManager::Task::isMinimized (  )  const

Returns true if the task's window is minimized.

Definition at line 229 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 279 of file task.cpp.

bool TaskManager::Task::isOnAllDesktops (  )  const

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

Definition at line 264 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 259 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 300 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 274 of file task.cpp.

bool TaskManager::Task::isShaded (  )  const

Returns true if the task's window is shaded.

Definition at line 254 of file task.cpp.

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

Lower the task's window.

Definition at line 686 of file task.cpp.

QString TaskManager::Task::mimetype (  )  [static]

Returns the mimetype used for a Task.

Definition at line 840 of file task.cpp.

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

Move the window of this task.

Definition at line 537 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 809 of file task.cpp.

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

Raise the task's window.

Definition at line 680 of file task.cpp.

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

Definition at line 157 of file task.cpp.

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

Definition at line 133 of file task.cpp.

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

Definition at line 344 of file task.cpp.

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

Resize the window of this task.

Definition at line 560 of file task.cpp.

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

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

Definition at line 620 of file task.cpp.

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

Definition at line 213 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 743 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 776 of file task.cpp.

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

Iconify the task.

Definition at line 644 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 757 of file task.cpp.

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

Maximise the main window of this task.

Definition at line 583 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 795 of file task.cpp.

bool TaskManager::Task::showInPager (  )  const

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

Definition at line 310 of file task.cpp.

bool TaskManager::Task::showInTaskbar (  )  const

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

Definition at line 305 of file task.cpp.

void TaskManager::Task::timerEvent ( QTimerEvent *  event  )  [protected]

Reimplemented from QObject.

Definition at line 121 of file task.cpp.

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

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

Definition at line 738 of file task.cpp.

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

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

Definition at line 717 of file task.cpp.

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

Definition at line 752 of file task.cpp.

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

Definition at line 790 of file task.cpp.

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

Definition at line 669 of file task.cpp.

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

Definition at line 771 of file task.cpp.

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

Definition at line 615 of file task.cpp.

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

Definition at line 804 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 436 of file task.cpp.

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

Definition at line 320 of file task.cpp.

QString TaskManager::Task::visibleName (  )  const

QString TaskManager::Task::visibleNameWithState (  )  const

WId TaskManager::Task::window (  )  const

Definition at line 355 of file task.cpp.


Property Documentation

bool TaskManager::Task::active [read]

Definition at line 63 of file task.h.

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

Definition at line 66 of file task.h.

QString TaskManager::Task::className [read]

Definition at line 55 of file task.h.

bool TaskManager::Task::demandsAttention [read]

Definition at line 68 of file task.h.

int TaskManager::Task::desktop [read]

Definition at line 69 of file task.h.

bool TaskManager::Task::iconified [read]

Definition at line 61 of file task.h.

bool TaskManager::Task::maximized [read]

Definition at line 58 of file task.h.

bool TaskManager::Task::minimized [read]

Definition at line 59 of file task.h.

bool TaskManager::Task::modified [read]

Definition at line 67 of file task.h.

QString TaskManager::Task::name [read]

Definition at line 54 of file task.h.

bool TaskManager::Task::onAllDesktops [read]

Definition at line 65 of file task.h.

bool TaskManager::Task::onCurrentDesktop [read]

Definition at line 64 of file task.h.

QPixmap TaskManager::Task::pixmap [read]

Definition at line 57 of file task.h.

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

Definition at line 62 of file task.h.

QString TaskManager::Task::visibleName [read]

Definition at line 53 of file task.h.

QString TaskManager::Task::visibleNameWithState [read]

Definition at line 56 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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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