author | llornkcor <llornkcor> | 2002-09-30 03:36:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-30 03:36:02 (UTC) |
commit | 57e740cb3826b88b10daad09b8d453dd609af9cb (patch) (unidiff) | |
tree | 32bdbebdd37107d62225aa71c926b8cb8f0c39e8 | |
parent | 251458a2dd6d75c59440dc006060db2544de5d0e (diff) | |
download | opie-57e740cb3826b88b10daad09b8d453dd609af9cb.zip opie-57e740cb3826b88b10daad09b8d453dd609af9cb.tar.gz opie-57e740cb3826b88b10daad09b8d453dd609af9cb.tar.bz2 |
one tr - Standard, the rest of the catagories are in etc/unit_conversion.dat
-rw-r--r-- | noncore/tools/calculator/calculatorimpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp index 0925073..8d11132 100644 --- a/noncore/tools/calculator/calculatorimpl.cpp +++ b/noncore/tools/calculator/calculatorimpl.cpp | |||
@@ -151,49 +151,49 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, | |||
151 | 151 | ||
152 | func_buttons[0] = PushButtonF1; | 152 | func_buttons[0] = PushButtonF1; |
153 | func_buttons[1] = PushButtonF2; | 153 | func_buttons[1] = PushButtonF2; |
154 | func_buttons[2] = PushButtonF3; | 154 | func_buttons[2] = PushButtonF3; |
155 | func_buttons[3] = PushButtonF4; | 155 | func_buttons[3] = PushButtonF4; |
156 | func_buttons[4] = PushButtonF5; | 156 | func_buttons[4] = PushButtonF5; |
157 | func_buttons[5] = PushButtonF6; | 157 | func_buttons[5] = PushButtonF6; |
158 | func_buttons[6] = PushButtonF7; | 158 | func_buttons[6] = PushButtonF7; |
159 | func_buttons[7] = PushButtonF8; | 159 | func_buttons[7] = PushButtonF8; |
160 | func_buttons[8] = PushButtonF9; | 160 | func_buttons[8] = PushButtonF9; |
161 | func_buttons[9] = PushButtonF10; | 161 | func_buttons[9] = PushButtonF10; |
162 | func_buttons[10] = PushButtonF11; | 162 | func_buttons[10] = PushButtonF11; |
163 | func_buttons[11] = PushButtonF12; | 163 | func_buttons[11] = PushButtonF12; |
164 | 164 | ||
165 | for ( int x = 0 ; x < func_button_count ; x++ ) { | 165 | for ( int x = 0 ; x < func_button_count ; x++ ) { |
166 | QPushButton* tmpbutton = func_buttons[x]; | 166 | QPushButton* tmpbutton = func_buttons[x]; |
167 | faces << tmpbutton->text(); | 167 | faces << tmpbutton->text(); |
168 | bgr_function.insert(tmpbutton); | 168 | bgr_function.insert(tmpbutton); |
169 | } | 169 | } |
170 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(do_convert(int) ) ); | 170 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(do_convert(int) ) ); |
171 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs (int) ) ); | 171 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs (int) ) ); |
172 | 172 | ||
173 | connect(ComboBoxFunction, SIGNAL(activated(int) ), this, SLOT(function_button(int) ) ); | 173 | connect(ComboBoxFunction, SIGNAL(activated(int) ), this, SLOT(function_button(int) ) ); |
174 | 174 | ||
175 | captions.append("Standard"); | 175 | captions.append(tr("Standard")); |
176 | ComboBoxFunction->insertItem(captions.last()); | 176 | ComboBoxFunction->insertItem(captions.last()); |
177 | 177 | ||
178 | // now add in the conversion modes | 178 | // now add in the conversion modes |
179 | // when the menu gets done, these should be in a submenu | 179 | // when the menu gets done, these should be in a submenu |
180 | QString tmp = QPEApplication::qpeDir(); | 180 | QString tmp = QPEApplication::qpeDir(); |
181 | tmp += "etc/unit_conversion.dat"; | 181 | tmp += "etc/unit_conversion.dat"; |
182 | QFile myfile(tmp); | 182 | QFile myfile(tmp); |
183 | if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) { | 183 | if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) { |
184 | qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp); | 184 | qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp); |
185 | // disable the f button if no conv file available | 185 | // disable the f button if no conv file available |
186 | ComboBoxFunction->setEnabled(FALSE); | 186 | ComboBoxFunction->setEnabled(FALSE); |
187 | } | 187 | } |
188 | else { | 188 | else { |
189 | QString line, line2; | 189 | QString line, line2; |
190 | QTextStream ts(&myfile); | 190 | QTextStream ts(&myfile); |
191 | 191 | ||
192 | // first pass, see how many conversion types there are in order to allocate for them | 192 | // first pass, see how many conversion types there are in order to allocate for them |
193 | while ( ! ts.eof() ) { | 193 | while ( ! ts.eof() ) { |
194 | line = ts.readLine(); | 194 | line = ts.readLine(); |
195 | if ( line.contains ("STARTTYPE" ) ) | 195 | if ( line.contains ("STARTTYPE" ) ) |
196 | conversion_mode_count++; | 196 | conversion_mode_count++; |
197 | } | 197 | } |
198 | 198 | ||
199 | entry_list = new double[conversion_mode_count*func_button_count]; | 199 | entry_list = new double[conversion_mode_count*func_button_count]; |