コード例 #1
0
ファイル: tframehandle.cpp プロジェクト: SaierMe/opentoonz
void TFrameHandle::startPlaying(bool looping) {
  if (m_previewFrameRate == 0) return;
  if (isScrubbing()) stopScrubbing();
  setTimer(m_previewFrameRate);
  m_looping = looping;
  emit playStarted();
}
コード例 #2
0
ファイル: w_piano.cpp プロジェクト: an146/vomid
WPiano::WPiano(File *_file, vmd_track_t *_track, vmd_time_t time, Player *_player)
	:file_(_file),
	track_(_track),
	grid_size_(file()->division),
	mouse_captured_(false),
	cursor_time_(grid_snap_left(this, time)),
	cursor_size_(file()->division),
	cursor_level_(0),
	pivot_enabled_(false),
	selection_(NULL),
	player_(_player)
{
	int w = time2x(vmd_file_length(file()));
	int h = margin * 2 + level_height * levels(track());
	setMinimumSize(w, h);
	setPalette(PianoPalette());
	setFocusPolicy(Qt::StrongFocus);

	connect(file_, SIGNAL(acted()), this, SLOT(update()));
	connect(player_, SIGNAL(started()), this, SLOT(playStarted()));
	connect(player_, SIGNAL(finished()), this, SLOT(playStopped()));
	if (playing())
		playStarted();
}