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.cpp194
1 files changed, 97 insertions, 97 deletions
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp
index 11531834..781a62a3 100644
--- a/kdevdesigner/designer/hierarchyview.cpp
+++ b/kdevdesigner/designer/hierarchyview.cpp
@@ -90,14 +90,14 @@ void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( rtti() == Function &&
MainWindow::self->currProject()->isCpp() &&
( txt == "init()" || txt == "destroy()" ) ) {
- listView()->setUpdatesEnabled( FALSE );
+ listView()->setUpdatesEnabled( false );
if ( txt == "init()" )
setText( 0, txt + " " + "(Constructor)" );
else
setText( 0, txt + " " + "(Destructor)" );
TQListViewItem::paintCell( p, g, column, width, align );
setText( 0, txt );
- listView()->setUpdatesEnabled( TRUE );
+ listView()->setUpdatesEnabled( true );
} else {
TQListViewItem::paintCell( p, g, column, width, align );
}
@@ -183,8 +183,8 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
init_colors();
setDefaultRenameAction( Accept );
- header()->setMovingEnabled( FALSE );
- header()->setStretchEnabled( TRUE );
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
normalMenu = 0;
tabWidgetMenu = 0;
addColumn( i18n( "Name" ) );
@@ -193,46 +193,46 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) );
(void)*selectedBack; // hack
setPalette( p );
- disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
- this, TQT_SLOT( changeSortColumn( int ) ) );
+ disconnect( header(), TQ_SIGNAL( sectionClicked( int ) ),
+ this, TQ_SLOT( changeSortColumn( int ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
if ( doConnects ) {
- connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
- this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
- this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
- this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ),
- this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQ_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQ_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQ_SLOT( objectDoubleClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQ_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ),
+ this, TQ_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) );
}
- deselect = TRUE;
+ deselect = true;
setColumnWidthMode( 1, Manual );
}
void HierarchyList::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Shift || e->key() == Key_Control )
- deselect = FALSE;
+ deselect = false;
else
- deselect = TRUE;
+ deselect = true;
TQListView::keyPressEvent( e );
}
void HierarchyList::keyReleaseEvent( TQKeyEvent *e )
{
- deselect = TRUE;
+ deselect = true;
TQListView::keyReleaseEvent( e );
}
void HierarchyList::viewportMousePressEvent( TQMouseEvent *e )
{
if ( e->state() & ShiftButton || e->state() & ControlButton )
- deselect = FALSE;
+ deselect = false;
else
- deselect = TRUE;
+ deselect = true;
TQListView::viewportMousePressEvent( e );
}
@@ -251,8 +251,8 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
return 0;
if ( formWindow == o ) {
if ( deselect )
- formWindow->clearSelection( FALSE );
- formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) );
+ formWindow->clearSelection( false );
+ formWindow->emitShowProperties( formWindow );
return 0;
}
if ( o->isWidgetType() ) {
@@ -261,20 +261,20 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) {
if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
((TQTabWidget*)w->parent()->parent())->showPage( w );
- o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
- formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
+ o = (TQWidget*)w->parent()->parent();
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else if ( ::tqt_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()) );
+ o = (TQWidget*)w->parent()->parent();
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else {
( (TQWidgetStack*)w->parent() )->raiseWidget( w );
if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
( (QDesignerWidgetStack*)w->parent() )->updateButtons();
}
} else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
- formWindow->setActiveObject( TQT_TQOBJECT(w) );
+ formWindow->setActiveObject( w );
} else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else {
@@ -283,11 +283,11 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
}
} else if ( ::tqt_cast<TQAction*>(o) ) {
MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o );
- deselect = TRUE;
+ deselect = true;
}
if ( deselect )
- formWindow->clearSelection( FALSE );
+ formWindow->clearSelection( false );
return o;
}
@@ -303,7 +303,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i )
if ( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
- formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
+ formWindow->selectWidget( w, true );
}
}
@@ -314,7 +314,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
return;
if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) {
TQWidget *w = (TQWidget*)o;
- formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
+ formWindow->selectWidget( w, true );
}
}
@@ -388,7 +388,7 @@ void HierarchyList::setup()
if ( !widgetStacks )
widgetStacks = new TQPtrList<TQWidgetStack>;
if ( w )
- insertObject( TQT_TQOBJECT(w), 0 );
+ insertObject( w, 0 );
widgetStacks->clear();
}
@@ -401,12 +401,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
- bool fakeMainWindow = FALSE;
+ bool fakeMainWindow = false;
if ( ::tqt_cast<TQMainWindow*>(o) ) {
- TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) {
o = cw;
- fakeMainWindow = TRUE;
+ fakeMainWindow = true;
}
}
TQListViewItem *item = 0;
@@ -454,7 +454,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo );
else
item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo );
- item->setOpen( TRUE );
+ item->setOpen( true );
if ( !parent )
item->setPixmap( 0, DesignerFormPix );
else if ( ::tqt_cast<TQLayoutWidget*>(o) )
@@ -491,7 +491,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( widgetStacks->findRef( stack ) != -1 )
continue;
widgetStacks->append( stack );
- TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE );
+ TQObjectList *l2 = stack->queryList( "TQWidget", 0, true, false );
for ( obj = l2->last(); obj; obj = l2->prev() ) {
if ( qstrcmp( obj->className(),
"TQWidgetStackPrivate::Invisible" ) == 0 ||
@@ -510,7 +510,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
continue;
TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i )
- insertObject( TQT_TQOBJECT(tb->item( i )), item );
+ insertObject( tb->item( i ), item );
}
continue;
}
@@ -544,7 +544,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( da->supportsMenu() )
insertObject( da, item );
else
- insertObject( TQT_TQOBJECT(da->widget()), item );
+ insertObject( da->widget(), item );
} else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) {
insertObject( a, item );
}
@@ -558,7 +558,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( da->supportsMenu() )
insertObject( da, item );
else
- insertObject( TQT_TQOBJECT(da->widget()), item );
+ insertObject( da->widget(), item );
} else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) {
insertObject( obj, item );
}
@@ -569,7 +569,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
MenuBarEditorItem *md = mb->item( i );
if ( !md || !md->menu() )
continue;
- insertObject( TQT_TQOBJECT(md->menu()), item );
+ insertObject( md->menu(), item );
}
}
}
@@ -579,10 +579,10 @@ void HierarchyList::setCurrent( TQObject *o )
TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->object() == o ) {
- blockSignals( TRUE );
+ blockSignals( true );
setCurrentItem( it.current() );
ensureItemVisible( it.current() );
- blockSignals( FALSE );
+ blockSignals( false );
return;
}
++it;
@@ -612,8 +612,8 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
if ( !tabWidgetMenu )
tabWidgetMenu =
formWindow->mainWindow()->setupTabWidgetHierarchyMenu(
- this, TQT_SLOT( addTabPage() ),
- TQT_SLOT( removeTabPage() ) );
+ this, TQ_SLOT( addTabPage() ),
+ TQ_SLOT( removeTabPage() ) );
tabWidgetMenu->popup( p );
}
}
@@ -667,7 +667,7 @@ void HierarchyList::removeTabPage()
new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ).
arg( dw->pageTitle() ).arg( wiz->name() ),
formWindow, wiz,
- wiz->indexOf( wiz->currentPage() ), TRUE );
+ wiz->indexOf( wiz->currentPage() ), true );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -677,13 +677,13 @@ void HierarchyList::removeTabPage()
// ------------------------------------------------------------
FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw )
- : HierarchyList( parent, fw, TRUE )
+ : HierarchyList( parent, fw, true )
{
header()->hide();
removeColumn( 1 );
- connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
- this, TQT_SLOT( renamed( TQListViewItem * ) ) );
- popupOpen = FALSE;
+ connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQ_SLOT( renamed( TQListViewItem * ) ) );
+ popupOpen = false;
}
void FormDefinitionView::setup()
@@ -710,14 +710,14 @@ void FormDefinitionView::setup()
HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0,
i18n( *dit ), TQString(), TQString() );
itemDef->setPixmap( 0, DesignerFolderPix );
- itemDef->setOpen( TRUE );
+ itemDef->setOpen( true );
TQStringList entries =
lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() );
HierarchyItem *item = 0;
for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) {
item = new HierarchyItem( HierarchyItem::Definition,
itemDef, item, *eit, TQString(), TQString() );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
}
}
lIface->release();
@@ -729,7 +729,7 @@ void FormDefinitionView::setup()
void FormDefinitionView::setupVariables()
{
bool pubOpen, protOpen, privOpen;
- pubOpen = protOpen = privOpen = TRUE;
+ pubOpen = protOpen = privOpen = true;
TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::VarParent ) {
@@ -753,7 +753,7 @@ void FormDefinitionView::setupVariables()
HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ),
TQString(), TQString() );
itemVar->setPixmap( 0, DesignerFolderPix );
- itemVar->setOpen( TRUE );
+ itemVar->setOpen( true );
itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ),
TQString(), TQString() );
@@ -762,7 +762,7 @@ void FormDefinitionView::setupVariables()
itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ),
TQString(), TQString() );
- TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
if ( !varList.isEmpty() && itemVar ) {
for (;;) {
@@ -782,7 +782,7 @@ void FormDefinitionView::setupVariables()
--it;
}
}
- itemVar->setOpen( TRUE );
+ itemVar->setOpen( true );
itemVarPriv->setOpen( privOpen );
itemVarProt->setOpen( protOpen );
itemVarPubl->setOpen( pubOpen );
@@ -794,7 +794,7 @@ void FormDefinitionView::refresh()
return;
bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv;
- fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE;
+ fuPub = fuProt = fuPriv = slPub = slProt = slPriv = true;
TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::SlotParent ||
@@ -852,7 +852,7 @@ void FormDefinitionView::refresh()
itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ),
TQString(), TQString() );
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
if ( !functionList.isEmpty() && itemFunct ) {
for (;;) {
@@ -885,12 +885,12 @@ void FormDefinitionView::refresh()
}
}
- itemFunct->setOpen( TRUE );
+ itemFunct->setOpen( true );
itemFunctPubl->setOpen( fuPub );
itemFunctProt->setOpen( fuProt );
itemFunctPriv->setOpen( fuPriv );
- itemSlots->setOpen( TRUE );
+ itemSlots->setOpen( true );
itemPublic->setOpen( slPub );
itemProtected->setOpen( slProt );
itemPrivate->setOpen( slPriv );
@@ -956,7 +956,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T
TQString(), TQString() );
if ( !pix.isNull() )
item->setPixmap( 0, pix );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
setCurrentItem( item );
ensureItemVisible( item );
tqApp->processEvents();
@@ -981,22 +981,22 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
if ( formWindow->project()->isCpp() )
switch( i->rtti() ) {
case HierarchyItem::FunctPublic:
- execFunctionDialog( "public", "function", TRUE );
+ execFunctionDialog( "public", "function", true );
break;
case HierarchyItem::FunctProtected:
- execFunctionDialog( "protected", "function", TRUE );
+ execFunctionDialog( "protected", "function", true );
break;
case HierarchyItem::FunctPrivate:
- execFunctionDialog( "private", "function", TRUE );
+ execFunctionDialog( "private", "function", true );
break;
case HierarchyItem::SlotPublic:
- execFunctionDialog( "public", "slot", TRUE );
+ execFunctionDialog( "public", "slot", true );
break;
case HierarchyItem::SlotProtected:
- execFunctionDialog( "protected", "slot", TRUE );
+ execFunctionDialog( "protected", "slot", true );
break;
case HierarchyItem::SlotPrivate:
- execFunctionDialog( "private", "slot", TRUE );
+ execFunctionDialog( "private", "slot", true );
break;
case HierarchyItem::VarPublic:
case HierarchyItem::VarProtected:
@@ -1023,7 +1023,7 @@ void FormDefinitionView::execFunctionDialog( const TQString &access, const TQStr
// refresh the functions list in the metadatabase
SourceEditor *editor = formFile->editor();
if ( editor )
- editor->refresh( TRUE );
+ editor->refresh( true );
EditFunctions dlg( this, formWindow );
if ( addFunc )
@@ -1043,7 +1043,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
const int GOIMPL = 5;
TQPopupMenu menu;
- bool insertDelete = FALSE;
+ bool insertDelete = false;
if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent ||
i->rtti() == HierarchyItem::VarParent ) {
@@ -1059,7 +1059,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS );
if ( MetaDataBase::hasEditor( formWindow->project()->language() ) )
menu.insertItem( i18n( "Goto Implementation" ), GOIMPL );
- insertDelete = TRUE;
+ insertDelete = true;
}
if ( insertDelete || i->rtti() == HierarchyItem::Variable ||
i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ||
@@ -1067,19 +1067,19 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
menu.insertSeparator();
menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL );
}
- popupOpen = TRUE;
+ popupOpen = true;
int res = menu.exec( pos );
- popupOpen = FALSE;
+ popupOpen = false;
if ( res == -1 )
return;
if ( res == EDIT ) {
switch( i->rtti() ) {
case HierarchyItem::FunctParent:
- execFunctionDialog( "public", "function", FALSE );
+ execFunctionDialog( "public", "function", false );
break;
case HierarchyItem::SlotParent:
- execFunctionDialog( "public", "slot", FALSE );
+ execFunctionDialog( "public", "slot", false );
break;
case HierarchyItem::VarParent:
case HierarchyItem::VarPublic:
@@ -1091,7 +1091,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
if ( i )
varDia.setCurrentItem( i->text( 0 ) );
if ( varDia.exec() == TQDialog::Accepted )
- formWindow->commandHistory()->setModified( TRUE );
+ formWindow->commandHistory()->setModified( true );
break;
}
case HierarchyItem::Definition:
@@ -1101,7 +1101,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
return;
if ( i->rtti() == HierarchyItem::Definition )
i = i->parent();
- ListEditor dia( this, 0, TRUE );
+ ListEditor dia( this, 0, true );
dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) );
TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
dia.setList( entries );
@@ -1117,22 +1117,22 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
i = i->parent();
switch( i->rtti() ) {
case HierarchyItem::SlotPublic:
- execFunctionDialog( "public", "slot", TRUE );
+ execFunctionDialog( "public", "slot", true );
break;
case HierarchyItem::SlotProtected:
- execFunctionDialog( "protected", "slot", TRUE );
+ execFunctionDialog( "protected", "slot", true );
break;
case HierarchyItem::SlotPrivate:
- execFunctionDialog( "private" , "slot", TRUE );
+ execFunctionDialog( "private" , "slot", true );
break;
case HierarchyItem::FunctPublic:
- execFunctionDialog( "public", "function", TRUE );
+ execFunctionDialog( "public", "function", true );
break;
case HierarchyItem::FunctProtected:
- execFunctionDialog( "protected", "function", TRUE );
+ execFunctionDialog( "protected", "function", true );
break;
case HierarchyItem::FunctPrivate:
- execFunctionDialog( "private" , "function", TRUE );
+ execFunctionDialog( "private" , "function", true );
break;
default:
insertEntry( i );
@@ -1192,12 +1192,12 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i )
}
if ( i && i->rtti() == HierarchyItem::Variable ) {
- i->setRenameEnabled( 0, FALSE );
+ i->setRenameEnabled( 0, false );
TQString varName = i->text( 0 );
varName = varName.simplifyWhiteSpace();
if ( varName[(int)varName.length() - 1] != ';' )
varName += ";";
- if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) {
+ if ( MetaDataBase::hasVariable( formWindow, varName ) ) {
TQMessageBox::information( this, i18n( "Edit Variables" ),
i18n( "This variable has already been declared." ) );
} else {
@@ -1268,9 +1268,9 @@ HierarchyView::HierarchyView( TQWidget *parent )
ClassBrowser cb( ciface->createClassBrowser( this ), ciface );
addTab( cb.lv, i18n( "Class Declarations" ) );
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
- ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
+ ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb );
- setTabEnabled( cb.lv, FALSE );
+ setTabEnabled( cb.lv, false );
}
}
}
@@ -1301,13 +1301,13 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
editor = 0;
}
- setTabEnabled( listview, TRUE );
+ setTabEnabled( listview, true );
setTabEnabled( fView, fw && fw->project()->isCpp() );
if ( fw == formwindow ) {
if ( fw ) {
if ( !fake )
- listview->setCurrent( TQT_TQOBJECT(o) );
+ listview->setCurrent( o );
else
listview->clear();
if ( MainWindow::self->qWorkspace()->activeWindow() == fw )
@@ -1330,7 +1330,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
fView->setFormWindow( fw );
if ( !fake ) {
listview->setup();
- listview->setCurrent( TQT_TQOBJECT(o) );
+ listview->setCurrent( o );
}
fView->setup();
@@ -1356,7 +1356,7 @@ void HierarchyView::showClasses( SourceEditor *se )
return;
lastSourceEditor = se;
- TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) );
+ TQTimer::singleShot( 100, this, TQ_SLOT( showClassesTimeout() ) );
}
void HierarchyView::showClassesTimeout()
@@ -1367,14 +1367,14 @@ void HierarchyView::showClassesTimeout()
if ( !se->object() )
return;
if ( se->formWindow() && se->formWindow()->project()->isCpp() ) {
- setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) );
- MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()),
+ setFormWindow( se->formWindow(), se->formWindow()->currentWidget() );
+ MainWindow::self->propertyeditor()->setWidget( se->formWindow()->currentWidget(),
se->formWindow() );
return;
}
setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() );
- setTabEnabled( fView, FALSE );
+ setTabEnabled( fView, false );
formwindow = 0;
listview->setFormWindow( 0 );
@@ -1389,10 +1389,10 @@ void HierarchyView::showClassesTimeout()
it != classBrowsers->end(); ++it ) {
if ( it.key() == se->project()->language() ) {
(*it).iface->update( se->text() );
- setTabEnabled( (*it).lv, TRUE );
+ setTabEnabled( (*it).lv, true );
showPage( (*it).lv );
} else {
- setTabEnabled( (*it).lv, FALSE );
+ setTabEnabled( (*it).lv, false );
(*it).iface->clear();
}
}
@@ -1447,7 +1447,7 @@ void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
TQWidget *w2 = w;
if ( ::tqt_cast<TQMainWindow*>(w) )
w2 = ( (TQMainWindow*)w )->centralWidget();
- listview->changeNameOf( TQT_TQOBJECT(w2), w->name() );
+ listview->changeNameOf( w2, w->name() );
}
@@ -1455,7 +1455,7 @@ void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& in
{
#ifndef TQT_NO_SQL
TQString i = info.join( "." );
- listview->changeDatabaseOf( TQT_TQOBJECT(w), i );
+ listview->changeDatabaseOf( w, i );
#endif
}