X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bs%2Fui%2Ftickviewbase.ui.h;h=d37d629fa3460f2501268a1897cd69a2656167b6;hb=6ab17155b82923f4263f1c536133e657970239a4;hp=4b8f126982f5290d95ce6289399d7e859f6192e4;hpb=ec7ebf4a9acd1d7b7e4e7967c4afa94300ed5ff9;p=hbs.git diff --git a/bs/ui/tickviewbase.ui.h b/bs/ui/tickviewbase.ui.h index 4b8f126..d37d629 100644 --- a/bs/ui/tickviewbase.ui.h +++ b/bs/ui/tickviewbase.ui.h @@ -1,21 +1,52 @@ /**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** Add custom slot implementations here. Use a slot init() for -** initialization code called during construction, and a slot destroy() -** for cleanup code called during destruction. -** -** This file gets modified by Qt Designer whenever you add, rename or -** remove custom slots. Implementation code does not get lost. -*****************************************************************************/ + ** ui.h extension file, included from the uic-generated form implementation. + ** + ** Add custom slot implementations here. Use a slot init() for + ** initialization code called during construction, and a slot destroy() + ** for cleanup code called during destruction. + ** + ** This file gets modified by Qt Designer whenever you add, rename or + ** remove custom slots. Implementation code does not get lost. + *****************************************************************************/ -void CTickViewBase::slotMaxTick( int i ) +void CTickViewBase::slotMaxTick(int i) { - minTickSpin->setMaxValue(i); + if ( !oneTickCheck->isChecked()) + minTickSpin->setMaxValue(i); + } void CTickViewBase::slotMinTick( int i ) { - maxTickSpin->setMinValue(i); -} \ No newline at end of file + if ( !oneTickCheck->isChecked()) + maxTickSpin->setMinValue(i); +} + +void CTickViewBase::slotTickChanged(int i) +{ + if ( oneTickCheck->isChecked()) + { + maxTickSpin->setValue(i); + //minTickSpin->setValue(i-1); + emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value()); + return; + } + emit ticksChanged( minTickSpin->value(), maxTickSpin->value()); +} + +void CTickViewBase::slotOneTick( bool b ) +{ + if(b) + { + maxTickSpin->setMinValue(0); + minTickSpin->setDisabled(true); + minTickSpin->setMaxValue(99); + } + else + { + minTickSpin->setEnabled(true); + maxTickSpin->setMinValue( minTickSpin->value()); + minTickSpin->setMaxValue( maxTickSpin->value()); + } +}