author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kutils | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 16 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 8 |
2 files changed, 13 insertions, 11 deletions
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp index 9c87682..88f17e5 100644 --- a/microkde/kutils/kcmultidialog.cpp +++ b/microkde/kutils/kcmultidialog.cpp | |||
@@ -16,16 +16,18 @@ | |||
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <qhbox.h> | 22 | #include <q3hbox.h> |
23 | #include <qvbox.h> | 23 | #include <q3vbox.h> |
24 | #include <qcursor.h> | 24 | #include <qcursor.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | //Added by qt3to4: | ||
27 | #include <QPixmap> | ||
26 | 28 | ||
27 | #include <klocale.h> | 29 | #include <klocale.h> |
28 | #include <kglobal.h> | 30 | #include <kglobal.h> |
29 | #include <kdebug.h> | 31 | #include <kdebug.h> |
30 | #include <kiconloader.h> | 32 | #include <kiconloader.h> |
31 | #include <kmessagebox.h> | 33 | #include <kmessagebox.h> |
@@ -70,13 +72,13 @@ KCMultiDialog::~KCMultiDialog() | |||
70 | 72 | ||
71 | void KCMultiDialog::slotDefault() | 73 | void KCMultiDialog::slotDefault() |
72 | { | 74 | { |
73 | 75 | ||
74 | int curPageIndex = activePageIndex(); | 76 | int curPageIndex = activePageIndex(); |
75 | 77 | ||
76 | QPtrListIterator<KCModule> it(modules); | 78 | Q3PtrListIterator<KCModule> it(modules); |
77 | for (; it.current(); ++it) | 79 | for (; it.current(); ++it) |
78 | { | 80 | { |
79 | if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) | 81 | if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) |
80 | { | 82 | { |
81 | (*it)->defaults(); | 83 | (*it)->defaults(); |
82 | clientChanged(true); | 84 | clientChanged(true); |
@@ -88,13 +90,13 @@ void KCMultiDialog::slotDefault() | |||
88 | void KCMultiDialog::accept() | 90 | void KCMultiDialog::accept() |
89 | { | 91 | { |
90 | slotOk(); | 92 | slotOk(); |
91 | } | 93 | } |
92 | void KCMultiDialog::slotApply() | 94 | void KCMultiDialog::slotApply() |
93 | { | 95 | { |
94 | QPtrListIterator<KCModule> it(modules); | 96 | Q3PtrListIterator<KCModule> it(modules); |
95 | for (; it.current(); ++it) | 97 | for (; it.current(); ++it) |
96 | (*it)->save(); | 98 | (*it)->save(); |
97 | clientChanged(false); | 99 | clientChanged(false); |
98 | 100 | ||
99 | emit applyClicked(); | 101 | emit applyClicked(); |
100 | 102 | ||
@@ -102,13 +104,13 @@ void KCMultiDialog::slotApply() | |||
102 | 104 | ||
103 | 105 | ||
104 | void KCMultiDialog::slotOk() | 106 | void KCMultiDialog::slotOk() |
105 | { | 107 | { |
106 | qDebug("KCMultiDialog::slotOk clicked"); | 108 | qDebug("KCMultiDialog::slotOk clicked"); |
107 | 109 | ||
108 | QPtrListIterator<KCModule> it(modules); | 110 | Q3PtrListIterator<KCModule> it(modules); |
109 | for (; it.current(); ++it) | 111 | for (; it.current(); ++it) |
110 | (*it)->save(); | 112 | (*it)->save(); |
111 | QDialog::accept(); | 113 | QDialog::accept(); |
112 | 114 | ||
113 | emit okClicked(); | 115 | emit okClicked(); |
114 | } | 116 | } |
@@ -150,15 +152,15 @@ void KCMultiDialog::addModule(const QString& path, bool withfallback) | |||
150 | } | 152 | } |
151 | moduleDict.insert(page, new LoadInfo(path, withfallback)); | 153 | moduleDict.insert(page, new LoadInfo(path, withfallback)); |
152 | if (modules.isEmpty()) | 154 | if (modules.isEmpty()) |
153 | slotAboutToShow(page); | 155 | slotAboutToShow(page); |
154 | } | 156 | } |
155 | */ | 157 | */ |
156 | QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) | 158 | Q3VBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) |
157 | { | 159 | { |
158 | QVBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() ); | 160 | Q3VBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() ); |
159 | return page; | 161 | return page; |
160 | 162 | ||
161 | } | 163 | } |
162 | //US special method for microkde. We dop noty want to load everything dynamically. | 164 | //US special method for microkde. We dop noty want to load everything dynamically. |
163 | void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, const QString& iconname) | 165 | void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, const QString& iconname) |
164 | { | 166 | { |
diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h index 66412ac..78f8a00 100644 --- a/microkde/kutils/kcmultidialog.h +++ b/microkde/kutils/kcmultidialog.h | |||
@@ -19,14 +19,14 @@ | |||
19 | 19 | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef KCMULTIDIALOG_H | 22 | #ifndef KCMULTIDIALOG_H |
23 | #define KCMULTIDIALOG_H | 23 | #define KCMULTIDIALOG_H |
24 | 24 | ||
25 | #include <qptrlist.h> | 25 | #include <q3ptrlist.h> |
26 | #include <qptrdict.h> | 26 | #include <q3ptrdict.h> |
27 | 27 | ||
28 | #include <kdialogbase.h> | 28 | #include <kdialogbase.h> |
29 | #include <kjanuswidget.h> | 29 | #include <kjanuswidget.h> |
30 | #include <kcmodule.h> | 30 | #include <kcmodule.h> |
31 | 31 | ||
32 | /** | 32 | /** |
@@ -72,13 +72,13 @@ public: | |||
72 | **/ | 72 | **/ |
73 | //US void addModule(const QString& module, bool withfallback=true); | 73 | //US void addModule(const QString& module, bool withfallback=true); |
74 | 74 | ||
75 | 75 | ||
76 | //US special method for microkde. We do not want to load everything dynamically. | 76 | //US special method for microkde. We do not want to load everything dynamically. |
77 | void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); | 77 | void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); |
78 | QVBox* getNewVBoxPage(const QString & modulename) ; | 78 | Q3VBox* getNewVBoxPage(const QString & modulename) ; |
79 | 79 | ||
80 | 80 | ||
81 | bool showPage( int index ); | 81 | bool showPage( int index ); |
82 | int activePageIndex() const; | 82 | int activePageIndex() const; |
83 | int pageIndex( QWidget *widget ) const; | 83 | int pageIndex( QWidget *widget ) const; |
84 | 84 | ||
@@ -130,13 +130,13 @@ private: | |||
130 | : path(_path), withfallback(_withfallback) | 130 | : path(_path), withfallback(_withfallback) |
131 | { } | 131 | { } |
132 | QString path; | 132 | QString path; |
133 | bool withfallback; | 133 | bool withfallback; |
134 | }; | 134 | }; |
135 | */ | 135 | */ |
136 | QPtrList<KCModule> modules; | 136 | Q3PtrList<KCModule> modules; |
137 | /* | 137 | /* |
138 | QPtrDict<LoadInfo> moduleDict; | 138 | QPtrDict<LoadInfo> moduleDict; |
139 | QString _docPath; | 139 | QString _docPath; |
140 | */ | 140 | */ |
141 | QString _baseGroup; | 141 | QString _baseGroup; |
142 | 142 | ||