timeline_view¶
- class janim.gui.timeline_view.TimelineView(parent: QWidget | None = None)¶
基类:
QWidget窗口下方的进度条和动画区段指示器
w 键放大区段(使视野精确到一小段中)
s 键缩小区段(使视野扩展到一大段中)
a 和 d 左右移动区段
- class LabelInfo(anim: Animation, row: int, segment_left: int)¶
基类:
object动画区段被渲染到第几行的标记
- row: int¶
- segment_left: int¶
- class PixelRange(left: float, width: float)¶
基类:
object- left: float¶
- width: float¶
- property right: float¶
- class Pressing(w: bool = False, a: bool = False, s: bool = False, d: bool = False)¶
基类:
object记录按键状态
- w: bool = False¶
- a: bool = False¶
- s: bool = False¶
- d: bool = False¶
- value_changed¶
- dragged¶
- space_pressed¶
- audio_height = 20¶
- label_height = 24¶
- range_tip_height = 4¶
- play_space = 20¶
- set_anim(anim: TimelineAnim, pause_progresses: list[int]) None¶
- init_label_info() None¶
计算各个动画区段应当被渲染到第几行,以叠放式进行显示
- set_range(at: float, duration: float) None¶
- hover_at(pos: QPoint) None¶
- hover_at_audio(pos: QPoint, info: PlayAudioInfo) None¶
- create_audio_chart(info: PlayAudioInfo, near: float | None = None) QChartView¶
- static create_axvspan(x1: float, x2: float, c1: QColor, c2: QColor) QAreaSeries¶
- place_tooltip(tooltip: QWidget, pos: QPoint) None¶
- hide_tooltip() None¶
- on_hover_timer_timeout() None¶
- on_drag_timer_timeout() None¶
- on_key_timer_timeout() None¶
- set_progress(progress: int) None¶
- progress() int¶
- at_end() bool¶
- progress_to_time(progress: int) float¶
- time_to_progress(time: float) int¶
- time_to_pixel(time: float) float¶
- pixel_to_time(pixel: float) float¶
- progress_to_pixel(progress: int) float¶
- pixel_to_progress(pixel: float) int¶
- time_range_to_pixel_range(range: TimeRange) PixelRange¶
- set_progress_by_x(x: float) None¶
- mousePressEvent(event: QMouseEvent) None¶
- mouseMoveEvent(event: QMouseEvent) None¶
- mouseReleaseEvent(event: QMouseEvent) None¶
- leaveEvent(_) None¶
- keyPressEvent(event: QKeyEvent) None¶
- keyReleaseEvent(event: QKeyEvent) None¶
- wheelEvent(event: QWheelEvent) None¶
- paintEvent(_: QPaintEvent) None¶
- property audio_rect: QRect¶
- property bottom_rect: QRect¶
- label_y(row: int) float¶
- paint_label(p: QPainter, time_range: TimeRange, y: float, height: float, txt: str, stroke: QPen | QColor, fill: QBrush | QColor, is_anim_lable: bool) None¶
- paint_line(p: QPainter, time: float) None¶
- staticMetaObject = PySide6.QtCore.QMetaObject("TimelineView" inherits "QWidget": Methods: #33 type=Signal, signature=value_changed(double), parameters=double #34 type=Signal, signature=dragged() #35 type=Signal, signature=space_pressed() )¶