This file is indexed.

/usr/include/plasmaclock/calendartable.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
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 *   Copyright 2008,2010 Davide Bettio <davide.bettio@kdemail.net>
 *   Copyright 2009 John Layt <john@layt.net>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef PLASMA_CALENDARWIDGET_H
#define PLASMA_CALENDARWIDGET_H

#include <QtGui/QGraphicsWidget>

#include "plasmaclock_export.h"

#include <KCalendarSystem>
#include <Plasma/DataEngine>

class KConfigDialog;
class KConfigGroup;

namespace Plasma
{

class CalendarTablePrivate;
class DataEngine;

class PLASMACLOCK_EXPORT CalendarTable : public QGraphicsWidget
{
    Q_OBJECT

public:
    enum CellType { NoType = 0,
                    Today = 1,
                    Selected = 2,
                    Hovered = 4,
                    Holiday = 8,
                    NotInCurrentMonth = 16,
                    InvalidDate = 32,
                    Event = 64,
                    PublicHoliday = 128};
    Q_DECLARE_FLAGS(CellTypes, CellType)

    explicit CalendarTable(QGraphicsWidget *parent = 0);
    explicit CalendarTable(const QDate &, QGraphicsWidget *parent = 0);
    ~CalendarTable();

    void setCalendar(const QString &newCalendarType = "locale");
    void setCalendar(const KCalendarSystem *calendar);
    const KCalendarSystem *calendar () const;

    void setDate(const QDate &date);
    const QDate& date() const;

    void setDisplayEvents(bool display);
    bool displayEvents();

    void setDisplayHolidays(bool showHolidays);
    bool displayHolidays();

    void clearHolidaysRegions();
    void addHolidaysRegion(const QString &regionCode, bool daysOff);
    QStringList holidaysRegions() const;
    QStringList holidaysRegionsDaysOff() const;

    void clearHolidays();
    void addHoliday(Plasma::DataEngine::Data holidayData);
    bool dateHasDetails(const QDate &date) const;
    QStringList dateDetails(const QDate &date) const;

    void setAutomaticUpdateEnabled(bool enabled);
    bool isAutomaticUpdateEnabled() const;

    void setCurrentDate(const QDate &date);
    const QDate& currentDate() const;

    QDate startDate() const;
    QDate endDate() const;

    void applyConfiguration(KConfigGroup cg);
    void writeConfiguration(KConfigGroup cg);
    void createConfigurationInterface(KConfigDialog *parent);
    void configAccepted(KConfigGroup cg);

Q_SIGNALS:
    void dateChanged(const QDate &newDate, const QDate &oldDate);
    void dateChanged(const QDate &newDate);
    void dateSelected(const QDate &date);
    void dateHovered(const QDate &date);
    void tableClicked();
    void eventsChanged();

public Q_SLOTS:
    void dataUpdated(const QString &source, const Plasma::DataEngine::Data &data);

protected:
    int cellX(int weekDay);
    int cellY(int week);

    void paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    void wheelEvent(QGraphicsSceneWheelEvent *event);
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
    void resizeEvent(QGraphicsSceneResizeEvent * event);

    virtual void paintCell(QPainter *p, int cell, int week, int weekDay, CellTypes type, const QDate &cellDate);
    virtual void paintBorder(QPainter *p, int cell, int week, int weekDay, CellTypes type, const QDate &cellDate);

private:
    QString buildOccurrenceDescription(const Plasma::DataEngine::Data &occurrence) const;

    friend class CalendarTablePrivate;
    CalendarTablePrivate* const d;

    Q_PRIVATE_SLOT(d, void populateCalendar())
    Q_PRIVATE_SLOT(d, void settingsChanged(int category))
};

}

Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::CalendarTable::CellTypes)

#endif