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

Applets

windowtaskitem.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Robert Knight <robertknight@gmail.com>          *
00003  *   Copyright (C) 2008 by Alexis Ménard <darktears31@gmail.com>           *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
00019  ***************************************************************************/
00020 
00021 
00022 #ifndef WINDOWTASKITEM_H
00023 #define WINDOWTASKITEM_H
00024 
00025 #include "abstracttaskitem.h"
00026 // Own
00027 #include <taskmanager/taskmanager.h>
00028 #include <taskmanager/taskitem.h>
00029 
00033 class WindowTaskItem : public AbstractTaskItem
00034 {
00035     Q_OBJECT
00036 
00037 public:
00039     WindowTaskItem(QGraphicsWidget *parent, Tasks *applet, const bool showTooltip);
00040 
00042     void setTask(TaskManager::TaskItem* taskItem);
00043 
00045     TaskManager::TaskPtr windowTask() const;
00046 
00048     void publishIconGeometry() const;
00049 
00050     // used by the group; for efficiency this avoids multiple calls to
00051     // AbstractTaskItem::iconScreenGeometry
00052     void publishIconGeometry(const QRect &rect) const; 
00053 
00054     virtual bool isWindowItem() const;
00055     virtual bool isActive() const;
00056     virtual void setAdditionalMimeData(QMimeData* mimeData);
00057 
00058 signals:
00060     //void windowSelected(WindowTaskItem *); //what is it for?
00061 
00062 public slots:
00063     void activate();
00064     void close();
00065 
00066 protected:
00067     void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
00068     void mousePressEvent(QGraphicsSceneMouseEvent *event);
00069     void updateToolTip();
00070 
00071 private slots:
00072     void updateTask(::TaskManager::TaskChanges changes);
00073     void gotTaskPointer();
00074 
00075 private:
00077     void setStartupTask(TaskManager::TaskItem* task);
00078 
00080     void setWindowTask(TaskManager::TaskItem* taskItem);
00081 
00082     TaskManager::TaskItem *m_task;
00083 };
00084 
00085 #endif

Applets

Skip menu "Applets"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

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