[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebindings/kjsembed
From: Ian Reinhart Geiser <geiseri () kde ! org>
Date: 2004-12-29 17:51:47
Message-ID: 20041229175147.AFC051BBFA () office ! kde ! org
[Download RAW message or body]
CVS commit by geiseri:
Workarounds for QWizard and QTabWidget pages to appear as direct children of
the imported ui file.
M +31 -24 jsfactory_imp.cpp 1.26
--- kdebindings/kjsembed/jsfactory_imp.cpp #1.25:1.26
@@ -22,4 +22,6 @@
#include <qobjectlist.h>
#include <qtoolbox.h>
+#include <qtabwidget.h>
+#include <qwizard.h>
#include "global.h"
@@ -264,20 +266,25 @@ void JSFactoryImp::publishChildren(QObje
// Hack to publish QToolBoxes children
QToolBox *box = dynamic_cast<QToolBox*>(obj);
+ QTabWidget *tab = dynamic_cast<QTabWidget*>(obj);
+ QWizard *wiz = dynamic_cast<QWizard*>(obj);
- if( box )
- {
+ if( box ) {
int count = box->count();
for( int idx = 0; idx < count; ++idx)
publishChildren(box->item(idx),newParent);
- }
- else
- {
+ } else if ( tab ) {
+ int count = tab->count();
+ for( int idx = 0; idx < count; ++idx)
+ publishChildren(tab->page(idx),newParent);
+ } else if ( wiz ) {
+ int count = wiz->pageCount();
+ for( int idx = 0; idx < count; ++idx)
+ publishChildren(wiz->page(idx),newParent);
+ } else {
const QObjectList *lst = obj->children();
- if ( lst )
- {
+ if ( lst ) {
QObjectListIt it( *lst );
QObject *child;
- while ( (child = it.current()) != 0 )
- {
+ while ( (child = it.current()) != 0 ) {
publishChildren( child, newParent);
++it;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic