summaryrefslogtreecommitdiffstats
path: root/kommander/editor/hierarchyview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/hierarchyview.cpp')
-rw-r--r--kommander/editor/hierarchyview.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp
index ee5c6642..9ec77020 100644
--- a/kommander/editor/hierarchyview.cpp
+++ b/kommander/editor/hierarchyview.cpp
@@ -74,15 +74,15 @@ static const char * const folder_xpm[]={
TQListViewItem *newItem = 0;
-HierarchyItem::HierarchyItem( Type type, TQListViewItem *tqparent,
+HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( tqparent, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type )
{
}
-HierarchyItem::HierarchyItem( Type type, TQListView *tqparent,
+HierarchyItem::HierarchyItem( Type type, TQListView *parent,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( tqparent, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type )
{
}
@@ -177,8 +177,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 )
{
init_colors();
@@ -255,15 +255,15 @@ void HierarchyList::objectClicked( TQListViewItem *i )
}
if ( !formWindow->widgets()->find( w ) ) {
- if ( w->tqparent() && w->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
- w->tqparent()->tqparent() &&
- ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
- w->tqparent()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) {
- if ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- ( (TQTabWidget*)w->tqparent()->tqparent() )->showPage( w );
+ if ( w->parent() && w->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
+ w->parent()->parent() &&
+ ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
+ w->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) {
+ if ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ ( (TQTabWidget*)w->parent()->parent() )->showPage( w );
else
- ( (QDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (QDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) );
- w = (TQWidget*)w->tqparent()->tqparent();
+ ( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
+ w = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
} else {
return;
@@ -353,7 +353,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 )
{
bool fakeMainWindow = false;
if ( o && o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
@@ -387,30 +387,30 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
#endif
TQString name = o->name();
- if ( o->tqparent() && o->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
- o->tqparent()->tqparent() ) {
- if ( o->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- name = ( (TQTabWidget*)o->tqparent()->tqparent() )->tabLabel( (TQWidget*)o );
- else if ( o->tqparent()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
- name = ( (TQWizard*)o->tqparent()->tqparent() )->title( (TQWidget*)o );
+ if ( o->parent() && o->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
+ o->parent()->parent() ) {
+ if ( o->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
+ else if ( o->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ 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, name, className, dbInfo );
else
- item = new HierarchyItem( HierarchyItem::Widget, tqparent, name, className, dbInfo );
- if ( !tqparent )
+ item = new HierarchyItem( HierarchyItem::Widget, parent, name, className, dbInfo );
+ if ( !parent )
item->setPixmap( 0, PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
else if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
item->setPixmap( 0, PixmapChooser::loadPixmap( "tqlayout.xpm", PixmapChooser::Small ) );
@@ -428,18 +428,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() )
continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
- if ( it.current()->tqparent() &&
- ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
- it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) &&
+ if ( it.current()->parent() &&
+ ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
+ it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) &&
it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
TQObject *obj = it.current();
TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false );
QDesignerTabWidget *tw = 0;
QDesignerWizard *dw = 0;
- if ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- tw = (QDesignerTabWidget*)it.current()->tqparent();
- if ( it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
- dw = (QDesignerWizard*)it.current()->tqparent();
+ if ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ tw = (QDesignerTabWidget*)it.current()->parent();
+ if ( it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ dw = (QDesignerWizard*)it.current()->parent();
TQWidgetStack *stack = (TQWidgetStack*)obj;
for ( obj = l2->last(); obj; obj = l2->prev() ) {
if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 ||
@@ -449,10 +449,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 );
}
@@ -598,8 +598,8 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T
item->startRename( 0 );
}
-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;