This file is indexed.

/usr/include/kparts/factory.h is in kdelibs5-dev 4:4.13.3-0ubuntu0.5.

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
/* This file is part of the KDE project
   Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
             (C) 1999 David Faure <faure@kde.org>

   This library 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 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/
#ifndef __kparts_factory_h__
#define __kparts_factory_h__

#include <klibloader.h>

#include <kparts/kparts_export.h>

class QWidget;

namespace KParts
{

class Part;

/**
 * A generic factory object to create a Part.
 *
 * Factory is an abstract class. Reimplement the
 * createPartObject() method to give it functionality.
 *
 * @see KLibFactory.
 */
class KPARTS_EXPORT Factory : public KLibFactory
{
  Q_OBJECT
public:
  Factory( QObject *parent = 0 );
  virtual ~Factory();

    /**
     * Creates a part.
     *
     * The QStringList can be used to pass additional arguments to the part.
     * If the part needs additional arguments, it should take them as
     * name="value" pairs. This is the way additional arguments will get passed
     * to the part from eg. khtml. You can for example emebed the part into HTML
     * by using the following code:
     * \code
     *    <object type="my_mimetype" data="url_to_my_data">
     *        <param name="name1" value="value1">
     *        <param name="name2" value="value2">
     *    </object>
     * \endcode
     * This could result in a call to
     * \code
     *     createPart( parentWidget, parentObject, "KParts::Part",
     *                 QStringList("name1="value1"", "name2="value2") );
     * \endcode
     *
     * @returns the newly created part.
     *
     * createPart() automatically emits a signal KLibFactory::objectCreated to tell
     * the library about its newly created object.  This is very
     * important for reference counting, and allows unloading the
     * library automatically once all its objects have been destroyed.
     */
     Part *createPart( QWidget *parentWidget = 0, QObject *parent = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() );

     /**
      * If you have a part contained in a shared library you might want to query
      * for meta-information like the about-data, or the KComponentData in general.
      * If the part is exported using KParts::GenericFactory then this method will
      * return the instance that belongs to the part without the need to instantiate
      * the part component.
      */
     virtual KComponentData partComponentData();

     /**
      * A convenience method for partComponentData that takes care of retrieving
      * the factory for a given library name and calling partComponentData on it.
      *
      * @param libraryName name of the library to query the instance from
      */
     static KComponentData partComponentDataFromLibrary(const QString &libraryName);

protected:

    /**
     * Reimplement this method in your implementation to create the Part.
     *
     * The QStringList can be used to pass additional arguments to the part.
     * If the part needs additional arguments, it should take them as
     * name="value" pairs. This is the way additional arguments will get passed
     * to the part from eg. khtml. You can for example emebed the part into HTML
     * by using the following code:
     * \code
     *    <object type="my_mimetype" data="url_to_my_data">
     *        <param name="name1" value="value1">
     *        <param name="name2" value="value2">
     *    </object>
     * \endcode
     * This could result in a call to
     * \code
     *     createPart( parentWidget, parentObject, "KParts::Part",
     *                 QStringList("name1="value1"", "name2="value2") );
     * \endcode
     *
     * @returns the newly created part.
     */
    virtual Part *createPartObject( QWidget *parentWidget = 0, QObject *parent = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList() ) = 0;

    /**
     * Reimplemented from KLibFactory. Calls createPart()
     */
    virtual QObject *createObject( QObject *parent = 0, const char *classname = "QObject", const QStringList &args = QStringList() );

};

}

/*
 * vim: et sw=4
 */

#endif