Exemplo n.º 1
0
void MainWindowActions::toggleTrackingSlot()
{
	if (trackingService()->getState() >= Tool::tsTRACKING)
		trackingService()->setState(Tool::tsINITIALIZED);
	else
		trackingService()->setState(Tool::tsTRACKING);
}
Exemplo n.º 2
0
void MainWindowActions::createTrackingActions()
{
	this->createAction("ConfigureTools", "Tool configuration",
					   QIcon(), QKeySequence(), "",
					   &MainWindowActions::configureSlot);

	boost::function<void()> finit = boost::bind(&TrackingService::setState, trackingService(), Tool::tsINITIALIZED);
	this->createAction("InitializeTools", "Initialize",
					   QIcon(), QKeySequence(), "",
					   finit);

	mTrackingToolsAction = this->createAction("TrackingTools", "Start tracking",
											  QIcon(), QKeySequence("Ctrl+T"), "",
											  &MainWindowActions::toggleTrackingSlot);

	connect(trackingService().get(), &TrackingService::stateChanged, this, &MainWindowActions::updateTrackingActionSlot);
	this->updateTrackingActionSlot();
}
Exemplo n.º 3
0
void MainWindowActions::updateTrackingActionSlot()
{
	if (trackingService()->getState() >= Tool::tsTRACKING)
	{
		mTrackingToolsAction->setIcon(QIcon(":/icons/polaris-green.png"));
		mTrackingToolsAction->setText("Stop Tracking");
	}
	else
	{
		mTrackingToolsAction->setIcon(QIcon(":/icons/polaris-red.png"));
		mTrackingToolsAction->setText("Start Tracking");
	}
}
Exemplo n.º 4
0
void ToolImagePreviewWidget::previewFileSlot(const QString& absoluteFilePath)
{
	TrackerConfigurationPtr config = trackingService()->getConfiguration();
	const QString imageAbsoluteFilePath = config->getTool(absoluteFilePath).mPictureFilename;
	ImagePreviewWidget::previewFileSlot(imageAbsoluteFilePath);
}
Exemplo n.º 5
0
NavigationWidget::NavigationWidget(QWidget* parent) :
    BaseWidget(parent, "NavigationWidget", "Navigation Properties"),
    mVerticalLayout(new QVBoxLayout(this)),
    mCameraGroupBox(new QGroupBox(tr("Camera Style"), this)),
    mCameraGroupLayout(new QVBoxLayout())
{
	this->setToolTip("Camera follow style");
  //camera setttings
  mCameraGroupBox->setLayout(mCameraGroupLayout);

  QToolBar* toolBar = new QToolBar(this);
  mCameraGroupLayout->addWidget(toolBar);
  toolBar->addActions(viewService()->createInteractorStyleActionGroup()->actions());

  DoublePropertyBasePtr offset = DoublePropertyActiveToolOffset::create(ActiveToolProxy::New(trackingService()));
  QWidget* toolOffsetWidget = new SliderGroupWidget(this, offset);

  //layout
  this->setLayout(mVerticalLayout);
  mVerticalLayout->addWidget(mCameraGroupBox);
  mVerticalLayout->addWidget(toolOffsetWidget);
  mVerticalLayout->addStretch();
}
Exemplo n.º 6
0
void MainWindowActions::configureSlot()
{
	trackingService()->setState(Tool::tsCONFIGURED);
}