Exemplo n.º 1
0
GS2D_API AudioPtr CreateAudio(boost::any data)
{
	IrrKlangAudioPtr audio = IrrKlangAudio::Create(data);
	if (audio)
	{
		return audio;
	}
	return AudioPtr();
}
Exemplo n.º 2
0
GS2D_API AudioPtr CreateAudio(boost::any data)
{
	AudiereContextPtr audio = AudiereContext::Create(data);
	if (audio)
	{
		return audio;
	}
	return AudioPtr();
}
Exemplo n.º 3
0
GS2D_API AudioPtr CreateAudio(boost::any data)
{
	AudioPtr audio = AndroidAudioContext::Create(data);
	if (audio)
	{
		return audio;
	}
	else
	{
		return AudioPtr();
	}
}
Exemplo n.º 4
0
MainWindow::MainWindow() :
	mFullScreenAction(NULL),
	mStandard3DViewActions(new QActionGroup(this)),
	mControlPanel(NULL),
	mDockWidgets(new DynamicMainWindowWidgets(this)),
	mActions(NULL)
{
	this->setObjectName("MainWindow");

	mServices = VisServices::create(logicManager()->getPluginContext());
	mLayoutInteractor.reset(new LayoutInteractor());

    this->setCentralWidget(viewService()->createLayoutWidget(this, 0));

	mActions = new MainWindowActions(mServices, this);

	this->createActions();
	this->createMenus();
	this->createToolBars();
	this->setStatusBar(new StatusBar());

	reporter()->setAudioSource(AudioPtr(new AudioImpl()));

	connect(stateService().get(), &StateService::applicationStateChanged, this, &MainWindow::onApplicationStateChangedSlot);
	connect(stateService().get(), &StateService::workflowStateChanged, this, &MainWindow::onWorkflowStateChangedSlot);
	connect(stateService().get(), &StateService::workflowStateAboutToChange, this, &MainWindow::saveDesktopSlot);

	this->updateWindowTitle();

	this->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);

	this->addAsDockWidget(new PlaybackWidget(this), "Browsing");
	this->addAsDockWidget(new VideoConnectionWidget(mServices, this), "Utility");
	this->addAsDockWidget(new EraserWidget(mServices->patient(), mServices->view(), this), "Properties");
	this->addAsDockWidget(new MetricWidget(mServices->view(), mServices->patient(), this), "Utility");
	this->addAsDockWidget(new SlicePropertiesWidget(mServices->patient(), mServices->view(), this), "Properties");
	this->addAsDockWidget(new VolumePropertiesWidget(mServices, this), "Properties");
	this->addAsDockWidget(new ActiveMeshPropertiesWidget(mServices, this), "Properties");
	this->addAsDockWidget(new StreamPropertiesWidget(mServices->patient(), mServices->view(), this), "Properties");
	this->addAsDockWidget(new TrackPadWidget(this), "Utility");
	this->addAsDockWidget(new ActiveToolPropertiesWidget(mServices->tracking(), mServices->spaceProvider(), this), "Properties");
	this->addAsDockWidget(new NavigationWidget(this), "Properties");
	this->addAsDockWidget(new ConsoleWidget(this, "ConsoleWidget", "Console"), "Utility");
	this->addAsDockWidget(new ConsoleWidget(this, "ConsoleWidget2", "Extra Console"), "Utility");
//	this->addAsDockWidget(new ConsoleWidgetCollection(this, "ConsoleWidgets", "Consoles"), "Utility");
	this->addAsDockWidget(new FrameTreeWidget(mServices->patient(), this), "Browsing");
	this->addAsDockWidget(new ToolManagerWidget(this), "Debugging");
	this->addAsDockWidget(new PluginFrameworkWidget(this), "Browsing");
    this->addAsDockWidget(new FiltersWidget(VisServices::create(logicManager()->getPluginContext()), this), "Algorithms");
	this->addAsDockWidget(new ClippingPropertiesWidget(mServices, this), "Properties");

	this->addAsDockWidget(new BrowserWidget(this, mServices), "Browsing");

	connect(patientService().get(), &PatientModelService::patientChanged, this, &MainWindow::patientChangedSlot);
	connect(qApp, &QApplication::focusChanged, this, &MainWindow::focusChanged);

	this->setupGUIExtenders();

	// window menu must be created after all dock widgets are created
	QMenu* popupMenu = this->createPopupMenu();
	popupMenu->setTitle("Window");
	this->menuBar()->insertMenu(mHelpMenuAction, popupMenu);

	// show after window has been initialized
	QTimer::singleShot(0, this, SLOT(delayedShow()));
}
Exemplo n.º 5
0
MainWindow::~MainWindow()
{
	viewService()->deactivateLayout();
	reporter()->setAudioSource(AudioPtr()); // important! QSound::play fires a thread, causes segfault during shutdown
	mServiceListener.reset();
}
Exemplo n.º 6
0
MainWindow::MainWindow() :
	mFullScreenAction(NULL),
	mStandard3DViewActions(new QActionGroup(this)),
	mControlPanel(NULL),
	mDockWidgets(new DynamicMainWindowWidgets(this)),
	mActions(NULL)
{
	this->setObjectName("MainWindow");

	mServices = VisServices::create(logicManager()->getPluginContext());
	mLayoutInteractor.reset(new LayoutInteractor());

	this->setCentralWidget(viewService()->getLayoutWidget(this, 0));

	mActions = new MainWindowActions(mServices, this);

	this->createActions();
	this->createMenus();
	this->createToolBars();
	this->setStatusBar(new StatusBar());

	reporter()->setAudioSource(AudioPtr(new AudioImpl()));

	connect(stateService().get(), &StateService::applicationStateChanged, this, &MainWindow::onApplicationStateChangedSlot);
	connect(stateService().get(), &StateService::workflowStateChanged, this, &MainWindow::onWorkflowStateChangedSlot);
	connect(stateService().get(), &StateService::workflowStateAboutToChange, this, &MainWindow::saveDesktopSlot);

	this->updateWindowTitle();

	this->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);

	this->addAsDockWidget(new PlaybackWidget(this), "Browsing");
	this->addAsDockWidget(new VideoConnectionWidget(mServices, this), "Utility");
	this->addAsDockWidget(new EraserWidget(mServices->patientModelService, mServices->visualizationService, this), "Properties");
	this->addAsDockWidget(new MetricWidget(mServices->visualizationService, mServices->patientModelService, this), "Utility");
	this->addAsDockWidget(new SlicePropertiesWidget(mServices->patientModelService, mServices->visualizationService, this), "Properties");
	this->addAsDockWidget(new VolumePropertiesWidget(mServices->patientModelService, mServices->visualizationService, this), "Properties");
	this->addAsDockWidget(new MeshInfoWidget(mServices->patientModelService, mServices->visualizationService, this), "Properties");
	this->addAsDockWidget(new StreamPropertiesWidget(mServices->patientModelService, mServices->visualizationService, this), "Properties");
	this->addAsDockWidget(new TrackPadWidget(this), "Utility");
	this->addAsDockWidget(new ToolPropertiesWidget(this), "Properties");
	this->addAsDockWidget(new NavigationWidget(this), "Properties");
	this->addAsDockWidget(new ConsoleWidget(this, "ConsoleWidget", "Console"), "Utility");
	this->addAsDockWidget(new ConsoleWidget(this, "ConsoleWidget2", "Extra Console"), "Utility");
//	this->addAsDockWidget(new ConsoleWidgetCollection(this, "ConsoleWidgets", "Consoles"), "Utility");
	this->addAsDockWidget(new FrameTreeWidget(mServices->patientModelService, this), "Browsing");
	this->addAsDockWidget(new ToolManagerWidget(this), "Debugging");
	this->addAsDockWidget(new PluginFrameworkWidget(this), "Browsing");
	this->addAsDockWidget(new AllFiltersWidget(VisServices::create(logicManager()->getPluginContext()), this), "Algorithms");

	connect(patientService().get(), &PatientModelService::patientChanged, this, &MainWindow::patientChangedSlot);
	connect(qApp, &QApplication::focusChanged, this, &MainWindow::focusChanged);

	this->setupGUIExtenders();

	// window menu must be created after all dock widgets are created
	QMenu* popupMenu = this->createPopupMenu();
	popupMenu->setTitle("Window");
	this->menuBar()->insertMenu(mHelpMenuAction, popupMenu);

	// Restore saved window states
	// Must be done after all DockWidgets are created
	if (restoreGeometry(settings()->value("mainWindow/geometry").toByteArray()))
	{
		this->show();
	}
	else
	{
		this->showMaximized();
	}

	if (settings()->value("gui/fullscreen").toBool())
		this->setWindowState(this->windowState() | Qt::WindowFullScreen);
}