Exemplo n.º 1
0
void plot_canvas::ensure_canvas_size(int ww, int hh)
{
  if (! m_img)
    {
      prepare_image_buffer (ww, hh);
    }
  else if (m_img->getWidth() != ww || m_img->getHeight() != hh)
    {
      prepare_image_buffer (ww, hh);
    }
}
Exemplo n.º 2
0
//start button handler
void MainWindow::on_start_clicked()
{
	switch(tracker_state)
	{
	case STATE_NOT_STARTED:
		//start the tracker...
		tracker_state = STATE_STARTED_TRACKING;
		update_gui();
		video_loader.reset();
		//if (config->detect_elevator_events) prepare_elevator_detector();
		if (config->record_activity) prepare_image_buffer();
		start_tracking();
		break;
	case STATE_STARTED_TRACKING:
		//pause the tracker...
		update_trace_list();
		//Update the target table
		update_target_list();
		//Update the elevator list table
		update_event_list();

		tracker_state = STATE_STOPPED_TRACKING;
		update_gui();
		break;
	case STATE_STOPPED_TRACKING:
		//resume the tracker...

		//Update the trace table
		update_trace_list();
		//Update the target table
		update_target_list();
		//Update the elevator list table
		update_event_list();

		tracker_state = STATE_STARTED_TRACKING;
		update_gui();
		start_tracking();
		break;
	}
}