This file is indexed.

/usr/include/openrpt/OpenRPT/wrtembed/graphicssection.h is in libopenrpt-dev 3.3.7-1.

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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
 * OpenRPT report writer and rendering engine
 * Copyright (C) 2001-2014 by OpenMFG, LLC
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * Please contact info@openmfg.com with any questions on this license.
 */

#ifndef __GRAPHICSSECTION_H__
#define __GRAPHICSSECTION_H__

#include <QtGui>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsRectItem>
#include <QDomDocument>
#include <QList>

#include <parsexmlutils.h>

class ORGraphicsSectionItem;
class DocumentScene;

class ORSectionHandle : public QGraphicsRectItem
{
  public:
    enum { Type = UserType + 49 };

    ORSectionHandle(QGraphicsItem * parent = 0);

    int type() const { return Type; }

  protected:
    void mouseMoveEvent(QGraphicsSceneMouseEvent * event);
    void mousePressEvent(QGraphicsSceneMouseEvent * event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
};

class ORGraphicsSectionItem : public QGraphicsRectItem
{
  public:
    enum { Type = UserType + 50 };
    enum Highlight {
      Normal = 0,
      Origin,
      Destination
    };

    ORGraphicsSectionItem(QGraphicsItem * parent = 0);

    void setTitle(const QString & s);
    QString title() const;
    void highlightTitle(bool v);

    void buildXML(QDomDocument & doc, QDomElement & section);
    void initFromXML(QDomNode & section);

    int type() const { return Type; }

    void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );

    void highlight(enum Highlight mode);

  protected:
    //void contextMenuEvent(QGraphicsSceneContextMenuEvent * event);

    qreal _previousWidth;

  private:
    ORSectionHandle * _handle;
    QGraphicsSimpleTextItem * _title;
    bool _hightLighted;
};

class ORGraphicsSectionDetail;
class ORGraphicsSectionDetailGroup : public QObject
{
  Q_OBJECT

  public:
    ORGraphicsSectionDetailGroup(const QString &, ORGraphicsSectionDetail *, QObject * parent);
    ~ORGraphicsSectionDetailGroup();

    enum PageBreak
    {
      BreakNone = 0,
      BreakAfterGroupFooter = 1
    };

    void setTitle(const QString & s);
    void setColumn(const QString &);
    void showGroupHead(bool yes = true);
    void showGroupFoot(bool yes = true);
    void setPageBreak(int);

    QString getTitle() const { return _name; }
    QString column() const { return _column; }
    bool isGroupHeadShowing() const;
    bool isGroupFootShowing() const;
    int  pageBreak() const { return _pagebreak; }

    ORGraphicsSectionItem * getGroupHead() { return _head; }
    ORGraphicsSectionItem * getGroupFoot() { return _foot; }

  protected:
    QString _name;
    QString _column;

    ORGraphicsSectionItem * _head;
    ORGraphicsSectionItem * _foot;

    ORGraphicsSectionDetail * _rsd;

    int _pagebreak;
};

class ORGraphicsSectionDetail : public QObject
{
  Q_OBJECT

  public:
    ORGraphicsSectionDetail(DocumentScene * rptwin, QObject * parent);
    ~ORGraphicsSectionDetail();

    enum PageBreak
    {
      BreakNone = 0,
      BreakAtEnd = 1
    };

    void setTitle(const QString & s);
    void setQuery(const QString &);
    void setPageBreak(int);

    QString getTitle() const { return _name; }
    QString query() const { return _query; }
    int pageBreak() const { return _pagebreak; }

    ORGraphicsSectionItem * getDetail() { return _detail; }
    DocumentScene * reportWindow() { return _rw; }


    void buildXML(QDomDocument & doc, QDomElement & section);
    void initFromXML(QDomNode & node);

    int groupSectionCount() const;
    ORGraphicsSectionDetailGroup * getSection(int i);
    void insertSection(int idx, ORGraphicsSectionDetailGroup * rsd);
    int findSection(const QString & name);
    void removeSection(int idx, bool del = false);

    void adjustSize();

  protected:
    QString _query;

    QString _name;
    ORGraphicsSectionItem * _detail;
    DocumentScene * _rw;

    QList<ORGraphicsSectionDetailGroup*> groupList;

    int _pagebreak;
};

#endif