author | zecke <zecke> | 2002-04-27 16:11:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-27 16:11:28 (UTC) |
commit | 68a364bbab96b8a26bf6a4a1f9f9989c08a001c5 (patch) (unidiff) | |
tree | 81feaabb443fd4e80dc0f1469587ab5951a16e00 /noncore/settings/mediummount/mainwindow.cc | |
parent | d0a9aaaca068af74d845743b0bf4f13f6f179f27 (diff) | |
download | opie-68a364bbab96b8a26bf6a4a1f9f9989c08a001c5.zip opie-68a364bbab96b8a26bf6a4a1f9f9989c08a001c5.tar.gz opie-68a364bbab96b8a26bf6a4a1f9f9989c08a001c5.tar.bz2 |
Add the medium mount settings app. Now launcher needs to catch up again
Diffstat (limited to 'noncore/settings/mediummount/mainwindow.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/mediummount/mainwindow.cc | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/noncore/settings/mediummount/mainwindow.cc b/noncore/settings/mediummount/mainwindow.cc new file mode 100644 index 0000000..88f7c61 --- a/dev/null +++ b/noncore/settings/mediummount/mainwindow.cc | |||
@@ -0,0 +1,55 @@ | |||
1 | |||
2 | |||
3 | #include <qtabwidget.h> | ||
4 | #include <qlayout.h> | ||
5 | |||
6 | #include <qpe/storage.h> | ||
7 | |||
8 | #include "mediumwidget.h" | ||
9 | #include "mediumglobal.h" | ||
10 | |||
11 | #include "mainwindow.h" | ||
12 | |||
13 | using namespace MediumMountSetting; | ||
14 | |||
15 | |||
16 | MainWindow::MainWindow( QWidget *parent, const char *name ) | ||
17 | : QMainWindow( parent, name ) | ||
18 | |||
19 | { | ||
20 | // m_lay = new QVBoxLayout( this ); | ||
21 | m_tab = new QTabWidget( this ); | ||
22 | setCentralWidget( m_tab ); | ||
23 | init(); | ||
24 | } | ||
25 | |||
26 | MainWindow::~MainWindow() | ||
27 | { | ||
28 | |||
29 | } | ||
30 | void MainWindow::init() | ||
31 | { | ||
32 | m_global = new MediumGlobalWidget( m_tab, "test drive" ); | ||
33 | m_tab->addTab( m_global, tr("Global") ); | ||
34 | |||
35 | StorageInfo storage; | ||
36 | const QList<FileSystem> &fs = storage.fileSystems(); | ||
37 | QListIterator<FileSystem> it( fs ); | ||
38 | MediumMountWidget *wid; | ||
39 | for( ; it.current(); ++it ){ | ||
40 | if( (*it)->isRemovable() ){ | ||
41 | wid = new MediumMountWidget((*it)->path(), QPixmap(), m_tab ); | ||
42 | m_mediums.append( wid ); | ||
43 | m_tab->addTab( wid, (*it)->name() ); | ||
44 | } | ||
45 | } | ||
46 | } | ||
47 | |||
48 | void MainWindow::slotGlobalChanged(int ) | ||
49 | { | ||
50 | |||
51 | } | ||
52 | void MainWindow::slotCheckingChanged(int ) | ||
53 | { | ||
54 | |||
55 | } | ||