This file is indexed.

/usr/include/taskmanager/abstractgroupingstrategy.h is in kde-workspace-dev 4:4.8.4-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*****************************************************************

Copyright 2008 Christian Mollekopf <chrigi_1@hotmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

******************************************************************/

#ifndef ABSTRACTGROUPINGSTRATEGY_H
#define ABSTRACTGROUPINGSTRATEGY_H

#include <QtCore/QObject>

#include "abstractgroupableitem.h"
#include "groupmanager.h"
#include "taskgroup.h"
#include "taskmanager_export.h"

class QAction;

namespace TaskManager
{

/**
 * Base class for strategies which can be used to
 * automatically group tasks.
 */
class TASKMANAGER_EXPORT AbstractGroupingStrategy : public QObject
{
    Q_OBJECT
public:
    AbstractGroupingStrategy(GroupManager *groupManager);
    virtual ~AbstractGroupingStrategy();

    void destroy();

    /** Handles a new item */
    virtual void handleItem(AbstractGroupableItem *) = 0;

    /** Returns the strategy type */
    GroupManager::TaskGroupingStrategy type() const;

    /** DesktopChanges time to backup any needed data */
    virtual void desktopChanged(int newDesktop);

    /**
    * Returns list of actions that a task can do in this groupingStrategy
    *  If the visualization supports grouping it has to show these actions.
    */
    virtual QList<QAction*> strategyActions(QObject *parent, AbstractGroupableItem *item);

    /** Returns the root group to use in grouping */
    GroupPtr rootGroup() const;

    enum EditableGroupProperties {
        None = 0,
        Name = 1,
        Icon =  4,
        Members = 8,
        All = 15
    };
    /**
    * Returns which group properties are editable by the user and which are handled solely by the strategy.
    * The visualization should create a configuration interface based on this.
    */
    virtual EditableGroupProperties editableGroupProperties() = 0;

    /* The following functions check if a property is editable and sets it on group*/

    virtual bool setName(const QString &, TaskGroup*);
    /** Returns a List of unused Names*/
    virtual QList<QString> nameSuggestions(TaskGroup *);

    virtual bool setIcon(const QIcon &, TaskGroup*);
    /** Returns a list of icons*/
    virtual QList<QIcon> iconSuggestions(TaskGroup *);

    /** Adds an item to group if EditableGroupProperties::Members is set */
    bool manualGroupingRequest(AbstractGroupableItem* taskItem, TaskGroup* groupItem);
    /**
    * Creates a new group if EditableGroupProperties::Members is set
    * Should be called if the user wants to group items manually
    */
    bool manualGroupingRequest(ItemList items);

protected:
    /** Create a group with items and returns the newly created group */
    TaskGroup* createGroup(ItemList items);

Q_SIGNALS:
    void groupRemoved(TaskGroup*);

protected Q_SLOTS:
    /** Adds all group members to the parentgroup of group and removes the group */
    virtual void closeGroup(TaskGroup *group);

    /** Checks if the group is still necessary, removes group if empty*/
    virtual void checkGroup();

    /** Returns the strategy type */
    void setType(GroupManager::TaskGroupingStrategy type);

private:
    class Private;
    Private * const d;
};

} // TaskManager namespace
#endif