summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp2
-rw-r--r--noncore/settings/language/languagesettingsbase.ui2
-rw-r--r--noncore/settings/mediummount/mainwindow.cc2
3 files changed, 4 insertions, 2 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index e9e0ad9..2b35119 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -314,193 +314,193 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
314 QWhatsThis::add( m_except, tr( "If some applications do not display correctly with the global appearance settings, certain features can be turned off for that application.\n\nThis area allows you to select an application and which settings you wish to disable." ) ); 314 QWhatsThis::add( m_except, tr( "If some applications do not display correctly with the global appearance settings, certain features can be turned off for that application.\n\nThis area allows you to select an application and which settings you wish to disable." ) );
315 315
316 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int ))); 316 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int )));
317 317
318 QToolButton *tb = new QToolButton ( tab ); 318 QToolButton *tb = new QToolButton ( tab );
319 tb-> setIconSet ( Resource::loadIconSet ( "appearance/add" )); 319 tb-> setIconSet ( Resource::loadIconSet ( "appearance/add" ));
320 tb-> setFocusPolicy ( QWidget::StrongFocus ); 320 tb-> setFocusPolicy ( QWidget::StrongFocus );
321 lay-> addWidget ( tb, 2, 1 ); 321 lay-> addWidget ( tb, 2, 1 );
322 connect ( tb, SIGNAL( clicked ( )), this, SLOT( addExcept ( ))); 322 connect ( tb, SIGNAL( clicked ( )), this, SLOT( addExcept ( )));
323 QWhatsThis::add( tb, tr( "Click here to add an application to the list above." ) ); 323 QWhatsThis::add( tb, tr( "Click here to add an application to the list above." ) );
324 324
325 tb = new QToolButton ( tab ); 325 tb = new QToolButton ( tab );
326 tb-> setIconSet ( Resource::loadIconSet ( "editdelete" )); 326 tb-> setIconSet ( Resource::loadIconSet ( "editdelete" ));
327 tb-> setFocusPolicy ( QWidget::StrongFocus ); 327 tb-> setFocusPolicy ( QWidget::StrongFocus );
328 lay-> addWidget ( tb, 3, 1 ); 328 lay-> addWidget ( tb, 3, 1 );
329 connect ( tb, SIGNAL( clicked ( )), this, SLOT( delExcept ( ))); 329 connect ( tb, SIGNAL( clicked ( )), this, SLOT( delExcept ( )));
330 QWhatsThis::add( tb, tr( "Click here to delete the currently selected application." ) ); 330 QWhatsThis::add( tb, tr( "Click here to delete the currently selected application." ) );
331 331
332 tb = new QToolButton ( tab ); 332 tb = new QToolButton ( tab );
333 tb-> setIconSet ( Resource::loadIconSet ( "up" )); 333 tb-> setIconSet ( Resource::loadIconSet ( "up" ));
334 tb-> setFocusPolicy ( QWidget::StrongFocus ); 334 tb-> setFocusPolicy ( QWidget::StrongFocus );
335 lay-> addWidget ( tb, 4, 1 ); 335 lay-> addWidget ( tb, 4, 1 );
336 connect ( tb, SIGNAL( clicked ( )), this, SLOT( upExcept ( ))); 336 connect ( tb, SIGNAL( clicked ( )), this, SLOT( upExcept ( )));
337 QWhatsThis::add( tb, tr( "Click here to move the currently selected application up in the list." ) ); 337 QWhatsThis::add( tb, tr( "Click here to move the currently selected application up in the list." ) );
338 338
339 tb = new QToolButton ( tab ); 339 tb = new QToolButton ( tab );
340 tb-> setIconSet ( Resource::loadIconSet ( "down" )); 340 tb-> setIconSet ( Resource::loadIconSet ( "down" ));
341 tb-> setFocusPolicy ( QWidget::StrongFocus ); 341 tb-> setFocusPolicy ( QWidget::StrongFocus );
342 lay-> addWidget ( tb, 5, 1 ); 342 lay-> addWidget ( tb, 5, 1 );
343 connect ( tb, SIGNAL( clicked ( )), this, SLOT( downExcept ( ))); 343 connect ( tb, SIGNAL( clicked ( )), this, SLOT( downExcept ( )));
344 QWhatsThis::add( tb, tr( "Click here to move the currently selected application down in the list." ) ); 344 QWhatsThis::add( tb, tr( "Click here to move the currently selected application down in the list." ) );
345 345
346 lay-> setRowStretch ( 6, 10 ); 346 lay-> setRowStretch ( 6, 10 );
347 lay-> setColStretch ( 0, 10 ); 347 lay-> setColStretch ( 0, 10 );
348 348
349 QStringList sl = cfg. readListEntry ( "NoStyle", ';' ); 349 QStringList sl = cfg. readListEntry ( "NoStyle", ';' );
350 QListViewItem *lvit = 0; 350 QListViewItem *lvit = 0;
351 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 351 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
352 int fl = ( *it ). left ( 1 ). toInt ( 0, 32 ); 352 int fl = ( *it ). left ( 1 ). toInt ( 0, 32 );
353 353
354 lvit = new ExceptListItem ( m_except, lvit, ( *it ). mid ( 1 ), fl & 0x01, fl & 0x02, fl & 0x04 ); 354 lvit = new ExceptListItem ( m_except, lvit, ( *it ). mid ( 1 ), fl & 0x01, fl & 0x02, fl & 0x04 );
355 } 355 }
356 356
357 357
358 vertLayout-> addSpacing ( 3 ); 358 vertLayout-> addSpacing ( 3 );
359 QFrame *f = new QFrame ( tab ); 359 QFrame *f = new QFrame ( tab );
360 f-> setFrameStyle ( QFrame::HLine | QFrame::Sunken ); 360 f-> setFrameStyle ( QFrame::HLine | QFrame::Sunken );
361 vertLayout-> addWidget ( f ); 361 vertLayout-> addWidget ( f );
362 vertLayout-> addSpacing ( 3 ); 362 vertLayout-> addSpacing ( 3 );
363 363
364 364
365 QGridLayout* gridLayout = new QGridLayout ( vertLayout, 0, 0, 3, 0 ); 365 QGridLayout* gridLayout = new QGridLayout ( vertLayout, 0, 0, 3, 0 );
366 366
367 int style = cfg. readNumEntry ( "TabStyle", 2 ) - 1; 367 int style = cfg. readNumEntry ( "TabStyle", 2 ) - 1;
368 bool tabtop = ( cfg. readEntry ( "TabPosition", "Top" ) == "Top" ); 368 bool tabtop = ( cfg. readEntry ( "TabPosition", "Top" ) == "Top" );
369 369
370 QLabel* label = new QLabel( tr( "Tab style:" ), tab ); 370 QLabel* label = new QLabel( tr( "Tab style:" ), tab );
371 gridLayout-> addWidget ( label, 0, 0 ); 371 gridLayout-> addWidget ( label, 0, 0 );
372 QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); 372 QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
373 373
374 QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" ); 374 QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" );
375 btngrp-> hide ( ); 375 btngrp-> hide ( );
376 btngrp-> setExclusive ( true ); 376 btngrp-> setExclusive ( true );
377 377
378 m_tabstyle_list = new QComboBox ( false, tab, "tabstyle" ); 378 m_tabstyle_list = new QComboBox ( false, tab, "tabstyle" );
379 m_tabstyle_list-> insertItem ( tr( "Tabs" )); 379 m_tabstyle_list-> insertItem ( tr( "Tabs" ));
380 m_tabstyle_list-> insertItem ( tr( "Tabs w/icons" )); 380 m_tabstyle_list-> insertItem ( tr( "Tabs w/icons" ));
381 m_tabstyle_list-> insertItem ( tr( "Drop down list" )); 381 m_tabstyle_list-> insertItem ( tr( "Drop down list" ));
382 m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" )); 382 m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" ));
383 m_tabstyle_list-> setCurrentItem ( style ); 383 m_tabstyle_list-> setCurrentItem ( style );
384 gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 ); 384 gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 );
385 QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) ); 385 QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
386 386
387 m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" ); 387 m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" );
388 btngrp-> insert ( m_tabstyle_top ); 388 btngrp-> insert ( m_tabstyle_top );
389 gridLayout-> addWidget( m_tabstyle_top, 1, 1 ); 389 gridLayout-> addWidget( m_tabstyle_top, 1, 1 );
390 QWhatsThis::add( m_tabstyle_top, tr( "Click here so that tabs appear at the top of the window." ) ); 390 QWhatsThis::add( m_tabstyle_top, tr( "Click here so that tabs appear at the top of the window." ) );
391 391
392 m_tabstyle_bottom = new QRadioButton( tr( "Bottom" ), tab, "tabposbottom" ); 392 m_tabstyle_bottom = new QRadioButton( tr( "Bottom" ), tab, "tabposbottom" );
393 btngrp-> insert ( m_tabstyle_bottom ); 393 btngrp-> insert ( m_tabstyle_bottom );
394 gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 ); 394 gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 );
395 QWhatsThis::add( m_tabstyle_bottom, tr( "Click here so that tabs appear at the bottom of the window." ) ); 395 QWhatsThis::add( m_tabstyle_bottom, tr( "Click here so that tabs appear at the bottom of the window." ) );
396 396
397 m_tabstyle_top-> setChecked ( tabtop ); 397 m_tabstyle_top-> setChecked ( tabtop );
398 m_tabstyle_bottom-> setChecked ( !tabtop ); 398 m_tabstyle_bottom-> setChecked ( !tabtop );
399 399
400 m_original_tabstyle = style; 400 m_original_tabstyle = style;
401 m_original_tabpos = tabtop; 401 m_original_tabpos = tabtop;
402 402
403 return tab; 403 return tab;
404} 404}
405 405
406 406
407Appearance::Appearance( QWidget* parent, const char* name, WFlags ) 407Appearance::Appearance( QWidget* parent, const char* name, WFlags )
408 : QDialog ( parent, name, true, WStyle_ContextHelp ) 408 : QDialog ( parent, name, true, WStyle_ContextHelp )
409{ 409{
410 setCaption( tr( "Appearance" ) ); 410 setCaption( tr( "Appearance Settings" ) );
411 411
412 Config config( "qpe" ); 412 Config config( "qpe" );
413 config.setGroup( "Appearance" ); 413 config.setGroup( "Appearance" );
414 414
415 QVBoxLayout *top = new QVBoxLayout ( this, 3, 3 ); 415 QVBoxLayout *top = new QVBoxLayout ( this, 3, 3 );
416 416
417 m_sample = new SampleWindow ( this ); 417 m_sample = new SampleWindow ( this );
418 m_sample-> setDecoration ( new DefaultWindowDecoration ( )); 418 m_sample-> setDecoration ( new DefaultWindowDecoration ( ));
419 QWhatsThis::add( m_sample, tr( "This is a preview window. Look here to see your new appearance as options are changed." ) ); 419 QWhatsThis::add( m_sample, tr( "This is a preview window. Look here to see your new appearance as options are changed." ) );
420 420
421 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 421 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
422 QWidget *styletab; 422 QWidget *styletab;
423 423
424 m_color_list = 0; 424 m_color_list = 0;
425 425
426 tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance/style", tr( "Style" )); 426 tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance/style", tr( "Style" ));
427 tw-> addTab ( createFontTab ( tw, config ), "appearance/font", tr( "Font" )); 427 tw-> addTab ( createFontTab ( tw, config ), "appearance/font", tr( "Font" ));
428 tw-> addTab ( createColorTab ( tw, config ), "appearance/color", tr( "Colors" ) ); 428 tw-> addTab ( createColorTab ( tw, config ), "appearance/color", tr( "Colors" ) );
429 tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco", tr( "Windows" ) ); 429 tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco", tr( "Windows" ) );
430 tw-> addTab ( m_advtab = createAdvancedTab ( tw, config ), "appearance/advanced", tr( "Advanced" ) ); 430 tw-> addTab ( m_advtab = createAdvancedTab ( tw, config ), "appearance/advanced", tr( "Advanced" ) );
431 431
432 top-> addWidget ( tw, 10 ); 432 top-> addWidget ( tw, 10 );
433 top-> addWidget ( m_sample, 1 ); 433 top-> addWidget ( m_sample, 1 );
434 434
435 tw-> setCurrentTab ( styletab ); 435 tw-> setCurrentTab ( styletab );
436 connect ( tw, SIGNAL( currentChanged ( QWidget * )), this, SLOT( tabChanged ( QWidget * ))); 436 connect ( tw, SIGNAL( currentChanged ( QWidget * )), this, SLOT( tabChanged ( QWidget * )));
437 437
438 m_style_changed = m_font_changed = m_color_changed = m_deco_changed = false; 438 m_style_changed = m_font_changed = m_color_changed = m_deco_changed = false;
439} 439}
440 440
441Appearance::~Appearance() 441Appearance::~Appearance()
442{ 442{
443} 443}
444 444
445void Appearance::tabChanged ( QWidget *w ) 445void Appearance::tabChanged ( QWidget *w )
446{ 446{
447 if ( w == m_advtab ) { 447 if ( w == m_advtab ) {
448 m_sample-> hide ( ); 448 m_sample-> hide ( );
449 updateGeometry ( ); // shouldn't be necessary ... 449 updateGeometry ( ); // shouldn't be necessary ...
450 } 450 }
451 else 451 else
452 m_sample-> show ( ); 452 m_sample-> show ( );
453} 453}
454 454
455void Appearance::accept ( ) 455void Appearance::accept ( )
456{ 456{
457 bool newtabpos = m_tabstyle_top-> isChecked ( ); 457 bool newtabpos = m_tabstyle_top-> isChecked ( );
458 int newtabstyle = m_tabstyle_list-> currentItem ( ); 458 int newtabstyle = m_tabstyle_list-> currentItem ( );
459 459
460 Config config ( "qpe" ); 460 Config config ( "qpe" );
461 config. setGroup ( "Appearance" ); 461 config. setGroup ( "Appearance" );
462 462
463 if ( m_style_changed ) { 463 if ( m_style_changed ) {
464 StyleListItem *item = (StyleListItem *) m_style_list-> item ( m_style_list-> currentItem ( )); 464 StyleListItem *item = (StyleListItem *) m_style_list-> item ( m_style_list-> currentItem ( ));
465 if ( item ) 465 if ( item )
466 config.writeEntry( "Style", item-> key ( )); 466 config.writeEntry( "Style", item-> key ( ));
467 } 467 }
468 468
469 if ( m_deco_changed ) { 469 if ( m_deco_changed ) {
470 DecoListItem *item = (DecoListItem *) m_deco_list-> item ( m_deco_list-> currentItem ( )); 470 DecoListItem *item = (DecoListItem *) m_deco_list-> item ( m_deco_list-> currentItem ( ));
471 if ( item ) 471 if ( item )
472 config.writeEntry( "Decoration", item-> key ( )); 472 config.writeEntry( "Decoration", item-> key ( ));
473 } 473 }
474 474
475 if (( newtabstyle != m_original_tabstyle ) || ( newtabpos != m_original_tabpos )) { 475 if (( newtabstyle != m_original_tabstyle ) || ( newtabpos != m_original_tabpos )) {
476 config. writeEntry ( "TabStyle", newtabstyle + 1 ); 476 config. writeEntry ( "TabStyle", newtabstyle + 1 );
477 config. writeEntry ( "TabPosition", newtabpos ? "Top" : "Bottom" ); 477 config. writeEntry ( "TabPosition", newtabpos ? "Top" : "Bottom" );
478 } 478 }
479 479
480 if ( m_font_changed ) { 480 if ( m_font_changed ) {
481 config. writeEntry ( "FontFamily", m_fontselect-> fontFamily ( )); 481 config. writeEntry ( "FontFamily", m_fontselect-> fontFamily ( ));
482 config. writeEntry ( "FontStyle", m_fontselect-> fontStyle ( )); 482 config. writeEntry ( "FontStyle", m_fontselect-> fontStyle ( ));
483 config. writeEntry ( "FontSize", m_fontselect-> fontSize ( )); 483 config. writeEntry ( "FontSize", m_fontselect-> fontSize ( ));
484 } 484 }
485 485
486 486
487 if ( m_color_changed ) 487 if ( m_color_changed )
488 { 488 {
489 ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); 489 ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( ));
490 490
491 if ( item ) 491 if ( item )
492 item-> save ( config ); 492 item-> save ( config );
493 } 493 }
494 494
495 495
496 m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated 496 m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated
497 497
498 QStringList sl; 498 QStringList sl;
499 QString exceptstr; 499 QString exceptstr;
500 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) { 500 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) {
501 int fl = 0; 501 int fl = 0;
502 fl |= ( it-> noStyle ( ) ? 0x01 : 0 ); 502 fl |= ( it-> noStyle ( ) ? 0x01 : 0 );
503 fl |= ( it-> noFont ( ) ? 0x02 : 0 ); 503 fl |= ( it-> noFont ( ) ? 0x02 : 0 );
504 fl |= ( it-> noDeco ( ) ? 0x04 : 0 ); 504 fl |= ( it-> noDeco ( ) ? 0x04 : 0 );
505 exceptstr = QString::number ( fl, 32 ); 505 exceptstr = QString::number ( fl, 32 );
506 exceptstr.append( it-> pattern ( )); 506 exceptstr.append( it-> pattern ( ));
diff --git a/noncore/settings/language/languagesettingsbase.ui b/noncore/settings/language/languagesettingsbase.ui
index 62bdafa..ae317e4 100644
--- a/noncore/settings/language/languagesettingsbase.ui
+++ b/noncore/settings/language/languagesettingsbase.ui
@@ -1,51 +1,51 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>LanguageSettingsBase</class> 2<class>LanguageSettingsBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>LanguageSettingsBase</cstring> 7 <cstring>LanguageSettingsBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>369</width> 14 <width>369</width>
15 <height>492</height> 15 <height>492</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Language</string> 20 <string>Language Settings</string>
21 </property> 21 </property>
22 <vbox> 22 <vbox>
23 <property stdset="1"> 23 <property stdset="1">
24 <name>margin</name> 24 <name>margin</name>
25 <number>11</number> 25 <number>11</number>
26 </property> 26 </property>
27 <property stdset="1"> 27 <property stdset="1">
28 <name>spacing</name> 28 <name>spacing</name>
29 <number>6</number> 29 <number>6</number>
30 </property> 30 </property>
31 <widget> 31 <widget>
32 <class>QLabel</class> 32 <class>QLabel</class>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>name</name> 34 <name>name</name>
35 <cstring>TextLabel1</cstring> 35 <cstring>TextLabel1</cstring>
36 </property> 36 </property>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>text</name> 38 <name>text</name>
39 <string>Select language</string> 39 <string>Select language</string>
40 </property> 40 </property>
41 </widget> 41 </widget>
42 <widget> 42 <widget>
43 <class>QListBox</class> 43 <class>QListBox</class>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>name</name> 45 <name>name</name>
46 <cstring>languages</cstring> 46 <cstring>languages</cstring>
47 </property> 47 </property>
48 </widget> 48 </widget>
49 </vbox> 49 </vbox>
50</widget> 50</widget>
51</UI> 51</UI>
diff --git a/noncore/settings/mediummount/mainwindow.cc b/noncore/settings/mediummount/mainwindow.cc
index cf8ad6c..6d9bb80 100644
--- a/noncore/settings/mediummount/mainwindow.cc
+++ b/noncore/settings/mediummount/mainwindow.cc
@@ -1,55 +1,57 @@
1 1
2 2
3#include <qtabwidget.h> 3#include <qtabwidget.h>
4#include <qlayout.h> 4#include <qlayout.h>
5 5
6#include <qpe/storage.h> 6#include <qpe/storage.h>
7 7
8#include "mediumwidget.h" 8#include "mediumwidget.h"
9#include "mediumglobal.h" 9#include "mediumglobal.h"
10 10
11#include "mainwindow.h" 11#include "mainwindow.h"
12 12
13using namespace MediumMountSetting; 13using namespace MediumMountSetting;
14 14
15 15
16MainWindow::MainWindow( QWidget *parent, const char *name, WFlags ) 16MainWindow::MainWindow( QWidget *parent, const char *name, WFlags )
17 : QMainWindow( parent, name, WStyle_ContextHelp ) 17 : QMainWindow( parent, name, WStyle_ContextHelp )
18 18
19{ 19{
20 setCaption ( tr( "Medium Mount Settings" ));
21
20 // m_lay = new QVBoxLayout( this ); 22 // m_lay = new QVBoxLayout( this );
21 m_tab = new QTabWidget( this ); 23 m_tab = new QTabWidget( this );
22 setCentralWidget( m_tab ); 24 setCentralWidget( m_tab );
23 init(); 25 init();
24} 26}
25 27
26MainWindow::~MainWindow() 28MainWindow::~MainWindow()
27{ 29{
28 30
29} 31}
30void MainWindow::init() 32void MainWindow::init()
31{ 33{
32 m_global = new MediumGlobalWidget( m_tab, "test drive" ); 34 m_global = new MediumGlobalWidget( m_tab, "test drive" );
33 m_tab->addTab( m_global, tr("Global") ); 35 m_tab->addTab( m_global, tr("Global") );
34 36
35 StorageInfo storage; 37 StorageInfo storage;
36 const QList<FileSystem> &fs = storage.fileSystems(); 38 const QList<FileSystem> &fs = storage.fileSystems();
37 QListIterator<FileSystem> it( fs ); 39 QListIterator<FileSystem> it( fs );
38 MediumMountWidget *wid; 40 MediumMountWidget *wid;
39 for( ; it.current(); ++it ){ 41 for( ; it.current(); ++it ){
40 if( (*it)->isRemovable() ){ 42 if( (*it)->isRemovable() ){
41 wid = new MediumMountWidget((*it)->path(), QPixmap(), m_tab ); 43 wid = new MediumMountWidget((*it)->path(), QPixmap(), m_tab );
42 m_mediums.append( wid ); 44 m_mediums.append( wid );
43 m_tab->addTab( wid, (*it)->name() ); 45 m_tab->addTab( wid, (*it)->name() );
44 } 46 }
45 } 47 }
46} 48}
47 49
48void MainWindow::slotGlobalChanged(int ) 50void MainWindow::slotGlobalChanged(int )
49{ 51{
50 52
51} 53}
52void MainWindow::slotCheckingChanged(int ) 54void MainWindow::slotCheckingChanged(int )
53{ 55{
54 56
55} 57}