author | harlekin <harlekin> | 2003-03-23 14:17:43 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-23 14:17:43 (UTC) |
commit | dca448bad29f0afbab1fc0ffe493560fd927c1b5 (patch) (unidiff) | |
tree | 178ab4781f5952f6e333659531cb7e0db0276f24 /noncore/settings/mediummount/mainwindow.cc | |
parent | 013194659dde417767c62ab2fe18b09ea21558eb (diff) | |
download | opie-dca448bad29f0afbab1fc0ffe493560fd927c1b5.zip opie-dca448bad29f0afbab1fc0ffe493560fd927c1b5.tar.gz opie-dca448bad29f0afbab1fc0ffe493560fd927c1b5.tar.bz2 |
a dialog now x does not save ok saves, also some layout changes
Diffstat (limited to 'noncore/settings/mediummount/mainwindow.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/mediummount/mainwindow.cc | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/noncore/settings/mediummount/mainwindow.cc b/noncore/settings/mediummount/mainwindow.cc index 6d9bb80..bfd1e21 100644 --- a/noncore/settings/mediummount/mainwindow.cc +++ b/noncore/settings/mediummount/mainwindow.cc | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | #include <qtabwidget.h> | 3 | #include <qtabwidget.h> |
4 | #include <qlayout.h> | 4 | #include <qlayout.h> |
5 | #include <qtooltip.h> | ||
6 | #include <qwhatsthis.h> | ||
5 | 7 | ||
6 | #include <qpe/storage.h> | 8 | #include <qpe/storage.h> |
7 | 9 | ||
@@ -13,22 +15,25 @@ | |||
13 | using namespace MediumMountSetting; | 15 | using namespace MediumMountSetting; |
14 | 16 | ||
15 | 17 | ||
16 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags ) | 18 | MainWindow::MainWindow( QWidget *parent, const char *name, bool modal, WFlags ) |
17 | : QMainWindow( parent, name, WStyle_ContextHelp ) | 19 | : QDialog( parent, name, modal, WStyle_ContextHelp ) |
18 | 20 | ||
19 | { | 21 | { |
20 | setCaption ( tr( "Medium Mount Settings" )); | 22 | setCaption ( tr( "Medium Mount Settings" )); |
21 | 23 | ||
22 | // m_lay = new QVBoxLayout( this ); | 24 | m_lay = new QVBoxLayout( this ); |
23 | m_tab = new QTabWidget( this ); | 25 | |
24 | setCentralWidget( m_tab ); | 26 | m_tab = new QTabWidget( this ); |
25 | init(); | 27 | |
28 | m_lay->addWidget( m_tab ); | ||
29 | |||
30 | init(); | ||
26 | } | 31 | } |
27 | 32 | ||
28 | MainWindow::~MainWindow() | 33 | MainWindow::~MainWindow() |
29 | { | 34 | { |
30 | |||
31 | } | 35 | } |
36 | |||
32 | void MainWindow::init() | 37 | void MainWindow::init() |
33 | { | 38 | { |
34 | m_global = new MediumGlobalWidget( m_tab, "test drive" ); | 39 | m_global = new MediumGlobalWidget( m_tab, "test drive" ); |
@@ -47,6 +52,19 @@ void MainWindow::init() | |||
47 | } | 52 | } |
48 | } | 53 | } |
49 | 54 | ||
55 | void MainWindow::accept() | ||
56 | { | ||
57 | m_global->writeConfig(); | ||
58 | |||
59 | MediumMountWidget *confWidget; | ||
60 | for ( confWidget = m_mediums.first(); confWidget != 0; | ||
61 | confWidget = m_mediums.next() ) { | ||
62 | confWidget->writeConfig(); | ||
63 | } | ||
64 | |||
65 | QDialog::accept(); | ||
66 | } | ||
67 | |||
50 | void MainWindow::slotGlobalChanged(int ) | 68 | void MainWindow::slotGlobalChanged(int ) |
51 | { | 69 | { |
52 | 70 | ||