Interval Struct
struct QMediaTimeRange::IntervalQMediaTimeRange::Interval クラスは時間間隔を整数精度で表します。詳細...
パブリック関数
Interval(qint64 start, qint64 end) | |
bool | contains(qint64 time) const |
qint64 | end() const |
bool | isNormal() const |
QMediaTimeRange::Interval | normalized() const |
qint64 | start() const |
QMediaTimeRange::Interval | translated(qint64 offset) const |
関連する非メンバー
bool | operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs) |
bool | operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs) |
詳細説明
インターバルは、start() とend() の時刻を含めて指定する。これは不変クラスなので、コンストラクタで設定する必要があります。このクラスが表す特定の時間単位は定義されておらず、符号付き 64 ビット整数で表すことができる任意の時間に適しています。
isNormal() メソッドは、時間間隔が正常かどうかを判定します(正常な時間間隔はstart() <=end() です)。normalized() メソッドを呼び出すことで、異常な時間間隔から正常な時間間隔を受け取ることができる。
contains() メソッドは、指定された時刻が時間間隔内にあるかどうかを判定する。
translated() メソッドは、指定されたオフセットだけ時間を前後に変換した時間間隔を返す。
QMediaTimeRangeも参照 。
メンバ関数ドキュメント
[explicit constexpr noexcept]
Interval::Interval(qint64 start, qint64 end)
指定されたstart とend の時間を持つ区間を構築する。
[constexpr noexcept]
bool Interval::contains(qint64 time) const
時間間隔が指定されたtime を含む場合に真を返す。すなわち、start() <= time <=end()。
[constexpr noexcept]
qint64 Interval::end() const
インターバルの終了時刻を返す。
start()も参照 。
[constexpr noexcept]
bool Interval::isNormal() const
この時間間隔が正常であれば真を返す。正常な時間間隔は、start() <=end() である。
normalized()も参照のこと 。
[constexpr]
QMediaTimeRange::Interval Interval::normalized() const
この区間を正規化したものを返す。
区間のstart() 時刻がend() 時刻よりも大きい場合、返される区間は開始時刻と終了時刻が入れ替わったものとなる。
[constexpr noexcept]
qint64 Interval::start() const
インターバルの開始時刻を返す。
end()も参照 。
[constexpr]
QMediaTimeRange::Interval Interval::translated(qint64 offset) const
この時間間隔のコピーを、offset の値で変換して返します。 間隔は、正のオフセットで時間を進め、負のオフセットで時間を戻すことができます。
関連する非会員
[constexpr noexcept]
bool operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)
lhs がrhs と正確に等しくない場合に真を返す。
[constexpr noexcept]
bool operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)
lhs がrhs と正確に等しい場合に真を返す。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.