void squareToolDock::processToolChange(squareDockToolButton* button) { if (curToolButton_ != button) { const toolChangeData deactivationData = curToolButton_->deactivate(); processToolChange(T_DEACTIVATE, deactivationData); const toolChangeData activationData = button->activate(); processToolChange(T_ACTIVATE, activationData); curToolButton_ = button; emit announceToolChanged(curToolButton_->toolIndex()); } else { // the button toggles up/down each time it gets pressed, so undo that curToolButton_->setDown(true); } }
void TomographyIfacePresenter::notify( ITomographyIfacePresenter::Notification notif) { switch (notif) { case ITomographyIfacePresenter::SetupResourcesAndTools: processSetup(); break; case ITomographyIfacePresenter::CompResourceChanged: processCompResourceChange(); break; case ITomographyIfacePresenter::ToolChanged: processToolChange(); break; case ITomographyIfacePresenter::TomoPathsChanged: processTomoPathsChanged(); break; case ITomographyIfacePresenter::LogInRequested: processLogin(); break; case ITomographyIfacePresenter::LogOutRequested: processLogout(); break; case ITomographyIfacePresenter::SetupReconTool: processSetupReconTool(); break; case ITomographyIfacePresenter::RunReconstruct: processRunRecon(); break; case ITomographyIfacePresenter::RefreshJobs: processRefreshJobs(); break; case ITomographyIfacePresenter::CancelJobFromTable: processCancelJobs(); break; case ITomographyIfacePresenter::VisualizeJobFromTable: processVisualizeJobs(); break; case ITomographyIfacePresenter::ViewImg: processViewImg(); break; case ITomographyIfacePresenter::LogMsg: processLogMsg(); break; case ITomographyIfacePresenter::ShutDown: processShutDown(); break; } }