Changeset View
Changeset View
Standalone View
Standalone View
dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 97 | { | |||
---|---|---|---|---|---|
116 | 116 | | |||
117 | QGridLayout *directionLayout = new QGridLayout (directionGroupBox ); | 117 | QGridLayout *directionLayout = new QGridLayout (directionGroupBox ); | ||
118 | directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter); | 118 | directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter); | ||
119 | directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter); | 119 | directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter); | ||
120 | directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, Qt::AlignCenter); | 120 | directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, Qt::AlignCenter); | ||
121 | directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter); | 121 | directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter); | ||
122 | 122 | | |||
123 | 123 | | |||
124 | connect (m_antiClockwiseRadioButton, SIGNAL (toggled(bool)), | 124 | connect (m_antiClockwiseRadioButton, &QRadioButton::toggled, | ||
125 | this, SLOT (slotUpdate())); | 125 | this, &kpTransformRotateDialog::slotUpdate); | ||
126 | connect (m_clockwiseRadioButton, SIGNAL (toggled(bool)), | 126 | | ||
127 | this, SLOT (slotUpdate())); | 127 | connect (m_clockwiseRadioButton, &QRadioButton::toggled, | ||
128 | this, &kpTransformRotateDialog::slotUpdate); | ||||
128 | } | 129 | } | ||
129 | 130 | | |||
130 | // private | 131 | // private | ||
131 | void kpTransformRotateDialog::createAngleGroupBox () | 132 | void kpTransformRotateDialog::createAngleGroupBox () | ||
132 | { | 133 | { | ||
133 | QGroupBox *angleGroupBox = new QGroupBox (i18n ("Angle"), mainWidget ()); | 134 | QGroupBox *angleGroupBox = new QGroupBox (i18n ("Angle"), mainWidget ()); | ||
134 | addCustomWidget (angleGroupBox); | 135 | addCustomWidget (angleGroupBox); | ||
135 | 136 | | |||
Show All 21 Lines | |||||
157 | 158 | | |||
158 | angleLayout->addWidget (m_angleCustomRadioButton, 3, 0); | 159 | angleLayout->addWidget (m_angleCustomRadioButton, 3, 0); | ||
159 | angleLayout->addWidget (m_angleCustomInput, 3, 1); | 160 | angleLayout->addWidget (m_angleCustomInput, 3, 1); | ||
160 | angleLayout->addWidget (degreesLabel, 3, 2); | 161 | angleLayout->addWidget (degreesLabel, 3, 2); | ||
161 | 162 | | |||
162 | angleLayout->setColumnStretch (1, 2); // Stretch Custom Angle Input | 163 | angleLayout->setColumnStretch (1, 2); // Stretch Custom Angle Input | ||
163 | 164 | | |||
164 | 165 | | |||
165 | connect (m_angle90RadioButton, SIGNAL (toggled(bool)), | | |||
166 | this, SLOT (slotUpdate())); | | |||
167 | connect (m_angle180RadioButton, SIGNAL (toggled(bool)), | | |||
168 | this, SLOT (slotUpdate())); | | |||
169 | connect (m_angle270RadioButton, SIGNAL (toggled(bool)), | | |||
170 | this, SLOT (slotUpdate())); | | |||
171 | | ||||
172 | connect (m_angleCustomRadioButton, SIGNAL (toggled(bool)), | | |||
173 | this, SLOT (slotAngleCustomRadioButtonToggled(bool))); | | |||
174 | connect (m_angleCustomRadioButton, SIGNAL (toggled(bool)), | | |||
175 | this, SLOT (slotUpdate())); | | |||
176 | 166 | | |||
177 | connect (m_angleCustomInput, SIGNAL (valueChanged(int)), | 167 | connect (m_angle90RadioButton, &QRadioButton::toggled, | ||
178 | this, SLOT (slotUpdate())); | 168 | this, &kpTransformRotateDialog::slotUpdate); | ||
169 | connect (m_angle180RadioButton, &QRadioButton::toggled, | ||||
170 | this, &kpTransformRotateDialog::slotUpdate); | ||||
171 | connect (m_angle270RadioButton, &QRadioButton::toggled, | ||||
172 | this, &kpTransformRotateDialog::slotUpdate); | ||||
173 | | ||||
174 | connect (m_angleCustomRadioButton, &QRadioButton::toggled, | ||||
175 | this, &kpTransformRotateDialog::slotAngleCustomRadioButtonToggled); | ||||
176 | connect (m_angleCustomRadioButton, &QRadioButton::toggled, | ||||
177 | this, &kpTransformRotateDialog::slotUpdate); | ||||
178 | | ||||
179 | connect (m_angleCustomInput, | ||||
180 | static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), | ||||
181 | this, &kpTransformRotateDialog::slotUpdate); | ||||
179 | } | 182 | } | ||
180 | 183 | | |||
181 | 184 | | |||
182 | // public virtual [base kpTransformPreviewDialog] | 185 | // public virtual [base kpTransformPreviewDialog] | ||
183 | bool kpTransformRotateDialog::isNoOp () const | 186 | bool kpTransformRotateDialog::isNoOp () const | ||
184 | { | 187 | { | ||
185 | return (angle () == 0); | 188 | return (angle () == 0); | ||
186 | } | 189 | } | ||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |