]> ruin.nu Git - hbs.git/blob - bs/ui/tickviewbase.ui.h
solved an evil bug in Fleet::distributeLossesGains and some other stuff
[hbs.git] / bs / ui / tickviewbase.ui.h
1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
3 ** 
4 ** Add custom slot implementations here. Use a slot init() for
5 ** initialization code called during construction, and a slot destroy()
6 ** for cleanup code called during destruction.
7 **
8 ** This file gets modified by Qt Designer whenever you add, rename or
9 ** remove custom slots. Implementation code does not get lost.
10 *****************************************************************************/
11
12
13 void CTickViewBase::slotMaxTick(int i)
14 {
15      if ( !oneTickCheck->isChecked())
16          minTickSpin->setMaxValue(i);
17      
18 }
19
20 void CTickViewBase::slotMinTick( int i )
21 {
22      if ( !oneTickCheck->isChecked())
23          maxTickSpin->setMinValue(i);
24 }
25
26 void CTickViewBase::slotTickChanged(int i)
27 {
28    if ( oneTickCheck->isChecked())
29     {
30         maxTickSpin->setValue(i);
31         //minTickSpin->setValue(i-1);
32         emit ticksChanged( maxTickSpin->value() - 1, maxTickSpin->value());
33         return;
34     }
35    emit ticksChanged( minTickSpin->value(), maxTickSpin->value());
36 }
37
38 void CTickViewBase::slotOneTick( bool b )
39 {
40     if(b)
41     {
42         maxTickSpin->setMinValue(0);
43         minTickSpin->setDisabled(true);
44         minTickSpin->setMaxValue(99);
45     }
46     else
47     {
48         minTickSpin->setEnabled(true);
49         maxTickSpin->setMinValue( minTickSpin->value());
50         minTickSpin->setMaxValue( maxTickSpin->value());
51     }
52 }