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

libtaskmanager

abstractgroupingstrategy.h

Go to the documentation of this file.
00001 /*****************************************************************
00002 
00003 Copyright 2008 Christian Mollekopf <chrigi_1@hotmail.com>
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a copy
00006 of this software and associated documentation files (the "Software"), to deal
00007 in the Software without restriction, including without limitation the rights
00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00009 copies of the Software, and to permit persons to whom the Software is
00010 furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00018 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00019 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00020 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00021 
00022 ******************************************************************/
00023 
00024 #ifndef ABSTRACTGROUPINGSTRATEGY_H
00025 #define ABSTRACTGROUPINGSTRATEGY_H
00026 
00027 #include <QtCore/QObject>
00028 
00029 #include <taskmanager/abstractgroupableitem.h>
00030 #include <taskmanager/groupmanager.h>
00031 #include <taskmanager/taskgroup.h>
00032 #include <taskmanager/taskmanager_export.h>
00033 
00034 class QAction;
00035 
00036 namespace TaskManager
00037 {
00038 
00043 class TASKMANAGER_EXPORT AbstractGroupingStrategy : public QObject
00044 {
00045     Q_OBJECT
00046 public:
00047     AbstractGroupingStrategy(GroupManager *groupManager);
00048     virtual ~AbstractGroupingStrategy();
00049 
00051     virtual void handleItem(AbstractItemPtr) = 0;
00052 
00054     GroupManager::TaskGroupingStrategy type() const;
00055 
00057     virtual void desktopChanged(int newDesktop);
00058 
00062     virtual QList<QAction*> strategyActions(QObject *parent, AbstractGroupableItem *item);
00063 
00064     enum EditableGroupProperties
00065     {
00066         None = 0,
00067         Name = 1,
00068         Color = 2,
00069         Icon =  4,
00070         Members = 8,
00071         All = 15
00072     };
00076     virtual EditableGroupProperties editableGroupProperties() = 0;
00077 
00081     virtual bool addItemToGroup(AbstractGroupableItem *, TaskGroup*);
00082 
00083     virtual bool setName(const QString &, TaskGroup*);
00085     virtual QList<QString> nameSuggestions(TaskGroup *);
00086 
00087     virtual bool setColor(const QColor &, TaskGroup*);
00089     virtual QList<QColor> colorSuggestions(TaskGroup *);
00090 
00091     virtual bool setIcon(const QIcon &, TaskGroup*);
00093     virtual QList<QIcon> iconSuggestions(TaskGroup *);
00094 
00095 Q_SIGNALS:
00096     void groupRemoved(TaskGroup*);
00097 
00098 protected Q_SLOTS:
00100     virtual void closeGroup(TaskGroup *group);
00101 
00103     virtual void checkGroup();
00104 
00106     void setType(GroupManager::TaskGroupingStrategy type);
00107 
00108 protected:
00110     TaskGroup* createGroup(ItemList items);
00111 
00112 private:
00113     class Private;
00114     Private * const d;
00115 };
00116 
00117 } // TaskManager namespace
00118 #endif

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