This file is indexed.

/usr/include/kpimidentities/signatureconfigurator.h is in kdepimlibs5-dev 4:4.14.10-7+b2.

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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/*  -*- c++ -*-
    Copyright 2008 Thomas McGuire <Thomas.McGuire@gmx.net>
    Copyright 2008 Edwin Schepers <yez@familieschepers.nl>
    Copyright 2008 Tom Albers <tomalbers@kde.nl>
    Copyright 2004 Marc Mutz <mutz@kde.org>

    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, see <http://www.gnu.org/licenses/>.
*/

#ifndef KPIMIDENTITIES_SIGNATURECONFIGURATOR_H
#define KPIMIDENTITIES_SIGNATURECONFIGURATOR_H

#include "kpimidentities_export.h"
#include "signature.h" // for Signature::Type
#include <QWidget>

using KPIMIdentities::Signature;

class QCheckBox;
class KComboBox;
class KUrlRequester;
class KLineEdit;
class KToolBar;
class KRichTextWidget;
class QString;
class QPushButton;
class QTextEdit;
class QTextCharFormat;

namespace KPIMIdentities {

  /**
    * This widget gives an interface so users can edit their signature.
    * You can set a signature via setSignature(), let the user edit the
    * signature and when done, read the signature back.
    */
class KPIMIDENTITIES_EXPORT SignatureConfigurator : public QWidget
{
  Q_OBJECT
  public:
     /**
       * Constructor
       */
    explicit SignatureConfigurator( QWidget * parent = 0 );

    /**
      * destructor
      */
    virtual ~SignatureConfigurator();

    /**
      * Enum for the different viemodes.
      */
    enum ViewMode { ShowCode, ShowHtml };

    /**
      * Indicated if the user wants a signature
      */
    bool isSignatureEnabled() const;

    /**
      * Use this to activate the signature.
      */
    void setSignatureEnabled( bool enable );

    /**
      * This returns the type of the signature,
      * so that can be Disabled, Inline, fromFile, etc.
      */
    Signature::Type signatureType() const;

    /**
      * Set the signature type to @p type.
      */
    void setSignatureType( Signature::Type type );

    /**
      * Returns the inline text, only useful
      * when this is the appropriate Signature::Type
      */
    QString inlineText() const;

    /**
      * Make @p text the text for the signature.
      */
    void setInlineText( const QString & text );

    /**
      * Returns the file url which the user wants
      * to use as a signature.
      */
    QString fileURL() const;

    /**
      * Set @p url for the file url part of the
      * widget.
      */
    void setFileURL( const QString & url );

    /**
      * Returns the url of the command which the
      * users wants to use as signature.
      */
    QString commandURL() const;

    /**
      * Sets @p url as the command to execute.
      */
    void setCommandURL( const QString & url );

    /**
       Conveniece method.
       @return a Signature object representing the state of the widgets.
     **/
    Signature signature() const;

    /**
       Convenience method. Sets the widgets according to @p sig
       @param sig the signature to configure
    **/
    void setSignature( const Signature & sig );

    /**
     * Sets the directory where the images used in the HTML signature will be stored.
     * Needs to be called before calling setSignature(), as each signature should use
     * a different location.
     * The directory needs to exist, it will not be created.
     * @param path the image location to set
     * @since 4.4
     * @sa Signature::setImageLocation
     */
    void setImageLocation( const QString &path );

    /**
     * Sets the image location to the image location of a given identity, which is
     * emailidentities/<identity-id>/.
     *
     * @param identity The identity whose unique ID will be used to determine the image
     *                 location.
     * @since 4.4
     */
    void setImageLocation( const Identity &identity );

  private:
    void toggleHtmlBtnState( ViewMode state );

    void initHtmlState();

    // Returns the current text of the textedit as HTML code, but strips
    // unnecessary tags Qt inserts
    QString asCleanedHTML() const;

  protected Q_SLOTS:
    void slotEnableEditButton( const QString & );
    void slotEdit();
    void slotSetHtml();

  protected:

    // TODO: KDE5: BIC: Move to private class!
    QCheckBox       * mEnableCheck;
    QCheckBox       * mHtmlCheck;
    KComboBox       * mSourceCombo;
    KUrlRequester   * mFileRequester;
    QPushButton     * mEditButton;
    KLineEdit       * mCommandEdit;
    KToolBar        * mEditToolBar;
    KToolBar        * mFormatToolBar;
    KRichTextWidget * mTextEdit;      // Grmbl, why is this not in the private class? 
                                      // This is a KPIMTextEdit::TextEdit, really.

  private:
    //@cond PRIVATE
    class Private;
    Private *const d;
    //@endcond
};

}

#endif