Diffstat (limited to 'noncore/settings/mediummount/mainwindow.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/mediummount/mainwindow.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/mediummount/mainwindow.cc b/noncore/settings/mediummount/mainwindow.cc index 6b37cff..eec786c 100644 --- a/noncore/settings/mediummount/mainwindow.cc +++ b/noncore/settings/mediummount/mainwindow.cc | |||
@@ -1,64 +1,65 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <qtabwidget.h> | 3 | #include <qtabwidget.h> |
4 | #include <qlayout.h> | 4 | #include <qlayout.h> |
5 | #include <qtooltip.h> | 5 | #include <qtooltip.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | 7 | ||
8 | #include <qpe/storage.h> | 8 | #include <qpe/storage.h> |
9 | 9 | ||
10 | #include "mediumwidget.h" | 10 | #include "mediumwidget.h" |
11 | #include "mediumglobal.h" | 11 | #include "mediumglobal.h" |
12 | 12 | ||
13 | #include "mainwindow.h" | 13 | #include "mainwindow.h" |
14 | 14 | ||
15 | using namespace MediumMountSetting; | 15 | using namespace MediumMountSetting; |
16 | 16 | ||
17 | /* TRANSLATOR MediumMountSetting::MainWindow */ | ||
17 | 18 | ||
18 | MainWindow::MainWindow( QWidget *parent, const char *name, bool modal, WFlags ) | 19 | MainWindow::MainWindow( QWidget *parent, const char *name, bool modal, WFlags ) |
19 | : QDialog( parent, name, modal, WStyle_ContextHelp ) | 20 | : QDialog( parent, name, modal, WStyle_ContextHelp ) |
20 | 21 | ||
21 | { | 22 | { |
22 | setCaption ( tr( "Medium Mount Settings" )); | 23 | setCaption ( tr( "Medium Mount Settings" )); |
23 | 24 | ||
24 | m_lay = new QVBoxLayout( this ); | 25 | m_lay = new QVBoxLayout( this ); |
25 | 26 | ||
26 | m_tab = new QTabWidget( this ); | 27 | m_tab = new QTabWidget( this ); |
27 | 28 | ||
28 | m_lay->addWidget( m_tab ); | 29 | m_lay->addWidget( m_tab ); |
29 | 30 | ||
30 | init(); | 31 | init(); |
31 | } | 32 | } |
32 | 33 | ||
33 | MainWindow::~MainWindow() | 34 | MainWindow::~MainWindow() |
34 | { | 35 | { |
35 | } | 36 | } |
36 | 37 | ||
37 | void MainWindow::init() | 38 | void MainWindow::init() |
38 | { | 39 | { |
39 | m_global = new MediumGlobalWidget( m_tab, "test drive" ); | 40 | m_global = new MediumGlobalWidget( m_tab, "test drive" ); |
40 | m_tab->addTab( m_global, tr("Global") ); | 41 | m_tab->addTab( m_global, tr("Global") ); |
41 | 42 | ||
42 | StorageInfo storage; | 43 | StorageInfo storage; |
43 | const QList<FileSystem> &fs = storage.fileSystems(); | 44 | const QList<FileSystem> &fs = storage.fileSystems(); |
44 | QListIterator<FileSystem> it( fs ); | 45 | QListIterator<FileSystem> it( fs ); |
45 | MediumMountWidget *wid; | 46 | MediumMountWidget *wid; |
46 | for( ; it.current(); ++it ){ | 47 | for( ; it.current(); ++it ){ |
47 | if( (*it)->isRemovable() ){ | 48 | if( (*it)->isRemovable() ){ |
48 | wid = new MediumMountWidget((*it)->path(), QPixmap(), m_tab ); | 49 | wid = new MediumMountWidget((*it)->path(), QPixmap(), m_tab ); |
49 | m_mediums.append( wid ); | 50 | m_mediums.append( wid ); |
50 | m_tab->addTab( wid, (*it)->name() ); | 51 | m_tab->addTab( wid, (*it)->name() ); |
51 | } | 52 | } |
52 | } | 53 | } |
53 | } | 54 | } |
54 | 55 | ||
55 | void MainWindow::accept() | 56 | void MainWindow::accept() |
56 | { | 57 | { |
57 | m_global->writeConfig(); | 58 | m_global->writeConfig(); |
58 | 59 | ||
59 | MediumMountWidget *confWidget; | 60 | MediumMountWidget *confWidget; |
60 | for ( confWidget = m_mediums.first(); confWidget != 0; | 61 | for ( confWidget = m_mediums.first(); confWidget != 0; |
61 | confWidget = m_mediums.next() ) { | 62 | confWidget = m_mediums.next() ) { |
62 | confWidget->writeConfig(); | 63 | confWidget->writeConfig(); |
63 | } | 64 | } |
64 | 65 | ||