QMediaTimeRange Class
QMediaTimeRangeクラスは、0個以上の不連続な時間間隔の集合を表します。詳細...
ヘッダ | #include <QMediaTimeRange> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
注意:このクラスの関数はすべてリエントラントです。
パブリック型
struct | Interval |
パブリック関数
QMediaTimeRange() | |
QMediaTimeRange(const QMediaTimeRange::Interval &interval) | |
QMediaTimeRange(qint64 start, qint64 end) | |
QMediaTimeRange(const QMediaTimeRange &range) | |
QMediaTimeRange(QMediaTimeRange &&other) | |
~QMediaTimeRange() | |
void | addInterval(const QMediaTimeRange::Interval &interval) |
void | addInterval(qint64 start, qint64 end) |
void | addTimeRange(const QMediaTimeRange &range) |
void | clear() |
bool | contains(qint64 time) const |
qint64 | earliestTime() const |
QList<QMediaTimeRange::Interval> | intervals() const |
bool | isContinuous() const |
bool | isEmpty() const |
qint64 | latestTime() const |
void | removeInterval(const QMediaTimeRange::Interval &interval) |
void | removeInterval(qint64 start, qint64 end) |
void | removeTimeRange(const QMediaTimeRange &range) |
void | swap(QMediaTimeRange &other) |
QMediaTimeRange & | operator+=(const QMediaTimeRange &other) |
QMediaTimeRange & | operator+=(const QMediaTimeRange::Interval &interval) |
QMediaTimeRange & | operator-=(const QMediaTimeRange &other) |
QMediaTimeRange & | operator-=(const QMediaTimeRange::Interval &interval) |
QMediaTimeRange & | operator=(QMediaTimeRange &&other) |
QMediaTimeRange & | operator=(const QMediaTimeRange &other) |
QMediaTimeRange & | operator=(const QMediaTimeRange::Interval &interval) |
関連する非メンバー
bool | operator!=(const QMediaTimeRange &lhs, const QMediaTimeRange &rhs) |
QMediaTimeRange | operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2) |
QMediaTimeRange | operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2) |
bool | operator==(const QMediaTimeRange &lhs, const QMediaTimeRange &rhs) |
詳細説明
earliestTime()、latestTime()、intervals()、isEmpty() メソッドは、現在の時間範囲に関する情報を取得するために使用します。
addInterval()、removeInterval()、clear() メソッドは、現在の時間範囲を変更するために使用される。
時間範囲に区間を追加したり削除したりする場合、時間範囲内のすべての区間が区別され、分離されたままであることを保証するために、時間範囲内の既存の区間を拡張、トリム、削除、結合、分割することができる。結果として、時間範囲に追加または削除されたすべての区間は、normal 。
QMediaTimeRange::Intervalも参照のこと 。
メンバ関数ドキュメント
QMediaTimeRange::QMediaTimeRange()
空の時間範囲を構築する。
QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange::Interval &interval)
初期区間interval を含む時間範囲を構築する。
interval がnormal でない場合、結果の時間範囲は空になる。
addInterval()も参照 。
[explicit]
QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end)
start からend を含む初期区間を含む時間範囲を構築する。
区間がnormal でない場合、結果の時間範囲は空になる。
addInterval()も参照 。
[noexcept]
QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range)
別の時間range をコピーして時間範囲を構築する。
[noexcept]
QMediaTimeRange::QMediaTimeRange(QMediaTimeRange &&other)
other から移動して時間範囲を構築する。
[noexcept]
QMediaTimeRange::~QMediaTimeRange()
破壊者。
void QMediaTimeRange::addInterval(const QMediaTimeRange::Interval &interval)
指定されたinterval を時間範囲に追加する。
normal でない区間の追加は無効であり、無視される。
指定された区間が時間範囲内の既存の区間に隣接しているか、重なっている場合、これらの区間はマージされる。
この処理には線形時間がかかる。
removeInterval()も参照のこと 。
void QMediaTimeRange::addInterval(qint64 start, qint64 end)
これはオーバーロードされた関数である。
start とend で指定された区間を時間範囲に追加する。
addInterval()も参照のこと 。
void QMediaTimeRange::addTimeRange(const QMediaTimeRange &range)
range の各区間をこの時間範囲に追加する。
range の各区間に対してaddInterval() を呼び出すのと等価である。
void QMediaTimeRange::clear()
時間範囲からすべての区間を削除する。
removeInterval()も参照 。
bool QMediaTimeRange::contains(qint64 time) const
指定されたtime が時間範囲内にある場合、true を返す。
qint64 QMediaTimeRange::earliestTime() const
時間範囲内で最も早い時刻を返す。
空の時間範囲の場合、この値は 0 になります。
latestTime()も参照 。
QList<QMediaTimeRange::Interval> QMediaTimeRange::intervals() const
この時間範囲に含まれる間隔のリストを返します。
bool QMediaTimeRange::isContinuous() const
時間範囲が連続区間である場合に真を返す。つまり、時間範囲内に1つ以下の不連続な区間が存在する。
bool QMediaTimeRange::isEmpty() const
時間範囲内に区間がない場合は真を返す。
intervals()も参照 。
qint64 QMediaTimeRange::latestTime() const
時間範囲内の最新時刻を返す。
空の時間範囲の場合、この値は 0 になります。
earliestTime()も参照 。
void QMediaTimeRange::removeInterval(const QMediaTimeRange::Interval &interval)
時間範囲から指定されたinterval を削除する。
normal でない区間の削除は無効であり、無視されます。
時間範囲内の区間は、時間範囲内のどの区間もターゲット区間の一部を含まないように、トリム、分割、または削除される。
この処理には線形時間がかかる。
addInterval()も参照のこと 。
void QMediaTimeRange::removeInterval(qint64 start, qint64 end)
これはオーバーロードされた関数である。
start とend で指定された区間を時間範囲から削除する。
removeInterval()も参照のこと 。
void QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range)
この時間範囲からrange の各区間を削除する。
range の各区間に対してremoveInterval() を呼び出すのと等価である。
[noexcept]
void QMediaTimeRange::swap(QMediaTimeRange &other)
現在のインスタンスをother と交換する。
QMediaTimeRange &QMediaTimeRange::operator+=(const QMediaTimeRange &other)
other の各区間を時間範囲に追加し、結果を返す。
QMediaTimeRange &QMediaTimeRange::operator+=(const QMediaTimeRange::Interval &interval)
指定されたinterval を時間範囲に追加し、結果を返す。
QMediaTimeRange &QMediaTimeRange::operator-=(const QMediaTimeRange &other)
other の各区間を時間範囲から削除し、結果を返す。
QMediaTimeRange &QMediaTimeRange::operator-=(const QMediaTimeRange::Interval &interval)
指定されたinterval を時間範囲から削除し、結果を返す。
[noexcept]
QMediaTimeRange &QMediaTimeRange::operator=(QMediaTimeRange &&other)
other をこの時間帯に移動する。
[noexcept]
QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeRange &other)
other の時間範囲のコピーを取り、それ自身を返す。
QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeRange::Interval &interval)
時間範囲を単一の連続インターバルに設定、interval 。
関連する非会員
bool operator!=(const QMediaTimeRange &lhs, const QMediaTimeRange &rhs)
lhs に含まれる1つ以上の区間がrhs に存在しない場合、true を返す。
QMediaTimeRange operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
r1 とr2 の和を含む時間範囲を返す。
QMediaTimeRange operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
r1 からr2 を引いた時間範囲を返す。
bool operator==(const QMediaTimeRange &lhs, const QMediaTimeRange &rhs)
lhs のすべての区間がrhs に存在する場合、true を返す。
© 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.