This file is indexed.

/usr/include/qgis/qgsdockwidget.h is in libqgis-dev 2.18.17+dfsg-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
/***************************************************************************
                             qgsdockwidget.h
                             ---------------
    begin                : June 2016
    copyright            : (C) 2016 by Nyall Dawson
    email                : nyall dot dawson at gmail dot com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef QGSDOCKWIDGET_H
#define QGSDOCKWIDGET_H

#include <QDockWidget>

/** \ingroup gui
 * \class QgsDockWidget
 * QgsDockWidget subclass with more fine-grained control over how the widget is closed or opened.
 * \note added in 2.16
 */

class GUI_EXPORT QgsDockWidget : public QDockWidget
{
    Q_OBJECT

  public:

    /** Constructor for QgsDockWidget.
     * @param parent parent widget
     * @param flags window flags
     */
    explicit QgsDockWidget( QWidget* parent = nullptr, Qt::WindowFlags flags = 0 );

    /** Constructor for QgsDockWidget.
     * @param title dock title
     * @param parent parent widget
     * @param flags window flags
     */
    explicit QgsDockWidget( const QString &title, QWidget* parent = nullptr, Qt::WindowFlags flags = 0 );

  public slots:

    /** Sets the dock widget as visible to a user, ie both shown and raised to the front.
     * @param visible set to true to show the dock to the user, or false to hide the dock.
     * When setting a dock as user visible, the dock will be opened (if it is not already
     * opened) and raised to the front.
     * When setting as hidden, the following logic is used:
     * - hiding a dock which is open but not raised (ie hidden by another tab) will have no
     * effect, and the dock will still be opened and hidden by the other tab
     * - hiding a dock which is open and raised (ie, user visible) will cause the dock to
     * be closed
     * - hiding a dock which is closed has no effect and raises no signals
     * @see isUserVisible()
     */
    void setUserVisible( bool visible );

    /** Returns true if the dock is both opened and raised to the front (ie not hidden by
     * any other tabs.
     * @see setUserVisible()
     */
    bool isUserVisible() const;

  protected:

    virtual void closeEvent( QCloseEvent * ) override;
    virtual void showEvent( QShowEvent* event ) override;

  signals:

    /** Emitted when dock widget is closed.
     * @see closedStateChanged()
     * @see opened()
     */
    void closed();

    /** Emitted when dock widget is closed (or opened).
     * @param wasClosed will be true if dock widget was closed, or false if dock widget was opened
     * @see closed()
     * @see openedStateChanged()
     */
    void closedStateChanged( bool wasClosed );

    /** Emitted when dock widget is opened.
     * @see openedStateChanged()
     * @see closed()
     */
    void opened();

    /** Emitted when dock widget is opened (or closed).
     * @param wasOpened will be true if dock widget was opened, or false if dock widget was closed
     * @see closedStateChanged()
     * @see opened()
     */
    void openedStateChanged( bool wasOpened );

  private slots:

    void handleVisibilityChanged( bool visible );

  private:

    bool mVisibleAndActive;

};
#endif //QGSDOCKWIDGET_H