| 193 | } |
| 194 | |
| 195 | void QmitkTotalSegmentatorToolGUI::InitializeUI(QBoxLayout* mainLayout) |
| 196 | { |
| 197 | auto wrapperWidget = new QWidget(this); |
| 198 | mainLayout->addWidget(wrapperWidget); |
| 199 | m_Ui->setupUi(wrapperWidget); |
| 200 | |
| 201 | // Keep the task combo the same height as the Settings button they share the top |
| 202 | // row with; a QComboBox's default height is otherwise slightly shorter. |
| 203 | m_Ui->taskComboBox->setMinimumHeight(m_Ui->settingsButton->sizeHint().height()); |
| 204 | |
| 205 | m_Ui->runButton->setIcon(QmitkStyleManager::ThemeIcon( |
| 206 | QStringLiteral(":/org_mitk_icons/icons/tango/scalable/actions/media-playback-start.svg"))); |
| 207 | |
| 208 | connect(m_Ui->installButton, &QPushButton::clicked, this, &Self::OnInstallButtonClicked); |
| 209 | connect(m_Ui->settingsButton, &QPushButton::clicked, this, &Self::OnSettingsButtonClicked); |
| 210 | connect(m_Ui->runButton, &QPushButton::clicked, this, &Self::OnRunButtonClicked); |
| 211 | connect(m_Ui->taskComboBox, &QComboBox::currentIndexChanged, this, &Self::UpdateRunButtonState); |
| 212 | |
| 213 | auto prefService = mitk::CoreServices::GetPreferencesService(); |
| 214 | m_Preferences = prefService->GetSystemPreferences()->Node(PREFERENCES_NODE.toStdString()); |
| 215 | if (m_Preferences != nullptr) |
| 216 | { |
| 217 | m_Preferences->OnPropertyChanged += |
| 218 | mitk::MessageDelegate1<QmitkTotalSegmentatorToolGUI, const mitk::IPreferences::ChangeEvent&>( |
| 219 | this, &QmitkTotalSegmentatorToolGUI::OnPreferenceChangedEvent); |
| 220 | } |
| 221 | |
| 222 | this->RefreshInstallState(); |
| 223 | |
| 224 | Superclass::InitializeUI(mainLayout); |
| 225 | } |
| 226 | |
| 227 | mitk::TotalSegmentatorTool* QmitkTotalSegmentatorToolGUI::GetTool() |
| 228 | { |
nothing calls this directly
no test coverage detected