|
|
@ -56,6 +56,10 @@ void UBBackgroundPalette::init() |
|
|
|
|
|
|
|
|
|
|
|
connect(UBApplication::mainWindow->actionDefaultGridSize, SIGNAL(triggered()), this, SLOT(defaultBackgroundGridSize())); |
|
|
|
connect(UBApplication::mainWindow->actionDefaultGridSize, SIGNAL(triggered()), this, SLOT(defaultBackgroundGridSize())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool enableIntermediateLines = UBSettings::settings()->enableIntermediateLines->get().toBool(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (enableIntermediateLines) |
|
|
|
|
|
|
|
{ |
|
|
|
mDrawIntermediateLinesCheckBox = createPaletteButton(UBApplication::mainWindow->actionDrawIntermediateGridLines, this); |
|
|
|
mDrawIntermediateLinesCheckBox = createPaletteButton(UBApplication::mainWindow->actionDrawIntermediateGridLines, this); |
|
|
|
mDrawIntermediateLinesCheckBox->setFixedSize(24,24); |
|
|
|
mDrawIntermediateLinesCheckBox->setFixedSize(24,24); |
|
|
|
mDrawIntermediateLinesCheckBox->setCheckable(true); |
|
|
|
mDrawIntermediateLinesCheckBox->setCheckable(true); |
|
|
@ -63,15 +67,20 @@ void UBBackgroundPalette::init() |
|
|
|
mButtons.removeLast(); // don't add to button group
|
|
|
|
mButtons.removeLast(); // don't add to button group
|
|
|
|
|
|
|
|
|
|
|
|
connect(UBApplication::mainWindow->actionDrawIntermediateGridLines, SIGNAL(toggled(bool)), this, SLOT(toggleIntermediateLines(bool))); |
|
|
|
connect(UBApplication::mainWindow->actionDrawIntermediateGridLines, SIGNAL(toggled(bool)), this, SLOT(toggleIntermediateLines(bool))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
mBottomLayout->addWidget(mSliderLabel); |
|
|
|
mBottomLayout->addWidget(mSliderLabel); |
|
|
|
mBottomLayout->addWidget(mSlider); |
|
|
|
mBottomLayout->addWidget(mSlider); |
|
|
|
mBottomLayout->addWidget(mResetDefaultGridSizeButton); |
|
|
|
mBottomLayout->addWidget(mResetDefaultGridSizeButton); |
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (enableIntermediateLines) |
|
|
|
|
|
|
|
{ |
|
|
|
mBottomLayout->addWidget(mIntermediateLinesLabel); |
|
|
|
mBottomLayout->addWidget(mIntermediateLinesLabel); |
|
|
|
mBottomLayout->addWidget(mDrawIntermediateLinesCheckBox); |
|
|
|
mBottomLayout->addWidget(mDrawIntermediateLinesCheckBox); |
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
mBottomLayout->addSpacing(16); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateLayout(); |
|
|
|
updateLayout(); |
|
|
|
} |
|
|
|
} |
|
|
@ -149,7 +158,10 @@ void UBBackgroundPalette::showEvent(QShowEvent* event) |
|
|
|
connect(mSlider, SIGNAL(valueChanged(int)), |
|
|
|
connect(mSlider, SIGNAL(valueChanged(int)), |
|
|
|
this, SLOT(sliderValueChanged(int))); |
|
|
|
this, SLOT(sliderValueChanged(int))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (UBSettings::settings()->enableIntermediateLines->get().toBool()) |
|
|
|
|
|
|
|
{ |
|
|
|
mDrawIntermediateLinesCheckBox->setChecked(UBApplication::boardController->activeScene()->intermediateLines()); |
|
|
|
mDrawIntermediateLinesCheckBox->setChecked(UBApplication::boardController->activeScene()->intermediateLines()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QWidget::showEvent(event); |
|
|
|
QWidget::showEvent(event); |
|
|
|
} |
|
|
|
} |
|
|
|