author | clem <clem> | 2004-06-17 23:11:25 (UTC) |
---|---|---|
committer | clem <clem> | 2004-06-17 23:11:25 (UTC) |
commit | d177fbbcdabe8568b394bc2a16ecc5895a4b659a (patch) (unidiff) | |
tree | 9b8a98b949e3425c5512db166e1ca959ec8a9cfb | |
parent | 237ab9ee408f861a0fb8c9f988cfcaa5db033dd1 (diff) | |
download | opie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.zip opie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.tar.gz opie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.tar.bz2 |
replaced tr( "" ) by "" (in order not to pollute the .ts translation files)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 2 | ||||
-rw-r--r-- | core/pim/osearch/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/settings/citytime/citytimebase.cpp | 36 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/swapfile.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/zsafe/scqtfiledlg.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 8 | ||||
-rw-r--r-- | noncore/multimedia/powerchord/powerchordbase.cpp | 12 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/mediummount/mediumglobal.cc | 2 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettingsbase.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 2 |
11 files changed, 38 insertions, 38 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 9c13017..312c663 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -173,193 +173,193 @@ void ContactEditor::init() { | |||
173 | cmbChooserField1->setMaximumWidth( 90 ); | 173 | cmbChooserField1->setMaximumWidth( 90 ); |
174 | gl->addWidget( cmbChooserField1, 4, 0 ); | 174 | gl->addWidget( cmbChooserField1, 4, 0 ); |
175 | // Textfield for chooser 1. | 175 | // Textfield for chooser 1. |
176 | // Now use Widgetstack to contain the textfield and the default-email combo ! | 176 | // Now use Widgetstack to contain the textfield and the default-email combo ! |
177 | m_widgetStack1 = new QWidgetStack( container ); | 177 | m_widgetStack1 = new QWidgetStack( container ); |
178 | txtChooserField1 = new QLineEdit( m_widgetStack1 ); | 178 | txtChooserField1 = new QLineEdit( m_widgetStack1 ); |
179 | m_widgetStack1 -> addWidget( txtChooserField1, TextField ); | 179 | m_widgetStack1 -> addWidget( txtChooserField1, TextField ); |
180 | gl->addWidget( m_widgetStack1, 4, 1 ); | 180 | gl->addWidget( m_widgetStack1, 4, 1 ); |
181 | m_widgetStack1 -> raiseWidget( TextField ); | 181 | m_widgetStack1 -> raiseWidget( TextField ); |
182 | 182 | ||
183 | // Chooser 2 | 183 | // Chooser 2 |
184 | cmbChooserField2 = new QComboBox( FALSE, container ); | 184 | cmbChooserField2 = new QComboBox( FALSE, container ); |
185 | QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) ); | 185 | QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) ); |
186 | cmbChooserField2->setMaximumWidth( 90 ); | 186 | cmbChooserField2->setMaximumWidth( 90 ); |
187 | gl->addWidget( cmbChooserField2, 5, 0 ); | 187 | gl->addWidget( cmbChooserField2, 5, 0 ); |
188 | // Textfield for chooser 2 | 188 | // Textfield for chooser 2 |
189 | // Now use WidgetStack to contain the textfield and the default-email combo! | 189 | // Now use WidgetStack to contain the textfield and the default-email combo! |
190 | m_widgetStack2 = new QWidgetStack( container ); | 190 | m_widgetStack2 = new QWidgetStack( container ); |
191 | txtChooserField2 = new QLineEdit( m_widgetStack2 ); | 191 | txtChooserField2 = new QLineEdit( m_widgetStack2 ); |
192 | m_widgetStack2 -> addWidget( txtChooserField2, TextField ); | 192 | m_widgetStack2 -> addWidget( txtChooserField2, TextField ); |
193 | gl->addWidget( m_widgetStack2, 5, 1 ); | 193 | gl->addWidget( m_widgetStack2, 5, 1 ); |
194 | m_widgetStack2 -> raiseWidget( TextField ); | 194 | m_widgetStack2 -> raiseWidget( TextField ); |
195 | 195 | ||
196 | // Chooser 3 | 196 | // Chooser 3 |
197 | cmbChooserField3 = new QComboBox( FALSE, container ); | 197 | cmbChooserField3 = new QComboBox( FALSE, container ); |
198 | QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) ); | 198 | QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) ); |
199 | cmbChooserField3->setMaximumWidth( 90 ); | 199 | cmbChooserField3->setMaximumWidth( 90 ); |
200 | gl->addWidget( cmbChooserField3, 6, 0 ); | 200 | gl->addWidget( cmbChooserField3, 6, 0 ); |
201 | // Textfield for chooser 2 | 201 | // Textfield for chooser 2 |
202 | // Now use WidgetStack to contain the textfield and the default-email combo! | 202 | // Now use WidgetStack to contain the textfield and the default-email combo! |
203 | m_widgetStack3 = new QWidgetStack( container ); | 203 | m_widgetStack3 = new QWidgetStack( container ); |
204 | txtChooserField3 = new QLineEdit( m_widgetStack3 ); | 204 | txtChooserField3 = new QLineEdit( m_widgetStack3 ); |
205 | m_widgetStack3 -> addWidget( txtChooserField3, TextField ); | 205 | m_widgetStack3 -> addWidget( txtChooserField3, TextField ); |
206 | gl->addWidget( m_widgetStack3, 6, 1 ); | 206 | gl->addWidget( m_widgetStack3, 6, 1 ); |
207 | m_widgetStack3 -> raiseWidget( TextField ); | 207 | m_widgetStack3 -> raiseWidget( TextField ); |
208 | 208 | ||
209 | l = new QLabel( tr( "File As" ), container ); | 209 | l = new QLabel( tr( "File As" ), container ); |
210 | QWhatsThis::add( l, tr( "Press to select how to store the name (and howto show it in the listview)" ) ); | 210 | QWhatsThis::add( l, tr( "Press to select how to store the name (and howto show it in the listview)" ) ); |
211 | gl->addWidget( l, 7, 0 ); | 211 | gl->addWidget( l, 7, 0 ); |
212 | cmbFileAs = new QComboBox( TRUE, container ); | 212 | cmbFileAs = new QComboBox( TRUE, container ); |
213 | gl->addWidget( cmbFileAs, 7, 1 ); | 213 | gl->addWidget( cmbFileAs, 7, 1 ); |
214 | 214 | ||
215 | labCat = new QLabel( tr( "Category" ), container ); | 215 | labCat = new QLabel( tr( "Category" ), container ); |
216 | gl->addWidget( labCat, 8, 0 ); | 216 | gl->addWidget( labCat, 8, 0 ); |
217 | cmbCat = new CategorySelect( container ); | 217 | cmbCat = new CategorySelect( container ); |
218 | gl->addWidget( cmbCat, 8, 1 ); | 218 | gl->addWidget( cmbCat, 8, 1 ); |
219 | labCat->show(); | 219 | labCat->show(); |
220 | cmbCat->show(); | 220 | cmbCat->show(); |
221 | 221 | ||
222 | btnNote = new QPushButton( tr( "Notes..." ), container ); | 222 | btnNote = new QPushButton( tr( "Notes..." ), container ); |
223 | gl->addWidget( btnNote, 9, 1 ); | 223 | gl->addWidget( btnNote, 9, 1 ); |
224 | 224 | ||
225 | tabMain->insertTab( tabViewport, tr( "General" ) ); | 225 | tabMain->insertTab( tabViewport, tr( "General" ) ); |
226 | 226 | ||
227 | tabViewport = new QWidget ( tabMain ); | 227 | tabViewport = new QWidget ( tabMain ); |
228 | 228 | ||
229 | vb = new QVBoxLayout( tabViewport ); | 229 | vb = new QVBoxLayout( tabViewport ); |
230 | 230 | ||
231 | svAddress = new QScrollView( tabViewport ); | 231 | svAddress = new QScrollView( tabViewport ); |
232 | vb->addWidget( svAddress, 0, 0 ); | 232 | vb->addWidget( svAddress, 0, 0 ); |
233 | svAddress->setResizePolicy( QScrollView::AutoOneFit ); | 233 | svAddress->setResizePolicy( QScrollView::AutoOneFit ); |
234 | svAddress->setFrameStyle( QFrame::NoFrame ); | 234 | svAddress->setFrameStyle( QFrame::NoFrame ); |
235 | 235 | ||
236 | container = new QWidget( svAddress->viewport() ); | 236 | container = new QWidget( svAddress->viewport() ); |
237 | svAddress->addChild( container ); | 237 | svAddress->addChild( container ); |
238 | 238 | ||
239 | gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem | 239 | gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem |
240 | 240 | ||
241 | cmbAddress = new QComboBox( FALSE, container ); | 241 | cmbAddress = new QComboBox( FALSE, container ); |
242 | cmbAddress->insertItem( tr( "Business" ) ); | 242 | cmbAddress->insertItem( tr( "Business" ) ); |
243 | cmbAddress->insertItem( tr( "Home" ) ); | 243 | cmbAddress->insertItem( tr( "Home" ) ); |
244 | gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 ); | 244 | gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 ); |
245 | 245 | ||
246 | l = new QLabel( tr( "Address" ), container ); | 246 | l = new QLabel( tr( "Address" ), container ); |
247 | gl->addWidget( l, 1, 0 ); | 247 | gl->addWidget( l, 1, 0 ); |
248 | txtAddress = new QLineEdit( container ); | 248 | txtAddress = new QLineEdit( container ); |
249 | gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 ); | 249 | gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 ); |
250 | 250 | ||
251 | l = new QLabel( tr( "City" ), container ); | 251 | l = new QLabel( tr( "City" ), container ); |
252 | gl->addWidget( l, 2, 0 ); | 252 | gl->addWidget( l, 2, 0 ); |
253 | txtCity = new QLineEdit( container ); | 253 | txtCity = new QLineEdit( container ); |
254 | gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 ); | 254 | gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 ); |
255 | 255 | ||
256 | l = new QLabel( tr( "State" ), container ); | 256 | l = new QLabel( tr( "State" ), container ); |
257 | gl->addWidget( l, 3, 0 ); | 257 | gl->addWidget( l, 3, 0 ); |
258 | txtState = new QLineEdit( container ); | 258 | txtState = new QLineEdit( container ); |
259 | gl->addMultiCellWidget( txtState, 3, 3, 1, 2 ); | 259 | gl->addMultiCellWidget( txtState, 3, 3, 1, 2 ); |
260 | 260 | ||
261 | l = new QLabel( tr( "Zip Code" ), container ); | 261 | l = new QLabel( tr( "Zip Code" ), container ); |
262 | gl->addWidget( l, 4, 0 ); | 262 | gl->addWidget( l, 4, 0 ); |
263 | txtZip = new QLineEdit( container ); | 263 | txtZip = new QLineEdit( container ); |
264 | gl->addMultiCellWidget( txtZip, 4, 4, 1, 2 ); | 264 | gl->addMultiCellWidget( txtZip, 4, 4, 1, 2 ); |
265 | 265 | ||
266 | l = new QLabel( tr( "Country" ), container ); | 266 | l = new QLabel( tr( "Country" ), container ); |
267 | gl->addWidget( l, 5, 0 ); | 267 | gl->addWidget( l, 5, 0 ); |
268 | cmbCountry = new QComboBox( TRUE, container ); | 268 | cmbCountry = new QComboBox( TRUE, container ); |
269 | cmbCountry->insertItem( tr( "" ) ); | 269 | cmbCountry->insertItem( "" ); |
270 | cmbCountry->insertItem( tr ( "United States" ) ); | 270 | cmbCountry->insertItem( tr ( "United States" ) ); |
271 | cmbCountry->insertItem( tr ( "United Kingdom" ) ); | 271 | cmbCountry->insertItem( tr ( "United Kingdom" ) ); |
272 | cmbCountry->insertItem( tr ( "Afghanistan" ) ); | 272 | cmbCountry->insertItem( tr ( "Afghanistan" ) ); |
273 | cmbCountry->insertItem( tr ( "Albania" ) ); | 273 | cmbCountry->insertItem( tr ( "Albania" ) ); |
274 | cmbCountry->insertItem( tr ( "Algeria" ) ); | 274 | cmbCountry->insertItem( tr ( "Algeria" ) ); |
275 | cmbCountry->insertItem( tr ( "American Samoa" ) ); | 275 | cmbCountry->insertItem( tr ( "American Samoa" ) ); |
276 | cmbCountry->insertItem( tr ( "Andorra" ) ); | 276 | cmbCountry->insertItem( tr ( "Andorra" ) ); |
277 | cmbCountry->insertItem( tr ( "Angola" ) ); | 277 | cmbCountry->insertItem( tr ( "Angola" ) ); |
278 | cmbCountry->insertItem( tr ( "Anguilla" ) ); | 278 | cmbCountry->insertItem( tr ( "Anguilla" ) ); |
279 | cmbCountry->insertItem( tr ( "Antarctica" ) ); | 279 | cmbCountry->insertItem( tr ( "Antarctica" ) ); |
280 | cmbCountry->insertItem( tr ( "Argentina" ) ); | 280 | cmbCountry->insertItem( tr ( "Argentina" ) ); |
281 | cmbCountry->insertItem( tr ( "Armenia" ) ); | 281 | cmbCountry->insertItem( tr ( "Armenia" ) ); |
282 | cmbCountry->insertItem( tr ( "Aruba" ) ); | 282 | cmbCountry->insertItem( tr ( "Aruba" ) ); |
283 | cmbCountry->insertItem( tr ( "Australia" ) ); | 283 | cmbCountry->insertItem( tr ( "Australia" ) ); |
284 | cmbCountry->insertItem( tr ( "Austria" ) ); | 284 | cmbCountry->insertItem( tr ( "Austria" ) ); |
285 | cmbCountry->insertItem( tr ( "Azerbaijan" ) ); | 285 | cmbCountry->insertItem( tr ( "Azerbaijan" ) ); |
286 | cmbCountry->insertItem( tr ( "Bahamas" ) ); | 286 | cmbCountry->insertItem( tr ( "Bahamas" ) ); |
287 | cmbCountry->insertItem( tr ( "Bahrain" ) ); | 287 | cmbCountry->insertItem( tr ( "Bahrain" ) ); |
288 | cmbCountry->insertItem( tr ( "Bangladesh" ) ); | 288 | cmbCountry->insertItem( tr ( "Bangladesh" ) ); |
289 | cmbCountry->insertItem( tr ( "Barbados" ) ); | 289 | cmbCountry->insertItem( tr ( "Barbados" ) ); |
290 | cmbCountry->insertItem( tr ( "Belarus" ) ); | 290 | cmbCountry->insertItem( tr ( "Belarus" ) ); |
291 | cmbCountry->insertItem( tr ( "Belgium" ) ); | 291 | cmbCountry->insertItem( tr ( "Belgium" ) ); |
292 | cmbCountry->insertItem( tr ( "Belize" ) ); | 292 | cmbCountry->insertItem( tr ( "Belize" ) ); |
293 | cmbCountry->insertItem( tr ( "Benin" ) ); | 293 | cmbCountry->insertItem( tr ( "Benin" ) ); |
294 | cmbCountry->insertItem( tr ( "Bermuda" ) ); | 294 | cmbCountry->insertItem( tr ( "Bermuda" ) ); |
295 | cmbCountry->insertItem( tr ( "Bhutan" ) ); | 295 | cmbCountry->insertItem( tr ( "Bhutan" ) ); |
296 | cmbCountry->insertItem( tr ( "Bolivia" ) ); | 296 | cmbCountry->insertItem( tr ( "Bolivia" ) ); |
297 | cmbCountry->insertItem( tr ( "Botswana" ) ); | 297 | cmbCountry->insertItem( tr ( "Botswana" ) ); |
298 | cmbCountry->insertItem( tr ( "Bouvet Island" ) ); | 298 | cmbCountry->insertItem( tr ( "Bouvet Island" ) ); |
299 | cmbCountry->insertItem( tr ( "Brazil" ) ); | 299 | cmbCountry->insertItem( tr ( "Brazil" ) ); |
300 | cmbCountry->insertItem( tr ( "Brunei Darussalam" ) ); | 300 | cmbCountry->insertItem( tr ( "Brunei Darussalam" ) ); |
301 | cmbCountry->insertItem( tr ( "Bulgaria" ) ); | 301 | cmbCountry->insertItem( tr ( "Bulgaria" ) ); |
302 | cmbCountry->insertItem( tr ( "Burkina Faso" ) ); | 302 | cmbCountry->insertItem( tr ( "Burkina Faso" ) ); |
303 | cmbCountry->insertItem( tr ( "Burundi" ) ); | 303 | cmbCountry->insertItem( tr ( "Burundi" ) ); |
304 | cmbCountry->insertItem( tr ( "Cambodia" ) ); | 304 | cmbCountry->insertItem( tr ( "Cambodia" ) ); |
305 | cmbCountry->insertItem( tr ( "Cameroon" ) ); | 305 | cmbCountry->insertItem( tr ( "Cameroon" ) ); |
306 | cmbCountry->insertItem( tr ( "Canada" ) ); | 306 | cmbCountry->insertItem( tr ( "Canada" ) ); |
307 | cmbCountry->insertItem( tr ( "Cape Verde" ) ); | 307 | cmbCountry->insertItem( tr ( "Cape Verde" ) ); |
308 | cmbCountry->insertItem( tr ( "Cayman Islands" ) ); | 308 | cmbCountry->insertItem( tr ( "Cayman Islands" ) ); |
309 | cmbCountry->insertItem( tr ( "Chad" ) ); | 309 | cmbCountry->insertItem( tr ( "Chad" ) ); |
310 | cmbCountry->insertItem( tr ( "Chile" ) ); | 310 | cmbCountry->insertItem( tr ( "Chile" ) ); |
311 | cmbCountry->insertItem( tr ( "China" ) ); | 311 | cmbCountry->insertItem( tr ( "China" ) ); |
312 | cmbCountry->insertItem( tr ( "Christmas Island" ) ); | 312 | cmbCountry->insertItem( tr ( "Christmas Island" ) ); |
313 | cmbCountry->insertItem( tr ( "Colombia" ) ); | 313 | cmbCountry->insertItem( tr ( "Colombia" ) ); |
314 | cmbCountry->insertItem( tr ( "Comoros" ) ); | 314 | cmbCountry->insertItem( tr ( "Comoros" ) ); |
315 | cmbCountry->insertItem( tr ( "Congo" ) ); | 315 | cmbCountry->insertItem( tr ( "Congo" ) ); |
316 | cmbCountry->insertItem( tr ( "Cook Island" ) ); | 316 | cmbCountry->insertItem( tr ( "Cook Island" ) ); |
317 | cmbCountry->insertItem( tr ( "Costa Rica" ) ); | 317 | cmbCountry->insertItem( tr ( "Costa Rica" ) ); |
318 | cmbCountry->insertItem( tr ( "Cote d'Ivoire" ) ); | 318 | cmbCountry->insertItem( tr ( "Cote d'Ivoire" ) ); |
319 | cmbCountry->insertItem( tr ( "Croatia" ) ); | 319 | cmbCountry->insertItem( tr ( "Croatia" ) ); |
320 | cmbCountry->insertItem( tr ( "Cuba" ) ); | 320 | cmbCountry->insertItem( tr ( "Cuba" ) ); |
321 | cmbCountry->insertItem( tr ( "Cyprus" ) ); | 321 | cmbCountry->insertItem( tr ( "Cyprus" ) ); |
322 | cmbCountry->insertItem( tr ( "Czech Republic" ) ); | 322 | cmbCountry->insertItem( tr ( "Czech Republic" ) ); |
323 | cmbCountry->insertItem( tr ( "Denmark" ) ); | 323 | cmbCountry->insertItem( tr ( "Denmark" ) ); |
324 | cmbCountry->insertItem( tr ( "Djibouti" ) ); | 324 | cmbCountry->insertItem( tr ( "Djibouti" ) ); |
325 | cmbCountry->insertItem( tr ( "Dominica" ) ); | 325 | cmbCountry->insertItem( tr ( "Dominica" ) ); |
326 | cmbCountry->insertItem( tr ( "Dominican Republic" ) ); | 326 | cmbCountry->insertItem( tr ( "Dominican Republic" ) ); |
327 | cmbCountry->insertItem( tr ( "East Timor" ) ); | 327 | cmbCountry->insertItem( tr ( "East Timor" ) ); |
328 | cmbCountry->insertItem( tr ( "Ecuador" ) ); | 328 | cmbCountry->insertItem( tr ( "Ecuador" ) ); |
329 | cmbCountry->insertItem( tr ( "Egypt" ) ); | 329 | cmbCountry->insertItem( tr ( "Egypt" ) ); |
330 | cmbCountry->insertItem( tr ( "El Salvador" ) ); | 330 | cmbCountry->insertItem( tr ( "El Salvador" ) ); |
331 | cmbCountry->insertItem( tr ( "Equatorial Guinea" ) ); | 331 | cmbCountry->insertItem( tr ( "Equatorial Guinea" ) ); |
332 | cmbCountry->insertItem( tr ( "Eritrea" ) ); | 332 | cmbCountry->insertItem( tr ( "Eritrea" ) ); |
333 | cmbCountry->insertItem( tr ( "Estonia" ) ); | 333 | cmbCountry->insertItem( tr ( "Estonia" ) ); |
334 | cmbCountry->insertItem( tr ( "Ethiopia" ) ); | 334 | cmbCountry->insertItem( tr ( "Ethiopia" ) ); |
335 | cmbCountry->insertItem( tr ( "Falkland Islands" ) ); | 335 | cmbCountry->insertItem( tr ( "Falkland Islands" ) ); |
336 | cmbCountry->insertItem( tr ( "Faroe Islands" ) ); | 336 | cmbCountry->insertItem( tr ( "Faroe Islands" ) ); |
337 | cmbCountry->insertItem( tr ( "Fiji" ) ); | 337 | cmbCountry->insertItem( tr ( "Fiji" ) ); |
338 | cmbCountry->insertItem( tr ( "Finland" ) ); | 338 | cmbCountry->insertItem( tr ( "Finland" ) ); |
339 | cmbCountry->insertItem( tr ( "France" ) ); | 339 | cmbCountry->insertItem( tr ( "France" ) ); |
340 | cmbCountry->insertItem( tr ( "French Guiana" ) ); | 340 | cmbCountry->insertItem( tr ( "French Guiana" ) ); |
341 | cmbCountry->insertItem( tr ( "French Polynesia" ) ); | 341 | cmbCountry->insertItem( tr ( "French Polynesia" ) ); |
342 | cmbCountry->insertItem( tr ( "Gabon" ) ); | 342 | cmbCountry->insertItem( tr ( "Gabon" ) ); |
343 | cmbCountry->insertItem( tr ( "Gambia" ) ); | 343 | cmbCountry->insertItem( tr ( "Gambia" ) ); |
344 | cmbCountry->insertItem( tr ( "Georgia" ) ); | 344 | cmbCountry->insertItem( tr ( "Georgia" ) ); |
345 | cmbCountry->insertItem( tr ( "Germany" ) ); | 345 | cmbCountry->insertItem( tr ( "Germany" ) ); |
346 | cmbCountry->insertItem( tr ( "Ghana" ) ); | 346 | cmbCountry->insertItem( tr ( "Ghana" ) ); |
347 | cmbCountry->insertItem( tr ( "Gibraltar" ) ); | 347 | cmbCountry->insertItem( tr ( "Gibraltar" ) ); |
348 | cmbCountry->insertItem( tr ( "Greece" ) ); | 348 | cmbCountry->insertItem( tr ( "Greece" ) ); |
349 | cmbCountry->insertItem( tr ( "Greenland" ) ); | 349 | cmbCountry->insertItem( tr ( "Greenland" ) ); |
350 | cmbCountry->insertItem( tr ( "Grenada" ) ); | 350 | cmbCountry->insertItem( tr ( "Grenada" ) ); |
351 | cmbCountry->insertItem( tr ( "Guadeloupe" ) ); | 351 | cmbCountry->insertItem( tr ( "Guadeloupe" ) ); |
352 | cmbCountry->insertItem( tr ( "Guam" ) ); | 352 | cmbCountry->insertItem( tr ( "Guam" ) ); |
353 | cmbCountry->insertItem( tr ( "Guatemala" ) ); | 353 | cmbCountry->insertItem( tr ( "Guatemala" ) ); |
354 | cmbCountry->insertItem( tr ( "Guinea" ) ); | 354 | cmbCountry->insertItem( tr ( "Guinea" ) ); |
355 | cmbCountry->insertItem( tr ( "Guinea-Bissau" ) ); | 355 | cmbCountry->insertItem( tr ( "Guinea-Bissau" ) ); |
356 | cmbCountry->insertItem( tr ( "Guyana" ) ); | 356 | cmbCountry->insertItem( tr ( "Guyana" ) ); |
357 | cmbCountry->insertItem( tr ( "Haiti" ) ); | 357 | cmbCountry->insertItem( tr ( "Haiti" ) ); |
358 | cmbCountry->insertItem( tr ( "Holy See" ) ); | 358 | cmbCountry->insertItem( tr ( "Holy See" ) ); |
359 | cmbCountry->insertItem( tr ( "Honduras" ) ); | 359 | cmbCountry->insertItem( tr ( "Honduras" ) ); |
360 | cmbCountry->insertItem( tr ( "Hong Kong" ) ); | 360 | cmbCountry->insertItem( tr ( "Hong Kong" ) ); |
361 | cmbCountry->insertItem( tr ( "Hungary" ) ); | 361 | cmbCountry->insertItem( tr ( "Hungary" ) ); |
362 | cmbCountry->insertItem( tr ( "Iceland" ) ); | 362 | cmbCountry->insertItem( tr ( "Iceland" ) ); |
363 | cmbCountry->insertItem( tr ( "India" ) ); | 363 | cmbCountry->insertItem( tr ( "India" ) ); |
364 | cmbCountry->insertItem( tr ( "Indonesia" ) ); | 364 | cmbCountry->insertItem( tr ( "Indonesia" ) ); |
365 | cmbCountry->insertItem( tr ( "Ireland" ) ); | 365 | cmbCountry->insertItem( tr ( "Ireland" ) ); |
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp index 798e1f1..4589c9d 100644 --- a/core/pim/osearch/mainwindow.cpp +++ b/core/pim/osearch/mainwindow.cpp | |||
@@ -106,193 +106,193 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | |||
106 | mainLayout->addWidget( detailsFrame ); | 106 | mainLayout->addWidget( detailsFrame ); |
107 | mainLayout->addWidget( buttonBox ); | 107 | mainLayout->addWidget( buttonBox ); |
108 | detailsFrame->hide(); | 108 | detailsFrame->hide(); |
109 | buttonBox->hide(); | 109 | buttonBox->hide(); |
110 | 110 | ||
111 | searches.append( new AppLnkSearch( resultsList, tr("Applications") ) ); | 111 | searches.append( new AppLnkSearch( resultsList, tr("Applications") ) ); |
112 | searches.append( new DocLnkSearch( resultsList, tr("Documents") ) ); | 112 | searches.append( new DocLnkSearch( resultsList, tr("Documents") ) ); |
113 | searches.append( new TodoSearch( resultsList, tr("Todo List") ) ); | 113 | searches.append( new TodoSearch( resultsList, tr("Todo List") ) ); |
114 | searches.append( new DatebookSearch( resultsList, tr("Calendar") ) ); | 114 | searches.append( new DatebookSearch( resultsList, tr("Calendar") ) ); |
115 | searches.append( new AdressSearch( resultsList, tr("Contacts") ) ); | 115 | searches.append( new AdressSearch( resultsList, tr("Contacts") ) ); |
116 | 116 | ||
117 | setCentralWidget( mainFrame ); | 117 | setCentralWidget( mainFrame ); |
118 | 118 | ||
119 | popupTimer = new QTimer(); | 119 | popupTimer = new QTimer(); |
120 | searchTimer = new QTimer(); | 120 | searchTimer = new QTimer(); |
121 | 121 | ||
122 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); | 122 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); |
123 | connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged())); | 123 | connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged())); |
124 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); | 124 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); |
125 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); | 125 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); |
126 | 126 | ||
127 | signalMapper = new QSignalMapper( this ); | 127 | signalMapper = new QSignalMapper( this ); |
128 | 128 | ||
129 | connect(signalMapper, SIGNAL(mapped(int)), SLOT( slotAction(int) ) ); | 129 | connect(signalMapper, SIGNAL(mapped(int)), SLOT( slotAction(int) ) ); |
130 | 130 | ||
131 | makeMenu(); | 131 | makeMenu(); |
132 | 132 | ||
133 | Config cfg( "osearch", Config::User ); | 133 | Config cfg( "osearch", Config::User ); |
134 | cfg.setGroup( "search_settings" ); | 134 | cfg.setGroup( "search_settings" ); |
135 | actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) ); | 135 | actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) ); |
136 | actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) ); | 136 | actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) ); |
137 | // actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) ); | 137 | // actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) ); |
138 | } | 138 | } |
139 | 139 | ||
140 | void MainWindow::makeMenu() | 140 | void MainWindow::makeMenu() |
141 | { | 141 | { |
142 | QToolBar *toolBar = new QToolBar( this ); | 142 | QToolBar *toolBar = new QToolBar( this ); |
143 | QToolBar *searchBar = new QToolBar(this); | 143 | QToolBar *searchBar = new QToolBar(this); |
144 | QMenuBar *menuBar = new QMenuBar( toolBar ); | 144 | QMenuBar *menuBar = new QMenuBar( toolBar ); |
145 | QPopupMenu *searchMenu = new QPopupMenu( menuBar ); | 145 | QPopupMenu *searchMenu = new QPopupMenu( menuBar ); |
146 | // QPopupMenu *viewMenu = new QPopupMenu( menuBar ); | 146 | // QPopupMenu *viewMenu = new QPopupMenu( menuBar ); |
147 | QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); | 147 | QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); |
148 | QPopupMenu *searchOptions = new QPopupMenu( cfgMenu ); | 148 | QPopupMenu *searchOptions = new QPopupMenu( cfgMenu ); |
149 | 149 | ||
150 | setToolBarsMovable( false ); | 150 | setToolBarsMovable( false ); |
151 | toolBar->setHorizontalStretchable( true ); | 151 | toolBar->setHorizontalStretchable( true ); |
152 | menuBar->insertItem( tr( "Search" ), searchMenu ); | 152 | menuBar->insertItem( tr( "Search" ), searchMenu ); |
153 | menuBar->insertItem( tr( "Settings" ), cfgMenu ); | 153 | menuBar->insertItem( tr( "Settings" ), cfgMenu ); |
154 | 154 | ||
155 | //SETTINGS MENU | 155 | //SETTINGS MENU |
156 | cfgMenu->insertItem( tr( "Search" ), searchOptions ); | 156 | cfgMenu->insertItem( tr( "Search" ), searchOptions ); |
157 | QPopupMenu *pop; | 157 | QPopupMenu *pop; |
158 | for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){ | 158 | for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){ |
159 | pop = s->popupMenu(); | 159 | pop = s->popupMenu(); |
160 | if (pop){ | 160 | if (pop){ |
161 | cfgMenu->insertItem( s->text(0), pop ); | 161 | cfgMenu->insertItem( s->text(0), pop ); |
162 | } | 162 | } |
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | //SEARCH | 166 | //SEARCH |
167 | SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 ); | 167 | SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 ); |
168 | SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) ); | 168 | SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) ); |
169 | // QWhatsThis::add( SearchAllAction, tr("Search everything...") ); | 169 | // QWhatsThis::add( SearchAllAction, tr("Search everything...") ); |
170 | connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) ); | 170 | connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) ); |
171 | SearchAllAction->addTo( searchMenu ); | 171 | SearchAllAction->addTo( searchMenu ); |
172 | searchMenu->insertItem( tr( "Options" ), searchOptions ); | 172 | searchMenu->insertItem( tr( "Options" ), searchOptions ); |
173 | 173 | ||
174 | //SEARCH OPTIONS | 174 | //SEARCH OPTIONS |
175 | //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true ); | 175 | //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true ); |
176 | //actionWholeWordsOnly->addTo( searchOptions ); | 176 | //actionWholeWordsOnly->addTo( searchOptions ); |
177 | actionCaseSensitiv = new QAction( tr("Case sensitive"),QString::null, 0, this, 0, true ); | 177 | actionCaseSensitiv = new QAction( tr("Case sensitive"),QString::null, 0, this, 0, true ); |
178 | actionCaseSensitiv->addTo( searchOptions ); | 178 | actionCaseSensitiv->addTo( searchOptions ); |
179 | actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true ); | 179 | actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true ); |
180 | actionWildcards->addTo( searchOptions ); | 180 | actionWildcards->addTo( searchOptions ); |
181 | 181 | ||
182 | //SEARCH BAR | 182 | //SEARCH BAR |
183 | LabelEnterText = new QLabel( searchBar, "Label" ); | 183 | LabelEnterText = new QLabel( searchBar, "Label" ); |
184 | LabelEnterText->setAutoMask( FALSE ); | 184 | LabelEnterText->setAutoMask( FALSE ); |
185 | LabelEnterText->setText( tr( "Search for: " ) ); | 185 | LabelEnterText->setText( tr( "Search for: " ) ); |
186 | 186 | ||
187 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); | 187 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); |
188 | QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); | 188 | QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); |
189 | QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); | 189 | QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); |
190 | searchEdit->setFocus(); | 190 | searchEdit->setFocus(); |
191 | searchBar->setHorizontalStretchable( TRUE ); | 191 | searchBar->setHorizontalStretchable( TRUE ); |
192 | searchBar->setStretchableWidget( searchEdit ); | 192 | searchBar->setStretchableWidget( searchEdit ); |
193 | 193 | ||
194 | //Search button | 194 | //Search button |
195 | SearchAllAction->addTo( searchBar ); | 195 | SearchAllAction->addTo( searchBar ); |
196 | 196 | ||
197 | //image ripped of off opie-login/loginwindow.cpp | 197 | //image ripped of off opie-login/loginwindow.cpp |
198 | QPixmap image1( ( const char** ) image1_data ); | 198 | QPixmap image1( ( const char** ) image1_data ); |
199 | 199 | ||
200 | //Clear text | 200 | //Clear text |
201 | ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); | 201 | ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); |
202 | ClearSearchText->setText( tr( "" ) ); | 202 | ClearSearchText->setText( "" ); |
203 | ClearSearchText->setPixmap( image1 ); | 203 | ClearSearchText->setPixmap( image1 ); |
204 | 204 | ||
205 | connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) ); | 205 | connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) ); |
206 | connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); | 206 | connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); |
207 | 207 | ||
208 | } | 208 | } |
209 | 209 | ||
210 | MainWindow::~MainWindow() | 210 | MainWindow::~MainWindow() |
211 | { | 211 | { |
212 | Config cfg( "osearch", Config::User ); | 212 | Config cfg( "osearch", Config::User ); |
213 | cfg.setGroup( "search_settings" ); | 213 | cfg.setGroup( "search_settings" ); |
214 | cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() ); | 214 | cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() ); |
215 | cfg.writeEntry( "wildcards", actionWildcards->isOn() ); | 215 | cfg.writeEntry( "wildcards", actionWildcards->isOn() ); |
216 | //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() ); | 216 | //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() ); |
217 | } | 217 | } |
218 | 218 | ||
219 | void MainWindow::setCurrent(QListViewItem *item) | 219 | void MainWindow::setCurrent(QListViewItem *item) |
220 | { | 220 | { |
221 | if (!item) return; | 221 | if (!item) return; |
222 | _currentItem = (OListViewItem*)item; | 222 | _currentItem = (OListViewItem*)item; |
223 | //_currentItem = dynamic_cast<OListViewItem*>(item); | 223 | //_currentItem = dynamic_cast<OListViewItem*>(item); |
224 | if (_currentItem->rtti() == OListViewItem::Result){ | 224 | if (_currentItem->rtti() == OListViewItem::Result){ |
225 | ResultItem *res = (ResultItem*)item; | 225 | ResultItem *res = (ResultItem*)item; |
226 | // ResultItem *res = dynamic_cast<ResultItem*>(item); | 226 | // ResultItem *res = dynamic_cast<ResultItem*>(item); |
227 | richEdit->setText( res->toRichText() ); | 227 | richEdit->setText( res->toRichText() ); |
228 | QIntDict<QString> acts = res->actions(); | 228 | QIntDict<QString> acts = res->actions(); |
229 | QButton *button; | 229 | QButton *button; |
230 | for (uint i = 0; i < acts.count(); i++){ | 230 | for (uint i = 0; i < acts.count(); i++){ |
231 | button = buttonMap[i]; | 231 | button = buttonMap[i]; |
232 | if (!button) { | 232 | if (!button) { |
233 | owarn << " no button for " << *acts[i] << oendl; | 233 | owarn << " no button for " << *acts[i] << oendl; |
234 | button = new QPushButton( buttonBox ); | 234 | button = new QPushButton( buttonBox ); |
235 | buttonMap.insert( i, button ); | 235 | buttonMap.insert( i, button ); |
236 | signalMapper->setMapping(button, i ); | 236 | signalMapper->setMapping(button, i ); |
237 | connect(button, SIGNAL(clicked() ), signalMapper, SLOT(map() ) ); | 237 | connect(button, SIGNAL(clicked() ), signalMapper, SLOT(map() ) ); |
238 | } | 238 | } |
239 | button->setText( *acts[i] ); | 239 | button->setText( *acts[i] ); |
240 | button->show(); | 240 | button->show(); |
241 | } | 241 | } |
242 | for (uint i = acts.count(); i < _buttonCount; i++){ | 242 | for (uint i = acts.count(); i < _buttonCount; i++){ |
243 | button = buttonMap[i]; | 243 | button = buttonMap[i]; |
244 | if (button) button->hide(); | 244 | if (button) button->hide(); |
245 | } | 245 | } |
246 | _buttonCount = acts.count(); | 246 | _buttonCount = acts.count(); |
247 | detailsFrame->show(); | 247 | detailsFrame->show(); |
248 | buttonBox->show(); | 248 | buttonBox->show(); |
249 | 249 | ||
250 | }else { | 250 | }else { |
251 | detailsFrame->hide(); | 251 | detailsFrame->hide(); |
252 | buttonBox->hide(); | 252 | buttonBox->hide(); |
253 | } | 253 | } |
254 | popupTimer->start( 300, true ); | 254 | popupTimer->start( 300, true ); |
255 | } | 255 | } |
256 | 256 | ||
257 | void MainWindow::stopTimer(QListViewItem*) | 257 | void MainWindow::stopTimer(QListViewItem*) |
258 | { | 258 | { |
259 | popupTimer->stop(); | 259 | popupTimer->stop(); |
260 | } | 260 | } |
261 | 261 | ||
262 | void MainWindow::showPopup() | 262 | void MainWindow::showPopup() |
263 | { | 263 | { |
264 | popupTimer->stop(); | 264 | popupTimer->stop(); |
265 | if (!_currentItem) return; | 265 | if (!_currentItem) return; |
266 | QPopupMenu *pop = _currentItem->popupMenu(); | 266 | QPopupMenu *pop = _currentItem->popupMenu(); |
267 | if (pop) pop->popup( QCursor::pos() ); | 267 | if (pop) pop->popup( QCursor::pos() ); |
268 | } | 268 | } |
269 | 269 | ||
270 | void MainWindow::setSearch( const QString &key ) | 270 | void MainWindow::setSearch( const QString &key ) |
271 | { | 271 | { |
272 | searchTimer->stop(); | 272 | searchTimer->stop(); |
273 | _searchString = key; | 273 | _searchString = key; |
274 | searchTimer->start( 300 ); | 274 | searchTimer->start( 300 ); |
275 | } | 275 | } |
276 | 276 | ||
277 | void MainWindow::searchStringChanged() | 277 | void MainWindow::searchStringChanged() |
278 | { | 278 | { |
279 | #ifdef NEW_OWAIT | 279 | #ifdef NEW_OWAIT |
280 | OWait("setting search string"); | 280 | OWait("setting search string"); |
281 | #endif | 281 | #endif |
282 | searchTimer->stop(); | 282 | searchTimer->stop(); |
283 | QString ss = _searchString; | 283 | QString ss = _searchString; |
284 | //ss = Global::stringQuote( _searchString ); | 284 | //ss = Global::stringQuote( _searchString ); |
285 | //if (actionWholeWordsOnly->isOn()) | 285 | //if (actionWholeWordsOnly->isOn()) |
286 | // ss = "\\s"+_searchString+"\\s"; | 286 | // ss = "\\s"+_searchString+"\\s"; |
287 | //Opie:Core::odebug << " set searchString >" << ss << "<" << oendl; | 287 | //Opie:Core::odebug << " set searchString >" << ss << "<" << oendl; |
288 | QRegExp re( ss ); | 288 | QRegExp re( ss ); |
289 | re.setCaseSensitive( actionCaseSensitiv->isOn() ); | 289 | re.setCaseSensitive( actionCaseSensitiv->isOn() ); |
290 | re.setWildcard( actionWildcards->isOn() ); | 290 | re.setWildcard( actionWildcards->isOn() ); |
291 | for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ) | 291 | for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ) |
292 | s->setSearch( re ); | 292 | s->setSearch( re ); |
293 | } | 293 | } |
294 | 294 | ||
295 | void MainWindow::searchAll() | 295 | void MainWindow::searchAll() |
296 | { | 296 | { |
297 | #ifdef NEW_OWAIT | 297 | #ifdef NEW_OWAIT |
298 | OWait("searching..."); | 298 | OWait("searching..."); |
diff --git a/core/settings/citytime/citytimebase.cpp b/core/settings/citytime/citytimebase.cpp index 77cb91d..bcdd422 100644 --- a/core/settings/citytime/citytimebase.cpp +++ b/core/settings/citytime/citytimebase.cpp | |||
@@ -1,325 +1,325 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | // changes by Maximilian Reiss <harlekin@handhelds.org> | 3 | // changes by Maximilian Reiss <harlekin@handhelds.org> |
4 | 4 | ||
5 | #include "citytimebase.h" | 5 | #include "citytimebase.h" |
6 | #include "zonemap.h" | 6 | #include "zonemap.h" |
7 | 7 | ||
8 | /* OPIE */ | 8 | /* OPIE */ |
9 | #include <opie2/odebug.h> | 9 | #include <opie2/odebug.h> |
10 | 10 | ||
11 | /* QT */ | 11 | /* QT */ |
12 | #include <qlabel.h> | 12 | #include <qlabel.h> |
13 | #include <qtoolbutton.h> | 13 | #include <qtoolbutton.h> |
14 | #include <qlayout.h> | 14 | #include <qlayout.h> |
15 | #include <qwhatsthis.h> | 15 | #include <qwhatsthis.h> |
16 | 16 | ||
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Constructs a CityTimeBase which is a child of 'parent', with the | 19 | * Constructs a CityTimeBase which is a child of 'parent', with the |
20 | * name 'name' and widget flags set to 'f' | 20 | * name 'name' and widget flags set to 'f' |
21 | */ | 21 | */ |
22 | CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) | 22 | CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) |
23 | : QWidget( parent, name, WStyle_ContextHelp ) | 23 | : QWidget( parent, name, WStyle_ContextHelp ) |
24 | { | 24 | { |
25 | if ( !name ) | 25 | if ( !name ) |
26 | setName( "CityTimeBase" ); | 26 | setName( "CityTimeBase" ); |
27 | setCaption( tr( "City Time" ) ); | 27 | setCaption( tr( "City Time" ) ); |
28 | CityTimeBaseLayout = new QVBoxLayout( this ); | 28 | CityTimeBaseLayout = new QVBoxLayout( this ); |
29 | CityTimeBaseLayout->setSpacing( 3 ); | 29 | CityTimeBaseLayout->setSpacing( 3 ); |
30 | CityTimeBaseLayout->setMargin( 0 ); | 30 | CityTimeBaseLayout->setMargin( 0 ); |
31 | 31 | ||
32 | frmMap = new ZoneMap( this, "frmMap" ); | 32 | frmMap = new ZoneMap( this, "frmMap" ); |
33 | frmMap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, frmMap->sizePolicy().hasHeightForWidth() ) ); | 33 | frmMap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, frmMap->sizePolicy().hasHeightForWidth() ) ); |
34 | CityTimeBaseLayout->addWidget( frmMap ); | 34 | CityTimeBaseLayout->addWidget( frmMap ); |
35 | 35 | ||
36 | buttonWidget = new QWidget( this ); | 36 | buttonWidget = new QWidget( this ); |
37 | QWhatsThis::add( buttonWidget, tr( "Click on one of the set cities to replace it" ) ); | 37 | QWhatsThis::add( buttonWidget, tr( "Click on one of the set cities to replace it" ) ); |
38 | Layout2 = new QGridLayout( buttonWidget ); | 38 | Layout2 = new QGridLayout( buttonWidget ); |
39 | Layout2->setSpacing( 3 ); | 39 | Layout2->setSpacing( 3 ); |
40 | Layout2->setMargin( 4 ); | 40 | Layout2->setMargin( 4 ); |
41 | 41 | ||
42 | cmdCity7 = new QToolButton( buttonWidget, "cmdCity7" ); | 42 | cmdCity7 = new QToolButton( buttonWidget, "cmdCity7" ); |
43 | cmdCity7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity7->sizePolicy().hasHeightForWidth() ) ); | 43 | cmdCity7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity7->sizePolicy().hasHeightForWidth() ) ); |
44 | QFont cmdCity7_font( cmdCity7->font() ); | 44 | QFont cmdCity7_font( cmdCity7->font() ); |
45 | cmdCity7_font.setBold( TRUE ); | 45 | cmdCity7_font.setBold( TRUE ); |
46 | cmdCity7->setFont( cmdCity7_font ); | 46 | cmdCity7->setFont( cmdCity7_font ); |
47 | cmdCity7->setFocusPolicy( QToolButton::TabFocus ); | 47 | cmdCity7->setFocusPolicy( QToolButton::TabFocus ); |
48 | cmdCity7->setText( tr( "" ) ); | 48 | cmdCity7->setText( "" ); |
49 | cmdCity7->setToggleButton( TRUE ); | 49 | cmdCity7->setToggleButton( TRUE ); |
50 | cmdCity7->setToggleButton( TRUE ); | 50 | cmdCity7->setToggleButton( TRUE ); |
51 | 51 | ||
52 | Layout2->addWidget( cmdCity7, 0, 2 ); | 52 | Layout2->addWidget( cmdCity7, 0, 2 ); |
53 | 53 | ||
54 | lblCTime9 = new QLabel( buttonWidget, "lblCTime9" ); | 54 | lblCTime9 = new QLabel( buttonWidget, "lblCTime9" ); |
55 | lblCTime9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime9->sizePolicy().hasHeightForWidth() ) ); | 55 | lblCTime9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime9->sizePolicy().hasHeightForWidth() ) ); |
56 | QFont lblCTime9_font( lblCTime9->font() ); | 56 | QFont lblCTime9_font( lblCTime9->font() ); |
57 | lblCTime9_font.setPointSize( 10 ); | 57 | lblCTime9_font.setPointSize( 10 ); |
58 | lblCTime9->setFont( lblCTime9_font ); | 58 | lblCTime9->setFont( lblCTime9_font ); |
59 | lblCTime9->setText( tr( "" ) ); | 59 | lblCTime9->setText( "" ); |
60 | lblCTime9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 60 | lblCTime9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
61 | 61 | ||
62 | Layout2->addWidget( lblCTime9, 2, 3 ); | 62 | Layout2->addWidget( lblCTime9, 2, 3 ); |
63 | 63 | ||
64 | cmdCity8 = new QToolButton( buttonWidget, "cmdCity8" ); | 64 | cmdCity8 = new QToolButton( buttonWidget, "cmdCity8" ); |
65 | cmdCity8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity8->sizePolicy().hasHeightForWidth() ) ); | 65 | cmdCity8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity8->sizePolicy().hasHeightForWidth() ) ); |
66 | QFont cmdCity8_font( cmdCity8->font() ); | 66 | QFont cmdCity8_font( cmdCity8->font() ); |
67 | cmdCity8_font.setBold( TRUE ); | 67 | cmdCity8_font.setBold( TRUE ); |
68 | cmdCity8->setFont( cmdCity8_font ); | 68 | cmdCity8->setFont( cmdCity8_font ); |
69 | cmdCity8->setFocusPolicy( QToolButton::TabFocus ); | 69 | cmdCity8->setFocusPolicy( QToolButton::TabFocus ); |
70 | cmdCity8->setText( tr( "" ) ); | 70 | cmdCity8->setText( "" ); |
71 | cmdCity8->setToggleButton( TRUE ); | 71 | cmdCity8->setToggleButton( TRUE ); |
72 | cmdCity8->setToggleButton( TRUE ); | 72 | cmdCity8->setToggleButton( TRUE ); |
73 | 73 | ||
74 | Layout2->addWidget( cmdCity8, 1, 2 ); | 74 | Layout2->addWidget( cmdCity8, 1, 2 ); |
75 | 75 | ||
76 | cmdCity2 = new QToolButton( buttonWidget, "cmdCity2" ); | 76 | cmdCity2 = new QToolButton( buttonWidget, "cmdCity2" ); |
77 | QFont cmdCity2_font( cmdCity2->font() ); | 77 | QFont cmdCity2_font( cmdCity2->font() ); |
78 | cmdCity2_font.setBold( TRUE ); | 78 | cmdCity2_font.setBold( TRUE ); |
79 | cmdCity2->setFont( cmdCity2_font ); | 79 | cmdCity2->setFont( cmdCity2_font ); |
80 | cmdCity2->setFocusPolicy( QToolButton::TabFocus ); | 80 | cmdCity2->setFocusPolicy( QToolButton::TabFocus ); |
81 | cmdCity2->setText( tr( "" ) ); | 81 | cmdCity2->setText( "" ); |
82 | cmdCity2->setToggleButton( TRUE ); | 82 | cmdCity2->setToggleButton( TRUE ); |
83 | cmdCity2->setToggleButton( TRUE ); | 83 | cmdCity2->setToggleButton( TRUE ); |
84 | 84 | ||
85 | Layout2->addWidget( cmdCity2, 1, 0 ); | 85 | Layout2->addWidget( cmdCity2, 1, 0 ); |
86 | 86 | ||
87 | lblCTime6 = new QLabel( buttonWidget, "lblCTime6" ); | 87 | lblCTime6 = new QLabel( buttonWidget, "lblCTime6" ); |
88 | QFont lblCTime6_font( lblCTime6->font() ); | 88 | QFont lblCTime6_font( lblCTime6->font() ); |
89 | lblCTime6_font.setPointSize( 10 ); | 89 | lblCTime6_font.setPointSize( 10 ); |
90 | lblCTime6->setFont( lblCTime6_font ); | 90 | lblCTime6->setFont( lblCTime6_font ); |
91 | lblCTime6->setText( tr( "" ) ); | 91 | lblCTime6->setText( "" ); |
92 | lblCTime6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 92 | lblCTime6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
93 | 93 | ||
94 | Layout2->addWidget( lblCTime6, 5, 1 ); | 94 | Layout2->addWidget( lblCTime6, 5, 1 ); |
95 | 95 | ||
96 | cmdCity6 = new QToolButton( buttonWidget, "cmdCity6" ); | 96 | cmdCity6 = new QToolButton( buttonWidget, "cmdCity6" ); |
97 | cmdCity6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity6->sizePolicy().hasHeightForWidth() ) ); | 97 | cmdCity6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity6->sizePolicy().hasHeightForWidth() ) ); |
98 | QFont cmdCity6_font( cmdCity6->font() ); | 98 | QFont cmdCity6_font( cmdCity6->font() ); |
99 | cmdCity6_font.setBold( TRUE ); | 99 | cmdCity6_font.setBold( TRUE ); |
100 | cmdCity6->setFont( cmdCity6_font ); | 100 | cmdCity6->setFont( cmdCity6_font ); |
101 | cmdCity6->setFocusPolicy( QToolButton::TabFocus ); | 101 | cmdCity6->setFocusPolicy( QToolButton::TabFocus ); |
102 | cmdCity6->setText( tr( "" ) ); | 102 | cmdCity6->setText( "" ); |
103 | cmdCity6->setToggleButton( TRUE ); | 103 | cmdCity6->setToggleButton( TRUE ); |
104 | cmdCity6->setToggleButton( TRUE ); | 104 | cmdCity6->setToggleButton( TRUE ); |
105 | 105 | ||
106 | Layout2->addWidget( cmdCity6, 5, 0 ); | 106 | Layout2->addWidget( cmdCity6, 5, 0 ); |
107 | 107 | ||
108 | cmdCity4 = new QToolButton( buttonWidget, "cmdCity4" ); | 108 | cmdCity4 = new QToolButton( buttonWidget, "cmdCity4" ); |
109 | cmdCity4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity4->sizePolicy().hasHeightForWidth() ) ); | 109 | cmdCity4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity4->sizePolicy().hasHeightForWidth() ) ); |
110 | QFont cmdCity4_font( cmdCity4->font() ); | 110 | QFont cmdCity4_font( cmdCity4->font() ); |
111 | cmdCity4_font.setBold( TRUE ); | 111 | cmdCity4_font.setBold( TRUE ); |
112 | cmdCity4->setFont( cmdCity4_font ); | 112 | cmdCity4->setFont( cmdCity4_font ); |
113 | cmdCity4->setFocusPolicy( QToolButton::TabFocus ); | 113 | cmdCity4->setFocusPolicy( QToolButton::TabFocus ); |
114 | cmdCity4->setText( tr( "" ) ); | 114 | cmdCity4->setText( "" ); |
115 | cmdCity4->setToggleButton( TRUE ); | 115 | cmdCity4->setToggleButton( TRUE ); |
116 | cmdCity4->setToggleButton( TRUE ); | 116 | cmdCity4->setToggleButton( TRUE ); |
117 | 117 | ||
118 | Layout2->addWidget( cmdCity4, 3, 0 ); | 118 | Layout2->addWidget( cmdCity4, 3, 0 ); |
119 | 119 | ||
120 | lblCTime5 = new QLabel( buttonWidget, "lblCTime5" ); | 120 | lblCTime5 = new QLabel( buttonWidget, "lblCTime5" ); |
121 | QFont lblCTime5_font( lblCTime5->font() ); | 121 | QFont lblCTime5_font( lblCTime5->font() ); |
122 | lblCTime5_font.setPointSize( 10 ); | 122 | lblCTime5_font.setPointSize( 10 ); |
123 | lblCTime5->setFont( lblCTime5_font ); | 123 | lblCTime5->setFont( lblCTime5_font ); |
124 | lblCTime5->setText( tr( "" ) ); | 124 | lblCTime5->setText( "" ); |
125 | lblCTime5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 125 | lblCTime5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
126 | 126 | ||
127 | Layout2->addWidget( lblCTime5, 4, 1 ); | 127 | Layout2->addWidget( lblCTime5, 4, 1 ); |
128 | 128 | ||
129 | lblCTime2 = new QLabel( buttonWidget, "lblCTime2" ); | 129 | lblCTime2 = new QLabel( buttonWidget, "lblCTime2" ); |
130 | lblCTime2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, lblCTime2->sizePolicy().hasHeightForWidth() ) ); | 130 | lblCTime2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, lblCTime2->sizePolicy().hasHeightForWidth() ) ); |
131 | QFont lblCTime2_font( lblCTime2->font() ); | 131 | QFont lblCTime2_font( lblCTime2->font() ); |
132 | lblCTime2_font.setPointSize( 10 ); | 132 | lblCTime2_font.setPointSize( 10 ); |
133 | lblCTime2->setFont( lblCTime2_font ); | 133 | lblCTime2->setFont( lblCTime2_font ); |
134 | lblCTime2->setText( tr( "" ) ); | 134 | lblCTime2->setText( "" ); |
135 | lblCTime2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 135 | lblCTime2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
136 | 136 | ||
137 | Layout2->addWidget( lblCTime2, 1, 1 ); | 137 | Layout2->addWidget( lblCTime2, 1, 1 ); |
138 | 138 | ||
139 | lblCTime1 = new QLabel( buttonWidget, "lblCTime1" ); | 139 | lblCTime1 = new QLabel( buttonWidget, "lblCTime1" ); |
140 | lblCTime1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, lblCTime1->sizePolicy().hasHeightForWidth() ) ); | 140 | lblCTime1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, lblCTime1->sizePolicy().hasHeightForWidth() ) ); |
141 | QFont lblCTime1_font( lblCTime1->font() ); | 141 | QFont lblCTime1_font( lblCTime1->font() ); |
142 | lblCTime1_font.setPointSize( 10 ); | 142 | lblCTime1_font.setPointSize( 10 ); |
143 | lblCTime1->setFont( lblCTime1_font ); | 143 | lblCTime1->setFont( lblCTime1_font ); |
144 | lblCTime1->setText( tr( "" ) ); | 144 | lblCTime1->setText( "" ); |
145 | lblCTime1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 145 | lblCTime1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
146 | 146 | ||
147 | Layout2->addWidget( lblCTime1, 0, 1 ); | 147 | Layout2->addWidget( lblCTime1, 0, 1 ); |
148 | 148 | ||
149 | cmdCity3 = new QToolButton( buttonWidget, "cmdCity3" ); | 149 | cmdCity3 = new QToolButton( buttonWidget, "cmdCity3" ); |
150 | cmdCity3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity3->sizePolicy().hasHeightForWidth() ) ); | 150 | cmdCity3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity3->sizePolicy().hasHeightForWidth() ) ); |
151 | QFont cmdCity3_font( cmdCity3->font() ); | 151 | QFont cmdCity3_font( cmdCity3->font() ); |
152 | cmdCity3_font.setBold( TRUE ); | 152 | cmdCity3_font.setBold( TRUE ); |
153 | cmdCity3->setFont( cmdCity3_font ); | 153 | cmdCity3->setFont( cmdCity3_font ); |
154 | cmdCity3->setFocusPolicy( QToolButton::TabFocus ); | 154 | cmdCity3->setFocusPolicy( QToolButton::TabFocus ); |
155 | cmdCity3->setText( tr( "" ) ); | 155 | cmdCity3->setText( "" ); |
156 | cmdCity3->setToggleButton( TRUE ); | 156 | cmdCity3->setToggleButton( TRUE ); |
157 | cmdCity3->setToggleButton( TRUE ); | 157 | cmdCity3->setToggleButton( TRUE ); |
158 | 158 | ||
159 | Layout2->addWidget( cmdCity3, 2, 0 ); | 159 | Layout2->addWidget( cmdCity3, 2, 0 ); |
160 | 160 | ||
161 | lblCTime8 = new QLabel( buttonWidget, "lblCTime8" ); | 161 | lblCTime8 = new QLabel( buttonWidget, "lblCTime8" ); |
162 | lblCTime8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime8->sizePolicy().hasHeightForWidth() ) ); | 162 | lblCTime8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime8->sizePolicy().hasHeightForWidth() ) ); |
163 | QFont lblCTime8_font( lblCTime8->font() ); | 163 | QFont lblCTime8_font( lblCTime8->font() ); |
164 | lblCTime8_font.setPointSize( 10 ); | 164 | lblCTime8_font.setPointSize( 10 ); |
165 | lblCTime8->setFont( lblCTime8_font ); | 165 | lblCTime8->setFont( lblCTime8_font ); |
166 | lblCTime8->setText( tr( "" ) ); | 166 | lblCTime8->setText( "" ); |
167 | lblCTime8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 167 | lblCTime8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
168 | 168 | ||
169 | Layout2->addWidget( lblCTime8, 1, 3 ); | 169 | Layout2->addWidget( lblCTime8, 1, 3 ); |
170 | 170 | ||
171 | cmdCity1 = new QToolButton( buttonWidget, "cmdCity1" ); | 171 | cmdCity1 = new QToolButton( buttonWidget, "cmdCity1" ); |
172 | cmdCity1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity1->sizePolicy().hasHeightForWidth() ) ); | 172 | cmdCity1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity1->sizePolicy().hasHeightForWidth() ) ); |
173 | QFont cmdCity1_font( cmdCity1->font() ); | 173 | QFont cmdCity1_font( cmdCity1->font() ); |
174 | cmdCity1_font.setBold( TRUE ); | 174 | cmdCity1_font.setBold( TRUE ); |
175 | cmdCity1->setFont( cmdCity1_font ); | 175 | cmdCity1->setFont( cmdCity1_font ); |
176 | cmdCity1->setFocusPolicy( QToolButton::TabFocus ); | 176 | cmdCity1->setFocusPolicy( QToolButton::TabFocus ); |
177 | cmdCity1->setText( tr( "" ) ); | 177 | cmdCity1->setText( "" ); |
178 | cmdCity1->setToggleButton( TRUE ); | 178 | cmdCity1->setToggleButton( TRUE ); |
179 | cmdCity1->setToggleButton( TRUE ); | 179 | cmdCity1->setToggleButton( TRUE ); |
180 | 180 | ||
181 | Layout2->addWidget( cmdCity1, 0, 0 ); | 181 | Layout2->addWidget( cmdCity1, 0, 0 ); |
182 | 182 | ||
183 | lblCTime7 = new QLabel( buttonWidget, "lblCTime7" ); | 183 | lblCTime7 = new QLabel( buttonWidget, "lblCTime7" ); |
184 | lblCTime7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime7->sizePolicy().hasHeightForWidth() ) ); | 184 | lblCTime7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, lblCTime7->sizePolicy().hasHeightForWidth() ) ); |
185 | QFont lblCTime7_font( lblCTime7->font() ); | 185 | QFont lblCTime7_font( lblCTime7->font() ); |
186 | lblCTime7_font.setPointSize( 10 ); | 186 | lblCTime7_font.setPointSize( 10 ); |
187 | lblCTime7->setFont( lblCTime7_font ); | 187 | lblCTime7->setFont( lblCTime7_font ); |
188 | lblCTime7->setText( tr( "" ) ); | 188 | lblCTime7->setText( "" ); |
189 | lblCTime7->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 189 | lblCTime7->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
190 | 190 | ||
191 | Layout2->addWidget( lblCTime7, 0, 3 ); | 191 | Layout2->addWidget( lblCTime7, 0, 3 ); |
192 | 192 | ||
193 | lblCTime4 = new QLabel( buttonWidget, "lblCTime4" ); | 193 | lblCTime4 = new QLabel( buttonWidget, "lblCTime4" ); |
194 | QFont lblCTime4_font( lblCTime4->font() ); | 194 | QFont lblCTime4_font( lblCTime4->font() ); |
195 | lblCTime4_font.setPointSize( 10 ); | 195 | lblCTime4_font.setPointSize( 10 ); |
196 | lblCTime4->setFont( lblCTime4_font ); | 196 | lblCTime4->setFont( lblCTime4_font ); |
197 | lblCTime4->setText( tr( "" ) ); | 197 | lblCTime4->setText( "" ); |
198 | lblCTime4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 198 | lblCTime4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
199 | 199 | ||
200 | Layout2->addWidget( lblCTime4, 3, 1 ); | 200 | Layout2->addWidget( lblCTime4, 3, 1 ); |
201 | 201 | ||
202 | cmdCity5 = new QToolButton( buttonWidget, "cmdCity5" ); | 202 | cmdCity5 = new QToolButton( buttonWidget, "cmdCity5" ); |
203 | cmdCity5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity5->sizePolicy().hasHeightForWidth() ) ); | 203 | cmdCity5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity5->sizePolicy().hasHeightForWidth() ) ); |
204 | QFont cmdCity5_font( cmdCity5->font() ); | 204 | QFont cmdCity5_font( cmdCity5->font() ); |
205 | cmdCity5_font.setBold( TRUE ); | 205 | cmdCity5_font.setBold( TRUE ); |
206 | cmdCity5->setFont( cmdCity5_font ); | 206 | cmdCity5->setFont( cmdCity5_font ); |
207 | cmdCity5->setFocusPolicy( QToolButton::TabFocus ); | 207 | cmdCity5->setFocusPolicy( QToolButton::TabFocus ); |
208 | cmdCity5->setText( tr( "" ) ); | 208 | cmdCity5->setText( "" ); |
209 | cmdCity5->setToggleButton( TRUE ); | 209 | cmdCity5->setToggleButton( TRUE ); |
210 | cmdCity5->setToggleButton( TRUE ); | 210 | cmdCity5->setToggleButton( TRUE ); |
211 | 211 | ||
212 | Layout2->addWidget( cmdCity5, 4, 0 ); | 212 | Layout2->addWidget( cmdCity5, 4, 0 ); |
213 | 213 | ||
214 | lblCTime3 = new QLabel( buttonWidget, "lblCTime3" ); | 214 | lblCTime3 = new QLabel( buttonWidget, "lblCTime3" ); |
215 | QFont lblCTime3_font( lblCTime3->font() ); | 215 | QFont lblCTime3_font( lblCTime3->font() ); |
216 | lblCTime3_font.setPointSize( 10 ); | 216 | lblCTime3_font.setPointSize( 10 ); |
217 | lblCTime3->setFont( lblCTime3_font ); | 217 | lblCTime3->setFont( lblCTime3_font ); |
218 | lblCTime3->setText( tr( "" ) ); | 218 | lblCTime3->setText( "" ); |
219 | lblCTime3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 219 | lblCTime3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
220 | 220 | ||
221 | Layout2->addWidget( lblCTime3, 2, 1 ); | 221 | Layout2->addWidget( lblCTime3, 2, 1 ); |
222 | 222 | ||
223 | cmdCity9 = new QToolButton( buttonWidget, "cmdCity9" ); | 223 | cmdCity9 = new QToolButton( buttonWidget, "cmdCity9" ); |
224 | cmdCity9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity9->sizePolicy().hasHeightForWidth() ) ); | 224 | cmdCity9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity9->sizePolicy().hasHeightForWidth() ) ); |
225 | QFont cmdCity9_font( cmdCity9->font() ); | 225 | QFont cmdCity9_font( cmdCity9->font() ); |
226 | cmdCity9_font.setBold( TRUE ); | 226 | cmdCity9_font.setBold( TRUE ); |
227 | cmdCity9->setFont( cmdCity9_font ); | 227 | cmdCity9->setFont( cmdCity9_font ); |
228 | cmdCity9->setFocusPolicy( QToolButton::TabFocus ); | 228 | cmdCity9->setFocusPolicy( QToolButton::TabFocus ); |
229 | cmdCity9->setText( tr( "" ) ); | 229 | cmdCity9->setText( "" ); |
230 | cmdCity9->setToggleButton( TRUE ); | 230 | cmdCity9->setToggleButton( TRUE ); |
231 | cmdCity9->setToggleButton( TRUE ); | 231 | cmdCity9->setToggleButton( TRUE ); |
232 | 232 | ||
233 | Layout2->addWidget( cmdCity9, 2, 2 ); | 233 | Layout2->addWidget( cmdCity9, 2, 2 ); |
234 | CityTimeBaseLayout->addWidget( buttonWidget ); | 234 | CityTimeBaseLayout->addWidget( buttonWidget ); |
235 | 235 | ||
236 | // signals and slots connections | 236 | // signals and slots connections |
237 | connect( frmMap, SIGNAL( signalTz(const QString&,const QString&) ), this, SLOT( slotNewTz(const QString&,const QString&) ) ); | 237 | connect( frmMap, SIGNAL( signalTz(const QString&,const QString&) ), this, SLOT( slotNewTz(const QString&,const QString&) ) ); |
238 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 238 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
239 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 239 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
240 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 240 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
241 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 241 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
242 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 242 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
243 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 243 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
244 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 244 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
245 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 245 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
246 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 246 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
247 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 247 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
248 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 248 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
249 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 249 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
250 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 250 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
251 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 251 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
252 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 252 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
253 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 253 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
254 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 254 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
255 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 255 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
256 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 256 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
257 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 257 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
258 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 258 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
259 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 259 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
260 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 260 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
261 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 261 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
262 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 262 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
263 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 263 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
264 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 264 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
265 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 265 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
266 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 266 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
267 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 267 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
268 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 268 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
269 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 269 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
270 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 270 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
271 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 271 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
272 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 272 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
273 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 273 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
274 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 274 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
275 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 275 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
276 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 276 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
277 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 277 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
278 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 278 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
279 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 279 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
280 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 280 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
281 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 281 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
282 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 282 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
283 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 283 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
284 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 284 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
285 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 285 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
286 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 286 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
287 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 287 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
288 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 288 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
289 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 289 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
290 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 290 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
291 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 291 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
292 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 292 | connect( cmdCity6, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
293 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 293 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
294 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 294 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
295 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 295 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
296 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 296 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
297 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 297 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
298 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); | 298 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity5, SLOT( setDisabled(bool) ) ); |
299 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); | 299 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity6, SLOT( setDisabled(bool) ) ); |
300 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 300 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
301 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 301 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
302 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 302 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
303 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 303 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
304 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 304 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
305 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 305 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
306 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 306 | connect( cmdCity5, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
307 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 307 | connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
308 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); | 308 | connect( cmdCity8, SIGNAL( toggled(bool) ), cmdCity9, SLOT( setDisabled(bool) ) ); |
309 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 309 | connect( cmdCity9, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
310 | connect( cmdCity1, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 310 | connect( cmdCity1, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
311 | connect( cmdCity2, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 311 | connect( cmdCity2, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
312 | connect( cmdCity7, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 312 | connect( cmdCity7, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
313 | connect( cmdCity3, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 313 | connect( cmdCity3, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
314 | connect( cmdCity4, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 314 | connect( cmdCity4, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
315 | connect( cmdCity5, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 315 | connect( cmdCity5, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
316 | connect( cmdCity6, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 316 | connect( cmdCity6, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
317 | connect( cmdCity8, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 317 | connect( cmdCity8, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
318 | connect( cmdCity9, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); | 318 | connect( cmdCity9, SIGNAL( toggled(bool) ), this, SLOT( beginNewTz() ) ); |
319 | 319 | ||
320 | // tab order | 320 | // tab order |
321 | setTabOrder( cmdCity1, cmdCity2 ); | 321 | setTabOrder( cmdCity1, cmdCity2 ); |
322 | setTabOrder( cmdCity2, cmdCity3 ); | 322 | setTabOrder( cmdCity2, cmdCity3 ); |
323 | setTabOrder( cmdCity3, cmdCity4 ); | 323 | setTabOrder( cmdCity3, cmdCity4 ); |
324 | setTabOrder( cmdCity4, cmdCity5 ); | 324 | setTabOrder( cmdCity4, cmdCity5 ); |
325 | setTabOrder( cmdCity5, cmdCity6 ); | 325 | setTabOrder( cmdCity5, cmdCity6 ); |
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp index a71078f..96010c8 100644 --- a/noncore/applets/memoryapplet/swapfile.cpp +++ b/noncore/applets/memoryapplet/swapfile.cpp | |||
@@ -6,193 +6,193 @@ | |||
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "swapfile.h" | 21 | #include "swapfile.h" |
22 | 22 | ||
23 | /* OPIE */ | 23 | /* OPIE */ |
24 | #include <opie2/odebug.h> | 24 | #include <opie2/odebug.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | using namespace Opie::Core; | 26 | using namespace Opie::Core; |
27 | 27 | ||
28 | /* QT */ | 28 | /* QT */ |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qhbuttongroup.h> | 35 | #include <qhbuttongroup.h> |
36 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qprogressbar.h> | 38 | #include <qprogressbar.h> |
39 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
40 | #include <qvgroupbox.h> | 40 | #include <qvgroupbox.h> |
41 | #include <qhbox.h> | 41 | #include <qhbox.h> |
42 | #include <qmessagebox.h> | 42 | #include <qmessagebox.h> |
43 | #include <qcopchannel_qws.h> | 43 | #include <qcopchannel_qws.h> |
44 | 44 | ||
45 | /* STD */ | 45 | /* STD */ |
46 | #include <stdio.h> | 46 | #include <stdio.h> |
47 | #include <stdlib.h> | 47 | #include <stdlib.h> |
48 | #include <string.h> | 48 | #include <string.h> |
49 | #include <unistd.h> | 49 | #include <unistd.h> |
50 | #include <fcntl.h> | 50 | #include <fcntl.h> |
51 | #include <sys/vfs.h> | 51 | #include <sys/vfs.h> |
52 | #include <mntent.h> | 52 | #include <mntent.h> |
53 | #include <unistd.h> | 53 | #include <unistd.h> |
54 | #include <sys/types.h> | 54 | #include <sys/types.h> |
55 | 55 | ||
56 | Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) | 56 | Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) |
57 | : QWidget( parent, name, f ) | 57 | : QWidget( parent, name, f ) |
58 | { | 58 | { |
59 | // are we running as root? | 59 | // are we running as root? |
60 | isRoot = geteuid() == 0; | 60 | isRoot = geteuid() == 0; |
61 | 61 | ||
62 | QVBoxLayout* vb = new QVBoxLayout(this, 5); | 62 | QVBoxLayout* vb = new QVBoxLayout(this, 5); |
63 | 63 | ||
64 | QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); | 64 | QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); |
65 | cfsdRBG->setRadioButtonExclusive(true); | 65 | cfsdRBG->setRadioButtonExclusive(true); |
66 | vb->addWidget(cfsdRBG); | 66 | vb->addWidget(cfsdRBG); |
67 | 67 | ||
68 | ramRB = new QRadioButton(tr("RAM"), cfsdRBG); | 68 | ramRB = new QRadioButton(tr("RAM"), cfsdRBG); |
69 | cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); | 69 | cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); |
70 | sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); | 70 | sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); |
71 | 71 | ||
72 | QHBox *hb1 = new QHBox(this); | 72 | QHBox *hb1 = new QHBox(this); |
73 | hb1->setSpacing(5); | 73 | hb1->setSpacing(5); |
74 | 74 | ||
75 | swapPath1 = new QLineEdit(hb1); | 75 | swapPath1 = new QLineEdit(hb1); |
76 | swapPath1->setEnabled(false); | 76 | swapPath1->setEnabled(false); |
77 | 77 | ||
78 | QPushButton* swapOn = new QPushButton(tr(" On "), hb1); | 78 | QPushButton* swapOn = new QPushButton(tr(" On "), hb1); |
79 | QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); | 79 | QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); |
80 | vb->addWidget(hb1); | 80 | vb->addWidget(hb1); |
81 | 81 | ||
82 | QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); | 82 | QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); |
83 | vb->addWidget(box1); | 83 | vb->addWidget(box1); |
84 | 84 | ||
85 | QHBox *hb2 = new QHBox(box1); | 85 | QHBox *hb2 = new QHBox(box1); |
86 | hb2->setSpacing(5); | 86 | hb2->setSpacing(5); |
87 | QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2); | 87 | QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2); |
88 | QPushButton* rmSwap = new QPushButton(tr("Remove"), hb2); | 88 | QPushButton* rmSwap = new QPushButton(tr("Remove"), hb2); |
89 | 89 | ||
90 | QHBox *hb3 = new QHBox(box1); | 90 | QHBox *hb3 = new QHBox(box1); |
91 | hb3->setSpacing(5); | 91 | hb3->setSpacing(5); |
92 | swapSize = new QComboBox(hb3); | 92 | swapSize = new QComboBox(hb3); |
93 | swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb"))); | 93 | swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb"))); |
94 | 94 | ||
95 | mkswapProgress = new QProgressBar(3, hb3); | 95 | mkswapProgress = new QProgressBar(3, hb3); |
96 | mkswapProgress->setCenterIndicator(true); | 96 | mkswapProgress->setCenterIndicator(true); |
97 | 97 | ||
98 | QHBox *hb4 = new QHBox(this); | 98 | QHBox *hb4 = new QHBox(this); |
99 | hb4->setSpacing(5); | 99 | hb4->setSpacing(5); |
100 | 100 | ||
101 | swapStatusIcon = new QLabel(hb4); | 101 | swapStatusIcon = new QLabel(hb4); |
102 | swapStatus = new QLabel(tr(""), hb4); | 102 | swapStatus = new QLabel("", hb4); |
103 | hb4->setStretchFactor(swapStatus, 99); | 103 | hb4->setStretchFactor(swapStatus, 99); |
104 | vb->addWidget(hb4); | 104 | vb->addWidget(hb4); |
105 | 105 | ||
106 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); | 106 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); |
107 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); | 107 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); |
108 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 108 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
109 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 109 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
110 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 110 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
111 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); | 111 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); |
112 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); | 112 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); |
113 | 113 | ||
114 | cfRB->setEnabled(FALSE); | 114 | cfRB->setEnabled(FALSE); |
115 | sdRB->setEnabled(FALSE); | 115 | sdRB->setEnabled(FALSE); |
116 | 116 | ||
117 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); | 117 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); |
118 | connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); | 118 | connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
119 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); | 119 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); |
120 | connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); | 120 | connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
121 | 121 | ||
122 | cardInPcmcia0 = FALSE; | 122 | cardInPcmcia0 = FALSE; |
123 | cardInPcmcia1 = FALSE; | 123 | cardInPcmcia1 = FALSE; |
124 | cardInSd = FALSE; | 124 | cardInSd = FALSE; |
125 | 125 | ||
126 | Swapfile::status(); | 126 | Swapfile::status(); |
127 | Swapfile::getStatusPcmcia(); | 127 | Swapfile::getStatusPcmcia(); |
128 | Swapfile::getStatusSd(); | 128 | Swapfile::getStatusSd(); |
129 | } | 129 | } |
130 | 130 | ||
131 | int Swapfile::exec(const QString& arg) | 131 | int Swapfile::exec(const QString& arg) |
132 | { | 132 | { |
133 | return system((!isRoot ? "sudo " : "") + arg); | 133 | return system((!isRoot ? "sudo " : "") + arg); |
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | Swapfile::~Swapfile() | 137 | Swapfile::~Swapfile() |
138 | { | 138 | { |
139 | } | 139 | } |
140 | 140 | ||
141 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) | 141 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) |
142 | { | 142 | { |
143 | if (msg == "stabChanged()") | 143 | if (msg == "stabChanged()") |
144 | { | 144 | { |
145 | getStatusPcmcia(); | 145 | getStatusPcmcia(); |
146 | } | 146 | } |
147 | else if (msg == "mtabChanged()") | 147 | else if (msg == "mtabChanged()") |
148 | { | 148 | { |
149 | getStatusSd(); | 149 | getStatusSd(); |
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | void Swapfile::getStatusPcmcia() | 153 | void Swapfile::getStatusPcmcia() |
154 | { | 154 | { |
155 | 155 | ||
156 | bool cardWas0 = cardInPcmcia0;// remember last state | 156 | bool cardWas0 = cardInPcmcia0;// remember last state |
157 | bool cardWas1 = cardInPcmcia1; | 157 | bool cardWas1 = cardInPcmcia1; |
158 | 158 | ||
159 | QString fileName; | 159 | QString fileName; |
160 | 160 | ||
161 | // one of these 3 files should exist | 161 | // one of these 3 files should exist |
162 | if (QFile::exists("/var/run/stab")) { | 162 | if (QFile::exists("/var/run/stab")) { |
163 | fileName = "/var/run/stab"; | 163 | fileName = "/var/run/stab"; |
164 | } else if (QFile::exists("/var/state/pcmcia/stab")) { | 164 | } else if (QFile::exists("/var/state/pcmcia/stab")) { |
165 | fileName = "/var/state/pcmcia/stab"; | 165 | fileName = "/var/state/pcmcia/stab"; |
166 | } else { | 166 | } else { |
167 | fileName = "/var/lib/pcmcia/stab"; | 167 | fileName = "/var/lib/pcmcia/stab"; |
168 | } | 168 | } |
169 | 169 | ||
170 | QFile f(fileName); | 170 | QFile f(fileName); |
171 | 171 | ||
172 | if (f.open(IO_ReadOnly)) { | 172 | if (f.open(IO_ReadOnly)) { |
173 | QStringList list; | 173 | QStringList list; |
174 | QTextStream stream(&f); | 174 | QTextStream stream(&f); |
175 | QString streamIn; | 175 | QString streamIn; |
176 | streamIn = stream.read(); | 176 | streamIn = stream.read(); |
177 | list = QStringList::split("\n", streamIn); | 177 | list = QStringList::split("\n", streamIn); |
178 | for (QStringList::Iterator line = list.begin(); line != list.end(); | 178 | for (QStringList::Iterator line = list.begin(); line != list.end(); |
179 | line++) { | 179 | line++) { |
180 | if ((*line).startsWith("Socket 0:")) { | 180 | if ((*line).startsWith("Socket 0:")) { |
181 | if ((*line).startsWith("Socket 0: empty") && cardInPcmcia0) { | 181 | if ((*line).startsWith("Socket 0: empty") && cardInPcmcia0) { |
182 | cardInPcmcia0 = FALSE; | 182 | cardInPcmcia0 = FALSE; |
183 | } else if (!(*line).startsWith("Socket 0: empty") | 183 | } else if (!(*line).startsWith("Socket 0: empty") |
184 | && !cardInPcmcia0) { | 184 | && !cardInPcmcia0) { |
185 | cardInPcmcia0 = TRUE; | 185 | cardInPcmcia0 = TRUE; |
186 | } | 186 | } |
187 | } else if ((*line).startsWith("Socket 1:")) { | 187 | } else if ((*line).startsWith("Socket 1:")) { |
188 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { | 188 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { |
189 | cardInPcmcia1 = FALSE; | 189 | cardInPcmcia1 = FALSE; |
190 | } else if (!(*line).startsWith("Socket 1: empty") | 190 | } else if (!(*line).startsWith("Socket 1: empty") |
191 | && !cardInPcmcia1) { | 191 | && !cardInPcmcia1) { |
192 | cardInPcmcia1 = TRUE; | 192 | cardInPcmcia1 = TRUE; |
193 | } | 193 | } |
194 | } | 194 | } |
195 | } | 195 | } |
196 | f.close(); | 196 | f.close(); |
197 | 197 | ||
198 | if (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1) { | 198 | if (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1) { |
diff --git a/noncore/apps/zsafe/scqtfiledlg.cpp b/noncore/apps/zsafe/scqtfiledlg.cpp index c67bbd5..f036101 100644 --- a/noncore/apps/zsafe/scqtfiledlg.cpp +++ b/noncore/apps/zsafe/scqtfiledlg.cpp | |||
@@ -38,216 +38,216 @@ static const char* const image0_data[] = { | |||
38 | static const char* const image1_data[] = { | 38 | static const char* const image1_data[] = { |
39 | "24 16 4 1", | 39 | "24 16 4 1", |
40 | ". c None", | 40 | ". c None", |
41 | "a c #008080", | 41 | "a c #008080", |
42 | "b c #808080", | 42 | "b c #808080", |
43 | "# c #ff0000", | 43 | "# c #ff0000", |
44 | "........................", | 44 | "........................", |
45 | "........................", | 45 | "........................", |
46 | "...####..........####...", | 46 | "...####..........####...", |
47 | "...#####........#####...", | 47 | "...#####........#####...", |
48 | "....######.....#####a...", | 48 | "....######.....#####a...", |
49 | ".....######...#####ba...", | 49 | ".....######...#####ba...", |
50 | ".....aa###########bba...", | 50 | ".....aa###########bba...", |
51 | "....aaaaa#######aabba...", | 51 | "....aaaaa#######aabba...", |
52 | "...aaabbb######bbbbba...", | 52 | "...aaabbb######bbbbba...", |
53 | "..aaaabb########bbbba...", | 53 | "..aaaabb########bbbba...", |
54 | "...aaa############bba...", | 54 | "...aaa############bba...", |
55 | "....a######aaa#####aa...", | 55 | "....a######aaa#####aa...", |
56 | "....######.....######...", | 56 | "....######.....######...", |
57 | "...#####a........####...", | 57 | "...#####a........####...", |
58 | "...####aa.........###...", | 58 | "...####aa.........###...", |
59 | "........................"}; | 59 | "........................"}; |
60 | 60 | ||
61 | static const char* const image2_data[] = { | 61 | static const char* const image2_data[] = { |
62 | "17 15 4 1", | 62 | "17 15 4 1", |
63 | "# c #000000", | 63 | "# c #000000", |
64 | ". c #dcdcdc", | 64 | ". c #dcdcdc", |
65 | "a c #ffff00", | 65 | "a c #ffff00", |
66 | "b c #ffffff", | 66 | "b c #ffffff", |
67 | ".................", | 67 | ".................", |
68 | "............#....", | 68 | "............#....", |
69 | ".................", | 69 | ".................", |
70 | "............#....", | 70 | "............#....", |
71 | ".........#.....#.", | 71 | ".........#.....#.", |
72 | "....####..#.#.#..", | 72 | "....####..#.#.#..", |
73 | "...#abab#..#.#...", | 73 | "...#abab#..#.#...", |
74 | "..##########..#.#", | 74 | "..##########..#.#", |
75 | "..#babababab##...", | 75 | "..#babababab##...", |
76 | "..#ababababa#.#..", | 76 | "..#ababababa#.#..", |
77 | "..#babababab#..#.", | 77 | "..#babababab#..#.", |
78 | "..#ababababa#....", | 78 | "..#ababababa#....", |
79 | "..#babababab#....", | 79 | "..#babababab#....", |
80 | "..#ababababa#....", | 80 | "..#ababababa#....", |
81 | "..###########...."}; | 81 | "..###########...."}; |
82 | 82 | ||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Constructs a ScQtFileDlg which is a child of 'parent', with the | 85 | * Constructs a ScQtFileDlg which is a child of 'parent', with the |
86 | * name 'name' and widget flags set to 'f' | 86 | * name 'name' and widget flags set to 'f' |
87 | * | 87 | * |
88 | * The dialog will by default be modeless, unless you set 'modal' to | 88 | * The dialog will by default be modeless, unless you set 'modal' to |
89 | * TRUE to construct a modal dialog. | 89 | * TRUE to construct a modal dialog. |
90 | */ | 90 | */ |
91 | ScQtFileDlg::ScQtFileDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) | 91 | ScQtFileDlg::ScQtFileDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) |
92 | : QDialog( parent, name, modal, fl ) | 92 | : QDialog( parent, name, modal, fl ) |
93 | { | 93 | { |
94 | QPixmap image0( ( const char** ) image0_data ); | 94 | QPixmap image0( ( const char** ) image0_data ); |
95 | QPixmap image1( ( const char** ) image1_data ); | 95 | QPixmap image1( ( const char** ) image1_data ); |
96 | QPixmap image2( ( const char** ) image2_data ); | 96 | QPixmap image2( ( const char** ) image2_data ); |
97 | if ( !name ) | 97 | if ( !name ) |
98 | setName( "ScQtFileDlg" ); | 98 | setName( "ScQtFileDlg" ); |
99 | resize( 196, 279 ); | 99 | resize( 196, 279 ); |
100 | if (!name) | 100 | if (!name) |
101 | setCaption( tr( "FileDlg" ) ); | 101 | setCaption( tr( "FileDlg" ) ); |
102 | else | 102 | else |
103 | setCaption(name); | 103 | setCaption(name); |
104 | ScQtFileDlgLayout = new QVBoxLayout( this ); | 104 | ScQtFileDlgLayout = new QVBoxLayout( this ); |
105 | ScQtFileDlgLayout->setSpacing( 6 ); | 105 | ScQtFileDlgLayout->setSpacing( 6 ); |
106 | ScQtFileDlgLayout->setMargin( 11 ); | 106 | ScQtFileDlgLayout->setMargin( 11 ); |
107 | 107 | ||
108 | Layout5 = new QVBoxLayout; | 108 | Layout5 = new QVBoxLayout; |
109 | Layout5->setSpacing( 6 ); | 109 | Layout5->setSpacing( 6 ); |
110 | Layout5->setMargin( 0 ); | 110 | Layout5->setMargin( 0 ); |
111 | 111 | ||
112 | Layout4 = new QVBoxLayout; | 112 | Layout4 = new QVBoxLayout; |
113 | Layout4->setSpacing( 6 ); | 113 | Layout4->setSpacing( 6 ); |
114 | Layout4->setMargin( 0 ); | 114 | Layout4->setMargin( 0 ); |
115 | 115 | ||
116 | Layout3 = new QHBoxLayout; | 116 | Layout3 = new QHBoxLayout; |
117 | Layout3->setSpacing( 6 ); | 117 | Layout3->setSpacing( 6 ); |
118 | Layout3->setMargin( 0 ); | 118 | Layout3->setMargin( 0 ); |
119 | 119 | ||
120 | TypeComboBox = new QComboBox( FALSE, this, "TypeComboBox" ); | 120 | TypeComboBox = new QComboBox( FALSE, this, "TypeComboBox" ); |
121 | TypeComboBox->setEditable( TRUE ); | 121 | TypeComboBox->setEditable( TRUE ); |
122 | TypeComboBox->setInsertionPolicy( QComboBox::AtBottom ); | 122 | TypeComboBox->setInsertionPolicy( QComboBox::AtBottom ); |
123 | TypeComboBox->setAutoCompletion( FALSE ); | 123 | TypeComboBox->setAutoCompletion( FALSE ); |
124 | TypeComboBox->setDuplicatesEnabled( FALSE ); | 124 | TypeComboBox->setDuplicatesEnabled( FALSE ); |
125 | QToolTip::add( TypeComboBox, tr( "file type filter" ) ); | 125 | QToolTip::add( TypeComboBox, tr( "file type filter" ) ); |
126 | QWhatsThis::add( TypeComboBox, tr( "ComboBox FileTypeFilter\n" | 126 | QWhatsThis::add( TypeComboBox, tr( "ComboBox FileTypeFilter\n" |
127 | "\n" | 127 | "\n" |
128 | "edit or select the filter" ) ); | 128 | "edit or select the filter" ) ); |
129 | Layout3->addWidget( TypeComboBox ); | 129 | Layout3->addWidget( TypeComboBox ); |
130 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | 130 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
131 | Layout3->addItem( spacer ); | 131 | Layout3->addItem( spacer ); |
132 | 132 | ||
133 | OkButton = new QToolButton( this, "OkButton" ); | 133 | OkButton = new QToolButton( this, "OkButton" ); |
134 | OkButton->setText( tr( "" ) ); | 134 | OkButton->setText( "" ); |
135 | OkButton->setPixmap( image0 ); | 135 | OkButton->setPixmap( image0 ); |
136 | OkButton->setUsesBigPixmap( FALSE ); | 136 | OkButton->setUsesBigPixmap( FALSE ); |
137 | QToolTip::add( OkButton, tr( "confirms the selection and closes the form" ) ); | 137 | QToolTip::add( OkButton, tr( "confirms the selection and closes the form" ) ); |
138 | QWhatsThis::add( OkButton, tr( "OKButton" ) ); | 138 | QWhatsThis::add( OkButton, tr( "OKButton" ) ); |
139 | Layout3->addWidget( OkButton ); | 139 | Layout3->addWidget( OkButton ); |
140 | 140 | ||
141 | CancelButton = new QToolButton( this, "CancelButton" ); | 141 | CancelButton = new QToolButton( this, "CancelButton" ); |
142 | CancelButton->setText( tr( "" ) ); | 142 | CancelButton->setText( "" ); |
143 | CancelButton->setPixmap( image1 ); | 143 | CancelButton->setPixmap( image1 ); |
144 | CancelButton->setUsesBigPixmap( FALSE ); | 144 | CancelButton->setUsesBigPixmap( FALSE ); |
145 | QToolTip::add( CancelButton, tr( "cancels the selection and closes the form" ) ); | 145 | QToolTip::add( CancelButton, tr( "cancels the selection and closes the form" ) ); |
146 | QWhatsThis::add( CancelButton, tr( "CancelButton" ) ); | 146 | QWhatsThis::add( CancelButton, tr( "CancelButton" ) ); |
147 | Layout3->addWidget( CancelButton ); | 147 | Layout3->addWidget( CancelButton ); |
148 | Layout4->addLayout( Layout3 ); | 148 | Layout4->addLayout( Layout3 ); |
149 | 149 | ||
150 | Layout3_2 = new QHBoxLayout; | 150 | Layout3_2 = new QHBoxLayout; |
151 | Layout3_2->setSpacing( 6 ); | 151 | Layout3_2->setSpacing( 6 ); |
152 | Layout3_2->setMargin( 0 ); | 152 | Layout3_2->setMargin( 0 ); |
153 | 153 | ||
154 | FNameLineEdit = new QLineEdit( this, "FNameLineEdit" ); | 154 | FNameLineEdit = new QLineEdit( this, "FNameLineEdit" ); |
155 | QToolTip::add( FNameLineEdit, tr( "shows the selected filename" ) ); | 155 | QToolTip::add( FNameLineEdit, tr( "shows the selected filename" ) ); |
156 | QWhatsThis::add( FNameLineEdit, tr( "Filename LineEdit\n" | 156 | QWhatsThis::add( FNameLineEdit, tr( "Filename LineEdit\n" |
157 | "\n" | 157 | "\n" |
158 | "shows the selected file\n" | 158 | "shows the selected file\n" |
159 | "and allows the direct filename\n" | 159 | "and allows the direct filename\n" |
160 | "edit" ) ); | 160 | "edit" ) ); |
161 | Layout3_2->addWidget( FNameLineEdit ); | 161 | Layout3_2->addWidget( FNameLineEdit ); |
162 | 162 | ||
163 | MkDirButton = new QToolButton( this, "MkDirButton" ); | 163 | MkDirButton = new QToolButton( this, "MkDirButton" ); |
164 | MkDirButton->setText( tr( "" ) ); | 164 | MkDirButton->setText( "" ); |
165 | MkDirButton->setPixmap( image2 ); | 165 | MkDirButton->setPixmap( image2 ); |
166 | MkDirButton->setUsesBigPixmap( FALSE ); | 166 | MkDirButton->setUsesBigPixmap( FALSE ); |
167 | QToolTip::add( MkDirButton, tr( "confirms the selection and closes the form" ) ); | 167 | QToolTip::add( MkDirButton, tr( "confirms the selection and closes the form" ) ); |
168 | QWhatsThis::add( MkDirButton, tr( "OKButton" ) ); | 168 | QWhatsThis::add( MkDirButton, tr( "OKButton" ) ); |
169 | Layout3_2->addWidget( MkDirButton ); | 169 | Layout3_2->addWidget( MkDirButton ); |
170 | Layout4->addLayout( Layout3_2 ); | 170 | Layout4->addLayout( Layout3_2 ); |
171 | 171 | ||
172 | DirComboBox = new QComboBox( FALSE, this, "DirComboBox" ); | 172 | DirComboBox = new QComboBox( FALSE, this, "DirComboBox" ); |
173 | DirComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, DirComboBox->sizePolicy().hasHeightForWidth() ) ); | 173 | DirComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, DirComboBox->sizePolicy().hasHeightForWidth() ) ); |
174 | DirComboBox->setEditable( TRUE ); | 174 | DirComboBox->setEditable( TRUE ); |
175 | DirComboBox->setDuplicatesEnabled( FALSE ); | 175 | DirComboBox->setDuplicatesEnabled( FALSE ); |
176 | QWhatsThis::add( DirComboBox, tr( "ComboBox Directory \n" | 176 | QWhatsThis::add( DirComboBox, tr( "ComboBox Directory \n" |
177 | "edit or select the directories name" ) ); | 177 | "edit or select the directories name" ) ); |
178 | Layout4->addWidget( DirComboBox ); | 178 | Layout4->addWidget( DirComboBox ); |
179 | Layout5->addLayout( Layout4 ); | 179 | Layout5->addLayout( Layout4 ); |
180 | 180 | ||
181 | ListView = new QListView( this, "ListView" ); | 181 | ListView = new QListView( this, "ListView" ); |
182 | ListView->addColumn( tr( "Name" ) ); | 182 | ListView->addColumn( tr( "Name" ) ); |
183 | ListView->addColumn( tr( "size" ) ); | 183 | ListView->addColumn( tr( "size" ) ); |
184 | ListView->addColumn( tr( "type" ) ); | 184 | ListView->addColumn( tr( "type" ) ); |
185 | ListView->setRootIsDecorated( TRUE ); | 185 | ListView->setRootIsDecorated( TRUE ); |
186 | QToolTip::add( ListView, tr( "directory listview" ) ); | 186 | QToolTip::add( ListView, tr( "directory listview" ) ); |
187 | QWhatsThis::add( ListView, tr( "Directory ListView\n" | 187 | QWhatsThis::add( ListView, tr( "Directory ListView\n" |
188 | "\n" | 188 | "\n" |
189 | "shows the list of dirs and files" ) ); | 189 | "shows the list of dirs and files" ) ); |
190 | Layout5->addWidget( ListView ); | 190 | Layout5->addWidget( ListView ); |
191 | ScQtFileDlgLayout->addLayout( Layout5 ); | 191 | ScQtFileDlgLayout->addLayout( Layout5 ); |
192 | 192 | ||
193 | // signals and slots connections | 193 | // signals and slots connections |
194 | connect( OkButton, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); | 194 | connect( OkButton, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); |
195 | connect( DirComboBox, SIGNAL( activated(int) ), this, SLOT( slotDirComboBoxChanged(int) ) ); | 195 | connect( DirComboBox, SIGNAL( activated(int) ), this, SLOT( slotDirComboBoxChanged(int) ) ); |
196 | connect( TypeComboBox, SIGNAL( activated(int) ), this, SLOT( slotTypeComboBoxChanged(int) ) ); | 196 | connect( TypeComboBox, SIGNAL( activated(int) ), this, SLOT( slotTypeComboBoxChanged(int) ) ); |
197 | connect( CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) ); | 197 | connect( CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) ); |
198 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); | 198 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); |
199 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); | 199 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) ); |
200 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( slotDoubleClicked(QListViewItem*) ) ); | 200 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( slotDoubleClicked(QListViewItem*) ) ); |
201 | connect( FNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotFileTextChanged(const QString&) ) ); | 201 | connect( FNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotFileTextChanged(const QString&) ) ); |
202 | connect( FNameLineEdit, SIGNAL( returnPressed() ), this, SLOT( slotOK() ) ); | 202 | connect( FNameLineEdit, SIGNAL( returnPressed() ), this, SLOT( slotOK() ) ); |
203 | connect( MkDirButton, SIGNAL( clicked() ), this, SLOT( slotMkDir() ) ); | 203 | connect( MkDirButton, SIGNAL( clicked() ), this, SLOT( slotMkDir() ) ); |
204 | } | 204 | } |
205 | 205 | ||
206 | /* | 206 | /* |
207 | * Destroys the object and frees any allocated resources | 207 | * Destroys the object and frees any allocated resources |
208 | */ | 208 | */ |
209 | ScQtFileDlg::~ScQtFileDlg() | 209 | ScQtFileDlg::~ScQtFileDlg() |
210 | { | 210 | { |
211 | // no need to delete child widgets, Qt does it all for us | 211 | // no need to delete child widgets, Qt does it all for us |
212 | } | 212 | } |
213 | 213 | ||
214 | void ScQtFileDlg::slotCancel() | 214 | void ScQtFileDlg::slotCancel() |
215 | { | 215 | { |
216 | owarn << "ScQtFileDlg::slotCancel(): Not implemented yet!" << oendl; | 216 | owarn << "ScQtFileDlg::slotCancel(): Not implemented yet!" << oendl; |
217 | } | 217 | } |
218 | 218 | ||
219 | void ScQtFileDlg::slotDirComboBoxChanged( int ) | 219 | void ScQtFileDlg::slotDirComboBoxChanged( int ) |
220 | { | 220 | { |
221 | owarn << "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" << oendl; | 221 | owarn << "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" << oendl; |
222 | } | 222 | } |
223 | 223 | ||
224 | void ScQtFileDlg::slotDoubleClicked(QListViewItem *) | 224 | void ScQtFileDlg::slotDoubleClicked(QListViewItem *) |
225 | { | 225 | { |
226 | owarn << "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" << oendl; | 226 | owarn << "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" << oendl; |
227 | } | 227 | } |
228 | 228 | ||
229 | void ScQtFileDlg::slotFileTextChanged( const QString & ) | 229 | void ScQtFileDlg::slotFileTextChanged( const QString & ) |
230 | { | 230 | { |
231 | owarn << "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" << oendl; | 231 | owarn << "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" << oendl; |
232 | } | 232 | } |
233 | 233 | ||
234 | void ScQtFileDlg::slotMkDir() | 234 | void ScQtFileDlg::slotMkDir() |
235 | { | 235 | { |
236 | owarn << "ScQtFileDlg::slotMkDir(): Not implemented yet!" << oendl; | 236 | owarn << "ScQtFileDlg::slotMkDir(): Not implemented yet!" << oendl; |
237 | } | 237 | } |
238 | 238 | ||
239 | void ScQtFileDlg::slotOK() | 239 | void ScQtFileDlg::slotOK() |
240 | { | 240 | { |
241 | owarn << "ScQtFileDlg::slotOK(): Not implemented yet!" << oendl; | 241 | owarn << "ScQtFileDlg::slotOK(): Not implemented yet!" << oendl; |
242 | } | 242 | } |
243 | 243 | ||
244 | void ScQtFileDlg::slotSelectionChanged(QListViewItem *) | 244 | void ScQtFileDlg::slotSelectionChanged(QListViewItem *) |
245 | { | 245 | { |
246 | owarn << "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" << oendl; | 246 | owarn << "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" << oendl; |
247 | } | 247 | } |
248 | 248 | ||
249 | void ScQtFileDlg::slotTypeComboBoxChanged( int ) | 249 | void ScQtFileDlg::slotTypeComboBoxChanged( int ) |
250 | { | 250 | { |
251 | owarn << "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" << oendl; | 251 | owarn << "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" << oendl; |
252 | } | 252 | } |
253 | 253 | ||
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index ca3ff52..189453e 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -494,211 +494,211 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl ) | |||
494 | { | 494 | { |
495 | if ( !QDir( zsafeAppDirPath ).exists() ) | 495 | if ( !QDir( zsafeAppDirPath ).exists() ) |
496 | { | 496 | { |
497 | //FIXME: Pending someone to look into why QDir.mkdir does not work as expected | 497 | //FIXME: Pending someone to look into why QDir.mkdir does not work as expected |
498 | QString cmdline = QString().sprintf( "mkdir -p %s", (const char*) zsafeAppDirPath ); | 498 | QString cmdline = QString().sprintf( "mkdir -p %s", (const char*) zsafeAppDirPath ); |
499 | ::system( cmdline ); | 499 | ::system( cmdline ); |
500 | } | 500 | } |
501 | if ( !QDir( zsafeAppDirPath ).exists() ) | 501 | if ( !QDir( zsafeAppDirPath ).exists() ) |
502 | { | 502 | { |
503 | QMessageBox::critical( 0, "ZSafe", tr("Can't create application data directory.\nZSafe will now exit.")); | 503 | QMessageBox::critical( 0, "ZSafe", tr("Can't create application data directory.\nZSafe will now exit.")); |
504 | exitZs (1); | 504 | exitZs (1); |
505 | } | 505 | } |
506 | } | 506 | } |
507 | 507 | ||
508 | // set the default filename | 508 | // set the default filename |
509 | filename = zsafeAppDirPath + "/passwords.zsf"; | 509 | filename = zsafeAppDirPath + "/passwords.zsf"; |
510 | 510 | ||
511 | // save the current filename to the config file | 511 | // save the current filename to the config file |
512 | conf->writeEntry(APP_KEY+"document", filename); | 512 | conf->writeEntry(APP_KEY+"document", filename); |
513 | saveConf(); | 513 | saveConf(); |
514 | 514 | ||
515 | //if (filename == "INVALIDPWD") | 515 | //if (filename == "INVALIDPWD") |
516 | //filename = ""; | 516 | //filename = ""; |
517 | 517 | ||
518 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); | 518 | QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); |
519 | #ifdef WIN32 | 519 | #ifdef WIN32 |
520 | this->setCaption("Qt ZSafe: " + ti); | 520 | this->setCaption("Qt ZSafe: " + ti); |
521 | #else | 521 | #else |
522 | this->setCaption("ZSafe: " + ti); | 522 | this->setCaption("ZSafe: " + ti); |
523 | #endif | 523 | #endif |
524 | 524 | ||
525 | selectedItem = NULL; | 525 | selectedItem = NULL; |
526 | lastSearchedCategory = NULL; | 526 | lastSearchedCategory = NULL; |
527 | lastSearchedItem = NULL; | 527 | lastSearchedItem = NULL; |
528 | lastSearchedName = ""; | 528 | lastSearchedName = ""; |
529 | lastSearchedUsername = ""; | 529 | lastSearchedUsername = ""; |
530 | lastSearchedComment = ""; | 530 | lastSearchedComment = ""; |
531 | 531 | ||
532 | infoForm = new InfoForm(); | 532 | infoForm = new InfoForm(); |
533 | categoryDialog = NULL; | 533 | categoryDialog = NULL; |
534 | 534 | ||
535 | // add a menu bar | 535 | // add a menu bar |
536 | QMenuBar *menu = new QMenuBar( this ); | 536 | QMenuBar *menu = new QMenuBar( this ); |
537 | 537 | ||
538 | // add file menu | 538 | // add file menu |
539 | // QPopupMenu *file = new QPopupMenu( this ); | 539 | // QPopupMenu *file = new QPopupMenu( this ); |
540 | file = new QPopupMenu( this ); | 540 | file = new QPopupMenu( this ); |
541 | 541 | ||
542 | // #ifdef DESKTOP | 542 | // #ifdef DESKTOP |
543 | file->insertItem( new_img, tr("&New document"), this, SLOT(newDocument()) ); | 543 | file->insertItem( new_img, tr("&New document"), this, SLOT(newDocument()) ); |
544 | file->insertItem( folder_open_img, tr("&Open document"), this, SLOT(loadDocument()) ); | 544 | file->insertItem( folder_open_img, tr("&Open document"), this, SLOT(loadDocument()) ); |
545 | file->insertItem( save_img, tr("&Save document as .."), this, SLOT(saveDocumentAs()) ); | 545 | file->insertItem( save_img, tr("&Save document as .."), this, SLOT(saveDocumentAs()) ); |
546 | file->insertSeparator(); | 546 | file->insertSeparator(); |
547 | // #endif | 547 | // #endif |
548 | 548 | ||
549 | file->insertItem( save_img, tr("&Save document"), this, SLOT(saveDocumentWithoutPwd()) ); | 549 | file->insertItem( save_img, tr("&Save document"), this, SLOT(saveDocumentWithoutPwd()) ); |
550 | file->insertItem( save_img, tr("S&ave document with new Password"), this, | 550 | file->insertItem( save_img, tr("S&ave document with new Password"), this, |
551 | SLOT(saveDocumentWithPwd()) ); | 551 | SLOT(saveDocumentWithPwd()) ); |
552 | file->insertSeparator(); | 552 | file->insertSeparator(); |
553 | file->insertItem( export_img, tr("&Export text file"), this, SLOT(writeAllEntries()) ); | 553 | file->insertItem( export_img, tr("&Export text file"), this, SLOT(writeAllEntries()) ); |
554 | file->insertItem( import_img, tr("&Import text file"), this, SLOT(readAllEntries()) ); | 554 | file->insertItem( import_img, tr("&Import text file"), this, SLOT(readAllEntries()) ); |
555 | file->insertItem( trash_img, tr("&Remove text file"), this, SLOT(removeAsciiFile()) ); | 555 | file->insertItem( trash_img, tr("&Remove text file"), this, SLOT(removeAsciiFile()) ); |
556 | file->insertSeparator(); | 556 | file->insertSeparator(); |
557 | file->insertItem( expand_img, tr("&Open entries expanded"), this, | 557 | file->insertItem( expand_img, tr("&Open entries expanded"), this, |
558 | SLOT(setExpandFlag()), 0, 'o'); | 558 | SLOT(setExpandFlag()), 0, 'o'); |
559 | file->setItemChecked('o', expandTree); | 559 | file->setItemChecked('o', expandTree); |
560 | file->insertSeparator(); | 560 | file->insertSeparator(); |
561 | file->insertItem( quit_icon_img, tr("E&xit"), this, SLOT(quitMe()) ); | 561 | file->insertItem( quit_icon_img, tr("E&xit"), this, SLOT(quitMe()) ); |
562 | menu->insertItem( tr("&File"), file ); | 562 | menu->insertItem( tr("&File"), file ); |
563 | 563 | ||
564 | QPopupMenu *cat = new QPopupMenu( this ); | 564 | QPopupMenu *cat = new QPopupMenu( this ); |
565 | cat->insertItem( new_img, tr("&New"), this, SLOT(addCategory()) ); | 565 | cat->insertItem( new_img, tr("&New"), this, SLOT(addCategory()) ); |
566 | cat->insertItem( edit_img, tr("&Edit"), this, SLOT(editCategory()) ); | 566 | cat->insertItem( edit_img, tr("&Edit"), this, SLOT(editCategory()) ); |
567 | cat->insertItem( trash_img, tr("&Delete"), this, SLOT(delCategory()) ); | 567 | cat->insertItem( trash_img, tr("&Delete"), this, SLOT(delCategory()) ); |
568 | menu->insertItem( tr("&Category"), cat ); | 568 | menu->insertItem( tr("&Category"), cat ); |
569 | 569 | ||
570 | QPopupMenu *it = new QPopupMenu( this ); | 570 | QPopupMenu *it = new QPopupMenu( this ); |
571 | it->insertItem( cut_img, tr("&Cut"), this, SLOT(cutItem()) ); | 571 | it->insertItem( cut_img, tr("&Cut"), this, SLOT(cutItem()) ); |
572 | it->insertItem( copy_img, tr("C&opy"), this, SLOT(copyItem()) ); | 572 | it->insertItem( copy_img, tr("C&opy"), this, SLOT(copyItem()) ); |
573 | it->insertItem( paste_img, tr("&Paste"), this, SLOT(pasteItem()) ); | 573 | it->insertItem( paste_img, tr("&Paste"), this, SLOT(pasteItem()) ); |
574 | it->insertSeparator(); | 574 | it->insertSeparator(); |
575 | it->insertItem( new_img, tr("&New"), this, SLOT(newPwd()) ); | 575 | it->insertItem( new_img, tr("&New"), this, SLOT(newPwd()) ); |
576 | it->insertItem( edit_img, tr("&Edit"), this, SLOT(editPwd()) ); | 576 | it->insertItem( edit_img, tr("&Edit"), this, SLOT(editPwd()) ); |
577 | it->insertItem( trash_img, tr("&Delete"), this, SLOT(deletePwd()) ); | 577 | it->insertItem( trash_img, tr("&Delete"), this, SLOT(deletePwd()) ); |
578 | it->insertItem( find_img, tr("&Search"), this, SLOT(findPwd()) ); | 578 | it->insertItem( find_img, tr("&Search"), this, SLOT(findPwd()) ); |
579 | menu->insertItem( tr("&Entry"), it ); | 579 | menu->insertItem( tr("&Entry"), it ); |
580 | 580 | ||
581 | QPopupMenu *help = new QPopupMenu( this ); | 581 | QPopupMenu *help = new QPopupMenu( this ); |
582 | help->insertItem( help_icon_img, tr("&About"), this, SLOT(about()) ); | 582 | help->insertItem( help_icon_img, tr("&About"), this, SLOT(about()) ); |
583 | menu->insertItem( tr("&Help"), help ); | 583 | menu->insertItem( tr("&Help"), help ); |
584 | 584 | ||
585 | // toolbar icons | 585 | // toolbar icons |
586 | 586 | ||
587 | New = new QToolButton( menu, "New" ); | 587 | New = new QToolButton( menu, "New" ); |
588 | New->setGeometry( QRect( DeskW-84, 2, 20, 20 ) ); | 588 | New->setGeometry( QRect( DeskW-84, 2, 20, 20 ) ); |
589 | New->setMouseTracking( TRUE ); | 589 | New->setMouseTracking( TRUE ); |
590 | New->setText( tr( "" ) ); | 590 | New->setText( "" ); |
591 | New->setPixmap( new_img ); | 591 | New->setPixmap( new_img ); |
592 | QToolTip::add( New, tr( "New entry" ) ); | 592 | QToolTip::add( New, tr( "New entry" ) ); |
593 | 593 | ||
594 | Edit = new QToolButton( menu, "Edit" ); | 594 | Edit = new QToolButton( menu, "Edit" ); |
595 | Edit->setGeometry( QRect( DeskW-64, 2, 20, 20 ) ); | 595 | Edit->setGeometry( QRect( DeskW-64, 2, 20, 20 ) ); |
596 | Edit->setText( tr( "" ) ); | 596 | Edit->setText( "" ); |
597 | Edit->setPixmap( edit_img ); | 597 | Edit->setPixmap( edit_img ); |
598 | QToolTip::add( Edit, tr( "Edit category or entry" ) ); | 598 | QToolTip::add( Edit, tr( "Edit category or entry" ) ); |
599 | 599 | ||
600 | Delete = new QToolButton( menu, "Delete" ); | 600 | Delete = new QToolButton( menu, "Delete" ); |
601 | Delete->setGeometry( QRect( DeskW-44, 2, 20, 20 ) ); | 601 | Delete->setGeometry( QRect( DeskW-44, 2, 20, 20 ) ); |
602 | Delete->setText( tr( "" ) ); | 602 | Delete->setText( "" ); |
603 | Delete->setPixmap( trash_img ); | 603 | Delete->setPixmap( trash_img ); |
604 | QToolTip::add( Delete, tr( "Delete category or entry" ) ); | 604 | QToolTip::add( Delete, tr( "Delete category or entry" ) ); |
605 | 605 | ||
606 | Find = new QToolButton( menu, "Find" ); | 606 | Find = new QToolButton( menu, "Find" ); |
607 | Find->setGeometry( QRect( DeskW-24, 2, 20, 20 ) ); | 607 | Find->setGeometry( QRect( DeskW-24, 2, 20, 20 ) ); |
608 | Find->setText( tr( "" ) ); | 608 | Find->setText( "" ); |
609 | Find->setPixmap( find_img ); | 609 | Find->setPixmap( find_img ); |
610 | QToolTip::add( Find, tr( "Find entry" ) ); | 610 | QToolTip::add( Find, tr( "Find entry" ) ); |
611 | 611 | ||
612 | /* | 612 | /* |
613 | QBoxLayout * h = new QHBoxLayout( this ); | 613 | QBoxLayout * h = new QHBoxLayout( this ); |
614 | h->addWidget (menu); | 614 | h->addWidget (menu); |
615 | h->addWidget (New); | 615 | h->addWidget (New); |
616 | h->addWidget (Edit); | 616 | h->addWidget (Edit); |
617 | h->addWidget (Delete); | 617 | h->addWidget (Delete); |
618 | h->addWidget (Find); | 618 | h->addWidget (Find); |
619 | */ | 619 | */ |
620 | 620 | ||
621 | ListView = new ZListView( this, "ListView" ); | 621 | ListView = new ZListView( this, "ListView" ); |
622 | ListView->addColumn( tr( "Name" ) ); | 622 | ListView->addColumn( tr( "Name" ) ); |
623 | ListView->addColumn( tr( "Field 2" ) ); | 623 | ListView->addColumn( tr( "Field 2" ) ); |
624 | ListView->addColumn( tr( "Field 3" ) ); | 624 | ListView->addColumn( tr( "Field 3" ) ); |
625 | ListView->addColumn( tr( "Comment" ) ); | 625 | ListView->addColumn( tr( "Comment" ) ); |
626 | ListView->addColumn( tr( "Field 4" ) ); | 626 | ListView->addColumn( tr( "Field 4" ) ); |
627 | ListView->addColumn( tr( "Field 5" ) ); | 627 | ListView->addColumn( tr( "Field 5" ) ); |
628 | ListView->setAllColumnsShowFocus(TRUE); | 628 | ListView->setAllColumnsShowFocus(TRUE); |
629 | 629 | ||
630 | #ifdef DESKTOP | 630 | #ifdef DESKTOP |
631 | ListView->setResizePolicy(QScrollView::AutoOneFit); | 631 | ListView->setResizePolicy(QScrollView::AutoOneFit); |
632 | // ListView->setGeometry( QRect( 0, 22, this->width(), this->height() - 30 ) ); | 632 | // ListView->setGeometry( QRect( 0, 22, this->width(), this->height() - 30 ) ); |
633 | #else | 633 | #else |
634 | ListView->setResizePolicy(QScrollView::AutoOneFit); | 634 | ListView->setResizePolicy(QScrollView::AutoOneFit); |
635 | // ListView->setGeometry( QRect( 0, 22, | 635 | // ListView->setGeometry( QRect( 0, 22, |
636 | // this->width(), this->height() - 30 ) ); | 636 | // this->width(), this->height() - 30 ) ); |
637 | // ListView->setMaximumSize( QSize( 440, 290 ) ); | 637 | // ListView->setMaximumSize( QSize( 440, 290 ) ); |
638 | #endif | 638 | #endif |
639 | ListView->setVScrollBarMode( QListView::Auto ); | 639 | ListView->setVScrollBarMode( QListView::Auto ); |
640 | 640 | ||
641 | QBoxLayout * l = new QVBoxLayout( this ); | 641 | QBoxLayout * l = new QVBoxLayout( this ); |
642 | l->addWidget (menu); | 642 | l->addWidget (menu); |
643 | l->addWidget (ListView); | 643 | l->addWidget (ListView); |
644 | 644 | ||
645 | #ifndef DESKTOP | 645 | #ifndef DESKTOP |
646 | // start a timer (100 ms) to load the default document | 646 | // start a timer (100 ms) to load the default document |
647 | docuTimer.start( 100, true ); | 647 | docuTimer.start( 100, true ); |
648 | connect( &docuTimer, SIGNAL(timeout()), SLOT( slotLoadDocu() ) ); | 648 | connect( &docuTimer, SIGNAL(timeout()), SLOT( slotLoadDocu() ) ); |
649 | raiseFlag = true; | 649 | raiseFlag = true; |
650 | connect( &raiseTimer, SIGNAL(timeout()), SLOT( slotRaiseTimer() ) ); | 650 | connect( &raiseTimer, SIGNAL(timeout()), SLOT( slotRaiseTimer() ) ); |
651 | #else | 651 | #else |
652 | // open the default document | 652 | // open the default document |
653 | openDocument(filename); | 653 | openDocument(filename); |
654 | #endif | 654 | #endif |
655 | 655 | ||
656 | // signals and slots connections for QTollButton | 656 | // signals and slots connections for QTollButton |
657 | connect( New, SIGNAL( clicked() ), this, SLOT( newPwd() ) ); | 657 | connect( New, SIGNAL( clicked() ), this, SLOT( newPwd() ) ); |
658 | connect( Edit, SIGNAL( clicked() ), this, SLOT( editPwd() ) ); | 658 | connect( Edit, SIGNAL( clicked() ), this, SLOT( editPwd() ) ); |
659 | connect( Delete, SIGNAL( clicked() ), this, SLOT( deletePwd() ) ); | 659 | connect( Delete, SIGNAL( clicked() ), this, SLOT( deletePwd() ) ); |
660 | connect( Find, SIGNAL( clicked() ), this, SLOT( findPwd() ) ); | 660 | connect( Find, SIGNAL( clicked() ), this, SLOT( findPwd() ) ); |
661 | // signals and slots connections for QListView | 661 | // signals and slots connections for QListView |
662 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), | 662 | connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), |
663 | this, SLOT( listViewSelected(QListViewItem*) ) ); | 663 | this, SLOT( listViewSelected(QListViewItem*) ) ); |
664 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), | 664 | connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), |
665 | this, SLOT( showInfo(QListViewItem*) ) ); | 665 | this, SLOT( showInfo(QListViewItem*) ) ); |
666 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), | 666 | connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), |
667 | this, SLOT( showInfo(QListViewItem*) ) ); | 667 | this, SLOT( showInfo(QListViewItem*) ) ); |
668 | 668 | ||
669 | } | 669 | } |
670 | 670 | ||
671 | const QColor *ZSafe::evenRowColor = &Qt::white; | 671 | const QColor *ZSafe::evenRowColor = &Qt::white; |
672 | // const QColor *ZSafe::oddRowColor = &Qt::lightGray; | 672 | // const QColor *ZSafe::oddRowColor = &Qt::lightGray; |
673 | const QColor *ZSafe::oddRowColor = new QColor(216,240,255); | 673 | const QColor *ZSafe::oddRowColor = new QColor(216,240,255); |
674 | 674 | ||
675 | /* | 675 | /* |
676 | * Destroys the object and frees any allocated resources | 676 | * Destroys the object and frees any allocated resources |
677 | */ | 677 | */ |
678 | ZSafe::~ZSafe() | 678 | ZSafe::~ZSafe() |
679 | { | 679 | { |
680 | // no need to delete child widgets, Qt does it all for us | 680 | // no need to delete child widgets, Qt does it all for us |
681 | quitMe(); | 681 | quitMe(); |
682 | } | 682 | } |
683 | 683 | ||
684 | // load the default document | 684 | // load the default document |
685 | void ZSafe::slotLoadDocu() | 685 | void ZSafe::slotLoadDocu() |
686 | { | 686 | { |
687 | openDocument (filename); | 687 | openDocument (filename); |
688 | } | 688 | } |
689 | 689 | ||
690 | void ZSafe::deletePwd() | 690 | void ZSafe::deletePwd() |
691 | { | 691 | { |
692 | 692 | ||
693 | if (!selectedItem) | 693 | if (!selectedItem) |
694 | return; | 694 | return; |
695 | if (!isCategory(selectedItem)) | 695 | if (!isCategory(selectedItem)) |
696 | { | 696 | { |
697 | switch( QMessageBox::information( this, tr("ZSafe"), | 697 | switch( QMessageBox::information( this, tr("ZSafe"), |
698 | tr("Do you want to delete?"), | 698 | tr("Do you want to delete?"), |
699 | tr("&Delete"), tr("D&on't Delete"), | 699 | tr("&Delete"), tr("D&on't Delete"), |
700 | 0 // Enter == button 0 | 700 | 0 // Enter == button 0 |
701 | ) ) { // Escape == button 2 | 701 | ) ) { // Escape == button 2 |
702 | case 0: // Delete clicked, Alt-S or Enter pressed. | 702 | case 0: // Delete clicked, Alt-S or Enter pressed. |
703 | // Delete | 703 | // Delete |
704 | modified = true; | 704 | modified = true; |
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp index 98fe3f7..f0d1487 100644 --- a/noncore/multimedia/powerchord/powerchordbase.cpp +++ b/noncore/multimedia/powerchord/powerchordbase.cpp | |||
@@ -105,228 +105,228 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl ) | |||
105 | chordfret->insertItem( tr( "1st" ) ); | 105 | chordfret->insertItem( tr( "1st" ) ); |
106 | chordfret->insertItem( tr( "2nd" ) ); | 106 | chordfret->insertItem( tr( "2nd" ) ); |
107 | chordfret->insertItem( tr( "3rd" ) ); | 107 | chordfret->insertItem( tr( "3rd" ) ); |
108 | chordfret->insertItem( tr( "4th" ) ); | 108 | chordfret->insertItem( tr( "4th" ) ); |
109 | chordfret->insertItem( tr( "5th" ) ); | 109 | chordfret->insertItem( tr( "5th" ) ); |
110 | chordfret->insertItem( tr( "6th" ) ); | 110 | chordfret->insertItem( tr( "6th" ) ); |
111 | chordfret->insertItem( tr( "7th" ) ); | 111 | chordfret->insertItem( tr( "7th" ) ); |
112 | chordfret->insertItem( tr( "8th" ) ); | 112 | chordfret->insertItem( tr( "8th" ) ); |
113 | chordfret->insertItem( tr( "9th" ) ); | 113 | chordfret->insertItem( tr( "9th" ) ); |
114 | chordfret->insertItem( tr( "10th" ) ); | 114 | chordfret->insertItem( tr( "10th" ) ); |
115 | chordfret->insertItem( tr( "11th" ) ); | 115 | chordfret->insertItem( tr( "11th" ) ); |
116 | chordfret->insertItem( tr( "12th" ) ); | 116 | chordfret->insertItem( tr( "12th" ) ); |
117 | chordfret->insertItem( tr( "13th" ) ); | 117 | chordfret->insertItem( tr( "13th" ) ); |
118 | chordfret->insertItem( tr( "14th" ) ); | 118 | chordfret->insertItem( tr( "14th" ) ); |
119 | chordfret->insertItem( tr( "15th" ) ); | 119 | chordfret->insertItem( tr( "15th" ) ); |
120 | chordfret->insertItem( tr( "16th" ) ); | 120 | chordfret->insertItem( tr( "16th" ) ); |
121 | chordfret->setGeometry( QRect( 90, 0, 55, 21 ) ); //cxm less 5 width | 121 | chordfret->setGeometry( QRect( 90, 0, 55, 21 ) ); //cxm less 5 width |
122 | 122 | ||
123 | chordnote = new QComboBox( FALSE, tab, "chordnote" ); | 123 | chordnote = new QComboBox( FALSE, tab, "chordnote" ); |
124 | chordnote->insertItem( tr( "C" ) ); | 124 | chordnote->insertItem( tr( "C" ) ); |
125 | chordnote->insertItem( tr( "C#" ) ); | 125 | chordnote->insertItem( tr( "C#" ) ); |
126 | chordnote->insertItem( tr( "D" ) ); | 126 | chordnote->insertItem( tr( "D" ) ); |
127 | chordnote->insertItem( tr( "Eb" ) ); | 127 | chordnote->insertItem( tr( "Eb" ) ); |
128 | chordnote->insertItem( tr( "E" ) ); | 128 | chordnote->insertItem( tr( "E" ) ); |
129 | chordnote->insertItem( tr( "F" ) ); | 129 | chordnote->insertItem( tr( "F" ) ); |
130 | chordnote->insertItem( tr( "F#" ) ); | 130 | chordnote->insertItem( tr( "F#" ) ); |
131 | chordnote->insertItem( tr( "G" ) ); | 131 | chordnote->insertItem( tr( "G" ) ); |
132 | chordnote->insertItem( tr( "G#" ) ); | 132 | chordnote->insertItem( tr( "G#" ) ); |
133 | chordnote->insertItem( tr( "A" ) ); | 133 | chordnote->insertItem( tr( "A" ) ); |
134 | chordnote->insertItem( tr( "Bb" ) ); | 134 | chordnote->insertItem( tr( "Bb" ) ); |
135 | chordnote->insertItem( tr( "B" ) ); | 135 | chordnote->insertItem( tr( "B" ) ); |
136 | chordnote->setGeometry( QRect( 0, 0, 40, 21 ) ); | 136 | chordnote->setGeometry( QRect( 0, 0, 40, 21 ) ); |
137 | chordnote->setCurrentItem( 9 ); | 137 | chordnote->setCurrentItem( 9 ); |
138 | 138 | ||
139 | QWidget* privateLayoutWidget = new QWidget( tab, "Layout1" ); | 139 | QWidget* privateLayoutWidget = new QWidget( tab, "Layout1" ); |
140 | privateLayoutWidget->setGeometry( QRect( 5, 232, 160, 20 ) ); | 140 | privateLayoutWidget->setGeometry( QRect( 5, 232, 160, 20 ) ); |
141 | Layout1 = new QHBoxLayout( privateLayoutWidget ); | 141 | Layout1 = new QHBoxLayout( privateLayoutWidget ); |
142 | Layout1->setSpacing( 6 ); | 142 | Layout1->setSpacing( 6 ); |
143 | Layout1->setMargin( 0 ); | 143 | Layout1->setMargin( 0 ); |
144 | 144 | ||
145 | s1_1 = new QLabel( privateLayoutWidget, "s1_1" ); | 145 | s1_1 = new QLabel( privateLayoutWidget, "s1_1" ); |
146 | s1_1->setText( tr( "E" ) ); | 146 | s1_1->setText( tr( "E" ) ); |
147 | s1_1->setAlignment( int( QLabel::AlignCenter ) ); | 147 | s1_1->setAlignment( int( QLabel::AlignCenter ) ); |
148 | Layout1->addWidget( s1_1 ); | 148 | Layout1->addWidget( s1_1 ); |
149 | 149 | ||
150 | s1_2 = new QLabel( privateLayoutWidget, "s1_2" ); | 150 | s1_2 = new QLabel( privateLayoutWidget, "s1_2" ); |
151 | s1_2->setText( tr( "A" ) ); | 151 | s1_2->setText( tr( "A" ) ); |
152 | s1_2->setAlignment( int( QLabel::AlignCenter ) ); | 152 | s1_2->setAlignment( int( QLabel::AlignCenter ) ); |
153 | Layout1->addWidget( s1_2 ); | 153 | Layout1->addWidget( s1_2 ); |
154 | 154 | ||
155 | s1_3 = new QLabel( privateLayoutWidget, "s1_3" ); | 155 | s1_3 = new QLabel( privateLayoutWidget, "s1_3" ); |
156 | s1_3->setText( tr( "E" ) ); | 156 | s1_3->setText( tr( "E" ) ); |
157 | s1_3->setAlignment( int( QLabel::AlignCenter ) ); | 157 | s1_3->setAlignment( int( QLabel::AlignCenter ) ); |
158 | Layout1->addWidget( s1_3 ); | 158 | Layout1->addWidget( s1_3 ); |
159 | 159 | ||
160 | s1_4 = new QLabel( privateLayoutWidget, "s1_4" ); | 160 | s1_4 = new QLabel( privateLayoutWidget, "s1_4" ); |
161 | s1_4->setText( tr( "A" ) ); | 161 | s1_4->setText( tr( "A" ) ); |
162 | s1_4->setAlignment( int( QLabel::AlignCenter ) ); | 162 | s1_4->setAlignment( int( QLabel::AlignCenter ) ); |
163 | Layout1->addWidget( s1_4 ); | 163 | Layout1->addWidget( s1_4 ); |
164 | 164 | ||
165 | s1_5 = new QLabel( privateLayoutWidget, "s1_5" ); | 165 | s1_5 = new QLabel( privateLayoutWidget, "s1_5" ); |
166 | s1_5->setText( tr( "C#" ) ); | 166 | s1_5->setText( tr( "C#" ) ); |
167 | s1_5->setAlignment( int( QLabel::AlignCenter ) ); | 167 | s1_5->setAlignment( int( QLabel::AlignCenter ) ); |
168 | Layout1->addWidget( s1_5 ); | 168 | Layout1->addWidget( s1_5 ); |
169 | 169 | ||
170 | s1_6 = new QLabel( privateLayoutWidget, "s1_6" ); | 170 | s1_6 = new QLabel( privateLayoutWidget, "s1_6" ); |
171 | s1_6->setText( tr( "E" ) ); | 171 | s1_6->setText( tr( "E" ) ); |
172 | s1_6->setAlignment( int( QLabel::AlignCenter ) ); | 172 | s1_6->setAlignment( int( QLabel::AlignCenter ) ); |
173 | Layout1->addWidget( s1_6 ); | 173 | Layout1->addWidget( s1_6 ); |
174 | 174 | ||
175 | // sound_label = new QLabel( tab, "sound_label" ); | 175 | // sound_label = new QLabel( tab, "sound_label" ); |
176 | // sound_label->setGeometry( QRect( 185, 160, 32, 17 ) ); | 176 | // sound_label->setGeometry( QRect( 185, 160, 32, 17 ) ); |
177 | // sound_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, sound_label->sizePolicy().hasHeightForWidth() ) ); | 177 | // sound_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, sound_label->sizePolicy().hasHeightForWidth() ) ); |
178 | // sound_label->setPixmap( image0 ); | 178 | // sound_label->setPixmap( image0 ); |
179 | // sound_label->pixmap()->setMask(*image0.mask()); | 179 | // sound_label->pixmap()->setMask(*image0.mask()); |
180 | // sound_label->setScaledContents( TRUE ); | 180 | // sound_label->setScaledContents( TRUE ); |
181 | // sound_label->setBackgroundMode( QWidget::PaletteButton ); | 181 | // sound_label->setBackgroundMode( QWidget::PaletteButton ); |
182 | // sound_label->setBackgroundColor(this->backgroundColor()); | 182 | // sound_label->setBackgroundColor(this->backgroundColor()); |
183 | // sound_label->setPalette( QPalette( QColor( 232, 227, 215) ) ); | 183 | // sound_label->setPalette( QPalette( QColor( 232, 227, 215) ) ); |
184 | 184 | ||
185 | 185 | ||
186 | Frame6 = new QFrame( tab, "Frame6" ); | 186 | Frame6 = new QFrame( tab, "Frame6" ); |
187 | Frame6->setGeometry( QRect( 170, 145, 66, 10 ) ); | 187 | Frame6->setGeometry( QRect( 170, 145, 66, 10 ) ); |
188 | Frame6->setFrameShape( QFrame::HLine ); | 188 | Frame6->setFrameShape( QFrame::HLine ); |
189 | Frame6->setFrameShadow( QFrame::Raised ); | 189 | Frame6->setFrameShadow( QFrame::Raised ); |
190 | 190 | ||
191 | chordshow_label = new QLabel( tab, "chordshow_label" ); | 191 | chordshow_label = new QLabel( tab, "chordshow_label" ); |
192 | chordshow_label->setGeometry( QRect( 185, 60, 32, 17 ) ); | 192 | chordshow_label->setGeometry( QRect( 185, 60, 32, 17 ) ); |
193 | // chordshow_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, chordshow_label->sizePolicy().hasHeightForWidth() ) ); | 193 | // chordshow_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, chordshow_label->sizePolicy().hasHeightForWidth() ) ); |
194 | chordshow_label->setFrameShape( QLabel::NoFrame ); | 194 | chordshow_label->setFrameShape( QLabel::NoFrame ); |
195 | chordshow_label->setPixmap( image1 ); | 195 | chordshow_label->setPixmap( image1 ); |
196 | chordshow_label->setScaledContents( TRUE ); | 196 | chordshow_label->setScaledContents( TRUE ); |
197 | // chordshow_label->setBackgroundMode( QWidget::PaletteButton ); | 197 | // chordshow_label->setBackgroundMode( QWidget::PaletteButton ); |
198 | 198 | ||
199 | transport_rec = new QPushButton( tab, "transport_rec" ); | 199 | transport_rec = new QPushButton( tab, "transport_rec" ); |
200 | transport_rec->setGeometry( QRect( 170, 80, 30, 30 ) ); | 200 | transport_rec->setGeometry( QRect( 170, 80, 30, 30 ) ); |
201 | transport_rec->setText( tr( "" ) ); | 201 | transport_rec->setText( "" ); |
202 | transport_rec->setPixmap( image2 ); | 202 | transport_rec->setPixmap( image2 ); |
203 | 203 | ||
204 | play_sound = new QPushButton( tab, "play_sound" ); | 204 | play_sound = new QPushButton( tab, "play_sound" ); |
205 | play_sound->setGeometry( QRect( 170, 180, 60, 55 ) ); | 205 | play_sound->setGeometry( QRect( 170, 180, 60, 55 ) ); |
206 | play_sound->setText( tr( "" ) ); | 206 | play_sound->setText( "" ); |
207 | play_sound->setPixmap( image3 ); | 207 | play_sound->setPixmap( image3 ); |
208 | 208 | ||
209 | Frame6_2 = new QFrame( tab, "Frame6_2" ); | 209 | Frame6_2 = new QFrame( tab, "Frame6_2" ); |
210 | Frame6_2->setGeometry( QRect( 170, 45, 66, 10 ) ); | 210 | Frame6_2->setGeometry( QRect( 170, 45, 66, 10 ) ); |
211 | Frame6_2->setFrameShape( QFrame::HLine ); | 211 | Frame6_2->setFrameShape( QFrame::HLine ); |
212 | Frame6_2->setFrameShadow( QFrame::Raised ); | 212 | Frame6_2->setFrameShadow( QFrame::Raised ); |
213 | 213 | ||
214 | transport_play = new QPushButton( tab, "transport_play" ); | 214 | transport_play = new QPushButton( tab, "transport_play" ); |
215 | transport_play->setEnabled( FALSE ); | 215 | transport_play->setEnabled( FALSE ); |
216 | transport_play->setGeometry( QRect( 200, 80, 30, 30 ) ); | 216 | transport_play->setGeometry( QRect( 200, 80, 30, 30 ) ); |
217 | transport_play->setText( tr( "" ) ); | 217 | transport_play->setText( "" ); |
218 | transport_play->setPixmap( image3 ); | 218 | transport_play->setPixmap( image3 ); |
219 | 219 | ||
220 | transport_rew = new QPushButton( tab, "transport_rew" ); | 220 | transport_rew = new QPushButton( tab, "transport_rew" ); |
221 | transport_rew->setEnabled( FALSE ); | 221 | transport_rew->setEnabled( FALSE ); |
222 | transport_rew->setGeometry( QRect( 170, 110, 30, 30 ) ); | 222 | transport_rew->setGeometry( QRect( 170, 110, 30, 30 ) ); |
223 | transport_rew->setText( tr( "" ) ); | 223 | transport_rew->setText( "" ); |
224 | transport_rew->setPixmap( image4 ); | 224 | transport_rew->setPixmap( image4 ); |
225 | 225 | ||
226 | transport_fwd = new QPushButton( tab, "transport_fwd" ); | 226 | transport_fwd = new QPushButton( tab, "transport_fwd" ); |
227 | transport_fwd->setEnabled( FALSE ); | 227 | transport_fwd->setEnabled( FALSE ); |
228 | transport_fwd->setGeometry( QRect( 200, 110, 30, 30 ) ); | 228 | transport_fwd->setGeometry( QRect( 200, 110, 30, 30 ) ); |
229 | transport_fwd->setText( tr( "" ) ); | 229 | transport_fwd->setText( "" ); |
230 | transport_fwd->setPixmap( image5 ); | 230 | transport_fwd->setPixmap( image5 ); |
231 | 231 | ||
232 | chordname = new QLabel( tab, "chordname" ); | 232 | chordname = new QLabel( tab, "chordname" ); |
233 | chordname->setGeometry( QRect( 146, 0, 90, 20 ) ); //cxm moved l 5 | 233 | chordname->setGeometry( QRect( 146, 0, 90, 20 ) ); //cxm moved l 5 |
234 | chordname->setText( tr( "A" ) ); | 234 | chordname->setText( tr( "A" ) ); |
235 | chordname->setAlignment( int( QLabel::AlignCenter ) ); | 235 | chordname->setAlignment( int( QLabel::AlignCenter ) ); |
236 | QToolTip::add( chordname, tr( "" ) ); | 236 | QToolTip::add( chordname, "" ); |
237 | 237 | ||
238 | synth = new gs(); | 238 | synth = new gs(); |
239 | tuner = new gt(); | 239 | tuner = new gt(); |
240 | frets = new FretBoard( tab, "frets" ); | 240 | frets = new FretBoard( tab, "frets" ); |
241 | frets->setGeometry( QRect( 0, 20, 168, 210 ) ); | 241 | frets->setGeometry( QRect( 0, 20, 168, 210 ) ); |
242 | tabs->insertTab( tab, tr( "Guitar" ) ); | 242 | tabs->insertTab( tab, tr( "Guitar" ) ); |
243 | 243 | ||
244 | tab_2 = new QWidget( tabs, "tab_2" ); | 244 | tab_2 = new QWidget( tabs, "tab_2" ); |
245 | 245 | ||
246 | optlab2 = new QLabel( tab_2, "optlab2" ); | 246 | optlab2 = new QLabel( tab_2, "optlab2" ); |
247 | optlab2->setGeometry( QRect( 9, 58, 120, 41 ) ); | 247 | optlab2->setGeometry( QRect( 9, 58, 120, 41 ) ); |
248 | optlab2->setText( tr( "Alternative tunings are possible" ) ); | 248 | optlab2->setText( tr( "Alternative tunings are possible" ) ); |
249 | optlab2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); | 249 | optlab2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); |
250 | 250 | ||
251 | span = new QComboBox( FALSE, tab_2, "span" ); | 251 | span = new QComboBox( FALSE, tab_2, "span" ); |
252 | span->insertItem( tr( "2" ) ); | 252 | span->insertItem( tr( "2" ) ); |
253 | span->insertItem( tr( "3" ) ); | 253 | span->insertItem( tr( "3" ) ); |
254 | span->insertItem( tr( "4" ) ); | 254 | span->insertItem( tr( "4" ) ); |
255 | span->insertItem( tr( "5" ) ); | 255 | span->insertItem( tr( "5" ) ); |
256 | span->insertItem( tr( "6" ) ); | 256 | span->insertItem( tr( "6" ) ); |
257 | span->setGeometry( QRect( 180, 20, 50, 21 ) ); | 257 | span->setGeometry( QRect( 180, 20, 50, 21 ) ); |
258 | span->setCurrentItem( 1 ); | 258 | span->setCurrentItem( 1 ); |
259 | 259 | ||
260 | TextLabel1 = new QLabel( tab_2, "TextLabel1" ); | 260 | TextLabel1 = new QLabel( tab_2, "TextLabel1" ); |
261 | TextLabel1->setGeometry( QRect( 3, 109, 226, 140 ) ); | 261 | TextLabel1->setGeometry( QRect( 3, 109, 226, 140 ) ); |
262 | TextLabel1->setText( tr( QString::fromUtf8( "©2002 Camilo Mesias\n" | 262 | TextLabel1->setText( tr( QString::fromUtf8( "©2002 Camilo Mesias\n" |
263 | "camilo@mesias.co.uk\n" | 263 | "camilo@mesias.co.uk\n" |
264 | "Version 0.0.7 beta" ) ) ); | 264 | "Version 0.0.7 beta" ) ) ); |
265 | TextLabel1->setAlignment( int( QLabel::AlignBottom | QLabel::AlignLeft ) ); | 265 | TextLabel1->setAlignment( int( QLabel::AlignBottom | QLabel::AlignLeft ) ); |
266 | 266 | ||
267 | tuning = new QComboBox( FALSE, tab_2, "tuning" ); | 267 | tuning = new QComboBox( FALSE, tab_2, "tuning" ); |
268 | tuning->insertItem( tr( "EADGBE" ) ); | 268 | tuning->insertItem( tr( "EADGBE" ) ); |
269 | tuning->insertItem( tr( "EBEG#BE" ) ); | 269 | tuning->insertItem( tr( "EBEG#BE" ) ); |
270 | tuning->insertItem( tr( "EAEAC#E" ) ); | 270 | tuning->insertItem( tr( "EAEAC#E" ) ); |
271 | tuning->insertItem( tr( "EADF#BE" ) ); | 271 | tuning->insertItem( tr( "EADF#BE" ) ); |
272 | tuning->insertItem( tr( "EADGCF" ) ); | 272 | tuning->insertItem( tr( "EADGCF" ) ); |
273 | tuning->insertItem( tr( "DADGAD" ) ); | 273 | tuning->insertItem( tr( "DADGAD" ) ); |
274 | tuning->insertItem( tr( "DGCGCD" ) ); | 274 | tuning->insertItem( tr( "DGCGCD" ) ); |
275 | tuning->insertItem( tr( "DADF#AD" ) ); | 275 | tuning->insertItem( tr( "DADF#AD" ) ); |
276 | tuning->insertItem( tr( "DADGBE" ) ); | 276 | tuning->insertItem( tr( "DADGBE" ) ); |
277 | tuning->insertItem( tr( "DGDGBD" ) ); | 277 | tuning->insertItem( tr( "DGDGBD" ) ); |
278 | tuning->insertItem( tr( "DADACD" ) ); | 278 | tuning->insertItem( tr( "DADACD" ) ); |
279 | tuning->insertItem( tr( "CGCGAE" ) ); | 279 | tuning->insertItem( tr( "CGCGAE" ) ); |
280 | tuning->insertItem( tr( "FADGBE" ) ); | 280 | tuning->insertItem( tr( "FADGBE" ) ); |
281 | tuning->insertItem( tr( "G minor" ) ); | 281 | tuning->insertItem( tr( "G minor" ) ); |
282 | tuning->setGeometry( QRect( 140, 70, 91, 21 ) ); | 282 | tuning->setGeometry( QRect( 140, 70, 91, 21 ) ); |
283 | 283 | ||
284 | optlab1 = new QLabel( tab_2, "optlab1" ); | 284 | optlab1 = new QLabel( tab_2, "optlab1" ); |
285 | optlab1->setGeometry( QRect( 8, 8, 160, 40 ) ); | 285 | optlab1->setGeometry( QRect( 8, 8, 160, 40 ) ); |
286 | optlab1->setText( tr( "Span: the greatest number of frets over which you want chords to be generated" ) ); | 286 | optlab1->setText( tr( "Span: the greatest number of frets over which you want chords to be generated" ) ); |
287 | optlab1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); | 287 | optlab1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); |
288 | tabs->insertTab( tab_2, tr( "Options" ) ); | 288 | tabs->insertTab( tab_2, tr( "Options" ) ); |
289 | 289 | ||
290 | Tuner = new QWidget( tabs, "Tuner" ); | 290 | Tuner = new QWidget( tabs, "Tuner" ); |
291 | 291 | ||
292 | Frame4 = new QFrame( Tuner, "Frame4" ); | 292 | Frame4 = new QFrame( Tuner, "Frame4" ); |
293 | Frame4->setGeometry( QRect( 0, 0, 230, 126 ) ); | 293 | Frame4->setGeometry( QRect( 0, 0, 230, 126 ) ); |
294 | Frame4->setFrameShape( QFrame::Box ); | 294 | Frame4->setFrameShape( QFrame::Box ); |
295 | Frame4->setFrameShadow( QFrame::Raised ); | 295 | Frame4->setFrameShadow( QFrame::Raised ); |
296 | 296 | ||
297 | vu = new VUMeter( Frame4, "vu" ); | 297 | vu = new VUMeter( Frame4, "vu" ); |
298 | vu->setGeometry( QRect( 5, 5, 220, 115 ) ); | 298 | vu->setGeometry( QRect( 5, 5, 220, 115 ) ); |
299 | 299 | ||
300 | tuner_note = new QComboBox( FALSE, Tuner, "tuner_note" ); | 300 | tuner_note = new QComboBox( FALSE, Tuner, "tuner_note" ); |
301 | tuner_note->insertItem( tr( "auto" ) ); | 301 | tuner_note->insertItem( tr( "auto" ) ); |
302 | tuner_note->insertItem( tr( "E" ) ); | 302 | tuner_note->insertItem( tr( "E" ) ); |
303 | tuner_note->insertItem( tr( "D" ) ); | 303 | tuner_note->insertItem( tr( "D" ) ); |
304 | tuner_note->insertItem( tr( "G" ) ); | 304 | tuner_note->insertItem( tr( "G" ) ); |
305 | tuner_note->insertItem( tr( "A" ) ); | 305 | tuner_note->insertItem( tr( "A" ) ); |
306 | tuner_note->insertItem( tr( "B" ) ); | 306 | tuner_note->insertItem( tr( "B" ) ); |
307 | tuner_note->insertItem( tr( "C" ) ); | 307 | tuner_note->insertItem( tr( "C" ) ); |
308 | tuner_note->insertItem( tr( "F" ) ); | 308 | tuner_note->insertItem( tr( "F" ) ); |
309 | tuner_note->setGeometry( QRect( 5, 160, 90, 20 ) ); | 309 | tuner_note->setGeometry( QRect( 5, 160, 90, 20 ) ); |
310 | 310 | ||
311 | Frame8 = new QFrame( Tuner, "Frame8" ); | 311 | Frame8 = new QFrame( Tuner, "Frame8" ); |
312 | Frame8->setGeometry( QRect( -2, 188, 231, 10 ) ); | 312 | Frame8->setGeometry( QRect( -2, 188, 231, 10 ) ); |
313 | Frame8->setFrameShape( QFrame::HLine ); | 313 | Frame8->setFrameShape( QFrame::HLine ); |
314 | Frame8->setFrameShadow( QFrame::Raised ); | 314 | Frame8->setFrameShadow( QFrame::Raised ); |
315 | 315 | ||
316 | tuner_start = new QPushButton( Tuner, "tuner_start" ); | 316 | tuner_start = new QPushButton( Tuner, "tuner_start" ); |
317 | tuner_start->setGeometry( QRect( 100, 155, 91, 30 ) ); | 317 | tuner_start->setGeometry( QRect( 100, 155, 91, 30 ) ); |
318 | tuner_start->setText( tr( "Start" ) ); | 318 | tuner_start->setText( tr( "Start" ) ); |
319 | 319 | ||
320 | tuner_lab1 = new QLabel( Tuner, "tuner_lab1" ); | 320 | tuner_lab1 = new QLabel( Tuner, "tuner_lab1" ); |
321 | tuner_lab1->setGeometry( QRect( 10, 130, 100, 21 ) ); | 321 | tuner_lab1->setGeometry( QRect( 10, 130, 100, 21 ) ); |
322 | tuner_lab1->setText( tr( "Tuner operation" ) ); | 322 | tuner_lab1->setText( tr( "Tuner operation" ) ); |
323 | 323 | ||
324 | tuner_lab2 = new QLabel( Tuner, "tuner_lab2" ); | 324 | tuner_lab2 = new QLabel( Tuner, "tuner_lab2" ); |
325 | tuner_lab2->setGeometry( QRect( 10, 200, 100, 16 ) ); | 325 | tuner_lab2->setGeometry( QRect( 10, 200, 100, 16 ) ); |
326 | tuner_lab2->setText( tr( "Pitch calibration" ) ); | 326 | tuner_lab2->setText( tr( "Pitch calibration" ) ); |
327 | 327 | ||
328 | tuner_calib_note = new QComboBox( FALSE, Tuner, "tuner_calib_note" ); | 328 | tuner_calib_note = new QComboBox( FALSE, Tuner, "tuner_calib_note" ); |
329 | tuner_calib_note->insertItem( tr( "A" ) ); | 329 | tuner_calib_note->insertItem( tr( "A" ) ); |
330 | tuner_calib_note->insertItem( tr( "C" ) ); | 330 | tuner_calib_note->insertItem( tr( "C" ) ); |
331 | tuner_calib_note->setGeometry( QRect( 5, 225, 90, 21 ) ); | 331 | tuner_calib_note->setGeometry( QRect( 5, 225, 90, 21 ) ); |
332 | 332 | ||
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 979b73a..6252fc2 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -4,193 +4,193 @@ | |||
4 | #include <qtimer.h> | 4 | #include <qtimer.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | 6 | ||
7 | #include <opie2/odebug.h> | 7 | #include <opie2/odebug.h> |
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | 9 | ||
10 | #include "defines.h" | 10 | #include "defines.h" |
11 | #include "mainwindow.h" | 11 | #include "mainwindow.h" |
12 | 12 | ||
13 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
14 | 14 | ||
15 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 15 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
16 | : QMainWindow( parent, name, flags ) | 16 | : QMainWindow( parent, name, flags ) |
17 | { | 17 | { |
18 | 18 | ||
19 | setCaption( tr( "Mail" ) ); | 19 | setCaption( tr( "Mail" ) ); |
20 | setToolBarsMovable( false ); | 20 | setToolBarsMovable( false ); |
21 | 21 | ||
22 | toolBar = new QToolBar( this ); | 22 | toolBar = new QToolBar( this ); |
23 | menuBar = new QMenuBar( toolBar ); | 23 | menuBar = new QMenuBar( toolBar ); |
24 | mailMenu = new QPopupMenu( menuBar ); | 24 | mailMenu = new QPopupMenu( menuBar ); |
25 | menuBar->insertItem( tr( "Mail" ), mailMenu ); | 25 | menuBar->insertItem( tr( "Mail" ), mailMenu ); |
26 | settingsMenu = new QPopupMenu( menuBar ); | 26 | settingsMenu = new QPopupMenu( menuBar ); |
27 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); | 27 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); |
28 | 28 | ||
29 | addToolBar( toolBar ); | 29 | addToolBar( toolBar ); |
30 | toolBar->setHorizontalStretchable( true ); | 30 | toolBar->setHorizontalStretchable( true ); |
31 | 31 | ||
32 | QLabel *spacer = new QLabel( toolBar ); | 32 | QLabel *spacer = new QLabel( toolBar ); |
33 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 33 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
34 | toolBar->setStretchableWidget( spacer ); | 34 | toolBar->setStretchableWidget( spacer ); |
35 | 35 | ||
36 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, | 36 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, |
37 | 0, 0, this ); | 37 | 0, 0, this ); |
38 | composeMail->addTo( toolBar ); | 38 | composeMail->addTo( toolBar ); |
39 | composeMail->addTo( mailMenu ); | 39 | composeMail->addTo( mailMenu ); |
40 | 40 | ||
41 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, | 41 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, |
42 | 0, 0, this ); | 42 | 0, 0, this ); |
43 | sendQueued->addTo( toolBar ); | 43 | sendQueued->addTo( toolBar ); |
44 | sendQueued->addTo( mailMenu ); | 44 | sendQueued->addTo( mailMenu ); |
45 | 45 | ||
46 | /* | 46 | /* |
47 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, | 47 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, |
48 | 0, 0, this ); | 48 | 0, 0, this ); |
49 | syncFolders->addTo( toolBar ); | 49 | syncFolders->addTo( toolBar ); |
50 | syncFolders->addTo( mailMenu ); | 50 | syncFolders->addTo( mailMenu ); |
51 | */ | 51 | */ |
52 | 52 | ||
53 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, | 53 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, |
54 | 0, 0, this, 0, true ); | 54 | 0, 0, this, 0, true ); |
55 | showFolders->addTo( toolBar ); | 55 | showFolders->addTo( toolBar ); |
56 | showFolders->addTo( mailMenu ); | 56 | showFolders->addTo( mailMenu ); |
57 | showFolders->setOn( true ); | 57 | showFolders->setOn( true ); |
58 | connect(showFolders, SIGNAL( toggled(bool) ), | 58 | connect(showFolders, SIGNAL( toggled(bool) ), |
59 | SLOT( slotShowFolders(bool) ) ); | 59 | SLOT( slotShowFolders(bool) ) ); |
60 | 60 | ||
61 | /* | 61 | /* |
62 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), | 62 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), |
63 | 0, 0, this ); | 63 | 0, 0, this ); |
64 | searchMails->addTo( toolBar ); | 64 | searchMails->addTo( toolBar ); |
65 | searchMails->addTo( mailMenu ); | 65 | searchMails->addTo( mailMenu ); |
66 | */ | 66 | */ |
67 | 67 | ||
68 | deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); | 68 | deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); |
69 | deleteMails->addTo( toolBar ); | 69 | deleteMails->addTo( toolBar ); |
70 | deleteMails->addTo( mailMenu ); | 70 | deleteMails->addTo( mailMenu ); |
71 | connect( deleteMails, SIGNAL( activated() ), | 71 | connect( deleteMails, SIGNAL( activated() ), |
72 | SLOT( slotDeleteMail() ) ); | 72 | SLOT( slotDeleteMail() ) ); |
73 | 73 | ||
74 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , | 74 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , |
75 | 0, 0, this ); | 75 | 0, 0, this ); |
76 | editSettings->addTo( settingsMenu ); | 76 | editSettings->addTo( settingsMenu ); |
77 | connect( editSettings, SIGNAL( activated() ), | 77 | connect( editSettings, SIGNAL( activated() ), |
78 | SLOT( slotEditSettings() ) ); | 78 | SLOT( slotEditSettings() ) ); |
79 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , | 79 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , |
80 | 0, 0, this ); | 80 | 0, 0, this ); |
81 | editAccounts->addTo( settingsMenu ); | 81 | editAccounts->addTo( settingsMenu ); |
82 | 82 | ||
83 | //setCentralWidget( view ); | 83 | //setCentralWidget( view ); |
84 | 84 | ||
85 | QVBox* wrapperBox = new QVBox( this ); | 85 | QVBox* wrapperBox = new QVBox( this ); |
86 | setCentralWidget( wrapperBox ); | 86 | setCentralWidget( wrapperBox ); |
87 | 87 | ||
88 | QWidget *view = new QWidget( wrapperBox ); | 88 | QWidget *view = new QWidget( wrapperBox ); |
89 | 89 | ||
90 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); | 90 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); |
91 | 91 | ||
92 | folderView = new AccountView( view ); | 92 | folderView = new AccountView( view ); |
93 | folderView->header()->hide(); | 93 | folderView->header()->hide(); |
94 | folderView->setRootIsDecorated( true ); | 94 | folderView->setRootIsDecorated( true ); |
95 | folderView->addColumn( tr( "Mailbox" ) ); | 95 | folderView->addColumn( tr( "Mailbox" ) ); |
96 | 96 | ||
97 | layout->addWidget( folderView ); | 97 | layout->addWidget( folderView ); |
98 | 98 | ||
99 | mailView = new QListView( view ); | 99 | mailView = new QListView( view ); |
100 | mailView->addColumn( tr( "" ) ); | 100 | mailView->addColumn( "" ); |
101 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); | 101 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); |
102 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); | 102 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); |
103 | mailView->addColumn( tr( "Size" ),QListView::Manual); | 103 | mailView->addColumn( tr( "Size" ),QListView::Manual); |
104 | mailView->addColumn( tr( "Date" )); | 104 | mailView->addColumn( tr( "Date" )); |
105 | mailView->setAllColumnsShowFocus(true); | 105 | mailView->setAllColumnsShowFocus(true); |
106 | mailView->setSorting(-1); | 106 | mailView->setSorting(-1); |
107 | 107 | ||
108 | statusWidget = new StatusWidget( wrapperBox ); | 108 | statusWidget = new StatusWidget( wrapperBox ); |
109 | statusWidget->hide(); | 109 | statusWidget->hide(); |
110 | 110 | ||
111 | layout->addWidget( mailView ); | 111 | layout->addWidget( mailView ); |
112 | layout->setStretchFactor( folderView, 1 ); | 112 | layout->setStretchFactor( folderView, 1 ); |
113 | layout->setStretchFactor( mailView, 2 ); | 113 | layout->setStretchFactor( mailView, 2 ); |
114 | 114 | ||
115 | slotAdjustLayout(); | 115 | slotAdjustLayout(); |
116 | 116 | ||
117 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 117 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
118 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 118 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
119 | 119 | ||
120 | connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this, | 120 | connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this, |
121 | SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) ); | 121 | SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) ); |
122 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 122 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
123 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); | 123 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
124 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), | 124 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), |
125 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 125 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |
126 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 126 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
127 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 127 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
128 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 128 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
129 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 129 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
130 | // Added by Stefan Eilers to allow starting by addressbook.. | 130 | // Added by Stefan Eilers to allow starting by addressbook.. |
131 | // copied from old mail2 | 131 | // copied from old mail2 |
132 | #if !defined(QT_NO_COP) | 132 | #if !defined(QT_NO_COP) |
133 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), | 133 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), |
134 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); | 134 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); |
135 | #endif | 135 | #endif |
136 | 136 | ||
137 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 137 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
138 | } | 138 | } |
139 | 139 | ||
140 | MainWindow::~MainWindow() | 140 | MainWindow::~MainWindow() |
141 | { | 141 | { |
142 | } | 142 | } |
143 | 143 | ||
144 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 144 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
145 | { | 145 | { |
146 | odebug << "appMessage not reached" << oendl; | 146 | odebug << "appMessage not reached" << oendl; |
147 | } | 147 | } |
148 | 148 | ||
149 | void MainWindow::slotAdjustLayout() { | 149 | void MainWindow::slotAdjustLayout() { |
150 | 150 | ||
151 | QWidget *d = QApplication::desktop(); | 151 | QWidget *d = QApplication::desktop(); |
152 | 152 | ||
153 | if ( d->width() < d->height() ) { | 153 | if ( d->width() < d->height() ) { |
154 | layout->setDirection( QBoxLayout::TopToBottom ); | 154 | layout->setDirection( QBoxLayout::TopToBottom ); |
155 | } else { | 155 | } else { |
156 | layout->setDirection( QBoxLayout::LeftToRight ); | 156 | layout->setDirection( QBoxLayout::LeftToRight ); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
160 | void MainWindow::slotAdjustColumns() | 160 | void MainWindow::slotAdjustColumns() |
161 | { | 161 | { |
162 | bool hidden = folderView->isHidden(); | 162 | bool hidden = folderView->isHidden(); |
163 | if ( hidden ) folderView->show(); | 163 | if ( hidden ) folderView->show(); |
164 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 164 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
165 | if ( hidden ) folderView->hide(); | 165 | if ( hidden ) folderView->hide(); |
166 | 166 | ||
167 | mailView->setColumnWidth( 0, 10 ); | 167 | mailView->setColumnWidth( 0, 10 ); |
168 | mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 ); | 168 | mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 ); |
169 | mailView->setColumnWidth( 2, 80 ); | 169 | mailView->setColumnWidth( 2, 80 ); |
170 | mailView->setColumnWidth( 3, 50 ); | 170 | mailView->setColumnWidth( 3, 50 ); |
171 | mailView->setColumnWidth( 4, 50 ); | 171 | mailView->setColumnWidth( 4, 50 ); |
172 | } | 172 | } |
173 | 173 | ||
174 | void MainWindow::slotEditSettings() | 174 | void MainWindow::slotEditSettings() |
175 | { | 175 | { |
176 | } | 176 | } |
177 | 177 | ||
178 | void MainWindow::slotShowFolders( bool ) | 178 | void MainWindow::slotShowFolders( bool ) |
179 | { | 179 | { |
180 | odebug << "slotShowFolders not reached" << oendl; | 180 | odebug << "slotShowFolders not reached" << oendl; |
181 | } | 181 | } |
182 | 182 | ||
183 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 183 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
184 | { | 184 | { |
185 | odebug << "refreshMailView not reached" << oendl; | 185 | odebug << "refreshMailView not reached" << oendl; |
186 | } | 186 | } |
187 | 187 | ||
188 | void MainWindow::mailLeftClicked(int, QListViewItem *,const QPoint&,int ) | 188 | void MainWindow::mailLeftClicked(int, QListViewItem *,const QPoint&,int ) |
189 | { | 189 | { |
190 | odebug << "mailLeftClicked not reached" << oendl; | 190 | odebug << "mailLeftClicked not reached" << oendl; |
191 | } | 191 | } |
192 | 192 | ||
193 | void MainWindow::displayMail() | 193 | void MainWindow::displayMail() |
194 | { | 194 | { |
195 | odebug << "displayMail not reached" << oendl; | 195 | odebug << "displayMail not reached" << oendl; |
196 | } | 196 | } |
diff --git a/noncore/settings/mediummount/mediumglobal.cc b/noncore/settings/mediummount/mediumglobal.cc index 0c6cf12..621784e 100644 --- a/noncore/settings/mediummount/mediumglobal.cc +++ b/noncore/settings/mediummount/mediumglobal.cc | |||
@@ -1,138 +1,138 @@ | |||
1 | 1 | ||
2 | #include "mediumglobal.h" | 2 | #include "mediumglobal.h" |
3 | 3 | ||
4 | /* OPIE */ | 4 | /* OPIE */ |
5 | #include <opie2/odebug.h> | 5 | #include <opie2/odebug.h> |
6 | using namespace Opie::Core; | 6 | using namespace Opie::Core; |
7 | #include <qpe/config.h> | 7 | #include <qpe/config.h> |
8 | 8 | ||
9 | /* QT */ | 9 | /* QT */ |
10 | #include <qlineedit.h> | 10 | #include <qlineedit.h> |
11 | #include <qcheckbox.h> | 11 | #include <qcheckbox.h> |
12 | #include <qlabel.h> | 12 | #include <qlabel.h> |
13 | #include <qabstractlayout.h> // spacer item | 13 | #include <qabstractlayout.h> // spacer item |
14 | #include <qlayout.h> | 14 | #include <qlayout.h> |
15 | #include <qframe.h> | 15 | #include <qframe.h> |
16 | #include <qgroupbox.h> | 16 | #include <qgroupbox.h> |
17 | #include <qwhatsthis.h> | 17 | #include <qwhatsthis.h> |
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | using namespace MediumMountSetting; | 21 | using namespace MediumMountSetting; |
22 | 22 | ||
23 | /* TRANSLATOR MediumMountSetting::MediumGlobalWidget */ | 23 | /* TRANSLATOR MediumMountSetting::MediumGlobalWidget */ |
24 | 24 | ||
25 | MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name ) | 25 | MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name ) |
26 | : QWidget( wid, name, WStyle_ContextHelp ) | 26 | : QWidget( wid, name, WStyle_ContextHelp ) |
27 | { | 27 | { |
28 | m_config = 0; | 28 | m_config = 0; |
29 | initGUI(); | 29 | initGUI(); |
30 | readConfig(); | 30 | readConfig(); |
31 | 31 | ||
32 | } | 32 | } |
33 | void MediumGlobalWidget::initGUI() | 33 | void MediumGlobalWidget::initGUI() |
34 | { | 34 | { |
35 | m_layout = new QVBoxLayout(this ); | 35 | m_layout = new QVBoxLayout(this ); |
36 | m_layout->setMargin( 4 ); | 36 | m_layout->setMargin( 4 ); |
37 | // m_layout->setSpacing( 10 ); | 37 | // m_layout->setSpacing( 10 ); |
38 | 38 | ||
39 | 39 | ||
40 | m_label = new QLabel( this ); | 40 | m_label = new QLabel( this ); |
41 | m_label->setTextFormat( Qt::RichText ); | 41 | m_label->setTextFormat( Qt::RichText ); |
42 | m_label->setText( tr("") ); | 42 | m_label->setText( "" ); |
43 | QWhatsThis::add( this, tr("If a medium gets inserted into this device Opie " | 43 | QWhatsThis::add( this, tr("If a medium gets inserted into this device Opie " |
44 | "tries to search the medium for Documents. On " | 44 | "tries to search the medium for Documents. On " |
45 | "large mediums this can take some time. You can choose " | 45 | "large mediums this can take some time. You can choose " |
46 | "if Opie should scan for Documents globally or on a " | 46 | "if Opie should scan for Documents globally or on a " |
47 | "per medium level. You're also able to reconfigure " | 47 | "per medium level. You're also able to reconfigure " |
48 | "each medium.") ); | 48 | "each medium.") ); |
49 | 49 | ||
50 | m_layout->addWidget( m_label ); | 50 | m_layout->addWidget( m_label ); |
51 | 51 | ||
52 | m_check = new QCheckBox( tr("Enable medium checking" ), this ); | 52 | m_check = new QCheckBox( tr("Enable medium checking" ), this ); |
53 | connect( m_check, SIGNAL(stateChanged(int) ), | 53 | connect( m_check, SIGNAL(stateChanged(int) ), |
54 | this, SLOT(slotEnableChecking() ) ); | 54 | this, SLOT(slotEnableChecking() ) ); |
55 | m_layout->addWidget(m_check ); | 55 | m_layout->addWidget(m_check ); |
56 | 56 | ||
57 | m_frame = new QFrame(this, "Frame" ); | 57 | m_frame = new QFrame(this, "Frame" ); |
58 | m_frame->setFrameShape( QFrame::Box ); | 58 | m_frame->setFrameShape( QFrame::Box ); |
59 | m_frame->setFrameShadow( QFrame::Sunken ); | 59 | m_frame->setFrameShadow( QFrame::Sunken ); |
60 | 60 | ||
61 | m_box = new QVBoxLayout( m_frame ); | 61 | m_box = new QVBoxLayout( m_frame ); |
62 | m_box->setMargin( 5 ); | 62 | m_box->setMargin( 5 ); |
63 | m_useglobal = new QCheckBox( tr("Use global settings"), m_frame ); | 63 | m_useglobal = new QCheckBox( tr("Use global settings"), m_frame ); |
64 | connect( m_useglobal, SIGNAL( stateChanged(int) ), | 64 | connect( m_useglobal, SIGNAL( stateChanged(int) ), |
65 | this, SLOT( slotGlobalChanged() ) ); | 65 | this, SLOT( slotGlobalChanged() ) ); |
66 | 66 | ||
67 | m_box->addWidget( m_useglobal ); | 67 | m_box->addWidget( m_useglobal ); |
68 | 68 | ||
69 | m_global = new QGroupBox( tr("Which media files"), m_frame ); | 69 | m_global = new QGroupBox( tr("Which media files"), m_frame ); |
70 | m_frameLay = new QGridLayout(m_global, 4, 3 ); | 70 | m_frameLay = new QGridLayout(m_global, 4, 3 ); |
71 | m_frameLay->setMargin( 10 ); | 71 | m_frameLay->setMargin( 10 ); |
72 | 72 | ||
73 | QSpacerItem *item2 = new QSpacerItem( 5, 8, | 73 | QSpacerItem *item2 = new QSpacerItem( 5, 8, |
74 | QSizePolicy::Fixed, | 74 | QSizePolicy::Fixed, |
75 | QSizePolicy::Fixed ); | 75 | QSizePolicy::Fixed ); |
76 | m_audio = new QCheckBox( tr("Audio"), m_global ); | 76 | m_audio = new QCheckBox( tr("Audio"), m_global ); |
77 | m_all = new QCheckBox( tr("All") , m_global ); | 77 | m_all = new QCheckBox( tr("All") , m_global ); |
78 | m_image = new QCheckBox( tr("Image"), m_global ); | 78 | m_image = new QCheckBox( tr("Image"), m_global ); |
79 | m_text = new QCheckBox( tr("Text") , m_global ); | 79 | m_text = new QCheckBox( tr("Text") , m_global ); |
80 | m_video = new QCheckBox( tr("Video"), m_global ); | 80 | m_video = new QCheckBox( tr("Video"), m_global ); |
81 | 81 | ||
82 | connect(m_all, SIGNAL(stateChanged(int) ), | 82 | connect(m_all, SIGNAL(stateChanged(int) ), |
83 | this, SLOT(slotAllChanged() ) ); | 83 | this, SLOT(slotAllChanged() ) ); |
84 | 84 | ||
85 | m_frameLay->addItem( item2, 0, 0 ); | 85 | m_frameLay->addItem( item2, 0, 0 ); |
86 | 86 | ||
87 | m_frameLay->addWidget( m_audio, 1, 0 ); | 87 | m_frameLay->addWidget( m_audio, 1, 0 ); |
88 | m_frameLay->addWidget( m_image, 2, 0 ); | 88 | m_frameLay->addWidget( m_image, 2, 0 ); |
89 | m_frameLay->addWidget( m_all, 3, 0 ); | 89 | m_frameLay->addWidget( m_all, 3, 0 ); |
90 | 90 | ||
91 | m_frameLay->addWidget( m_text, 1, 2 ); | 91 | m_frameLay->addWidget( m_text, 1, 2 ); |
92 | m_frameLay->addWidget( m_video, 2, 2 ); | 92 | m_frameLay->addWidget( m_video, 2, 2 ); |
93 | 93 | ||
94 | m_frameLay->addRowSpacing( 0, 8 ); | 94 | m_frameLay->addRowSpacing( 0, 8 ); |
95 | m_frameLay->addColSpacing( 1, 2 ); | 95 | m_frameLay->addColSpacing( 1, 2 ); |
96 | 96 | ||
97 | m_box->addWidget( m_global ); | 97 | m_box->addWidget( m_global ); |
98 | 98 | ||
99 | 99 | ||
100 | m_layout->addWidget( m_frame ); | 100 | m_layout->addWidget( m_frame ); |
101 | 101 | ||
102 | QSpacerItem *item1 = new QSpacerItem( 1, 24, | 102 | QSpacerItem *item1 = new QSpacerItem( 1, 24, |
103 | QSizePolicy::Fixed, | 103 | QSizePolicy::Fixed, |
104 | QSizePolicy::Expanding ); | 104 | QSizePolicy::Expanding ); |
105 | m_layout->addItem( item1 ); | 105 | m_layout->addItem( item1 ); |
106 | } | 106 | } |
107 | void MediumGlobalWidget::readConfig() | 107 | void MediumGlobalWidget::readConfig() |
108 | { | 108 | { |
109 | if( m_config == 0 ) | 109 | if( m_config == 0 ) |
110 | m_config = new Config("medium" ); | 110 | m_config = new Config("medium" ); |
111 | 111 | ||
112 | m_config->setGroup("main"); | 112 | m_config->setGroup("main"); |
113 | m_useglobal->setChecked( m_config->readBoolEntry("global", false ) ); | 113 | m_useglobal->setChecked( m_config->readBoolEntry("global", false ) ); |
114 | m_check->setChecked( m_config->readBoolEntry("use", true ) ); | 114 | m_check->setChecked( m_config->readBoolEntry("use", true ) ); |
115 | 115 | ||
116 | m_config->setGroup("mimetypes" ); | 116 | m_config->setGroup("mimetypes" ); |
117 | m_all->setChecked ( m_config->readBoolEntry("all", false ) ); | 117 | m_all->setChecked ( m_config->readBoolEntry("all", false ) ); |
118 | m_audio->setChecked( m_config->readBoolEntry("audio", true ) ); | 118 | m_audio->setChecked( m_config->readBoolEntry("audio", true ) ); |
119 | m_video->setChecked( m_config->readBoolEntry("video", true ) ); | 119 | m_video->setChecked( m_config->readBoolEntry("video", true ) ); |
120 | m_text->setChecked ( m_config->readBoolEntry("text", true ) ); | 120 | m_text->setChecked ( m_config->readBoolEntry("text", true ) ); |
121 | m_image->setChecked( m_config->readBoolEntry("image", true ) ); | 121 | m_image->setChecked( m_config->readBoolEntry("image", true ) ); |
122 | 122 | ||
123 | slotAllChanged(); | 123 | slotAllChanged(); |
124 | slotEnableChecking(); | 124 | slotEnableChecking(); |
125 | slotGlobalChanged(); | 125 | slotGlobalChanged(); |
126 | if( m_all->isChecked() ){ | 126 | if( m_all->isChecked() ){ |
127 | m_video->setEnabled( false ); | 127 | m_video->setEnabled( false ); |
128 | m_text->setEnabled( false ); | 128 | m_text->setEnabled( false ); |
129 | m_audio->setEnabled( false ); | 129 | m_audio->setEnabled( false ); |
130 | m_image->setEnabled( false ); | 130 | m_image->setEnabled( false ); |
131 | 131 | ||
132 | } | 132 | } |
133 | } | 133 | } |
134 | void MediumGlobalWidget::writeConfig() | 134 | void MediumGlobalWidget::writeConfig() |
135 | { | 135 | { |
136 | m_config->setGroup( "main" ); | 136 | m_config->setGroup( "main" ); |
137 | m_config->writeEntry("global", m_useglobal->isChecked() ); | 137 | m_config->writeEntry("global", m_useglobal->isChecked() ); |
138 | m_config->writeEntry("use", m_check->isChecked() ); | 138 | m_config->writeEntry("use", m_check->isChecked() ); |
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp index f283119..84187d2 100644 --- a/noncore/settings/sound/soundsettingsbase.cpp +++ b/noncore/settings/sound/soundsettingsbase.cpp | |||
@@ -34,147 +34,147 @@ static const char* const image0_data[] = { | |||
34 | "...aaa...#.##.#.", | 34 | "...aaa...#.##.#.", |
35 | "....aa..#..#..#.", | 35 | "....aa..#..#..#.", |
36 | ".....a.....#.##.", | 36 | ".....a.....#.##.", |
37 | "..........#..#..", | 37 | "..........#..#..", |
38 | "............##.."}; | 38 | "............##.."}; |
39 | 39 | ||
40 | static const char* const image1_data[] = { | 40 | static const char* const image1_data[] = { |
41 | "16 16 3 1", | 41 | "16 16 3 1", |
42 | ". c None", | 42 | ". c None", |
43 | "# c #000000", | 43 | "# c #000000", |
44 | "a c #ff0000", | 44 | "a c #ff0000", |
45 | "................", | 45 | "................", |
46 | "................", | 46 | "................", |
47 | "................", | 47 | "................", |
48 | ".....#..........", | 48 | ".....#..........", |
49 | "....##..........", | 49 | "....##..........", |
50 | "...###...a...a..", | 50 | "...###...a...a..", |
51 | "######..aaa.aaa.", | 51 | "######..aaa.aaa.", |
52 | "######...aaaaa..", | 52 | "######...aaaaa..", |
53 | "######....aaa...", | 53 | "######....aaa...", |
54 | "######...aaaaa..", | 54 | "######...aaaaa..", |
55 | "######..aaa.aaa.", | 55 | "######..aaa.aaa.", |
56 | "...###...a...a..", | 56 | "...###...a...a..", |
57 | "....##..........", | 57 | "....##..........", |
58 | ".....#..........", | 58 | ".....#..........", |
59 | "................", | 59 | "................", |
60 | "................"}; | 60 | "................"}; |
61 | 61 | ||
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Constructs a SoundSettingsBase which is a child of 'parent', with the | 64 | * Constructs a SoundSettingsBase which is a child of 'parent', with the |
65 | * name 'name' and widget flags set to 'f' | 65 | * name 'name' and widget flags set to 'f' |
66 | * | 66 | * |
67 | * The dialog will by default be modeless, unless you set 'modal' to | 67 | * The dialog will by default be modeless, unless you set 'modal' to |
68 | * TRUE to construct a modal dialog. | 68 | * TRUE to construct a modal dialog. |
69 | */ | 69 | */ |
70 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) | 70 | SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) |
71 | : QMainWindow( parent, name, fl ) | 71 | : QMainWindow( parent, name, fl ) |
72 | { | 72 | { |
73 | QPixmap image0( ( const char** ) image0_data ); | 73 | QPixmap image0( ( const char** ) image0_data ); |
74 | QPixmap image1( ( const char** ) image1_data ); | 74 | QPixmap image1( ( const char** ) image1_data ); |
75 | if ( !name ) | 75 | if ( !name ) |
76 | setName( "SoundSettingsBase" ); | 76 | setName( "SoundSettingsBase" ); |
77 | // resize(255,301); | 77 | // resize(255,301); |
78 | setCaption( tr( "Vmemo Settings" ) ); | 78 | setCaption( tr( "Vmemo Settings" ) ); |
79 | 79 | ||
80 | SoundSettingsBaseLayout = new QGridLayout( this ); | 80 | SoundSettingsBaseLayout = new QGridLayout( this ); |
81 | SoundSettingsBaseLayout->setSpacing( 4 ); | 81 | SoundSettingsBaseLayout->setSpacing( 4 ); |
82 | SoundSettingsBaseLayout->setMargin( 4 ); | 82 | SoundSettingsBaseLayout->setMargin( 4 ); |
83 | 83 | ||
84 | QHBoxLayout *Layout11; | 84 | QHBoxLayout *Layout11; |
85 | Layout11 = new QHBoxLayout; | 85 | Layout11 = new QHBoxLayout; |
86 | Layout11->setSpacing( 4 ); | 86 | Layout11->setSpacing( 4 ); |
87 | Layout11->setMargin( 0 ); | 87 | Layout11->setMargin( 0 ); |
88 | 88 | ||
89 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); | 89 | stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); |
90 | stereoCheckBox->setText( tr( "Stereo" ) ); | 90 | stereoCheckBox->setText( tr( "Stereo" ) ); |
91 | Layout11->addWidget( stereoCheckBox ); | 91 | Layout11->addWidget( stereoCheckBox ); |
92 | 92 | ||
93 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); | 93 | sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); |
94 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); | 94 | sixteenBitCheckBox->setText( tr( "16 bit" ) ); |
95 | Layout11->addWidget( sixteenBitCheckBox ); | 95 | Layout11->addWidget( sixteenBitCheckBox ); |
96 | 96 | ||
97 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); | 97 | AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); |
98 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); | 98 | AlertCheckBox->setText( tr( "Visual Alerts" ) ); |
99 | Layout11->addWidget( AlertCheckBox ); | 99 | Layout11->addWidget( AlertCheckBox ); |
100 | 100 | ||
101 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); | 101 | SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); |
102 | 102 | ||
103 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); | 103 | sampleRateLabel = new QLabel(this, "sampleRateLabel" ); |
104 | sampleRateLabel->setText( tr( "Sample Rate:" ) ); | 104 | sampleRateLabel->setText( tr( "Sample Rate:" ) ); |
105 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); | 105 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); |
106 | 106 | ||
107 | sampleRate = new QComboBox( FALSE,this, "sampleRate" ); | 107 | sampleRate = new QComboBox( FALSE,this, "sampleRate" ); |
108 | 108 | ||
109 | sampleRate->insertItem( tr( "8000" ) ); | 109 | sampleRate->insertItem( tr( "8000" ) ); |
110 | sampleRate->insertItem( tr( "11025" ) ); | 110 | sampleRate->insertItem( tr( "11025" ) ); |
111 | sampleRate->insertItem( tr( "22050" ) ); | 111 | sampleRate->insertItem( tr( "22050" ) ); |
112 | sampleRate->insertItem( tr( "33075" ) ); | 112 | sampleRate->insertItem( tr( "33075" ) ); |
113 | sampleRate->insertItem( tr( "44100" ) ); | 113 | sampleRate->insertItem( tr( "44100" ) ); |
114 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 ); | 114 | SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 ); |
115 | 115 | ||
116 | TextLabel1 = new QLabel( this, "TextLabel1" ); | 116 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
117 | TextLabel1->setText( tr( "Recording Directory:" ) ); | 117 | TextLabel1->setText( tr( "Recording Directory:" ) ); |
118 | SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1); | 118 | SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1); |
119 | 119 | ||
120 | 120 | ||
121 | LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); | 121 | LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); |
122 | SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1); | 122 | SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1); |
123 | 123 | ||
124 | QLabel *TextLabelKey; | 124 | QLabel *TextLabelKey; |
125 | TextLabelKey = new QLabel( this, "TextLabelKey" ); | 125 | TextLabelKey = new QLabel( this, "TextLabelKey" ); |
126 | TextLabelKey->setText( tr( "Recording Key:" ) ); | 126 | TextLabelKey->setText( tr( "Recording Key:" ) ); |
127 | SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1); | 127 | SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1); |
128 | 128 | ||
129 | keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); | 129 | keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); |
130 | keyComboBox->insertItem( tr( "" ) ); | 130 | keyComboBox->insertItem( "" ); |
131 | keyComboBox->insertItem( tr( "Taskbar Icon" ) ); | 131 | keyComboBox->insertItem( tr( "Taskbar Icon" ) ); |
132 | keyComboBox->insertItem( tr( "Key_Record" ) ); | 132 | keyComboBox->insertItem( tr( "Key_Record" ) ); |
133 | keyComboBox->insertItem( tr( "Key_Space" ) ); | 133 | keyComboBox->insertItem( tr( "Key_Space" ) ); |
134 | keyComboBox->insertItem( tr( "Key_Home" ) ); | 134 | keyComboBox->insertItem( tr( "Key_Home" ) ); |
135 | keyComboBox->insertItem( tr( "Key_Calender" ) ); | 135 | keyComboBox->insertItem( tr( "Key_Calender" ) ); |
136 | keyComboBox->insertItem( tr( "Key_Contacts" ) ); | 136 | keyComboBox->insertItem( tr( "Key_Contacts" ) ); |
137 | keyComboBox->insertItem( tr( "Key_Menu" ) ); | 137 | keyComboBox->insertItem( tr( "Key_Menu" ) ); |
138 | keyComboBox->insertItem( tr( "Key_Mail" ) ); | 138 | keyComboBox->insertItem( tr( "Key_Mail" ) ); |
139 | SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1); | 139 | SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1); |
140 | 140 | ||
141 | keyLabel= new QLabel( this, "keyLabel" ); | 141 | keyLabel= new QLabel( this, "keyLabel" ); |
142 | SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3); | 142 | SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3); |
143 | 143 | ||
144 | QLabel *timeLimitLabel; | 144 | QLabel *timeLimitLabel; |
145 | timeLimitLabel= new QLabel( this, "timeLimitLabel" ); | 145 | timeLimitLabel= new QLabel( this, "timeLimitLabel" ); |
146 | timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); | 146 | timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); |
147 | SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1); | 147 | SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1); |
148 | 148 | ||
149 | timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); | 149 | timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); |
150 | timeLimitComboBox->insertItem( tr( "30" ) ); | 150 | timeLimitComboBox->insertItem( tr( "30" ) ); |
151 | timeLimitComboBox->insertItem( tr( "20" ) ); | 151 | timeLimitComboBox->insertItem( tr( "20" ) ); |
152 | timeLimitComboBox->insertItem( tr( "15" ) ); | 152 | timeLimitComboBox->insertItem( tr( "15" ) ); |
153 | timeLimitComboBox->insertItem( tr( "10" ) ); | 153 | timeLimitComboBox->insertItem( tr( "10" ) ); |
154 | timeLimitComboBox->insertItem( tr( "5" ) ); | 154 | timeLimitComboBox->insertItem( tr( "5" ) ); |
155 | timeLimitComboBox->insertItem( tr( "Unlimited" ) ); | 155 | timeLimitComboBox->insertItem( tr( "Unlimited" ) ); |
156 | 156 | ||
157 | SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1); | 157 | SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1); |
158 | 158 | ||
159 | 159 | ||
160 | restartCheckBox= new QCheckBox( this, "restartCheck" ); | 160 | restartCheckBox= new QCheckBox( this, "restartCheck" ); |
161 | restartCheckBox->setText( tr( "Restart Opie if needed" ) ); | 161 | restartCheckBox->setText( tr( "Restart Opie if needed" ) ); |
162 | 162 | ||
163 | SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); | 163 | SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); |
164 | 164 | ||
165 | adpcmCheckBox = new QCheckBox( this, "adpcmCheck" ); | 165 | adpcmCheckBox = new QCheckBox( this, "adpcmCheck" ); |
166 | adpcmCheckBox->setText( tr( "Use ADPCM compression" ) ); | 166 | adpcmCheckBox->setText( tr( "Use ADPCM compression" ) ); |
167 | 167 | ||
168 | SoundSettingsBaseLayout->addMultiCellWidget( adpcmCheckBox , 10, 10, 0, 0, 1); | 168 | SoundSettingsBaseLayout->addMultiCellWidget( adpcmCheckBox , 10, 10, 0, 0, 1); |
169 | 169 | ||
170 | QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); | 170 | QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); |
171 | SoundSettingsBaseLayout->addItem( spacer4, 10, 0 ); | 171 | SoundSettingsBaseLayout->addItem( spacer4, 10, 0 ); |
172 | } | 172 | } |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * Destroys the object and frees any allocated resources | 175 | * Destroys the object and frees any allocated resources |
176 | */ | 176 | */ |
177 | SoundSettingsBase::~SoundSettingsBase() | 177 | SoundSettingsBase::~SoundSettingsBase() |
178 | { | 178 | { |
179 | // no need to delete child widgets, Qt does it all for us | 179 | // no need to delete child widgets, Qt does it all for us |
180 | } | 180 | } |
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 7f1c0b8..1719ed8 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -179,193 +179,193 @@ void MainWindow::makeMenu() | |||
179 | connect( findEdit, SIGNAL( textChanged(const QString&) ), | 179 | connect( findEdit, SIGNAL( textChanged(const QString&) ), |
180 | this, SLOT( displayList() ) ); | 180 | this, SLOT( displayList() ) ); |
181 | a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); | 181 | a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); |
182 | connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) ); | 182 | connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) ); |
183 | a->addTo( findBar ); | 183 | a->addTo( findBar ); |
184 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 184 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
185 | connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); | 185 | connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); |
186 | a->addTo( findBar ); | 186 | a->addTo( findBar ); |
187 | findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); | 187 | findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); |
188 | connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); | 188 | connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); |
189 | findAction->setToggleAction( true ); | 189 | findAction->setToggleAction( true ); |
190 | findAction->addTo( viewMenu ); | 190 | findAction->addTo( viewMenu ); |
191 | 191 | ||
192 | //SEARCH | 192 | //SEARCH |
193 | searchBar = new QToolBar(this); | 193 | searchBar = new QToolBar(this); |
194 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); | 194 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); |
195 | label = new QLabel( tr("Search: "), searchBar ); | 195 | label = new QLabel( tr("Search: "), searchBar ); |
196 | // label->setBackgroundMode( PaletteForeground ); | 196 | // label->setBackgroundMode( PaletteForeground ); |
197 | searchBar->setHorizontalStretchable( TRUE ); | 197 | searchBar->setHorizontalStretchable( TRUE ); |
198 | searchEdit = new QLineEdit( searchBar, "seachEdit" ); | 198 | searchEdit = new QLineEdit( searchBar, "seachEdit" ); |
199 | searchBar->setStretchableWidget( searchEdit ); | 199 | searchBar->setStretchableWidget( searchEdit ); |
200 | // connect( searchEdit, SIGNAL( textChanged(const QString&) ), | 200 | // connect( searchEdit, SIGNAL( textChanged(const QString&) ), |
201 | // this, SLOT( displayList() ) ); | 201 | // this, SLOT( displayList() ) ); |
202 | a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); | 202 | a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); |
203 | connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) ); | 203 | connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) ); |
204 | a->addTo( searchBar ); | 204 | a->addTo( searchBar ); |
205 | searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); | 205 | searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); |
206 | connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) ); | 206 | connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) ); |
207 | searchCommit->addTo( searchBar ); | 207 | searchCommit->addTo( searchBar ); |
208 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 208 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
209 | connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) ); | 209 | connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) ); |
210 | a->addTo( searchBar ); | 210 | a->addTo( searchBar ); |
211 | searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 ); | 211 | searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 ); |
212 | connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) ); | 212 | connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) ); |
213 | searchAction->setToggleAction( true ); | 213 | searchAction->setToggleAction( true ); |
214 | searchAction->addTo( viewMenu ); | 214 | searchAction->addTo( viewMenu ); |
215 | 215 | ||
216 | //DEST | 216 | //DEST |
217 | destBar = new QToolBar(this); | 217 | destBar = new QToolBar(this); |
218 | addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); | 218 | addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); |
219 | label = new QLabel( tr("Destination: "), destBar ); | 219 | label = new QLabel( tr("Destination: "), destBar ); |
220 | // label->setBackgroundMode( PaletteForeground ); | 220 | // label->setBackgroundMode( PaletteForeground ); |
221 | destBar->setHorizontalStretchable( TRUE ); | 221 | destBar->setHorizontalStretchable( TRUE ); |
222 | destination = new QComboBox( false, destBar ); | 222 | destination = new QComboBox( false, destBar ); |
223 | destination->insertStringList( settings->getDestinationNames() ); | 223 | destination->insertStringList( settings->getDestinationNames() ); |
224 | setComboName(destination,settings->getDestinationName()); | 224 | setComboName(destination,settings->getDestinationName()); |
225 | connect( destination, SIGNAL(activated(int)), | 225 | connect( destination, SIGNAL(activated(int)), |
226 | settings, SLOT(activeDestinationChange(int)) ); | 226 | settings, SLOT(activeDestinationChange(int)) ); |
227 | // space->setBackgroundMode( PaletteForeground ); | 227 | // space->setBackgroundMode( PaletteForeground ); |
228 | CheckBoxLink = new QCheckBox( tr("Link"), destBar); | 228 | CheckBoxLink = new QCheckBox( tr("Link"), destBar); |
229 | // CheckBoxLink->setBackgroundMode( PaletteForeground ); | 229 | // CheckBoxLink->setBackgroundMode( PaletteForeground ); |
230 | CheckBoxLink->setChecked( settings->createLinks() ); | 230 | CheckBoxLink->setChecked( settings->createLinks() ); |
231 | connect( CheckBoxLink, SIGNAL(toggled(bool)), | 231 | connect( CheckBoxLink, SIGNAL(toggled(bool)), |
232 | settings, SLOT(linkEnabled(bool)) ); | 232 | settings, SLOT(linkEnabled(bool)) ); |
233 | destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 ); | 233 | destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 ); |
234 | connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); | 234 | connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); |
235 | a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 235 | a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
236 | connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); | 236 | connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); |
237 | a->addTo( destBar ); | 237 | a->addTo( destBar ); |
238 | destBar->setStretchableWidget( CheckBoxLink ); | 238 | destBar->setStretchableWidget( CheckBoxLink ); |
239 | destAction->setToggleAction( true ); | 239 | destAction->setToggleAction( true ); |
240 | destAction->addTo( viewMenu ); | 240 | destAction->addTo( viewMenu ); |
241 | 241 | ||
242 | // helpMenu | 242 | // helpMenu |
243 | helpMenu->insertSeparator(); | 243 | helpMenu->insertSeparator(); |
244 | a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); | 244 | a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); |
245 | a->addTo( helpMenu ); | 245 | a->addTo( helpMenu ); |
246 | helpMenu->insertSeparator(); | 246 | helpMenu->insertSeparator(); |
247 | a = new QAction( tr( "Install" ), | 247 | a = new QAction( tr( "Install" ), |
248 | Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); | 248 | Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); |
249 | a->addTo( helpMenu ); | 249 | a->addTo( helpMenu ); |
250 | a = new QAction( tr( "Remove" ), | 250 | a = new QAction( tr( "Remove" ), |
251 | Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 ); | 251 | Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 ); |
252 | a->addTo( helpMenu ); | 252 | a->addTo( helpMenu ); |
253 | helpMenu->insertSeparator(); | 253 | helpMenu->insertSeparator(); |
254 | a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 ); | 254 | a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 ); |
255 | a->addTo( helpMenu ); | 255 | a->addTo( helpMenu ); |
256 | helpMenu->insertSeparator(); | 256 | helpMenu->insertSeparator(); |
257 | a = new QAction( tr( "New version, installed" ), | 257 | a = new QAction( tr( "New version, installed" ), |
258 | Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 ); | 258 | Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 ); |
259 | a->addTo( helpMenu ); | 259 | a->addTo( helpMenu ); |
260 | a = new QAction( tr( "New version, not installed" ), | 260 | a = new QAction( tr( "New version, not installed" ), |
261 | Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 ); | 261 | Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 ); |
262 | a->addTo( helpMenu ); | 262 | a->addTo( helpMenu ); |
263 | a = new QAction( tr( "Old version, installed" ), | 263 | a = new QAction( tr( "Old version, installed" ), |
264 | Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 ); | 264 | Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 ); |
265 | a->addTo( helpMenu ); | 265 | a->addTo( helpMenu ); |
266 | a = new QAction( tr( "Old version, not installed" ), | 266 | a = new QAction( tr( "Old version, not installed" ), |
267 | Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 ); | 267 | Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 ); |
268 | a->addTo( helpMenu ); | 268 | a->addTo( helpMenu ); |
269 | a = new QAction( tr( "Old version, new version installed" ), | 269 | a = new QAction( tr( "Old version, new version installed" ), |
270 | Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 ); | 270 | Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 ); |
271 | a->addTo( helpMenu ); | 271 | a->addTo( helpMenu ); |
272 | a = new QAction( tr( "New version, old version installed" ), | 272 | a = new QAction( tr( "New version, old version installed" ), |
273 | Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 ); | 273 | Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 ); |
274 | a->addTo( helpMenu ); | 274 | a->addTo( helpMenu ); |
275 | //a = new QAction( tr( "" ), | 275 | //a = new QAction( "", |
276 | // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 ); | 276 | // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 ); |
277 | // a->addTo( helpMenu ); | 277 | // a->addTo( helpMenu ); |
278 | 278 | ||
279 | // configure the menus | 279 | // configure the menus |
280 | Config cfg( "oipkg", Config::User ); | 280 | Config cfg( "oipkg", Config::User ); |
281 | cfg.setGroup( "gui" ); | 281 | cfg.setGroup( "gui" ); |
282 | 282 | ||
283 | findShow( cfg.readBoolEntry( "findBar", true ) ); | 283 | findShow( cfg.readBoolEntry( "findBar", true ) ); |
284 | searchShow( cfg.readBoolEntry( "searchBar", true ) ); | 284 | searchShow( cfg.readBoolEntry( "searchBar", true ) ); |
285 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); | 285 | sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); |
286 | destShow( cfg.readBoolEntry( "destBar", false ) ); | 286 | destShow( cfg.readBoolEntry( "destBar", false ) ); |
287 | setComboName(section,cfg.readEntry("default_section")); | 287 | setComboName(section,cfg.readEntry("default_section")); |
288 | sectionChanged(); | 288 | sectionChanged(); |
289 | } | 289 | } |
290 | 290 | ||
291 | MainWindow::~MainWindow() | 291 | MainWindow::~MainWindow() |
292 | { | 292 | { |
293 | Config cfg( "oipkg", Config::User ); | 293 | Config cfg( "oipkg", Config::User ); |
294 | cfg.setGroup( "gui" ); | 294 | cfg.setGroup( "gui" ); |
295 | cfg.writeEntry( "findBar", !findBar->isHidden() ); | 295 | cfg.writeEntry( "findBar", !findBar->isHidden() ); |
296 | cfg.writeEntry( "searchBar", !searchBar->isHidden() ); | 296 | cfg.writeEntry( "searchBar", !searchBar->isHidden() ); |
297 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); | 297 | cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); |
298 | cfg.writeEntry( "destBar", !destBar->isHidden() ); | 298 | cfg.writeEntry( "destBar", !destBar->isHidden() ); |
299 | cfg.writeEntry( "default_section", section->currentText() ); | 299 | cfg.writeEntry( "default_section", section->currentText() ); |
300 | 300 | ||
301 | } | 301 | } |
302 | 302 | ||
303 | void MainWindow::runIpkg() | 303 | void MainWindow::runIpkg() |
304 | { | 304 | { |
305 | packageListServers.allPackages(); | 305 | packageListServers.allPackages(); |
306 | ipkg->loadList( &packageListSearch ); | 306 | ipkg->loadList( &packageListSearch ); |
307 | ipkg->loadList( &packageListDocLnk ); | 307 | ipkg->loadList( &packageListDocLnk ); |
308 | ipkg->loadList( &packageListServers ); | 308 | ipkg->loadList( &packageListServers ); |
309 | ipkg->commit(); | 309 | ipkg->commit(); |
310 | ipkg->clearLists(); | 310 | ipkg->clearLists(); |
311 | // ##### If we looked in the list of files, we could send out accurate | 311 | // ##### If we looked in the list of files, we could send out accurate |
312 | // ##### messages. But we don't bother yet, and just do an "all". | 312 | // ##### messages. But we don't bother yet, and just do an "all". |
313 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 313 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
314 | QString lf = QString::null; | 314 | QString lf = QString::null; |
315 | e << lf; | 315 | e << lf; |
316 | displayList(); | 316 | displayList(); |
317 | } | 317 | } |
318 | 318 | ||
319 | void MainWindow::updateList() | 319 | void MainWindow::updateList() |
320 | { | 320 | { |
321 | packageListServers.clear(); | 321 | packageListServers.clear(); |
322 | packageListSearch.clear(); | 322 | packageListSearch.clear(); |
323 | 323 | ||
324 | packageListDocLnk.clear(); | 324 | packageListDocLnk.clear(); |
325 | ipkg->update(); | 325 | ipkg->update(); |
326 | packageListServers.update(); | 326 | packageListServers.update(); |
327 | packageListSearch.update(); | 327 | packageListSearch.update(); |
328 | packageListDocLnk.update(); | 328 | packageListDocLnk.update(); |
329 | } | 329 | } |
330 | 330 | ||
331 | void MainWindow::filterList() | 331 | void MainWindow::filterList() |
332 | { | 332 | { |
333 | QString f = ""; | 333 | QString f = ""; |
334 | if ( findAction->isOn() ) f = findEdit->text(); | 334 | if ( findAction->isOn() ) f = findEdit->text(); |
335 | packageListServers.filterPackages( f ); | 335 | packageListServers.filterPackages( f ); |
336 | } | 336 | } |
337 | 337 | ||
338 | void MainWindow::displayList() | 338 | void MainWindow::displayList() |
339 | { | 339 | { |
340 | filterList(); | 340 | filterList(); |
341 | listViewPackages->display(); | 341 | listViewPackages->display(); |
342 | } | 342 | } |
343 | 343 | ||
344 | void MainWindow::sectionChanged() | 344 | void MainWindow::sectionChanged() |
345 | { | 345 | { |
346 | disconnect( section, SIGNAL( activated(int) ), | 346 | disconnect( section, SIGNAL( activated(int) ), |
347 | this, SLOT( sectionChanged() ) ); | 347 | this, SLOT( sectionChanged() ) ); |
348 | disconnect( subsection, SIGNAL(activated(int) ), | 348 | disconnect( subsection, SIGNAL(activated(int) ), |
349 | this, SLOT( subSectionChanged() ) ); | 349 | this, SLOT( subSectionChanged() ) ); |
350 | subsection->clear(); | 350 | subsection->clear(); |
351 | packageListServers.setSection( section->currentText() ); | 351 | packageListServers.setSection( section->currentText() ); |
352 | setSubSections(); | 352 | setSubSections(); |
353 | connect( section, SIGNAL( activated(int) ), | 353 | connect( section, SIGNAL( activated(int) ), |
354 | this, SLOT( sectionChanged() ) ); | 354 | this, SLOT( sectionChanged() ) ); |
355 | connect( subsection, SIGNAL(activated(int) ), | 355 | connect( subsection, SIGNAL(activated(int) ), |
356 | this, SLOT( subSectionChanged() ) ); | 356 | this, SLOT( subSectionChanged() ) ); |
357 | displayList(); | 357 | displayList(); |
358 | } | 358 | } |
359 | 359 | ||
360 | void MainWindow::subSectionChanged() | 360 | void MainWindow::subSectionChanged() |
361 | { | 361 | { |
362 | disconnect( section, SIGNAL( activated(int) ), | 362 | disconnect( section, SIGNAL( activated(int) ), |
363 | this, SLOT( sectionChanged() ) ); | 363 | this, SLOT( sectionChanged() ) ); |
364 | disconnect( subsection, SIGNAL(activated(int) ), | 364 | disconnect( subsection, SIGNAL(activated(int) ), |
365 | this, SLOT( subSectionChanged() ) ); | 365 | this, SLOT( subSectionChanged() ) ); |
366 | packageListServers.setSubSection( subsection->currentText() ); | 366 | packageListServers.setSubSection( subsection->currentText() ); |
367 | connect( section, SIGNAL( activated(int) ), | 367 | connect( section, SIGNAL( activated(int) ), |
368 | this, SLOT( sectionChanged() ) ); | 368 | this, SLOT( sectionChanged() ) ); |
369 | connect( subsection, SIGNAL(activated(int) ), | 369 | connect( subsection, SIGNAL(activated(int) ), |
370 | this, SLOT( subSectionChanged() ) ); | 370 | this, SLOT( subSectionChanged() ) ); |
371 | displayList(); | 371 | displayList(); |