MCPcopy Create free account
hub / github.com/MITK/MITK / InitializeUI

Method InitializeUI

Modules/PythonSegmentationUI/src/QmitkTotalSegmentatorToolGUI.cpp:195–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void 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
227mitk::TotalSegmentatorTool* QmitkTotalSegmentatorToolGUI::GetTool()
228{

Callers

nothing calls this directly

Calls 5

RefreshInstallStateMethod · 0.95
setIconMethod · 0.80
sizeHintMethod · 0.45
NodeMethod · 0.45
GetSystemPreferencesMethod · 0.45

Tested by

no test coverage detected