libtaskmanager
taskgroup.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 TASKGROUP_H
00020 #define TASKGROUP_H
00021
00022 #include <QtGui/QIcon>
00023
00024 #include <taskmanager/abstractgroupableitem.h>
00025 #include <taskmanager/taskmanager_export.h>
00026
00027 namespace TaskManager
00028 {
00029 class GroupManager;
00030
00034 class TASKMANAGER_EXPORT TaskGroup : public AbstractGroupableItem
00035 {
00036 Q_OBJECT
00037 public:
00038 TaskGroup(GroupManager *parent, const QString& name, const QColor& color);
00039 TaskGroup(GroupManager *parent);
00040 ~TaskGroup();
00041
00042 ItemList members() const;
00043
00044 QIcon icon() const;
00045 void setIcon(const QIcon &icon);
00046
00047 QColor color() const;
00048 void setColor(const QColor &color);
00049
00050 QString name() const;
00051 void setName(const QString &newName);
00052
00053 virtual bool isGroupItem() const { return true; }
00054 bool isRootGroup() const;
00055
00057 bool hasDirectMember(AbstractItemPtr item) const;
00059 bool hasMember(AbstractItemPtr item) const;
00061 AbstractItemPtr directMember(AbstractItemPtr) const;
00062
00063 int desktop() const;
00064 bool isShaded() const;
00065 bool isMaximized() const;
00066 bool isMinimized() const;
00067 bool isFullScreen() const;
00068 bool isKeptBelowOthers() const;
00069 bool isAlwaysOnTop() const;
00070 bool isActionSupported(NET::Action) const;
00072 bool isActive() const;
00074 bool demandsAttention() const;
00075 bool isOnAllDesktops() const;
00076 bool isOnCurrentDesktop() const;
00077 void addMimeData(QMimeData *mimeData) const;
00078
00084 bool moveItem(int oldIndex, int newIndex);
00085
00086 public Q_SLOTS:
00088 void toDesktop(int);
00089
00090 void setShaded(bool);
00091 void toggleShaded();
00092
00093 void setMaximized(bool);
00094 void toggleMaximized();
00095
00096 void setMinimized(bool);
00097 void toggleMinimized();
00098
00099 void setFullScreen(bool);
00100 void toggleFullScreen();
00101
00102 void setKeptBelowOthers(bool);
00103 void toggleKeptBelowOthers();
00104
00105 void setAlwaysOnTop(bool);
00106 void toggleAlwaysOnTop();
00107
00109 void close();
00110
00112 void add(AbstractItemPtr);
00113
00115 void remove(AbstractItemPtr);
00116
00118 void clear();
00119
00120 Q_SIGNALS:
00122 void itemAdded(const AbstractItemPtr item);
00123 void itemRemoved(const AbstractItemPtr item);
00124 void groupEditRequest();
00126 void itemPositionChanged(AbstractItemPtr item);
00128 void movedToDesktop(int newDesk);
00129
00130 private:
00131 class Private;
00132 Private * const d;
00133 };
00134
00135
00136 }
00137
00138 #endif