Diffstat (limited to 'noncore/apps/opie-bartender/bac.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-bartender/bac.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/opie-bartender/bac.cpp b/noncore/apps/opie-bartender/bac.cpp index 2e74029..8dc7e88 100644 --- a/noncore/apps/opie-bartender/bac.cpp +++ b/noncore/apps/opie-bartender/bac.cpp | |||
@@ -113,49 +113,48 @@ BacDialog::BacDialog( QWidget* parent, const char* name, bool modal, WFlags fl | |||
113 | LCDNumber1 = new QLCDNumber( this, "LCDNumber1" ); | 113 | LCDNumber1 = new QLCDNumber( this, "LCDNumber1" ); |
114 | LCDNumber1->setMaximumHeight( 50); | 114 | LCDNumber1->setMaximumHeight( 50); |
115 | LCDNumber1->setNumDigits(6); | 115 | LCDNumber1->setNumDigits(6); |
116 | LCDNumber1->setSmallDecimalPoint(TRUE); | 116 | LCDNumber1->setSmallDecimalPoint(TRUE); |
117 | LCDNumber1->setFrameStyle(QFrame::Box); | 117 | LCDNumber1->setFrameStyle(QFrame::Box); |
118 | LCDNumber1->setLineWidth(2); | 118 | LCDNumber1->setLineWidth(2); |
119 | LCDNumber1->setSegmentStyle( QLCDNumber::Filled); | 119 | LCDNumber1->setSegmentStyle( QLCDNumber::Filled); |
120 | QPalette palette = LCDNumber1->palette(); | 120 | QPalette palette = LCDNumber1->palette(); |
121 | palette.setColor(QPalette::Normal, QColorGroup::Foreground, Qt::red); | 121 | palette.setColor(QPalette::Normal, QColorGroup::Foreground, Qt::red); |
122 | palette.setColor(QPalette::Normal, QColorGroup::Light, Qt::black); | 122 | palette.setColor(QPalette::Normal, QColorGroup::Light, Qt::black); |
123 | palette.setColor(QPalette::Normal, QColorGroup::Dark, Qt::darkGreen); | 123 | palette.setColor(QPalette::Normal, QColorGroup::Dark, Qt::darkGreen); |
124 | LCDNumber1->setPalette(palette); | 124 | LCDNumber1->setPalette(palette); |
125 | 125 | ||
126 | Layout7->addWidget( LCDNumber1 ); | 126 | Layout7->addWidget( LCDNumber1 ); |
127 | NumberSpinBox->setFocus(); | 127 | NumberSpinBox->setFocus(); |
128 | } | 128 | } |
129 | 129 | ||
130 | BacDialog::~BacDialog() | 130 | BacDialog::~BacDialog() |
131 | {} | 131 | {} |
132 | 132 | ||
133 | void BacDialog::calculate() | 133 | void BacDialog::calculate() |
134 | { | 134 | { |
135 | 135 | ||
136 | float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1; | 136 | float weight,genderDiff, bac, typeDrink=0, drinkOz=0, bodyWater, milliliters, oz, gram, gramsMil, alc, metab, bac1; |
137 | float weightunitDifference, massunitdiff; | ||
138 | QString estBac; | 137 | QString estBac; |
139 | 138 | ||
140 | if( GenderComboBox->currentItem()==0) | 139 | if( GenderComboBox->currentItem()==0) |
141 | genderDiff = .58; | 140 | genderDiff = .58; |
142 | else | 141 | else |
143 | genderDiff = .49; | 142 | genderDiff = .49; |
144 | 143 | ||
145 | switch(TypeDrinkComboBox->currentItem()) { | 144 | switch(TypeDrinkComboBox->currentItem()) { |
146 | case 0: { //beer | 145 | case 0: { //beer |
147 | typeDrink = .045; | 146 | typeDrink = .045; |
148 | drinkOz = 12; | 147 | drinkOz = 12; |
149 | } | 148 | } |
150 | break; | 149 | break; |
151 | case 1: { | 150 | case 1: { |
152 | typeDrink = .2; | 151 | typeDrink = .2; |
153 | drinkOz = 4; | 152 | drinkOz = 4; |
154 | } | 153 | } |
155 | break; | 154 | break; |
156 | case 2: { | 155 | case 2: { |
157 | typeDrink = .5; | 156 | typeDrink = .5; |
158 | drinkOz = 1.5; | 157 | drinkOz = 1.5; |
159 | } | 158 | } |
160 | break; | 159 | break; |
161 | }; | 160 | }; |