libtaskmanager
taskitem.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TASKITEM_H
00020 #define TASKITEM_H
00021
00022 #include <taskmanager/abstractgroupableitem.h>
00023 #include <taskmanager/startup.h>
00024 #include <taskmanager/task.h>
00025 #include <taskmanager/taskmanager_export.h>
00026
00027 #include <QtGui/QIcon>
00028
00029 namespace TaskManager
00030 {
00031
00032
00036 class TASKMANAGER_EXPORT TaskItem : public AbstractGroupableItem
00037 {
00038 Q_OBJECT
00039 public:
00041 TaskItem(QObject *parent, TaskPtr item);
00043 TaskItem(QObject *parent, StartupPtr item);
00044 ~TaskItem();
00046 void setTaskPointer(TaskPtr);
00048 TaskPtr task() const;
00049
00050 StartupPtr startup() const;
00051 bool isGroupItem() const { return false; }
00052
00053 QIcon icon() const;
00054 QString name() const;
00055
00056 bool isOnCurrentDesktop() const;
00057 bool isOnAllDesktops() const;
00058 int desktop() const;
00059 bool isShaded() const;
00060 bool isMaximized() const;
00061 bool isMinimized() const;
00062 bool isFullScreen() const;
00063 bool isKeptBelowOthers() const;
00064 bool isAlwaysOnTop() const;
00065 bool isActive() const;
00066 bool demandsAttention() const;
00067 bool isActionSupported(NET::Action) const;
00068 void addMimeData(QMimeData *mimeData) const;
00069
00070 public Q_SLOTS:
00071 void toDesktop(int);
00072
00073 void setShaded(bool);
00074 void toggleShaded();
00075
00076 void setMaximized(bool);
00077 void toggleMaximized();
00078
00079 void setMinimized(bool);
00080 void toggleMinimized();
00081
00082 void setFullScreen(bool);
00083 void toggleFullScreen();
00084
00085 void setKeptBelowOthers(bool);
00086 void toggleKeptBelowOthers();
00087
00088 void setAlwaysOnTop(bool);
00089 void toggleAlwaysOnTop();
00090
00091 void close();
00092
00093 Q_SIGNALS:
00095 void gotTaskPointer();
00096
00097 private:
00098 class Private;
00099 Private * const d;
00100 };
00101
00102 }
00103
00104 #endif