Diffstat (limited to 'microkde/kresources/kcmkresources.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/kcmkresources.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/microkde/kresources/kcmkresources.cpp b/microkde/kresources/kcmkresources.cpp index d600a31..f5eb826 100644 --- a/microkde/kresources/kcmkresources.cpp +++ b/microkde/kresources/kcmkresources.cpp | |||
@@ -1,77 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkresources. | 2 | This file is part of libkresources. |
3 | 3 | ||
4 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 4 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | //Added by qt3to4: | ||
24 | #include <Q3VBoxLayout> | ||
25 | #include <Q3Frame> | ||
23 | 26 | ||
24 | //US #include <kaboutdata.h> | 27 | //US #include <kaboutdata.h> |
25 | //US #include <kgenericfactory.h> | 28 | //US #include <kgenericfactory.h> |
26 | #include <klocale.h> | 29 | #include <klocale.h> |
27 | 30 | ||
28 | #include "configpage.h" | 31 | #include "configpage.h" |
29 | 32 | ||
30 | #include "kcmkresources.h" | 33 | #include "kcmkresources.h" |
31 | 34 | ||
32 | using namespace KRES; | 35 | using namespace KRES; |
33 | 36 | ||
34 | //US typedef KGenericFactory<KCMKResources, QWidget> ResourcesFactory; | 37 | //US typedef KGenericFactory<KCMKResources, QWidget> ResourcesFactory; |
35 | //US K_EXPORT_COMPONENT_FACTORY( kcm_kresources, ResourcesFactory( "kcmkresources" ) ); | 38 | //US K_EXPORT_COMPONENT_FACTORY( kcm_kresources, ResourcesFactory( "kcmkresources" ) ); |
36 | 39 | ||
37 | //US KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& ) | 40 | //US KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& ) |
38 | //US : KCModule( ResourcesFactory::instance(), parent, name ) | 41 | //US : KCModule( ResourcesFactory::instance(), parent, name ) |
39 | KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& ) | 42 | KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& ) |
40 | : KDialogBase( parent, name, true, i18n( "Configure Resources" ), | 43 | : KDialogBase( parent, name, true, i18n( "Configure Resources" ), |
41 | Ok|Cancel, Ok, true ) | 44 | Ok|Cancel, Ok, true ) |
42 | { | 45 | { |
43 | QFrame *main = plainPage(); | 46 | Q3Frame *main = plainPage(); |
44 | 47 | ||
45 | QVBoxLayout *layout = new QVBoxLayout( main ); | 48 | Q3VBoxLayout *layout = new Q3VBoxLayout( main ); |
46 | mConfigPage = new KRES::ConfigPage( main ); | 49 | mConfigPage = new KRES::ConfigPage( main ); |
47 | layout->addWidget( mConfigPage ); | 50 | layout->addWidget( mConfigPage ); |
48 | 51 | ||
49 | 52 | ||
50 | connect( mConfigPage, SIGNAL( changed( bool ) ), SLOT( changed( bool ) ) ); | 53 | connect( mConfigPage, SIGNAL( changed( bool ) ), SLOT( changed( bool ) ) ); |
51 | #ifndef DESKTOP_VERSION | 54 | #ifndef DESKTOP_VERSION |
52 | showMaximized(); | 55 | showMaximized(); |
53 | #endif | 56 | #endif |
54 | } | 57 | } |
55 | 58 | ||
56 | void KCMKResources::changed( bool changed) | 59 | void KCMKResources::changed( bool changed) |
57 | { | 60 | { |
58 | modified = changed; | 61 | modified = changed; |
59 | } | 62 | } |
60 | 63 | ||
61 | void KCMKResources::slotOk() | 64 | void KCMKResources::slotOk() |
62 | { | 65 | { |
63 | if (modified) { | 66 | if (modified) { |
64 | mConfigPage->save(); | 67 | mConfigPage->save(); |
65 | modified = false; | 68 | modified = false; |
66 | } | 69 | } |
67 | 70 | ||
68 | KDialogBase::slotOk(); | 71 | KDialogBase::slotOk(); |
69 | } | 72 | } |
70 | 73 | ||
71 | void KCMKResources::load() | 74 | void KCMKResources::load() |
72 | { | 75 | { |
73 | qDebug("KCMKResources::load" ); | 76 | qDebug("KCMKResources::load" ); |
74 | mConfigPage->load(); | 77 | mConfigPage->load(); |
75 | } | 78 | } |
76 | 79 | ||
77 | void KCMKResources::save() | 80 | void KCMKResources::save() |