summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/hierarchyview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/hierarchyview.cpp')
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp
index a617ac31..c91f5333 100644
--- a/kdevdesigner/designer/hierarchyview.cpp
+++ b/kdevdesigner/designer/hierarchyview.cpp
@@ -68,15 +68,15 @@ TQListViewItem *newItem = 0;
static TQPluginManager<ClassBrowserInterface> *classBrowserInterfaceManager = 0;
-HierarchyItem::HierarchyItem( Type type, TQListViewItem *tqparent, TQListViewItem *after,
+HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( tqparent, after, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
{
}
-HierarchyItem::HierarchyItem( Type type, TQListView *tqparent, TQListViewItem *after,
+HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( tqparent, after, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type )
{
}
@@ -172,8 +172,8 @@ void HierarchyItem::cancelRename( int col )
-HierarchyList::HierarchyList( TQWidget *tqparent, FormWindow *fw, bool doConnects )
- : TQListView( tqparent ), formWindow( fw )
+HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects )
+ : TQListView( parent ), formWindow( fw )
{
DesignerFormPix = SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance());
DesignerLayoutPix = SmallIcon( "designer_layout.png" , KDevDesignerPartFactory::instance());
@@ -258,20 +258,20 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( o->isWidgetType() ) {
TQWidget *w = (TQWidget*)o;
if ( !formWindow->widgets()->find( w ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(w->tqparent()) ) {
- if (::tqqt_cast<TQTabWidget*>(w->tqparent()->tqparent()) ) {
- ((TQTabWidget*)w->tqparent()->tqparent())->showPage( w );
- o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent());
+ if ( ::tqqt_cast<TQWidgetStack*>(w->parent()) ) {
+ if (::tqqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
+ ((TQTabWidget*)w->parent()->parent())->showPage( w );
+ o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
- } else if ( ::tqqt_cast<TQWizard*>(w->tqparent()->tqparent()) ) {
- ((QDesignerWizard*)w->tqparent()->tqparent())->
- setCurrentPage( ( (QDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) );
- o = TQT_TQOBJECT((TQWidget*)w->tqparent()->tqparent());
+ } else if ( ::tqqt_cast<TQWizard*>(w->parent()->parent()) ) {
+ ((QDesignerWizard*)w->parent()->parent())->
+ setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
+ o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
} else {
- ( (TQWidgetStack*)w->tqparent() )->raiseWidget( w );
- if ( (TQWidgetStack*)w->tqparent()->isA( "QDesignerWidgetStack" ) )
- ( (QDesignerWidgetStack*)w->tqparent() )->updateButtons();
+ ( (TQWidgetStack*)w->parent() )->raiseWidget( w );
+ if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
+ ( (QDesignerWidgetStack*)w->parent() )->updateButtons();
}
} else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( TQT_TQOBJECT(w) );
@@ -397,7 +397,7 @@ void HierarchyList::setOpen( TQListViewItem *i, bool b )
TQListView::setOpen( i, b );
}
-void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
+void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
@@ -433,29 +433,29 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
#endif
TQString name = o->name();
- if ( ::tqqt_cast<TQWidgetStack*>(o->tqparent()) ) {
- if ( ::tqqt_cast<TQTabWidget*>(o->tqparent()->tqparent()) )
- name = ( (TQTabWidget*)o->tqparent()->tqparent() )->tabLabel( (TQWidget*)o );
- else if ( ::tqqt_cast<TQWizard*>(o->tqparent()->tqparent()) )
- name = ( (TQWizard*)o->tqparent()->tqparent() )->title( (TQWidget*)o );
+ if ( ::tqqt_cast<TQWidgetStack*>(o->parent()) ) {
+ if ( ::tqqt_cast<TQTabWidget*>(o->parent()->parent()) )
+ name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
+ else if ( ::tqqt_cast<TQWizard*>(o->parent()->parent()) )
+ name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
}
TQToolBox *tb;
- if ( o->tqparent() && o->tqparent()->tqparent() &&
- (tb = ::tqqt_cast<TQToolBox*>(o->tqparent()->tqparent()->tqparent())) )
+ if ( o->parent() && o->parent()->parent() &&
+ (tb = ::tqqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) {
- name = o->tqparent()->name();
+ name = o->parent()->name();
className = TQMAINWINDOW_OBJECT_NAME_STRING;
}
- if ( !tqparent )
+ if ( !parent )
item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo );
else
- item = new HierarchyItem( HierarchyItem::Widget, tqparent, 0, name, className, dbInfo );
+ item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo );
item->setOpen( TRUE );
- if ( !tqparent )
+ if ( !parent )
item->setPixmap( 0, DesignerFormPix );
else if ( ::tqqt_cast<TQLayoutWidget*>(o) )
item->setPixmap( 0, DesignerLayoutPix );
@@ -478,16 +478,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
( (TQWidget*)it.current() )->isHidden() )
continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(it.current()->tqparent()) ||
+ if ( ::tqqt_cast<TQWidgetStack*>(it.current()->parent()) ||
::tqqt_cast<TQWidgetStack*>(it.current()) ) {
TQObject *obj = it.current();
- QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->tqparent());
- QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->tqparent());
+ QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->parent());
+ QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->parent());
TQWidgetStack *stack = 0;
if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) )
stack = (TQWidgetStack*)obj;
else
- stack = (TQWidgetStack*)obj->tqparent();
+ stack = (TQWidgetStack*)obj->parent();
if ( widgetStacks->findRef( stack ) != -1 )
continue;
widgetStacks->append( stack );
@@ -505,10 +505,10 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
insertObject( obj, item );
}
delete l2;
- } else if ( ::tqqt_cast<TQToolBox*>(it.current()->tqparent()) ) {
+ } else if ( ::tqqt_cast<TQToolBox*>(it.current()->parent()) ) {
if ( !::tqqt_cast<TQScrollView*>(it.current()) )
continue;
- TQToolBox *tb = (TQToolBox*)it.current()->tqparent();
+ TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i )
insertObject( TQT_TQOBJECT(tb->item( i )), item );
}
@@ -519,12 +519,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
}
if ( fakeMainWindow ) {
- TQObjectList *l = o->tqparent()->queryList( "QDesignerToolBar" );
+ TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" );
TQObject *obj;
for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item );
delete l;
- l = o->tqparent()->queryList( "MenuBarEditor" );
+ l = o->parent()->queryList( "MenuBarEditor" );
for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item );
delete l;
@@ -676,8 +676,8 @@ void HierarchyList::removeTabPage()
// ------------------------------------------------------------
-FormDefinitionView::FormDefinitionView( TQWidget *tqparent, FormWindow *fw )
- : HierarchyList( tqparent, fw, TRUE )
+FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw )
+ : HierarchyList( parent, fw, TRUE )
{
header()->hide();
removeColumn( 1 );
@@ -976,7 +976,7 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
HierarchyItem::Type t = getChildType( i->rtti() );
if ( (int)t == i->rtti() )
- i = i->tqparent();
+ i = i->parent();
if ( formWindow->project()->isCpp() )
switch( i->rtti() ) {
@@ -1100,7 +1100,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
if ( !lIface )
return;
if ( i->rtti() == HierarchyItem::Definition )
- i = i->tqparent();
+ i = i->parent();
ListEditor dia( this, 0, TRUE );
dia.setCaption( i18n( "Edit %1" ).tqarg( i->text( 0 ) ) );
TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
@@ -1114,7 +1114,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
} else if ( res == NEW ) {
HierarchyItem::Type t = getChildType( i->rtti() );
if ( (int)t == i->rtti() )
- i = i->tqparent();
+ i = i->parent();
switch( i->rtti() ) {
case HierarchyItem::SlotPublic:
execFunctionDialog( "public", "slot", TRUE );
@@ -1153,7 +1153,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else {
- TQListViewItem *p = i->tqparent();
+ TQListViewItem *p = i->parent();
delete i;
save( p, 0 );
}
@@ -1178,9 +1178,9 @@ void FormDefinitionView::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
- if ( !i->tqparent() )
+ if ( !i->parent() )
return;
- save( i->tqparent(), i );
+ save( i->parent(), i );
}
@@ -1235,8 +1235,8 @@ void FormDefinitionView::addVariable( const TQString &varName, const TQString &a
// ------------------------------------------------------------
-HierarchyView::HierarchyView( TQWidget *tqparent )
- : TQTabWidget( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+HierarchyView::HierarchyView( TQWidget *parent )
+ : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
formwindow = 0;