This file is indexed.

/usr/include/choreonoid-1.1/cnoid/src/Base/TimeBar.h is in libcnoid-dev 1.1.0+dfsg-6.1+b4.

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
/**
   @author Shin'ichiro Nakaoka
*/

#ifndef CNOID_GUIBASE_TIME_BAR_H_INCLUDED
#define CNOID_GUIBASE_TIME_BAR_H_INCLUDED

#include <cnoid/ToolBar>
#include "exportdecl.h"

namespace cnoid {

    class ExtensionManager;
    class TimeBarImpl;

    class CNOID_EXPORT TimeBar : public ToolBar
    {
        class LogicalSum
        {
        public:
            typedef bool result_type;
            template<typename InputIterator>
            bool operator()(InputIterator first, InputIterator last) const {
                bool result = false;
                while(first != last){
                    result |= *first++;
                }
                return result;
            }
        };

        class LogicalProduct
        {
        public:
            typedef bool result_type;
            template<typename InputIterator>
            bool operator()(InputIterator first, InputIterator last) const {
                bool result = true;
                while(first != last){
                    result &= *first++;
                }
                return result;
            }
        };
        
      public:

        static void initialize(ExtensionManager* ext);
        static TimeBar* instance();

        /**
           \note If any connected slot returns false, the playback is canceled.
        */
        SignalProxy< boost::signal<bool(double time), LogicalProduct> > sigPlaybackInitialized();
        
        SignalProxy< boost::signal<void(double time)> > sigPlaybackStarted();
        SignalProxy< boost::signal<bool(double time), LogicalSum> > sigTimeChanged();
        SignalProxy< boost::signal<void(double time, bool isStoppedManually)> > sigPlaybackStopped();

        inline double time() const { return time_; }
        
        bool setTime(double time);

        double minTime() const;
        double maxTime() const;
        
        void setTimeRange(double min, double max);
        
        inline double frameRate() const { return frameRate_; }
        void setFrameRate(double rate);

        inline double timeStep() const { return 1.0 / frameRate_; }

        inline bool isBeatMode() const { return isBeatMode_; }
        inline double beatOffset() const { return beatOffset_; }
        inline double tempo() const { return tempo_; }
        double timeOfBeatLocation(double beatLocation) const;
        double beatLocationOfTime(double time) const;
        inline int beatNumerator() const { return beatNumerator_; }
        inline int beatDenominator() const { return beatDenominator_; }

        double playbackSpeedScale() const;
        double playbackFrameRate() const;

        void setRepeatMode(bool on);
	
        void startPlayback();
        void stopPlayback(bool isStoppedManually = false);
        bool isDoingPlayback();

        int startFillLevelUpdate();
        void updateFillLevel(int id, double time);
        void stopFillLevelUpdate(int id);

        virtual QSize minimumSizeHint () const;
        virtual QSize sizeHint () const;

      protected:

        virtual bool storeState(Archive& archive);
        virtual bool restoreState(const Archive& archive);
        
      private:
        TimeBar();
        virtual ~TimeBar();
        
        TimeBarImpl* impl;
        double time_;
        double frameRate_;
        bool isBeatMode_;
        double beatOffset_;
        double tempo_;
        int beatNumerator_;
        int beatDenominator_;

        friend class TimeBarImpl;
    };
}

#endif