visiannot.visiannot.components.TruncTemporalRangeWidget

Summary

Module defining TimeEditWidget

Classes

visiannot.visiannot.components.TruncTemporalRangeWidget.TruncTemporalRangeWidget(…)

Widget for selecting truncated temporal range

API

Class TruncTemporalRangeWidget

class visiannot.visiannot.components.TruncTemporalRangeWidget.TruncTemporalRangeWidget(visi, widget_position, trunc_duration)[source]

Bases: object

Widget for selecting truncated temporal range

Parameters
  • visi – associated instance of ViSiAnnoT

  • widget_position (tuple or list) – position of the widget in the layout of the associated instance of ViSiAnnoT

  • trunc_duration (tuple or list) – duration of the truncated temporal ranges, 2 integer elements (minute, second)

Methods:

call_combo_trunc(ite_trunc, visi)

Callback method for selecting a part of the video/signal defined by trunc_duration via the combo box combo_box

get_trunc_intervals(visi)

Gets the strings associated to the truncated temporal ranges

set_trunc(visi)

Sets duration of truncated temporal ranges and combo box items

Attributes:

trunc_duration

(tuple or list)

nframes_trunc

(int) Number of frames correpsonding to duration of truncated temporal ranges

nb_trunc

(int) Number of splits

combo_box

(ComboBox) Combo box for selecting a truncated temporal range

call_combo_trunc(ite_trunc, visi)[source]

Callback method for selecting a part of the video/signal defined by trunc_duration via the combo box combo_box

Connected to the signal currentIndexChanged of combo_box.

It sets the temporal range (ViSiAnnoT.first_frame and ViSiAnnoT.last_frame) with the selected value in the combo box. The current frame ViSiAnnoT.frame_id is set to the new ViSiAnnoT.first_frame. Then it calls the method ViSiAnnoT.update_signal_plot().

Parameters

ite_trunc (int) – index of the selected value in the combo box combo_box

get_trunc_intervals(visi)[source]

Gets the strings associated to the truncated temporal ranges

Parameters

visi – associated instance of ViSiAnnoT

Returns

list of strings

Return type

list

set_trunc(visi)[source]

Sets duration of truncated temporal ranges and combo box items

It sets the attributes nframes_trunc, combo_box

Parameters

visi – associated instance of ViSiAnnoT

combo_box

(ComboBox) Combo box for selecting a truncated temporal range

nb_trunc

(int) Number of splits

nframes_trunc

(int) Number of frames correpsonding to duration of truncated temporal ranges

trunc_duration

(tuple or list)