Fix remaining kdevelop build problems

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1237331 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent e9be34de5f
commit 2cb2dfe421

@ -850,7 +850,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, const TQString &label ) TQTabWidget *tw, const TQString &label )
: Command( n, fw ), tabWidget( tw ), tabLabel( label ) : Command( n, fw ), tabWidget( tw ), tabLabel( label )
{ {
tabPage = new TQDesignerWidget( formWindow(), tabWidget, "TabPage" ); tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
tabPage->hide(); tabPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
@ -859,7 +859,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
void AddTabPageCommand::execute() void AddTabPageCommand::execute()
{ {
if ( index == -1 ) if ( index == -1 )
index = ( (TQDesignerTabWidget*)tabWidget )->count(); index = ( (QDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage ); tabWidget->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
@ -886,18 +886,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw,
void MoveTabPageCommand::execute() void MoveTabPageCommand::execute()
{ {
((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
void MoveTabPageCommand::unexecute() void MoveTabPageCommand::unexecute()
{ {
((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -908,8 +908,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, TQWidget *page ) TQTabWidget *tw, TQWidget *page )
: Command( n, fw ), tabWidget( tw ), tabPage( page ) : Command( n, fw ), tabWidget( tw ), tabPage( page )
{ {
tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle(); tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
index = ( (TQDesignerTabWidget*)tabWidget )->currentPage(); index = ( (QDesignerTabWidget*)tabWidget )->currentPage();
} }
void DeleteTabPageCommand::execute() void DeleteTabPageCommand::execute()
@ -931,10 +931,10 @@ void DeleteTabPageCommand::unexecute()
// ------------------------------------------------------------ // ------------------------------------------------------------
AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
TQDesignerWidgetStack *ws ) QDesignerWidgetStack *ws )
: Command( n, fw ), widgetStack( ws ) : Command( n, fw ), widgetStack( ws )
{ {
stackPage = new TQDesignerWidget( formWindow(), widgetStack, "WStackPage" ); stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
stackPage->hide(); stackPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
@ -956,7 +956,7 @@ void AddWidgetStackPageCommand::unexecute()
} }
DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
TQDesignerWidgetStack *ws, TQWidget *page ) QDesignerWidgetStack *ws, TQWidget *page )
: Command( n, fw), widgetStack( ws ), stackPage( page ) : Command( n, fw), widgetStack( ws ), stackPage( page )
{ {
index = -1; index = -1;
@ -984,7 +984,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
TQWizard *w, const TQString &label, int i, bool s ) TQWizard *w, const TQString &label, int i, bool s )
: Command( n, fw ), wizard( w ), pageLabel( label ) : Command( n, fw ), wizard( w ), pageLabel( label )
{ {
page = new TQDesignerWidget( formWindow(), wizard, "WizardPage" ); page = new QDesignerWidget( formWindow(), wizard, "WizardPage" );
page->hide(); page->hide();
index = i; index = i;
show = s; show = s;
@ -997,7 +997,7 @@ void AddWizardPageCommand::execute()
index = wizard->pageCount(); index = wizard->pageCount();
wizard->insertPage( page, pageLabel, index ); wizard->insertPage( page, pageLabel, index );
if ( show ) if ( show )
( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1033,7 +1033,7 @@ void DeleteWizardPageCommand::unexecute()
{ {
wizard->insertPage( page, pageLabel, index ); wizard->insertPage( page, pageLabel, index );
if ( show ) if ( show )
( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1857,18 +1857,18 @@ void AddActionToToolBarCommand::execute()
{ {
action->addTo( toolBar ); action->addTo( toolBar );
if ( ::tqqt_cast<TQDesignerAction*>(action) ) { if ( ::tqqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (TQDesignerAction*)action )->widget()->name(); TQString s = ( (QDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) { if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() ); s.remove( 0, TQString( "qt_dead_widget_" ).length() );
( (TQDesignerAction*)action )->widget()->setName( s ); ( (QDesignerAction*)action )->widget()->setName( s );
} }
toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
} else if ( ::tqqt_cast<TQDesignerActionGroup*>(action) ) { } else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) {
if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
} }
} else if ( ::tqqt_cast<QSeparatorAction*>(action) ) { } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
@ -1892,8 +1892,8 @@ void AddActionToToolBarCommand::execute()
if ( !::tqqt_cast<TQAction*>(o) ) if ( !::tqqt_cast<TQAction*>(o) )
continue; continue;
// ### fix it for nested actiongroups // ### fix it for nested actiongroups
if ( ::tqqt_cast<TQDesignerAction*>(o) ) { if ( ::tqqt_cast<QDesignerAction*>(o) ) {
TQDesignerAction *ac = (TQDesignerAction*)o; QDesignerAction *ac = (QDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac ); toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar ); ac->widget()->installEventFilter( toolBar );
if ( index == -1 ) if ( index == -1 )
@ -1912,10 +1912,10 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute() void AddActionToToolBarCommand::unexecute()
{ {
if ( ::tqqt_cast<TQDesignerAction*>(action) ) { if ( ::tqqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (TQDesignerAction*)action )->widget()->name(); TQString s = ( (QDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" ); s.prepend( "qt_dead_widget_" );
( (TQDesignerAction*)action )->widget()->setName( s ); ( (QDesignerAction*)action )->widget()->setName( s );
} }
toolBar->removeAction( action ); toolBar->removeAction( action );
@ -1932,7 +1932,7 @@ void AddActionToToolBarCommand::unexecute()
++it; ++it;
if ( !::tqqt_cast<TQAction*>(o) ) if ( !::tqqt_cast<TQAction*>(o) )
continue; continue;
if ( ::tqqt_cast<TQDesignerAction*>(o) ) { if ( ::tqqt_cast<QDesignerAction*>(o) ) {
o->removeEventFilter( toolBar ); o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o ); toolBar->removeAction( (TQAction*)o );
} }
@ -2426,7 +2426,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
TQToolBox *tw, const TQString &label ) TQToolBox *tw, const TQString &label )
: Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) : Command( n, fw ), toolBox( tw ), toolBoxLabel( label )
{ {
toolBoxPage = new TQDesignerWidget( formWindow(), toolBox, "page" ); toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
toolBoxPage->hide(); toolBoxPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );

@ -445,19 +445,19 @@ private:
TQString tabLabel; TQString tabLabel;
}; };
class TQDesignerWidgetStack; class QDesignerWidgetStack;
class AddWidgetStackPageCommand : public Command class AddWidgetStackPageCommand : public Command
{ {
public: public:
AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
TQDesignerWidgetStack *ws ); QDesignerWidgetStack *ws );
void execute(); void execute();
void unexecute(); void unexecute();
Type type() const { return AddWidgetStackPage; } Type type() const { return AddWidgetStackPage; }
private: private:
TQDesignerWidgetStack *widgetStack; QDesignerWidgetStack *widgetStack;
int index; int index;
TQWidget *stackPage; TQWidget *stackPage;
}; };
@ -466,14 +466,14 @@ class DeleteWidgetStackPageCommand : public Command
{ {
public: public:
DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
TQDesignerWidgetStack *ws, TQWidget *page ); QDesignerWidgetStack *ws, TQWidget *page );
void execute(); void execute();
void unexecute(); void unexecute();
Type type() const { return DeleteWidgetStackPage; } Type type() const { return DeleteWidgetStackPage; }
private: private:
TQDesignerWidgetStack *widgetStack; QDesignerWidgetStack *widgetStack;
int index; int index;
TQWidget *stackPage; TQWidget *stackPage;
}; };

@ -719,7 +719,7 @@ TQPtrList<TQAction> DesignerFormWindowImpl::actionList() const
TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
TQObject* tqparent, const char* name, bool toggle ) TQObject* tqparent, const char* name, bool toggle )
{ {
TQDesignerAction *a = new TQDesignerAction( tqparent ); QDesignerAction *a = new QDesignerAction( tqparent );
a->setName( name ); a->setName( name );
a->setText( text ); a->setText( text );
if ( !icon.isNull() && !icon.pixmap().isNull() ) if ( !icon.isNull() && !icon.pixmap().isNull() )
@ -998,7 +998,7 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" ); PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
if ( !popup ) if ( !popup )
return; return;
TQAction *a = new TQSeparatorAction( 0 ); TQAction *a = new QSeparatorAction( 0 );
popup->insert( a ); popup->insert( a );
} }
@ -1007,7 +1007,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n
if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new TQDesignerToolBar( mw ); TQToolBar *tb = new QDesignerToolBar( mw );
TQString n = name; TQString n = name;
formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); formWindow->unify( TQT_TQOBJECT(tb), n, TRUE );
tb->setName( n ); tb->setName( n );
@ -1019,7 +1019,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a
if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
if ( !tb ) if ( !tb )
return; return;
a->addTo( tb ); a->addTo( tb );
@ -1031,10 +1031,10 @@ void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
if ( !tb ) if ( !tb )
return; return;
TQAction *a = new TQSeparatorAction( 0 ); TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb ); a->addTo( tb );
tb->addAction( a ); tb->addAction( a );
} }

@ -1203,7 +1203,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
return; return;
} }
if ( ::tqqt_cast<TQDesignerToolBar*>(o) ) if ( ::tqqt_cast<QDesignerToolBar*>(o) )
return; return;
if ( select ) { if ( select ) {
@ -1486,7 +1486,7 @@ void FormWindow::deleteWidgets()
if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) )
widgets.append( it.current()->widget() ); widgets.append( it.current()->widget() );
else else
( (TQDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() );
} }
if ( widgets.isEmpty() ) if ( widgets.isEmpty() )
@ -2462,7 +2462,7 @@ bool FormWindow::isDatabaseWidgetUsed() const
bool FormWindow::isDatabaseAware() const bool FormWindow::isDatabaseAware() const
{ {
#ifndef TQT_NO_SQL #ifndef TQT_NO_SQL
if ( TQString(mContainer->className()) == "TQDesignerDataBrowser" || TQString(mContainer->className()) == "TQDesignerDataView" ) if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" )
return TRUE; return TRUE;
return isDatabaseWidgetUsed(); return isDatabaseWidgetUsed();
#else #else

@ -264,14 +264,14 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent()); o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent());
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
} else if ( ::tqqt_cast<TQWizard*>(w->tqparent()->tqparent()) ) { } else if ( ::tqqt_cast<TQWizard*>(w->tqparent()->tqparent()) ) {
((TQDesignerWizard*)w->tqparent()->tqparent())-> ((QDesignerWizard*)w->tqparent()->tqparent())->
setCurrentPage( ( (TQDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) ); setCurrentPage( ( (QDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) );
o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent()); o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent());
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
} else { } else {
( (TQWidgetStack*)w->tqparent() )->raiseWidget( w ); ( (TQWidgetStack*)w->tqparent() )->raiseWidget( w );
if ( (TQWidgetStack*)w->tqparent()->isA( "TQDesignerWidgetStack" ) ) if ( (TQWidgetStack*)w->tqparent()->isA( "QDesignerWidgetStack" ) )
( (TQDesignerWidgetStack*)w->tqparent() )->updateButtons(); ( (QDesignerWidgetStack*)w->tqparent() )->updateButtons();
} }
} else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) { } else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( TQT_TQOBJECT(w) ); formWindow->setActiveObject( TQT_TQOBJECT(w) );
@ -468,7 +468,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
( (HierarchyItem*)item )->setObject( o ); ( (HierarchyItem*)item )->setObject( o );
TQObjectList l = o->childrenListObject(); TQObjectList l = o->childrenListObject();
if ( ::tqqt_cast<TQDesignerToolBar*>(o) ) if ( ::tqqt_cast<QDesignerToolBar*>(o) )
l.clear(); l.clear();
if ( !l.isEmpty() ) { if ( !l.isEmpty() ) {
TQObjectListIt it( l ); TQObjectListIt it( l );
@ -481,8 +481,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
if ( ::tqqt_cast<TQWidgetStack*>(it.current()->tqparent()) || if ( ::tqqt_cast<TQWidgetStack*>(it.current()->tqparent()) ||
::tqqt_cast<TQWidgetStack*>(it.current()) ) { ::tqqt_cast<TQWidgetStack*>(it.current()) ) {
TQObject *obj = it.current(); TQObject *obj = it.current();
TQDesignerTabWidget *tw = ::tqqt_cast<TQDesignerTabWidget*>(it.current()->tqparent()); QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->tqparent());
TQDesignerWizard *dw = ::tqqt_cast<TQDesignerWizard*>(it.current()->tqparent()); QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->tqparent());
TQWidgetStack *stack = 0; TQWidgetStack *stack = 0;
if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) ) if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) )
stack = (TQWidgetStack*)obj; stack = (TQWidgetStack*)obj;
@ -519,7 +519,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
} }
if ( fakeMainWindow ) { if ( fakeMainWindow ) {
TQObjectList *l = o->tqparent()->queryList( "TQDesignerToolBar" ); TQObjectList *l = o->tqparent()->queryList( "QDesignerToolBar" );
TQObject *obj; TQObject *obj;
for ( obj = l->first(); obj; obj = l->next() ) for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item ); insertObject( obj, item );
@ -528,10 +528,10 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
for ( obj = l->first(); obj; obj = l->next() ) for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item ); insertObject( obj, item );
delete l; delete l;
} else if ( ::tqqt_cast<TQDesignerToolBar*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ) { } else if ( ::tqqt_cast<QDesignerToolBar*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ) {
TQPtrList<TQAction> actions; TQPtrList<TQAction> actions;
if ( ::tqqt_cast<TQDesignerToolBar*>(o) ) if ( ::tqqt_cast<QDesignerToolBar*>(o) )
actions = ( (TQDesignerToolBar*)o )->insertedActions(); actions = ( (QDesignerToolBar*)o )->insertedActions();
else else
( (PopupMenuEditor*)o )->insertedActions( actions ); ( (PopupMenuEditor*)o )->insertedActions( actions );
@ -539,27 +539,27 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
it.toLast(); it.toLast();
while ( it.current() ) { while ( it.current() ) {
TQAction *a = it.current(); TQAction *a = it.current();
if ( ::tqqt_cast<TQDesignerAction*>(a) ) { if ( ::tqqt_cast<QDesignerAction*>(a) ) {
TQDesignerAction *da = (TQDesignerAction*)a; QDesignerAction *da = (QDesignerAction*)a;
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( TQT_TQOBJECT(da->widget()), item ); insertObject( TQT_TQOBJECT(da->widget()), item );
} else if ( ::tqqt_cast<TQDesignerActionGroup*>(a) ) { } else if ( ::tqqt_cast<QDesignerActionGroup*>(a) ) {
insertObject( a, item ); insertObject( a, item );
} }
--it; --it;
} }
} else if ( ::tqqt_cast<TQDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) { } else if ( ::tqqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) {
TQObjectList l = o->childrenListObject(); TQObjectList l = o->childrenListObject();
for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { for ( TQObject *obj = l.last(); obj; obj = l.prev() ) {
if ( ::tqqt_cast<TQDesignerAction*>(obj) ) { if ( ::tqqt_cast<QDesignerAction*>(obj) ) {
TQDesignerAction *da = (TQDesignerAction*)obj; QDesignerAction *da = (QDesignerAction*)obj;
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( TQT_TQOBJECT(da->widget()), item ); insertObject( TQT_TQOBJECT(da->widget()), item );
} else if ( ::tqqt_cast<TQDesignerActionGroup*>(obj) ) { } else if ( ::tqqt_cast<QDesignerActionGroup*>(obj) ) {
insertObject( obj, item ); insertObject( obj, item );
} }
} }
@ -651,7 +651,7 @@ void HierarchyList::removeTabPage()
if ( ::tqqt_cast<TQTabWidget*>(w) ) { if ( ::tqqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w; TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) { if ( tw->currentPage() ) {
TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = DeleteTabPageCommand *cmd =
new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ).
tqarg( dtw->pageTitle() ).tqarg( tw->name() ), tqarg( dtw->pageTitle() ).tqarg( tw->name() ),
@ -662,7 +662,7 @@ void HierarchyList::removeTabPage()
} else if ( ::tqqt_cast<TQWizard*>(w) ) { } else if ( ::tqqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) { if ( wiz->currentPage() ) {
TQDesignerWizard *dw = (TQDesignerWizard*)wiz; QDesignerWizard *dw = (QDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = DeleteWizardPageCommand *cmd =
new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ).
tqarg( dw->pageTitle() ).tqarg( wiz->name() ), tqarg( dw->pageTitle() ).tqarg( wiz->name() ),

@ -420,7 +420,7 @@ void MainWindow::setupWorkspace()
dw->setResizeEnabled( TRUE ); dw->setResizeEnabled( TRUE );
dw->setCloseMode( TQDockWindow::Always ); dw->setCloseMode( TQDockWindow::Always );
TQVBox *vbox = new TQVBox( dw ); TQVBox *vbox = new TQVBox( dw );
TQCompletionEdit *edit = new TQCompletionEdit( vbox ); QCompletionEdit *edit = new QCompletionEdit( vbox );
TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) );
TQAccel *a = new TQAccel( this ); TQAccel *a = new TQAccel( this );
a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) );
@ -995,7 +995,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
::tqqt_cast<QDesignerToolBarSeparator*>(o) ) && ::tqqt_cast<QDesignerToolBarSeparator*>(o) ) &&
o->tqparent() o->tqparent()
&& ( ::tqqt_cast<QDesignerToolBar*>(o->tqparent()) && ( ::tqqt_cast<QDesignerToolBar*>(o->tqparent())
|| ::tqqt_cast<TQDesignerWidgetStack*>(o->tqparent())) ) ) { || ::tqqt_cast<QDesignerWidgetStack*>(o->tqparent())) ) ) {
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( ::tqqt_cast<TQToolButton*>(w) || if ( ::tqqt_cast<TQToolButton*>(w) ||
::tqqt_cast<TQComboBox*>(w) || ::tqqt_cast<TQComboBox*>(w) ||
@ -1619,16 +1619,16 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
if ( ::tqqt_cast<TQTabWidget*>(w) ) { if ( ::tqqt_cast<TQTabWidget*>(w) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQDesignerTabWidget*)w )->count() > 1) { if ( ( (QDesignerTabWidget*)w )->count() > 1) {
ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) );
commands.insert( "remove", id ); commands.insert( "remove", id );
} }
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id ); commands.insert( "add", id );
} else if ( ::tqqt_cast<TQDesignerWidgetStack*>(w) ) { } else if ( ::tqqt_cast<QDesignerWidgetStack*>(w) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQDesignerWidgetStack*)w )->count() > 1) { if ( ( (QDesignerWidgetStack*)w )->count() > 1) {
ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) );
commands.insert( "prevpage", id ); commands.insert( "prevpage", id );
ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) );
@ -1808,7 +1808,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute(); cmd->execute();
} else if ( id == commands[ "remove" ] ) { } else if ( id == commands[ "remove" ] ) {
if ( tw->currentPage() ) { if ( tw->currentPage() ) {
TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = DeleteTabPageCommand *cmd =
new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ).
tqarg( dtw->pageTitle() ).tqarg( tw->name() ), tqarg( dtw->pageTitle() ).tqarg( tw->name() ),
@ -1838,7 +1838,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} }
} }
} else if ( ::tqqt_cast<TQWidgetStack*>(w) ) { } else if ( ::tqqt_cast<TQWidgetStack*>(w) ) {
TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w; QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w;
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddWidgetStackPageCommand *cmd = AddWidgetStackPageCommand *cmd =
new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).tqarg( ws->name() ), new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).tqarg( ws->name() ),
@ -1948,7 +1948,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute(); cmd->execute();
} else if ( id == commands[ "remove" ] ) { } else if ( id == commands[ "remove" ] ) {
if ( wiz->currentPage() ) { if ( wiz->currentPage() ) {
TQDesignerWizard *dw = (TQDesignerWizard*)wiz; QDesignerWizard *dw = (QDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = DeleteWizardPageCommand *cmd =
new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ).
tqarg( dw->pageTitle() ).tqarg( wiz->name() ), tqarg( dw->pageTitle() ).tqarg( wiz->name() ),
@ -1964,7 +1964,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "rename" ] ) { } else if ( id == commands[ "rename" ] ) {
bool ok = FALSE; bool ok = FALSE;
TQDesignerWizard *dw = (TQDesignerWizard*)wiz; QDesignerWizard *dw = (QDesignerWizard*)wiz;
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, dw->pageTitle(), &ok, this ); TQLineEdit::Normal, dw->pageTitle(), &ok, this );
if ( ok ) { if ( ok ) {

@ -119,7 +119,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m
removable( TRUE ) removable( TRUE )
{ {
init(); init();
if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast<TQSeparatorAction*>(a) ) if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast<QSeparatorAction*>(a) )
separator = TRUE; separator = TRUE;
if ( a && !a->childrenListObject().isEmpty() ) if ( a && !a->childrenListObject().isEmpty() )
a->installEventFilter( this ); a->installEventFilter( this );
@ -747,7 +747,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
{ {
setFocusAt( mousePressPos ); setFocusAt( mousePressPos );
if ( currentItem() == &addSeparator ) { if ( currentItem() == &addSeparator ) {
PopupMenuEditorItem * i = createItem( new TQSeparatorAction( 0 ) ); PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) );
i->setSeparator( TRUE ); i->setSeparator( TRUE );
return; return;
} }
@ -771,7 +771,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
cmd.execute(); cmd.execute();
// FIXME: start rename after drop // FIXME: start rename after drop
} else if ( draggedItem == &addSeparator ) { } else if ( draggedItem == &addSeparator ) {
draggedItem = createItem( new TQSeparatorAction( 0 ) ); draggedItem = createItem( new QSeparatorAction( 0 ) );
draggedItem->setSeparator( TRUE ); draggedItem->setSeparator( TRUE );
} }
@ -857,7 +857,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
PopupMenuEditorItemPtrDrag::decode( e, &i ); PopupMenuEditorItemPtrDrag::decode( e, &i );
} else { } else {
if ( e->provides( "application/x-designer-actiongroup" ) ) { if ( e->provides( "application/x-designer-actiongroup" ) ) {
TQActionGroup * g = ::tqqt_cast<TQDesignerActionGroup*>(ActionDrag::action()); TQActionGroup * g = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action());
if ( g->usesDropDown() ) { if ( g->usesDropDown() ) {
i = new PopupMenuEditorItem( g, this ); i = new PopupMenuEditorItem( g, this );
TQString n = TQString( g->name() ) + "Item"; TQString n = TQString( g->name() ) + "Item";
@ -877,7 +877,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
dropInPlace( g, e->pos().y() ); dropInPlace( g, e->pos().y() );
} }
} else if ( e->provides( "application/x-designer-actions" ) ) { } else if ( e->provides( "application/x-designer-actions" ) ) {
TQAction *a = ::tqqt_cast<TQDesignerAction*>(ActionDrag::action()); TQAction *a = ::tqqt_cast<QDesignerAction*>(ActionDrag::action());
i = new PopupMenuEditorItem( a, this ); i = new PopupMenuEditorItem( a, this );
} }
} }
@ -1380,7 +1380,7 @@ void PopupMenuEditor::enterEditMode( TQKeyEvent * e )
PopupMenuEditorItem * i = currentItem(); PopupMenuEditorItem * i = currentItem();
if ( i == &addSeparator ) { if ( i == &addSeparator ) {
i = createItem( new TQSeparatorAction( 0 ) ); i = createItem( new QSeparatorAction( 0 ) );
} else if ( i->isSeparator() ) { } else if ( i->isSeparator() ) {
return; return;
} else if ( currentField == 0 ) { } else if ( currentField == 0 ) {

@ -3023,7 +3023,7 @@ static bool tqparent_is_data_aware( TQWidget *w )
{ {
TQWidget *p = w ? w->tqparentWidget() : 0; TQWidget *p = w ? w->tqparentWidget() : 0;
while ( p && !p->isTopLevel() ) { while ( p && !p->isTopLevel() ) {
if ( ::tqqt_cast<TQDesignerDataBrowser*>(p) || ::tqqt_cast<TQDesignerDataView*>(p) ) if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) )
return TRUE; return TRUE;
p = p->tqparentWidget(); p = p->tqparentWidget();
} }
@ -3057,7 +3057,7 @@ void PropertyList::setupProperties()
continue; continue;
if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) )
continue; continue;
if ( ::tqqt_cast<TQDesignerToolBar*>(editor->widget()) || if ( ::tqqt_cast<QDesignerToolBar*>(editor->widget()) ||
::tqqt_cast<MenuBarEditor*>(editor->widget()) ) { ::tqqt_cast<MenuBarEditor*>(editor->widget()) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue; continue;
@ -3235,7 +3235,7 @@ void PropertyList::setupProperties()
} }
} }
if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<TQDesignerToolBar*>(w) && if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) &&
w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "tqlayoutSpacing" ); item = new PropertyLayoutItem( this, item, 0, "tqlayoutSpacing" );
setPropertyValue( item ); setPropertyValue( item );
@ -3269,7 +3269,7 @@ void PropertyList::setupProperties()
} }
if ( !::tqqt_cast<Spacer*>(w) && !::tqqt_cast<TQLayoutWidget*>(w) && if ( !::tqqt_cast<Spacer*>(w) && !::tqqt_cast<TQLayoutWidget*>(w) &&
!::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<TQDesignerToolBar*>(w) ) { !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )

@ -832,7 +832,7 @@ void Resource::paste( const TQString &cb, TQWidget *tqparent )
formwindow->commandHistory()->addCommand( cmd ); formwindow->commandHistory()->addCommand( cmd );
} }
void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ) void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
{ {
if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() ) if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() )
return; return;
@ -851,7 +851,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
TQString attributes; TQString attributes;
if ( grid ) { if ( grid ) {
TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) { if ( item.rowspan * item.colspan != 1 ) {
@ -877,13 +877,13 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
return; return;
} }
TQDesignerWidgetStack* ws = 0; QDesignerWidgetStack* ws = 0;
if ( ::tqqt_cast<TQTabWidget*>(obj) ) { if ( ::tqqt_cast<TQTabWidget*>(obj) ) {
TQTabWidget* tw = (TQTabWidget*) obj; TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar(); TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) { for ( int i = 0; i < tb->count(); ++i ) {
TQTab *t = tb->tabAt( i ); TQTab *t = tb->tabAt( i );
if ( !t ) if ( !t )
@ -911,7 +911,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
delete tmpl; delete tmpl;
} else if ( (ws = ::tqqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) { } else if ( (ws = ::tqqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) { for ( int i = 0; i < ws->count(); ++i ) {
TQWidget *w = ws->page( i ); TQWidget *w = ws->page( i );
if ( !w ) if ( !w )
@ -1349,7 +1349,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
TQString closeTag; TQString closeTag;
// if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer
TQLayout *tqlayout = 0; TQLayout *tqlayout = 0;
TQDesignerGridLayout* grid = 0; QDesignerGridLayout* grid = 0;
if ( !::tqqt_cast<TQSplitter*>(obj) && if ( !::tqqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() && obj->isWidgetType() &&
@ -1370,7 +1370,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
closeTag = makeIndent( indent ) + "</grid>"; closeTag = makeIndent( indent ) + "</grid>";
ts << makeIndent( indent ) << "<grid>" << endl; ts << makeIndent( indent ) << "<grid>" << endl;
++indent; ++indent;
grid = (TQDesignerGridLayout*) tqlayout; grid = (QDesignerGridLayout*) tqlayout;
break; break;
default: default:
break; break;
@ -1807,7 +1807,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
( (TQVBoxLayout*)tqlayout )->addWidget( w ); ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break; break;
case WidgetFactory::Grid: case WidgetFactory::Grid:
( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 ); col, col + colspan - 1 );
break; break;
default: default:
@ -1882,7 +1882,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL
( (TQTabWidget*)tqparent )->insertTab( w, v.toString() ); ( (TQTabWidget*)tqparent )->insertTab( w, v.toString() );
} else if ( ::tqqt_cast<TQWidgetStack*>(tqparent) ) { } else if ( ::tqqt_cast<TQWidgetStack*>(tqparent) ) {
if ( attrib == "id" ) if ( attrib == "id" )
( (TQDesignerWidgetStack*)tqparent )->insertPage( w, v.toInt() ); ( (QDesignerWidgetStack*)tqparent )->insertPage( w, v.toInt() );
} else if ( ::tqqt_cast<TQToolBox*>(tqparent) ) { } else if ( ::tqqt_cast<TQToolBox*>(tqparent) ) {
if ( attrib == "label" ) if ( attrib == "label" )
( (TQToolBox*)tqparent )->addItem( w, v.toString() ); ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
@ -2132,7 +2132,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL
if ( ::tqqt_cast<TQBoxLayout*>(tqlayout) ) if ( ::tqqt_cast<TQBoxLayout*>(tqlayout) )
( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() ); ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() );
else else
( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
spacer->tqalignment() ); spacer->tqalignment() );
} }
return spacer; return spacer;
@ -3005,7 +3005,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
TQDomElement n = e; TQDomElement n = e;
TQAction *a = 0; TQAction *a = 0;
if ( n.tagName() == "action" ) { if ( n.tagName() == "action" ) {
a = new TQDesignerAction( tqparent ); a = new QDesignerAction( tqparent );
MetaDataBase::addEntry( a ); MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement(); TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE; bool hasMenuText = FALSE;
@ -3025,7 +3025,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
if ( !::tqqt_cast<TQAction*>(tqparent) ) if ( !::tqqt_cast<TQAction*>(tqparent) )
formwindow->actionList().append( a ); formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) { } else if ( n.tagName() == "actiongroup" ) {
a = new TQDesignerActionGroup( tqparent ); a = new QDesignerActionGroup( tqparent );
MetaDataBase::addEntry( a ); MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement(); TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE; bool hasMenuText = FALSE;
@ -3079,13 +3079,13 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl; ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++; indent++;
saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); saveObjectProperties( TQT_TQOBJECT(tb), ts, indent );
TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions(); TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::tqqt_cast<TQSeparatorAction*>(a) ) { if ( ::tqqt_cast<QSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl; ts << makeIndent( indent ) << "<separator/>" << endl;
} else { } else {
if ( ::tqqt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) { if ( ::tqqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
TQWidget *w = ( (TQDesignerAction*)a )->widget(); TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\"" ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl; << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
indent++; indent++;
@ -3143,11 +3143,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea
{ {
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
TQAction *a = i->action(); TQAction *a = i->action();
if ( ::tqqt_cast<TQSeparatorAction*>(a) ) if ( ::tqqt_cast<QSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl; ts << makeIndent( indent ) << "<separator/>" << endl;
else if ( ::tqqt_cast<TQDesignerAction*>(a) ) else if ( ::tqqt_cast<QDesignerAction*>(a) )
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl; ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
else if ( ::tqqt_cast<TQDesignerActionGroup*>(a) ) else if ( ::tqqt_cast<QDesignerActionGroup*>(a) )
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl; ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu(); PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) { if ( s && s->count() ) {
@ -3168,11 +3168,11 @@ void Resource::loadToolBars( const TQDomElement &e )
{ {
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
TQDesignerToolBar *tb = 0; QDesignerToolBar *tb = 0;
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) { if ( n.tagName() == "toolbar" ) {
TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
tb = new TQDesignerToolBar( mw, dock ); tb = new QDesignerToolBar( mw, dock );
TQDomElement n2 = n.firstChild().toElement(); TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) { while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) { if ( n2.tagName() == "action" ) {
@ -3182,12 +3182,12 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a ); tb->addAction( a );
} }
} else if ( n2.tagName() == "separator" ) { } else if ( n2.tagName() == "separator" ) {
TQAction *a = new TQSeparatorAction( 0 ); TQAction *a = new QSeparatorAction( 0 );
a->addTo( tb ); a->addTo( tb );
tb->addAction( a ); tb->addAction( a );
} else if ( n2.tagName() == "widget" ) { } else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb ); TQWidget *w = (TQWidget*)createObject( n2, tb );
TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) ); QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) );
a->addTo( tb ); a->addTo( tb );
tb->addAction( a ); tb->addAction( a );
tb->installEventFilters( w ); tb->installEventFilters( w );
@ -3244,7 +3244,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
loadPopupMenu( i->subMenu(), n ); loadPopupMenu( i->subMenu(), n );
} }
} else if ( n.tagName() == "separator" ) { } else if ( n.tagName() == "separator" ) {
a = new TQSeparatorAction( 0 ); a = new QSeparatorAction( 0 );
p->insert( a ); p->insert( a );
} }
n = n.nextSibling().toElement(); n = n.nextSibling().toElement();

@ -44,7 +44,7 @@ class TQPalette;
class FormWindow; class FormWindow;
class MainWindow; class MainWindow;
class TQDomElement; class TQDomElement;
class TQDesignerGridLayout; class QDesignerGridLayout;
class TQListViewItem; class TQListViewItem;
class TQMainWindow; class TQMainWindow;
struct LanguageInterface; struct LanguageInterface;
@ -86,7 +86,7 @@ public:
static bool saveFormCode( FormFile *formfile, LanguageInterface *langIface ); static bool saveFormCode( FormFile *formfile, LanguageInterface *langIface );
private: private:
void saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ); void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent );
void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent );
void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent );
void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent );

@ -653,7 +653,7 @@ bool Workspace::eventFilter( TQObject *o, TQEvent * e )
return TQListView::eventFilter( o, e ); return TQListView::eventFilter( o, e );
} }
void Workspace::setBufferEdit( TQCompletionEdit *edit ) void Workspace::setBufferEdit( QCompletionEdit *edit )
{ {
bufferEdit = edit; bufferEdit = edit;
connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ),

@ -39,7 +39,7 @@ class MainWindow;
class Project; class Project;
class SourceFile; class SourceFile;
class FormFile; class FormFile;
class TQCompletionEdit; class QCompletionEdit;
class SourceEditor; class SourceEditor;
class WorkspaceItem : public TQListViewItem class WorkspaceItem : public TQListViewItem
@ -98,7 +98,7 @@ public:
void contentsDragEnterEvent( TQDragEnterEvent *e ); void contentsDragEnterEvent( TQDragEnterEvent *e );
void contentsDragMoveEvent( TQDragMoveEvent *e ); void contentsDragMoveEvent( TQDragMoveEvent *e );
void setBufferEdit( TQCompletionEdit *edit ); void setBufferEdit( QCompletionEdit *edit );
public slots: public slots:
@ -141,7 +141,7 @@ private:
MainWindow *mainWindow; MainWindow *mainWindow;
Project *project; Project *project;
WorkspaceItem *projectItem; WorkspaceItem *projectItem;
TQCompletionEdit *bufferEdit; QCompletionEdit *bufferEdit;
bool blockNewForms; bool blockNewForms;
void updateBufferEdit(); void updateBufferEdit();
bool completionDirty; bool completionDirty;

Loading…
Cancel
Save