void TEditableToolbar::mouseReleaseEvent(QMouseEvent* event) { QToolBar::mouseReleaseEvent(event); if (size_grip) { QTimer::singleShot(1000, size_grip, SLOT(delayedShow())); } }
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())); }