QmitkPixelManipulationToolGUI::QmitkPixelManipulationToolGUI() : QmitkToolGUI() { QBoxLayout *mainLayout = new QVBoxLayout(this); QRadioButton *radio1 = new QRadioButton("change the masked pixels by value: ", this); QRadioButton *radio2 = new QRadioButton("set the masked pixels to value: ", this); radio1->setChecked(true); connect(radio1, SIGNAL(toggled(bool)), this, SLOT(SetFixedValueOff(bool))); connect(radio2, SIGNAL(toggled(bool)), this, SLOT(SetFixedValueOn(bool))); mainLayout->addWidget(radio1); mainLayout->addWidget(radio2); m_Slider = new QSlider(Qt::Horizontal, this); m_Slider->setRange(-5000, 5000); m_Slider->setValue(0); connect(m_Slider, SIGNAL(valueChanged(int)), this, SLOT(OnSliderValueChanged(int))); m_Spinner = new QSpinBox(this); m_Spinner->setRange(-5000, 5000); m_Spinner->setValue(0); connect(m_Spinner, SIGNAL(editingFinished()), this, SLOT(OnSpinBoxChanged())); QBoxLayout *layout1 = new QHBoxLayout(); layout1->addWidget(m_Slider); layout1->addWidget(m_Spinner); QPushButton *okButton = new QPushButton("Ok"); connect(okButton, SIGNAL(clicked()), this, SLOT(OnOkButtonClicked())); mainLayout->addLayout(layout1); mainLayout->addWidget(okButton); connect(this, SIGNAL(NewToolAssociated(mitk::Tool *)), this, SLOT(OnNewToolAssociated(mitk::Tool *))); }
void AdvancedDistance::InitConnector() { connect(cancel_btn_, SIGNAL(clicked()), this, SLOT(close())); connect(ok_btn_, SIGNAL(clicked()), this, SLOT(OnOkButtonClicked())); }
void EditFontDialog::ConnectToSignals() { //Connect signal and slots connect(ui->createNewRadioButton, SIGNAL(clicked()), this, SLOT(OnRadioButtonClicked())); connect(ui->applyToAllRadioButton, SIGNAL(clicked()), this, SLOT(OnRadioButtonClicked())); UpdateLineEditWidgetWithPropertyValue(ui->fontPresetNameLlineEdit); UpdateSpinBoxWidgetWithPropertyValue(ui->fontSizeSpinBox); UpdatePushButtonWidgetWithPropertyValue(ui->fontSelectButton); UpdateSpinBoxWidgetWithPropertyValue(ui->localizedFontSizeSpinBox); UpdatePushButtonWidgetWithPropertyValue(ui->localizedFontSelectButton); UpdateComboBoxWidgetWithPropertyValue(ui->selectLocaleComboBox); connect(ui->fontSelectButton, SIGNAL(clicked()), this, SLOT(OnPushButtonClicked())); connect(ui->fontSizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxValueChanged(int))); connect(ui->selectLocaleComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(OnComboBoxValueChanged(QString))); connect(ui->resetFontForLocalePushButton, SIGNAL(clicked()), this, SLOT(OnPushButtonClicked())); connect(ui->localizedFontSelectButton, SIGNAL(clicked()), this, SLOT(OnPushButtonClicked())); connect(ui->localizedFontSizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxValueChanged(int))); connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(OnOkButtonClicked())); }
void RoadwayCoorSelDlg::InitSignalSlots() { connect(ok_button_, SIGNAL(clicked()), this, SLOT(OnOkButtonClicked())); connect(cancel_button_, SIGNAL(clicked()), this, SLOT(OnCancelButtonClicked())); }