Example #1
0
void Settings::setValue(const QString& key, const QVariant& value)
{
	mSettings->setValue(key, value);
	this->sync();

	emit valueChangedFor(key);
}
TrackingSystemIGSTKService::TrackingSystemIGSTKService() :
				mConfigurationFilePath(""),
				mLoggingFolder(""),
				mState(Tool::tsNONE)
{
	connect(settings(), SIGNAL(valueChangedFor(QString)), this, SLOT(globalConfigurationFileChangedSlot(QString)));
	// initialize config file
	this->setConfigurationFile(profile()->getToolConfigFilePath());
}
Example #3
0
DataManagerImpl::DataManagerImpl(ActiveDataPtr activeData) :
	mClinicalApplication(mdNEUROLOGICAL),
	mActiveData(activeData)
{
	m_rMpr_History.reset(new RegistrationHistory());
	connect(m_rMpr_History.get(), &RegistrationHistory::currentChanged, this, &DataManager::rMprChanged);
	mPatientLandmarks = Landmarks::create();

	connect(settings(), SIGNAL(valueChangedFor(QString)), this, SLOT(settingsChangedSlot(QString)));
	this->readClinicalView();

	this->clear();
}
Example #4
0
void Settings::resetFile(QString filename)
{
	QStringList keys;
	if (mSettings)
		keys << mSettings->allKeys();

	mSettings.reset(new QSettings(filename, QSettings::IniFormat));

	if (mSettings)
		keys << mSettings->allKeys();

	keys.removeDuplicates();

	foreach (QString key, keys)
		emit valueChangedFor(key);
}
Example #5
0
ViewWrapper2D::ViewWrapper2D(ViewPtr view, VisServicesPtr backend) :
	ViewWrapper(backend),
	mOrientationActionGroup(new QActionGroup(view.get()))
{
	qRegisterMetaType<Vector3D>("Vector3D");
	mView = view;
	this->connectContextMenu(mView);

	// disable vtk interactor: this wrapper IS an interactor
	mView->getRenderWindow()->GetInteractor()->Disable();
	mView->getRenderer()->GetActiveCamera()->SetParallelProjection(true);
	double clipDepth = 1.0; // 1mm depth, i.e. all 3D props rendered outside this range is not shown.
	double length = clipDepth*10;
	mView->getRenderer()->GetActiveCamera()->SetPosition(0,0,length);
	mView->getRenderer()->GetActiveCamera()->SetClippingRange(length-clipDepth, length+0.1);
	connect(settings(), SIGNAL(valueChangedFor(QString)), this, SLOT(settingsChangedSlot(QString)));

	// slice proxy
	mSliceProxy = SliceProxy::create(mServices->patient());

	mDataRepContainer.reset(new DataRepContainer());
	mDataRepContainer->setSliceProxy(mSliceProxy);
	mDataRepContainer->setView(mView);

	mViewFollower = ViewFollower::create(mServices->patient());
	mViewFollower->setSliceProxy(mSliceProxy);

	addReps();

	mZoom2D.reset(new Zoom2DHandler());
	connect(mZoom2D.get(), SIGNAL(zoomChanged()), this, SLOT(viewportChanged()));

	connect(mServices->tracking().get(), SIGNAL(activeToolChanged(const QString&)), this, SLOT(activeToolChangedSlot()));
	connect(mView.get(), SIGNAL(resized(QSize)), this, SLOT(viewportChanged()));
	connect(mView.get(), SIGNAL(shown()), this, SLOT(showSlot()));
	connect(mView.get(), SIGNAL(mousePress(int, int, Qt::MouseButtons)), this, SLOT(mousePressSlot(int, int, Qt::MouseButtons)));
	connect(mView.get(), SIGNAL(mouseMove(int, int, Qt::MouseButtons)), this, SLOT(mouseMoveSlot(int, int, Qt::MouseButtons)));
	connect(mView.get(), SIGNAL(mouseWheel(int, int, int, int, Qt::MouseButtons)), this, SLOT(mouseWheelSlot(int, int, int, int, Qt::MouseButtons)));

	connect(mServices->patient().get(), &PatientModelService::videoAddedToTrackedStream, this, &ViewWrapper2D::videoSourcesChangedSlot);

	this->activeToolChangedSlot();
	this->updateView();
}