add more spacing
[personal-kdebase.git] / workspace / libs / taskmanager / strategies / manualsortingstrategy.h
blob8b3647388f09757113e42d323322d65ffb56e45b
1 /*****************************************************************
3 Copyright 2008 Christian Mollekopf <chrigi_1@hotmail.com>
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 ******************************************************************/
24 #ifndef MANUALSORTINGSTRATEGY_H
25 #define MANUALSORTINGSTRATEGY_H
27 #include "abstractsortingstrategy.h"
29 namespace TaskManager
32 /**
33 * Manual Sorting
34 * If showAllDesktops is enabled the position of the tasks logically changes on all desktops
35 * If showAllDesktops is disabled the position only changes per virtual desktop even
36 * if the task is on all desktops
39 class ManualSortingStrategy : public AbstractSortingStrategy
41 Q_OBJECT
42 public:
43 ManualSortingStrategy(GroupManager *parent);
44 ~ManualSortingStrategy();
46 /** DesktopChanges, time to backup any needed data */
47 void desktopChanged(int newDesktop);
49 protected Q_SLOTS:
50 /** Handles a new item*/
51 virtual void handleItem(AbstractItemPtr);
53 private:
54 /** Sorts list of items*/
55 void sortItems(ItemList&);
57 void storePositions(TaskGroup *group);
59 class Private;
60 Private * const d;
64 } // TaskManager namespace
65 #endif