Changeset View
Changeset View
Standalone View
Standalone View
src/directiondialog.cpp
Show First 20 Lines • Show All 254 Lines • ▼ Show 20 Line(s) | 195 | { | |||
---|---|---|---|---|---|
255 | rightLayout->addWidget(previousDirectionLabel); | 255 | rightLayout->addWidget(previousDirectionLabel); | ||
256 | previousDirectionSpin = new QSpinBox(rightWidget); | 256 | previousDirectionSpin = new QSpinBox(rightWidget); | ||
257 | // Use -360 to 720 instead of 0 to 360 | 257 | // Use -360 to 720 instead of 0 to 360 | ||
258 | // If 0 to 360 is used, then wrap-around goes from 360 to 0 (which isn't really a step at all) | 258 | // If 0 to 360 is used, then wrap-around goes from 360 to 0 (which isn't really a step at all) | ||
259 | // Instead use larger range and then convert it into the 0 to 359 range whenever it is changed. | 259 | // Instead use larger range and then convert it into the 0 to 359 range whenever it is changed. | ||
260 | previousDirectionSpin->setRange(-360, 720); | 260 | previousDirectionSpin->setRange(-360, 720); | ||
261 | previousDirectionSpin->setWrapping(true); | 261 | previousDirectionSpin->setWrapping(true); | ||
262 | previousDirectionSpin->setSingleStep(10); | 262 | previousDirectionSpin->setSingleStep(10); | ||
263 | previousDirectionSpin->setValue((int)deg); | 263 | previousDirectionSpin->setValue(static_cast<int>(deg)); | ||
264 | rightLayout->addWidget(previousDirectionSpin); | 264 | rightLayout->addWidget(previousDirectionSpin); | ||
265 | previousDirectionLabel->setBuddy(previousDirectionSpin); | 265 | previousDirectionLabel->setBuddy(previousDirectionSpin); | ||
266 | connect(previousDirectionSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DirectionDialog::directionChanged); | 266 | connect(previousDirectionSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DirectionDialog::directionChanged); | ||
267 | 267 | | |||
268 | // previous direction | 268 | // previous direction | ||
269 | QLabel* directionLabel = new QLabel(rightWidget); | 269 | QLabel* directionLabel = new QLabel(rightWidget); | ||
270 | directionLabel->setText(i18n("&New direction:")); | 270 | directionLabel->setText(i18n("&New direction:")); | ||
271 | rightLayout->addWidget(directionLabel); | 271 | rightLayout->addWidget(directionLabel); | ||
272 | directionSpin = new QSpinBox(rightWidget); | 272 | directionSpin = new QSpinBox(rightWidget); | ||
273 | // Use -360 to 720 instead of 0 to 360 | 273 | // Use -360 to 720 instead of 0 to 360 | ||
274 | // If 0 to 360 is used, then wrap-around goes from 360 to 0 (which isn't really a step at all) | 274 | // If 0 to 360 is used, then wrap-around goes from 360 to 0 (which isn't really a step at all) | ||
275 | // Instead use larger range and then convert it into the 0 to 359 range whenever it is changed. | 275 | // Instead use larger range and then convert it into the 0 to 359 range whenever it is changed. | ||
276 | directionSpin->setRange(-360, 720); | 276 | directionSpin->setRange(-360, 720); | ||
277 | directionSpin->setWrapping(true); | 277 | directionSpin->setWrapping(true); | ||
278 | directionSpin->setSingleStep(10); | 278 | directionSpin->setSingleStep(10); | ||
279 | directionSpin->setValue((int)deg); | 279 | directionSpin->setValue(static_cast<int>(deg)); | ||
280 | rightLayout->addWidget(directionSpin); | 280 | rightLayout->addWidget(directionSpin); | ||
281 | directionLabel->setBuddy(directionSpin); | 281 | directionLabel->setBuddy(directionSpin); | ||
282 | connect(directionSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DirectionDialog::directionChanged); | 282 | connect(directionSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DirectionDialog::directionChanged); | ||
283 | 283 | | |||
284 | baseLayout->addSpacing(20); | 284 | baseLayout->addSpacing(20); | ||
285 | 285 | | |||
286 | // commandBox and copy/paste buttons | 286 | // commandBox and copy/paste buttons | ||
287 | QHBoxLayout *pasteRowLayout = new QHBoxLayout; | 287 | QHBoxLayout *pasteRowLayout = new QHBoxLayout; | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |