Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5198c9d3ac)
r14.1.x r14.1.4
Michele Calgaro 11 months ago
parent b9618de13e
commit d2d30bfbef
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -41,7 +41,7 @@ class AddExistingDirectoriesDialog : public AddExistingDlgBase
public:
AddExistingDirectoriesDialog ( AutoProjectPart* part, AutoProjectWidget *widget,
SubprojectItem* spitem, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
const char* name = 0, bool modal = false, WFlags fl = 0 );
~AddExistingDirectoriesDialog();
private:

@ -53,7 +53,7 @@
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
AddExistingFilesDialog::AddExistingFilesDialog ( AutoProjectPart* part, AutoProjectWidget *widget, SubprojectItem* spitem, TargetItem* titem, TQWidget* parent, const char* name, bool modal, WFlags fl )

@ -44,7 +44,7 @@ class AddExistingFilesDialog : public AddExistingDlgBase
public:
AddExistingFilesDialog( AutoProjectPart* part, AutoProjectWidget *widget,
SubprojectItem* spitem, TargetItem* titem, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
const char* name = 0, bool modal = false, WFlags fl = 0 );
~AddExistingFilesDialog();
private:

@ -587,7 +587,7 @@ void AutoDetailsView::slotDetailsContextMenu( TDEListView *, TQListViewItem *ite
popup.setWhatsThis(idViewUIH, i18n("<b>Open ui.h file</b><p>Opens .ui.h file "
"associated with the selected .ui."));
if (!fitem->name.contains(TQRegExp("ui$")) || fitem->is_subst == true)
if (!fitem->name.contains(TQRegExp("ui$")) || fitem->is_subst)
{
popup.removeItem(idUISubclasses);
popup.removeItem(idViewUIH);
@ -597,7 +597,7 @@ void AutoDetailsView::slotDetailsContextMenu( TDEListView *, TQListViewItem *ite
if (fitem->uiFileLink.isEmpty())
popup.removeItem(idUpdateWidgetclass);
if(fitem->is_subst == false)
if(!fitem->is_subst)
m_part->core()->fillContextMenu( &popup, &context );
int r = popup.exec( p );

@ -133,7 +133,7 @@ void TargetOptionsDialog::readConfig()
clitem = static_cast<TQCheckListItem*>(clitem->nextSibling());
}
}
if ( inlistItem == false ) {
if ( !inlistItem ) {
TQListViewItem *item = new TQListViewItem(outsidelib_listview, *l2it);
if (lastItem)
item->moveItem(lastItem);

@ -894,7 +894,7 @@ TQString CustomProjectPart::makeEnvironment() const
void CustomProjectPart::startMakeCommand( const TQString &dir, const TQString &target, bool withKdesu )
{
if ( partController()->saveAllFiles() == false )
if ( !partController()->saveAllFiles() )
return; //user cancelled
TQDomDocument &dom = *projectDom();
@ -1002,8 +1002,8 @@ void CustomProjectPart::slotCompileFile()
//if there is no Makefile in the directory of the source file
//try to build it from the main build dir
//this works e.g. for non-recursive cmake Makefiles, Alex
if ( buildtool == "make" && ( TQFile::exists( sourceDir + "/Makefile" ) == false )
&& ( TQFile::exists( sourceDir + "/makefile" ) == false ) )
if ( buildtool == "make" && !TQFile::exists( sourceDir + "/Makefile" )
&& !TQFile::exists( sourceDir + "/makefile" ) )
{
buildDir = buildDirectory();
}

@ -29,7 +29,7 @@ TQ_OBJECT
public:
EnvironmentDisplayDialog(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
EnvironmentDisplayDialog(TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
};
#endif

@ -31,7 +31,7 @@ class RemoveSubprojectDialog : public RemoveSubprojectDlgBase
public:
RemoveSubprojectDialog(TQString caption, TQString question, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
RemoveSubprojectDialog(TQString caption, TQString question, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~RemoveSubprojectDialog();
/*$PUBLIC_FUNCTIONS$*/
bool removeFromDisk();

@ -31,7 +31,7 @@ class SubclassesDlg : public SubclassesDlgBase
public:
SubclassesDlg(TQString form, DomUtil::PairList &config, TQString projectDir, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
SubclassesDlg(TQString form, DomUtil::PairList &config, TQString projectDir, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~SubclassesDlg();
/*$PUBLIC_FUNCTIONS$*/

@ -37,7 +37,7 @@ class ChooseSubprojectDlg : public ChooseSubprojectDlgBase
public:
ChooseSubprojectDlg(TrollProjectWidget *widget, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ChooseSubprojectDlg(TrollProjectWidget *widget, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~ChooseSubprojectDlg();
/*$PUBLIC_FUNCTIONS$*/

@ -23,7 +23,7 @@ class CreateScopeDlg : public CreateScopeDlgBase
public:
CreateScopeDlg( QMakeScopeItem* item, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
CreateScopeDlg( QMakeScopeItem* item, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~CreateScopeDlg();
/*$PUBLIC_FUNCTIONS$*/

@ -21,7 +21,7 @@ class TQDomDocument;
class NewWidgetDlg : public NewWidgetDlgBase
{
public:
NewWidgetDlg(TQStringList &newFileNames,TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
NewWidgetDlg(TQStringList &newFileNames,TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~NewWidgetDlg();

@ -387,7 +387,7 @@ void ProjectConfigurationDlg::updateProjectConfiguration()
myProjectItem->updateValues( "INCLUDEPATH", values );
//target.install
if ( checkInstallTarget->isChecked() == true )
if ( checkInstallTarget->isChecked() )
{
myProjectItem->addValue( "INSTALLS", "target" );
myProjectItem->scope->setEqualOp( "target.path", TQStringList( m_InstallTargetPath->text() ) );

@ -56,7 +56,7 @@ class CustomVarListItem : public TDEListViewItem
class ProjectConfigurationDlg : public ProjectConfigurationDlgBase
{
public:
ProjectConfigurationDlg( TQListView *_prjList, TrollProjectWidget* _prjWidget, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ProjectConfigurationDlg( TQListView *_prjList, TrollProjectWidget* _prjWidget, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~ProjectConfigurationDlg();
void updateControls();
void updateSubproject( QMakeScopeItem* _item );

@ -715,7 +715,7 @@ void TrollProjectWidget::slotExecuteTarget()
void TrollProjectWidget::slotBuildProject()
{
if ( m_part->partController() ->saveAllFiles() == false )
if ( !m_part->partController() ->saveAllFiles() )
return ; //user cancelled
TQString dir = projectDirectory();
@ -733,7 +733,7 @@ void TrollProjectWidget::slotBuildProject()
void TrollProjectWidget::slotInstallProject()
{
if ( m_part->partController() ->saveAllFiles() == false )
if ( !m_part->partController() ->saveAllFiles() )
return ; //user cancelled
TQString dir = projectDirectory();
@ -1371,7 +1371,7 @@ void TrollProjectWidget::slotNewFile()
if ( gitem->groupType == GroupItem::InstallObject )
{
// TQString relpath = m_shownSubproject->path.mid(projectDirectory().length());
bool ok = FALSE;
bool ok = false;
TQString filepattern = KInputDialog::getText(
i18n( "Insert New Filepattern" ),
i18n( "Please enter a filepattern relative the current "
@ -1387,7 +1387,7 @@ void TrollProjectWidget::slotNewFile()
if ( gitem->groupType == GroupItem::InstallRoot )
{
// TQString relpath = m_shownSubproject->path.mid(projectDirectory().length());
bool ok = FALSE;
bool ok = false;
TQString install_obj = KInputDialog::getText(
i18n( "Insert New Install Object" ),
i18n( "Please enter a name for the new object:" ),
@ -1596,7 +1596,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem *
}
else if ( r == idInsNewFilepatternItem )
{
bool ok = FALSE;
bool ok = false;
TQString filepattern = KInputDialog::getText(
i18n( "Add Pattern of Files to Install" ),
i18n( "Enter a pattern relative to the current "
@ -1714,7 +1714,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem *
}
else if ( r == idInsInstallObject )
{
bool ok = FALSE;
bool ok = false;
TQString install_obj = KInputDialog::getText(
i18n( "Add Install Object" ),
i18n( "Enter a name for the new object:" ),
@ -1891,7 +1891,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem *
{
GroupItem * titem = static_cast<GroupItem*>( item->parent() );
bool ok = FALSE;
bool ok = false;
TQString filepattern = KInputDialog::getText(
i18n( "Edit Pattern" ),
i18n( "Enter a pattern relative to the current "

@ -106,12 +106,12 @@ bool QDesignerAction::addTo( TQWidget *w )
return TQAction::addTo( w );
if ( ::tqt_cast<TQPopupMenu*>(w) )
return FALSE;
return false;
widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE );
widgetToInsert->reparent( w, TQPoint( 0, 0 ), false );
widgetToInsert->show();
addedTo( widgetToInsert, w );
return TRUE;
return true;
}
bool QDesignerAction::removeFrom( TQWidget *w )
@ -120,15 +120,15 @@ bool QDesignerAction::removeFrom( TQWidget *w )
return TQAction::removeFrom( w );
remove();
return TRUE;
return true;
}
void QDesignerAction::remove()
{
if ( !widgetToInsert )
return;
MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE );
widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE );
MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
}
QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent,
@ -187,25 +187,25 @@ bool QSeparatorAction::addTo( TQWidget *w )
if ( ::tqt_cast<TQToolBar*>(w) ) {
TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
return TRUE;
return true;
} else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
idx = ( (TQPopupMenu*)w )->count();
( (TQPopupMenu*)w )->insertSeparator( idx );
return TRUE;
return true;
}
return FALSE;
return false;
}
bool QSeparatorAction::removeFrom( TQWidget *w )
{
if ( ::tqt_cast<TQToolBar*>(w) ) {
delete wid;
return TRUE;
return true;
} else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
( (TQPopupMenu*)w )->removeItemAt( idx );
return TRUE;
return true;
}
return FALSE;
return false;
}
TQWidget *QSeparatorAction::widget() const
@ -219,31 +219,31 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
: TQToolBar( mw ), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = TRUE;
setAcceptDrops( TRUE );
afterAnchor = true;
setAcceptDrops( true );
MetaDataBase::addEntry( this );
lastIndicatorPos = TQPoint( -1, -1 );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
installEventFilter( this );
widgetInserting = FALSE;
widgetInserting = false;
findFormWindow();
mw->setDockEnabled( DockTornOff, FALSE );
mw->setDockEnabled( DockTornOff, false );
}
QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock )
: TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = TRUE;
setAcceptDrops( TRUE );
afterAnchor = true;
setAcceptDrops( true );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
MetaDataBase::addEntry( this );
installEventFilter( this );
widgetInserting = FALSE;
widgetInserting = false;
findFormWindow();
mw->setDockEnabled( DockTornOff, FALSE );
mw->setDockEnabled( DockTornOff, false );
}
void QDesignerToolBar::findFormWindow()
@ -287,7 +287,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
if ( o == this && e->type() == TQEvent::MouseButtonPress &&
( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
return TRUE;
return true;
}
if ( o == this )
@ -297,30 +297,30 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
return false;
buttonMousePressEvent( ke, o );
return TRUE;
return true;
} else if(e->type() == TQEvent::ContextMenu ) {
TQContextMenuEvent *ce = (TQContextMenuEvent*)e;
fixObject( o );
if( !o )
return FALSE;
return false;
buttonContextMenuEvent( ce, o );
return TRUE;
return true;
} else if ( e->type() == TQEvent::MouseMove ) {
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
return false;
buttonMouseMoveEvent( ke, o );
return TRUE;
return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
return FALSE;
return false;
buttonMouseReleaseEvent( ke, o );
return TRUE;
return true;
} else if ( e->type() == TQEvent::DragEnter ) {
TQDragEnterEvent *de = (TQDragEnterEvent*)e;
if (ActionDrag::canDecode(de))
@ -358,20 +358,20 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
widgetInserting = FALSE;
widgetInserting = false;
if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL &&
MainWindow::self->currentTool() != CONNECT_TOOL &&
MainWindow::self->currentTool() != BUDDY_TOOL )
widgetInserting = TRUE;
widgetInserting = true;
}
void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
widgetInserting = FALSE;
widgetInserting = false;
}
void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
@ -379,10 +379,10 @@ void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) {
formWindow->clearSelection( FALSE );
formWindow->clearSelection( false );
formWindow->selectWidget( w );
}
widgetInserting = FALSE;
widgetInserting = false;
}
void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
@ -438,7 +438,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
widgetInserting = FALSE;
widgetInserting = false;
if ( e->button() == TQt::MidButton )
return;
@ -448,7 +448,7 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
MainWindow::self->currentTool() != ORDER_TOOL &&
MainWindow::self->currentTool() != CONNECT_TOOL &&
MainWindow::self->currentTool() != BUDDY_TOOL ) {
widgetInserting = TRUE;
widgetInserting = true;
return;
}
@ -500,7 +500,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
drag->setPixmap( a->iconSet().pixmap() );
if ( ::tqt_cast<QDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), FALSE );
formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), false );
}
if ( !drag->drag() ) {
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ).
@ -517,7 +517,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
{
widgetInserting = FALSE;
widgetInserting = false;
lastIndicatorPos = TQPoint( -1, -1 );
if (ActionDrag::canDecode(e))
e->accept();
@ -535,7 +535,7 @@ void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
{
indicator->hide();
insertAnchor = 0;
afterAnchor = TRUE;
afterAnchor = true;
}
void QDesignerToolBar::dropEvent( TQDropEvent *e )
@ -614,7 +614,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
if ( orientation() ==TQt::Horizontal ) {
TQPoint pnt( width() - 2, 0 );
insertAnchor = 0;
afterAnchor = TRUE;
afterAnchor = true;
TQObjectList clo = childrenListObject();
if ( clo.isEmpty() )
return pnt;
@ -629,7 +629,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
if ( w->x() < pos.x() ) {
pnt.setX( w->x() + w->width() + 1 );
insertAnchor = w;
afterAnchor = TRUE;
afterAnchor = true;
}
}
}
@ -637,7 +637,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
} else {
TQPoint pnt( 0, height() - 2 );
insertAnchor = 0;
afterAnchor = TRUE;
afterAnchor = true;
TQObjectList clo = childrenListObject();
if ( clo.isEmpty() )
return pnt;
@ -652,7 +652,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
if ( w->y() < pos.y() ) {
pnt.setY( w->y() + w->height() + 1 );
insertAnchor = w;
afterAnchor = TRUE;
afterAnchor = true;
}
}
}
@ -689,9 +689,9 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p )
if ( formWindow != MainWindow::self->formWindow() )
return;
calcIndicatorPos( p );
TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE );
TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true );
installEventFilters( w );
MainWindow::self->formWindow()->insertWidget( w, TRUE );
MainWindow::self->formWindow()->insertWidget( w, true );
QDesignerAction *a = new QDesignerAction( w, parent() );
int index = actionList.findRef( *actionMap.find( insertAnchor ) );
if ( index != -1 && afterAnchor )

@ -50,8 +50,8 @@ ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
explicitlyClosed(false)
{
listActions->addColumn( i18n( "Actions" ) );
setEnabled( FALSE );
buttonConnect->setEnabled( FALSE );
setEnabled( false );
buttonConnect->setEnabled( false );
TQPopupMenu *popup = new TQPopupMenu( this );
popup->insertItem( i18n( "New &Action" ), this, TQ_SLOT( newAction() ) );
@ -101,21 +101,21 @@ void ActionEditor::setCurrentAction( TQAction *a )
TQAction *ActionEditor::newActionEx()
{
ActionItem *i = new ActionItem( listActions, (bool)FALSE );
ActionItem *i = new ActionItem( listActions, (bool)false );
TQAction *a = i->action();
TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->action()->setName( n );
i->action()->setText( i->action()->name() );
MetaDataBase::setPropertyChanged( i->action(), "text", TRUE );
MetaDataBase::setPropertyChanged( i->action(), "name", TRUE );
MetaDataBase::setPropertyChanged( i->action(), "text", true );
MetaDataBase::setPropertyChanged( i->action(), "name", true );
formWindow->actionList().append( i->action() );
if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE );
formWindow->formFile()->setModified( true );
return i->action();
}
@ -141,7 +141,7 @@ void ActionEditor::deleteAction()
if ( formWindow ) {
formWindow->setActiveObject( formWindow->mainContainer() );
if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE );
formWindow->formFile()->setModified( true );
}
}
@ -157,28 +157,28 @@ void ActionEditor::newAction()
if ( actionParent )
i = new ActionItem( actionParent );
else
i = new ActionItem( listActions, (bool)FALSE );
i = new ActionItem( listActions, (bool)false );
TQAction *a = i->action();
TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
TQString n = "Action";
formWindow->unify( i->action(), n, TRUE );
formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->action()->setName( n );
i->action()->setText( i->action()->name() );
if ( actionParent && actionParent->actionGroup() &&
actionParent->actionGroup()->usesDropDown() ) {
i->action()->setToggleAction( TRUE );
MetaDataBase::setPropertyChanged( i->action(), "toggleAction", TRUE );
i->action()->setToggleAction( true );
MetaDataBase::setPropertyChanged( i->action(), "toggleAction", true );
}
MetaDataBase::setPropertyChanged( i->action(), "text", TRUE );
MetaDataBase::setPropertyChanged( i->action(), "name", TRUE );
MetaDataBase::setPropertyChanged( i->action(), "text", true );
MetaDataBase::setPropertyChanged( i->action(), "name", true );
listActions->setCurrentItem( i );
if ( !actionParent )
formWindow->actionList().append( i->action() );
if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE );
formWindow->formFile()->setModified( true );
}
void ActionEditor::newActionGroup()
@ -191,33 +191,33 @@ void ActionEditor::newActionGroup()
ActionItem *i = 0;
if ( actionParent )
i = new ActionItem( actionParent, TRUE );
i = new ActionItem( actionParent, true );
else
i = new ActionItem( listActions, TRUE );
i = new ActionItem( listActions, true );
TQAction *ag = i->actionGroup();
TQObject::connect( ag, TQ_SIGNAL( destroyed( TQObject * ) ),
this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->actionGroup() );
MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE );
MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", true );
TQString n = "ActionGroup";
formWindow->unify( i->action(), n, TRUE );
formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->actionGroup()->setName( n );
i->actionGroup()->setText( i->actionGroup()->name() );
MetaDataBase::setPropertyChanged( i->actionGroup(), "text", TRUE );
MetaDataBase::setPropertyChanged( i->actionGroup(), "name", TRUE );
MetaDataBase::setPropertyChanged( i->actionGroup(), "text", true );
MetaDataBase::setPropertyChanged( i->actionGroup(), "name", true );
listActions->setCurrentItem( i );
i->setOpen( TRUE );
i->setOpen( true );
if ( !actionParent )
formWindow->actionList().append( i->actionGroup() );
if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE );
formWindow->formFile()->setModified( true );
}
void ActionEditor::newDropDownActionGroup()
{
newActionGroup();
( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( TRUE );
( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( true );
}
void ActionEditor::setFormWindow( FormWindow *fw )
@ -226,9 +226,9 @@ void ActionEditor::setFormWindow( FormWindow *fw )
formWindow = fw;
if ( !formWindow ||
!::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
setEnabled( FALSE );
setEnabled( false );
} else {
setEnabled( TRUE );
setEnabled( true );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
if ( ::tqt_cast<TQAction*>(a->parent()) )
@ -247,7 +247,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
}
if ( listActions->firstChild() ) {
listActions->setCurrentItem( listActions->firstChild() );
listActions->setSelected( listActions->firstChild(), TRUE );
listActions->setSelected( listActions->firstChild(), true );
}
}
}
@ -265,7 +265,7 @@ void ActionEditor::insertChildActions( ActionItem *i )
continue;
TQAction *a = (TQAction*)o;
ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
i->setOpen( TRUE );
i->setOpen( true );
i2->setText( 0, a->name() );
i2->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection

@ -33,9 +33,9 @@
ActionListView::ActionListView( TQWidget *parent, const char *name )
: TQListView( parent, name )
{
setShowSortIndicator( TRUE );
setShowSortIndicator( true );
setResizeMode( LastColumn );
setRootIsDecorated( TRUE );
setRootIsDecorated( true );
connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
this, TQ_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) );
}
@ -46,7 +46,7 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac )
g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
a = ::tqt_cast<QDesignerAction*>(ac);
setDragEnabled( TRUE );
setDragEnabled( true );
}
ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
@ -55,7 +55,7 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
a = ::tqt_cast<QDesignerAction*>(ac);
setDragEnabled( TRUE );
setDragEnabled( true );
moveToEnd();
}

@ -36,13 +36,13 @@ public:
ActionItem( TQListView *lv, bool group )
: TQListViewItem( lv ),
a( group ? 0 : new QDesignerAction( 0 ) ),
g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( true ); }
ActionItem( TQListView *lv, TQAction *ac );
ActionItem( TQListViewItem *i, TQAction *ac );
ActionItem( ActionItem *parent, bool group = FALSE )
ActionItem( ActionItem *parent, bool group = false )
: TQListViewItem( parent ),
a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ),
g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); }
g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( true ); moveToEnd(); }
QDesignerAction *action() const { return a; }
QDesignerActionGroup *actionGroup() const { return g; }

@ -29,7 +29,7 @@
#include <tqstring.h>
AsciiValidator::AsciiValidator( TQObject * parent, const char *name )
: TQValidator( parent, name ), functionName( FALSE )
: TQValidator( parent, name ), functionName( false )
{
}
@ -39,7 +39,7 @@ AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *na
}
AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name )
: TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow )
: TQValidator( parent, name ), functionName( false ), allowedChars( allow )
{
}
@ -49,8 +49,8 @@ AsciiValidator::~AsciiValidator()
TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
{
bool inParen = FALSE;
bool outParen = FALSE;
bool inParen = false;
bool outParen = false;
if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' )
s[0] = '_';
for ( int i = 0, j = 0; i < (int) s.length(); i++ ) {
@ -75,11 +75,11 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
if ( functionName ) {
if ( c == '(' ) {
inParen = TRUE;
inParen = true;
continue;
}
if ( c == ')' ) {
outParen = TRUE;
outParen = true;
j = i + 1;
continue;
}

@ -63,8 +63,8 @@
CommandHistory::CommandHistory( int s )
: current( -1 ), steps( s ), savedAt( -1 )
{
history.setAutoDelete( TRUE );
modified = FALSE;
history.setAutoDelete( true );
modified = false;
compressedCommand = 0;
}
@ -80,7 +80,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
if ( compressedCommand ) {
compressedCommand->merge( cmd );
modified = TRUE;
modified = true;
modificationChanged( modified );
return;
}
@ -94,7 +94,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
savedAt = -2;
TQPtrList<Command> commands;
commands.setAutoDelete( FALSE );
commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) );
@ -104,7 +104,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
commands.append( cmd );
history.clear();
history = commands;
history.setAutoDelete( TRUE );
history.setAutoDelete( true );
} else {
history.append( cmd );
}
@ -117,7 +117,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
}
emitUndoRedo();
modified = TRUE;
modified = true;
modificationChanged( modified );
}
@ -228,7 +228,7 @@ void Command::merge( Command * )
bool Command::canMerge( Command * )
{
return FALSE;
return false;
}
// ------------------------------------------------------------
@ -278,7 +278,7 @@ void InsertCommand::execute()
}
widget->show();
formWindow()->widgets()->insert( widget, widget );
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
formWindow()->selectWidget( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
}
@ -286,7 +286,7 @@ void InsertCommand::execute()
void InsertCommand::unexecute()
{
widget->hide();
formWindow()->selectWidget( widget, FALSE );
formWindow()->selectWidget( widget, false );
formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@ -301,7 +301,7 @@ MoveCommand::MoveCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ),
oldParent( opr ), newParent( npr )
{
widgets.setAutoDelete( FALSE );
widgets.setAutoDelete( false );
}
void MoveCommand::merge( Command *c )
@ -323,7 +323,7 @@ void MoveCommand::execute()
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( newParent, pos, TRUE );
w->reparent( newParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
formWindow()->widgetChanged( w );
@ -344,7 +344,7 @@ void MoveCommand::unexecute()
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( oldParent, pos, TRUE );
w->reparent( oldParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
formWindow()->widgetChanged( w );
@ -365,9 +365,9 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
const TQWidgetList &wl )
: Command( n, fw ), widgets( wl )
{
widgets.setAutoDelete( FALSE );
widgets.setAutoDelete( false );
TQWidgetList copyOfWidgets = widgets;
copyOfWidgets.setAutoDelete(FALSE);
copyOfWidgets.setAutoDelete(false);
// Include the children of the selected items when deleting
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
@ -385,14 +385,14 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
void DeleteCommand::execute()
{
formWindow()->setPropertyShowingBlocked( TRUE );
formWindow()->setPropertyShowingBlocked( true );
connections.clear();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s );
formWindow()->selectWidget( w, FALSE );
formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
@ -402,7 +402,7 @@ void DeleteCommand::execute()
(*it).signal, (*it).receiver, (*it).slot );
}
}
formWindow()->setPropertyShowingBlocked( FALSE );
formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets );
@ -410,8 +410,8 @@ void DeleteCommand::execute()
void DeleteCommand::unexecute()
{
formWindow()->setPropertyShowingBlocked( TRUE );
formWindow()->clearSelection( FALSE );
formWindow()->setPropertyShowingBlocked( true );
formWindow()->clearSelection( false );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
TQString s = w->name();
@ -426,7 +426,7 @@ void DeleteCommand::unexecute()
(*it).signal, (*it).receiver, (*it).slot );
}
}
formWindow()->setPropertyShowingBlocked( FALSE );
formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets );
}
@ -440,7 +440,7 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
const TQString &ocut, bool reset )
: Command( n, fw ), widget( w ), editor( e ), propName( pn ),
oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ),
wasChanged( TRUE ), isResetCommand( reset )
wasChanged( true ), isResetCommand( reset )
{
wasChanged = MetaDataBase::isPropertyChanged( w, propName );
if ( oldCurrentItemText.isNull() )
@ -453,9 +453,9 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
void SetPropertyCommand::execute()
{
if ( !wasChanged )
MetaDataBase::setPropertyChanged( widget, propName, TRUE );
MetaDataBase::setPropertyChanged( widget, propName, true );
if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, FALSE );
MetaDataBase::setPropertyChanged( widget, propName, false );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget )
formWindow()->selectWidget( widget );
@ -466,7 +466,7 @@ void SetPropertyCommand::execute()
if ( !i )
return;
i->setValue( widget->property( propName ) );
i->setChanged( FALSE );
i->setChanged( false );
editor->refetchData();
editor->emitWidgetChanged();
return;
@ -478,9 +478,9 @@ void SetPropertyCommand::execute()
void SetPropertyCommand::unexecute()
{
if ( !wasChanged )
MetaDataBase::setPropertyChanged( widget, propName, FALSE );
MetaDataBase::setPropertyChanged( widget, propName, false );
if ( isResetCommand )
MetaDataBase::setPropertyChanged( widget, propName, TRUE );
MetaDataBase::setPropertyChanged( widget, propName, true );
setProperty( oldValue, oldCurrentItemText );
}
@ -488,24 +488,24 @@ bool SetPropertyCommand::canMerge( Command *c )
{
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
if ( !widget )
return FALSE;
return false;
const TQMetaProperty *p =
widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
return TRUE;
return true;
if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw )
return FALSE;
return false;
for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
if ( TQString( (*it ).property ) == propName ) {
if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" )
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
TQVariant::Type t = TQVariant::nameToType( p->type() );
return ( cmd->propName == propName &&
@ -523,7 +523,7 @@ bool SetPropertyCommand::checkProperty()
{
if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that
TQString s = newValue.toString();
if ( !formWindow()->unify( widget, s, FALSE ) ) {
if ( !formWindow()->unify( widget, s, false ) ) {
TQMessageBox::information( formWindow()->mainWindow(),
i18n( "Set 'name' Property" ),
i18n( "The name of a widget must be unique.\n"
@ -532,8 +532,8 @@ bool SetPropertyCommand::checkProperty()
arg( newValue.toString() ).
arg( formWindow()->name() ).
arg( oldValue.toString() ));
setProperty( oldValue, oldCurrentItemText, FALSE );
return FALSE;
setProperty( oldValue, oldCurrentItemText, false );
return false;
}
if ( s.isEmpty() ) {
TQMessageBox::information( formWindow()->mainWindow(),
@ -541,14 +541,14 @@ bool SetPropertyCommand::checkProperty()
i18n( "The name of a widget must not be null.\n"
"The name has been reverted to '%1'." ).
arg( oldValue.toString() ));
setProperty( oldValue, oldCurrentItemText, FALSE );
return FALSE;
setProperty( oldValue, oldCurrentItemText, false );
return false;
}
if ( ::tqt_cast<FormWindow*>(widget->parent()) )
formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
}
return TRUE;
return true;
}
void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, bool select )
@ -563,16 +563,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( select )
editor->propertyList()->setCurrentProperty( propName );
const TQMetaProperty *p =
widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "hAlign" ) {
p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
@ -680,14 +680,14 @@ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow
void LayoutHorizontalCommand::execute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@ -697,20 +697,20 @@ void LayoutHorizontalCommand::unexecute()
LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutHorizontalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@ -726,14 +726,14 @@ LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
void LayoutVerticalCommand::execute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@ -743,20 +743,20 @@ void LayoutVerticalCommand::unexecute()
LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
: Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutVerticalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@ -772,14 +772,14 @@ LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
void LayoutGridCommand::execute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutGridCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@ -795,18 +795,18 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
margin = MetaDataBase::margin( layoutBase );
layout = 0;
if ( lay == WidgetFactory::HBox )
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::Grid )
layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false );
}
void BreakLayoutCommand::execute()
{
if ( !layout )
return;
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
@ -817,7 +817,7 @@ void BreakLayoutCommand::unexecute()
{
if ( !layout )
return;
formWindow()->clearSelection( FALSE );
formWindow()->clearSelection( false );
layout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
@ -1190,7 +1190,7 @@ void AddFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void AddFunctionCommand::unexecute()
@ -1208,7 +1208,7 @@ void AddFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1252,7 +1252,7 @@ void ChangeFunctionAttribCommand::execute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void ChangeFunctionAttribCommand::unexecute()
@ -1279,7 +1279,7 @@ void ChangeFunctionAttribCommand::unexecute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1321,7 +1321,7 @@ void RemoveFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void RemoveFunctionCommand::unexecute()
@ -1342,7 +1342,7 @@ void RemoveFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1357,7 +1357,7 @@ void AddVariableCommand::execute()
MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void AddVariableCommand::unexecute()
@ -1365,7 +1365,7 @@ void AddVariableCommand::unexecute()
MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1382,7 +1382,7 @@ void SetVariablesCommand::execute()
MetaDataBase::setVariables( formWindow(), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void SetVariablesCommand::unexecute()
@ -1390,7 +1390,7 @@ void SetVariablesCommand::unexecute()
MetaDataBase::setVariables( formWindow(), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1412,7 +1412,7 @@ void RemoveVariableCommand::execute()
MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void RemoveVariableCommand::unexecute()
@ -1420,7 +1420,7 @@ void RemoveVariableCommand::unexecute()
MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1438,7 +1438,7 @@ void EditDefinitionsCommand::execute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
void EditDefinitionsCommand::unexecute()
@ -1447,7 +1447,7 @@ void EditDefinitionsCommand::unexecute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@ -1520,7 +1520,7 @@ void PasteCommand::unexecute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
formWindow()->selectWidget( w, FALSE );
formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
}
@ -1542,7 +1542,7 @@ void TabOrderCommand::merge( Command *c )
bool TabOrderCommand::canMerge( Command * )
{
return TRUE;
return true;
}
void TabOrderCommand::execute()
@ -1704,7 +1704,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
pi->setOpen( TRUE );
pi->setOpen( true );
} else {
if ( i->parent() == fromLast ) {
fromParents.push( fromLast );
@ -1724,7 +1724,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
pi->setOpen( TRUE );
pi->setOpen( true );
} else {
while ( fromParents.top() != i->parent() ) {
fromParents.pop();
@ -1744,7 +1744,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
ni->setPixmap( c, *i->pixmap( c ) );
}
if ( pi )
pi->setOpen( TRUE );
pi->setOpen( true );
toLasts.pop();
toLasts.push( ni );
}
@ -1768,7 +1768,7 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
void PopulateMultiLineEditCommand::execute()
{
mlined->setText( newText );
MetaDataBase::setPropertyChanged( mlined, "text", TRUE );
MetaDataBase::setPropertyChanged( mlined, "text", true );
formWindow()->emitUpdateProperties( mlined );
}
@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute()
if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar";
formWindow()->unify( toolBar, n, TRUE );
formWindow()->unify( toolBar, n, true );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
@ -2233,7 +2233,7 @@ void SetActionIconsCommand::execute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
void SetActionIconsCommand::unexecute()
@ -2242,7 +2242,7 @@ void SetActionIconsCommand::unexecute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
// ------------------------------------------------------------
@ -2272,19 +2272,19 @@ void AddMenuCommand::execute()
if ( !mb ) {
mb = new MenuBarEditor( formWindow(), mw );
mb->setName( "MenuBarEditor" );
formWindow()->insertWidget( mb, TRUE );
formWindow()->insertWidget( mb, true );
}
if ( !item ) {
PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw );
popup->setName( "PopupMenuEditor" );
formWindow()->insertWidget( popup, TRUE );
formWindow()->insertWidget( popup, true );
mb->insertItem( name, popup, index );
index = mb->findItem( popup );
item = mb->item( index );
} else {
PopupMenuEditor *popup = item->menu();
popup->setName( item->menuText() );
formWindow()->insertWidget( popup, TRUE );
formWindow()->insertWidget( popup, true );
mb->insertItem( item, index );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute()
PopupMenuEditor *popup = item->menu();
item->setMenuText( newName );
TQString legal = makeLegal( newName );
formWindow()->unify( popup, legal, TRUE );
formWindow()->unify( popup, legal, true );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}

@ -155,7 +155,7 @@ class CommandHistory : public TQObject
public:
CommandHistory( int s );
void addCommand( Command *cmd, bool tryCompress = FALSE );
void addCommand( Command *cmd, bool tryCompress = false );
void undo();
void redo();
@ -256,7 +256,7 @@ public:
const TQString &pn, const TQVariant &ov,
const TQVariant &nv, const TQString &ncut,
const TQString &ocut,
bool reset = FALSE );
bool reset = false );
void execute();
void unexecute();
@ -266,7 +266,7 @@ public:
bool checkProperty();
private:
void setProperty( const TQVariant &v, const TQString &currentItemText, bool select = TRUE );
void setProperty( const TQVariant &v, const TQString &currentItemText, bool select = true );
TQGuardedPtr<TQObject> widget;
PropertyEditor *editor;
@ -484,7 +484,7 @@ class AddWizardPageCommand : public Command
{
public:
AddWizardPageCommand( const TQString &n, FormWindow *fw,
TQWizard *w, const TQString &label, int index = -1, bool show = TRUE );
TQWizard *w, const TQString &label, int index = -1, bool show = true );
void execute();
void unexecute();
@ -503,7 +503,7 @@ class DeleteWizardPageCommand : public Command
{
public:
DeleteWizardPageCommand( const TQString &n, FormWindow *fw,
TQWizard *w, int index, bool show = TRUE );
TQWizard *w, int index, bool show = true );
void execute();
void unexecute();

@ -55,7 +55,7 @@ void ConfigToolboxDialog::init()
if ( !parent ) {
parent = new TQListViewItem( listViewTools );
parent->setText( 0, grp );
parent->setOpen( TRUE );
parent->setOpen( true );
groups.insert( grp, parent );
}
TQListViewItem *i = new TQListViewItem( parent );
@ -76,14 +76,14 @@ void ConfigToolboxDialog::addTool()
{
TQListView *src = listViewTools;
bool addKids = FALSE;
bool addKids = false;
TQListViewItem *nextSibling = 0;
TQListViewItem *nextParent = 0;
TQListViewItemIterator it = src->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
addKids = FALSE;
addKids = false;
if ( (*it)->isSelected() ) {
if ( (*it)->childCount() == 0 ) {
@ -97,7 +97,7 @@ void ConfigToolboxDialog::addTool()
// Children processing not set, so set it
// Also find the item were we shall quit
// processing children...if any such item
addKids = TRUE;
addKids = true;
nextSibling = (*it)->nextSibling();
nextParent = (*it)->parent();
while ( nextParent && !nextSibling ) {
@ -168,11 +168,11 @@ void ConfigToolboxDialog::moveToolDown()
void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i )
{
bool canAdd = FALSE;
bool canAdd = false;
TQListViewItemIterator it = listViewTools->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
canAdd = TRUE;
canAdd = true;
break;
}
}
@ -185,11 +185,11 @@ void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i )
buttonUp->setEnabled( (bool) (i && i->itemAbove()) );
buttonDown->setEnabled( (bool) (i && i->itemBelow()) );
bool canRemove = FALSE;
bool canRemove = false;
TQListViewItemIterator it = listViewCommon->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
canRemove = TRUE;
canRemove = true;
break;
}
}

@ -73,7 +73,7 @@ void ConnectionDialog::init()
this, TQ_SLOT( updateEditSlotsButton() ) );
connect( connectionsTable, TQ_SIGNAL( resorted() ),
this, TQ_SLOT( updateConnectionContainers() ) );
buttonEditSlots->setEnabled( FALSE );
buttonEditSlots->setEnabled( false );
if ( !invalidConnection ) {
invalidConnection = new TQPixmap( invalid_connection );
@ -86,7 +86,7 @@ void ConnectionDialog::init()
it != conns.end(); ++it ) {
ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver,
(*it).signal, (*it).slot );
c->setModified( FALSE );
c->setModified( false );
updateConnectionState( c );
}
@ -169,7 +169,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject
sl->setCurrentItem( slot );
}
c->setModified( TRUE );
c->setModified( true );
return c;
}
@ -263,7 +263,7 @@ void ConnectionDialog::deleteClicked()
void ConnectionDialog::editSlots()
{
EditFunctions dlg( this, MainWindow::self->formWindow(), TRUE );
EditFunctions dlg( this, MainWindow::self->formWindow(), true );
dlg.exec();
int currentCol = connectionsTable->currentColumn();
connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 );

@ -83,9 +83,9 @@ static const char* const ignore_slots[] = {
};
ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw )
: TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 )
: TQComboTableItem( table, TQStringList(), false ), formWindow( fw ), conn( 0 )
{
setReplaceable( FALSE );
setReplaceable( false );
}
void ConnectionItem::senderChanged( TQObject * )
@ -166,7 +166,7 @@ void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg,
TQFont f( p->font() );
TQFont oldf( p->font() );
if ( conn && conn->isModified() ) {
f.setBold( TRUE );
f.setBold( true );
p->setFont( f );
}
@ -338,7 +338,7 @@ SignalItem::SignalItem( TQTable *table, FormWindow *fw )
void SignalItem::senderChanged( TQObject *sender )
{
TQStrList sigs = sender->metaObject()->signalNames( TRUE );
TQStrList sigs = sender->metaObject()->signalNames( true );
sigs.remove( "destroyed()" );
sigs.remove( "destroyed(TQObject*)" );
sigs.remove( "accessibilityChanged(int)" );
@ -409,25 +409,25 @@ bool SlotItem::ignoreSlot( const char* slot ) const
#ifndef TQT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 &&
::tqt_cast<TQDataBrowser*>(lastReceiver) )
return FALSE;
return false;
#endif
for ( int i = 0; ignore_slots[i]; i++ ) {
if ( qstrcmp( slot, ignore_slots[i] ) == 0 )
return TRUE;
return true;
}
if ( !formWindow->isMainContainer( lastReceiver ) ) {
if ( qstrcmp( slot, "close()" ) == 0 )
return TRUE;
return true;
}
if ( qstrcmp( slot, "setFocus()" ) == 0 )
if ( lastReceiver->isWidgetType() &&
( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus )
return TRUE;
return true;
return FALSE;
return false;
}
void SlotItem::updateSlotList()
@ -441,15 +441,15 @@ void SlotItem::updateSlotList()
}
TQString signal = MetaDataBase::normalizeFunction( lastSignal );
int n = lastReceiver->metaObject()->numSlots( TRUE );
int n = lastReceiver->metaObject()->numSlots( true );
TQStringList slts;
for( int i = 0; i < n; ++i ) {
// accept only public slots. For the form window, also accept protected slots
const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE );
if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) ||
const TQMetaData* md = lastReceiver->metaObject()->slot( i, true );
if ( ( (lastReceiver->metaObject()->slot( i, true )->access == TQMetaData::Public) ||
(formWindow->isMainContainer( lastReceiver ) &&
lastReceiver->metaObject()->slot(i, TRUE)->access ==
lastReceiver->metaObject()->slot(i, true)->access ==
TQMetaData::Protected) ) &&
!ignoreSlot( md->name ) &&
checkConnectArgs( signal.latin1(), lastReceiver, md->name ) )

@ -170,7 +170,7 @@ class ConnectionContainer : public TQObject
public:
ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2,
ReceiverItem *i3, SlotItem *i4, int r )
: TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ),
: TQObject( parent ), mod( false ), se( i1 ), si( i2 ),
re( i3 ), sl( i4 ), rw ( r ) {
i1->setConnection( this );
i2->setConnection( this );
@ -207,7 +207,7 @@ public:
SlotItem *slotItem() const { return sl; }
public slots:
void somethingChanged() { mod = TRUE; emit changed( this ); }
void somethingChanged() { mod = true; emit changed( this ); }
signals:
void changed( ConnectionContainer *c );

@ -31,26 +31,26 @@
ConnectionTable::ConnectionTable( TQWidget *parent, const char *name )
: TQTable( 0, 4, parent, name )
{
setSorting( TRUE );
setShowGrid( FALSE );
setSorting( true );
setShowGrid( false );
setFocusStyle( FollowStyle );
setSelectionMode( SingleRow );
horizontalHeader()->setLabel( 0, i18n( "Sender" ) );
horizontalHeader()->setLabel( 1, i18n( "Signal" ) );
horizontalHeader()->setLabel( 2, i18n( "Receiver" ) );
horizontalHeader()->setLabel( 3, i18n( "Slot" ) );
setColumnStretchable( 0, TRUE );
setColumnStretchable( 1, TRUE );
setColumnStretchable( 2, TRUE );
setColumnStretchable( 3, TRUE );
setColumnStretchable( 0, true );
setColumnStretchable( 1, true );
setColumnStretchable( 2, true );
setColumnStretchable( 3, true );
}
void ConnectionTable::sortColumn( int col, bool ascending, bool )
{
horizontalHeader()->setSortIndicator( col, ascending );
if ( isEditing() )
endEdit( currEditRow(), currEditCol(), FALSE, FALSE );
TQTable::sortColumn( col, ascending, TRUE );
endEdit( currEditRow(), currEditCol(), false, false );
TQTable::sortColumn( col, ascending, true );
setCurrentCell( 0, 0 );
emit resorted();
}

@ -56,29 +56,29 @@
#include <tdelocale.h>
CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
: CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw )
: CustomWidgetEditorBase( parent, 0, true ), mainWindow( mw )
{
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
checkTimer = new TQTimer( this );
connect( checkTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( checkWidgetName() ) );
editClass->setEnabled( FALSE );
editHeader->setEnabled( FALSE );
buttonChooseHeader->setEnabled( FALSE );
buttonChoosePixmap->setEnabled( FALSE );
spinWidth->setEnabled( FALSE );
spinHeight->setEnabled( FALSE );
sizeHor->setEnabled( FALSE );
sizeVer->setEnabled( FALSE );
checkContainer->setEnabled( FALSE );
localGlobalCombo->setEnabled( FALSE );
editClass->setEnabled( false );
editHeader->setEnabled( false );
buttonChooseHeader->setEnabled( false );
buttonChoosePixmap->setEnabled( false );
spinWidth->setEnabled( false );
spinHeight->setEnabled( false );
sizeHor->setEnabled( false );
sizeVer->setEnabled( false );
checkContainer->setEnabled( false );
localGlobalCombo->setEnabled( false );
editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) );
editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) );
editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) );
editSignal->setValidator( new AsciiValidator( true, editSignal ) );
editSlot->setValidator( new AsciiValidator( true, editSignal ) );
editProperty->setValidator( new AsciiValidator( editSignal ) );
editSignal->setEnabled( FALSE );
buttonRemoveSignal->setEnabled( FALSE );
editSignal->setEnabled( false );
buttonRemoveSignal->setEnabled( false );
setupDefinition();
setupSignals();
@ -100,15 +100,15 @@ void CustomWidgetEditor::setupDefinition()
if ( boxWidgets->firstItem() ) {
boxWidgets->setCurrentItem( boxWidgets->firstItem() );
boxWidgets->setSelected( boxWidgets->firstItem(), TRUE );
boxWidgets->setSelected( boxWidgets->firstItem(), true );
}
oldItem = 0;
}
void CustomWidgetEditor::setupSignals()
{
editSignal->setEnabled( FALSE );
buttonRemoveSignal->setEnabled( FALSE );
editSignal->setEnabled( false );
buttonRemoveSignal->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
return;
@ -117,15 +117,15 @@ void CustomWidgetEditor::setupSignals()
listSignals->insertItem( TQString( *it ) );
if ( listSignals->firstItem() ) {
listSignals->setCurrentItem( listSignals->firstItem() );
listSignals->setSelected( listSignals->firstItem(), TRUE );
listSignals->setSelected( listSignals->firstItem(), true );
}
}
void CustomWidgetEditor::setupSlots()
{
editSlot->setEnabled( FALSE );
comboAccess->setEnabled( FALSE );
buttonRemoveSlot->setEnabled( FALSE );
editSlot->setEnabled( false );
comboAccess->setEnabled( false );
buttonRemoveSlot->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
@ -136,15 +136,15 @@ void CustomWidgetEditor::setupSlots()
if ( listSlots->firstChild() ) {
listSlots->setCurrentItem( listSlots->firstChild() );
listSlots->setSelected( listSlots->firstChild(), TRUE );
listSlots->setSelected( listSlots->firstChild(), true );
}
}
void CustomWidgetEditor::setupProperties()
{
editProperty->setEnabled( FALSE );
comboType->setEnabled( FALSE );
buttonRemoveProperty->setEnabled( FALSE );
editProperty->setEnabled( false );
comboType->setEnabled( false );
buttonRemoveProperty->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
@ -155,7 +155,7 @@ void CustomWidgetEditor::setupProperties()
if ( listProperties->firstChild() ) {
listProperties->setCurrentItem( listProperties->firstChild() );
listProperties->setSelected( listProperties->firstChild(), TRUE );
listProperties->setSelected( listProperties->firstChild(), true );
}
}
@ -166,33 +166,33 @@ void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w ) {
buttonChooseHeader->setEnabled( FALSE );
editClass->setEnabled( FALSE );
editHeader->setEnabled( FALSE );
buttonChoosePixmap->setEnabled( FALSE );
spinWidth->setEnabled( FALSE );
spinHeight->setEnabled( FALSE );
localGlobalCombo->setEnabled( FALSE );
sizeHor->setEnabled( FALSE );
sizeVer->setEnabled( FALSE );
checkContainer->setEnabled( FALSE );
buttonChooseHeader->setEnabled( false );
editClass->setEnabled( false );
editHeader->setEnabled( false );
buttonChoosePixmap->setEnabled( false );
spinWidth->setEnabled( false );
spinHeight->setEnabled( false );
localGlobalCombo->setEnabled( false );
sizeHor->setEnabled( false );
sizeVer->setEnabled( false );
checkContainer->setEnabled( false );
return;
}
buttonChooseHeader->setEnabled( TRUE );
editClass->setEnabled( TRUE );
editHeader->setEnabled( TRUE );
buttonChoosePixmap->setEnabled( TRUE );
spinWidth->setEnabled( TRUE );
spinHeight->setEnabled( TRUE );
localGlobalCombo->setEnabled( TRUE );
sizeHor->setEnabled( TRUE );
sizeVer->setEnabled( TRUE );
checkContainer->setEnabled( TRUE );
editClass->blockSignals( TRUE );
buttonChooseHeader->setEnabled( true );
editClass->setEnabled( true );
editHeader->setEnabled( true );
buttonChoosePixmap->setEnabled( true );
spinWidth->setEnabled( true );
spinHeight->setEnabled( true );
localGlobalCombo->setEnabled( true );
sizeHor->setEnabled( true );
sizeVer->setEnabled( true );
checkContainer->setEnabled( true );
editClass->blockSignals( true );
editClass->setText( w->className );
editClass->blockSignals( FALSE );
editClass->blockSignals( false );
editHeader->setText( w->includeFile );
localGlobalCombo->setCurrentItem( (int)w->includePolicy );
if ( w->pixmap )
@ -230,7 +230,7 @@ void CustomWidgetEditor::addWidgetClicked()
customWidgets.insert( i, w );
boxWidgets->setCurrentItem( i );
boxWidgets->setSelected( i, TRUE );
boxWidgets->setSelected( i, true );
}
void CustomWidgetEditor::classNameChanged( const TQString &s )
@ -243,7 +243,7 @@ void CustomWidgetEditor::classNameChanged( const TQString &s )
WidgetDatabase::customWidgetClassNameChanged( w->className, s );
checkTimer->stop();
boxWidgets->blockSignals( TRUE );
boxWidgets->blockSignals( true );
oldName = w->className;
w->className = s;
TQListBoxItem *old = i;
@ -255,8 +255,8 @@ void CustomWidgetEditor::classNameChanged( const TQString &s )
oldItem = i;
customWidgets.insert( i, w );
customWidgets.remove( old );
boxWidgets->blockSignals( FALSE );
checkTimer->start( 1000, TRUE );
boxWidgets->blockSignals( false );
checkTimer->start( 1000, true );
}
void CustomWidgetEditor::deleteWidgetClicked()
@ -289,7 +289,7 @@ void CustomWidgetEditor::deleteWidgetClicked()
i = boxWidgets->item( boxWidgets->currentItem() );
if ( i ) {
boxWidgets->setCurrentItem( i );
boxWidgets->setSelected( i, TRUE );
boxWidgets->setSelected( i, true );
}
}
@ -337,13 +337,13 @@ void CustomWidgetEditor::pixmapChoosen()
delete w->pixmap;
w->pixmap = new TQPixmap( pix );
boxWidgets->blockSignals( TRUE );
boxWidgets->blockSignals( true );
TQListBoxItem *old = i;
boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() );
i = boxWidgets->item( boxWidgets->currentItem() );
customWidgets.insert( i, w );
customWidgets.remove( old );
boxWidgets->blockSignals( FALSE );
boxWidgets->blockSignals( false );
previewPixmap->setPixmap( *w->pixmap );
}
@ -417,28 +417,28 @@ void CustomWidgetEditor::closeClicked()
void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i )
{
editSignal->blockSignals( TRUE );
editSignal->blockSignals( true );
editSignal->setText( "" );
editSignal->blockSignals( FALSE );
editSignal->blockSignals( false );
if ( !i ) {
editSignal->setEnabled( FALSE );
buttonRemoveSignal->setEnabled( FALSE );
editSignal->setEnabled( false );
buttonRemoveSignal->setEnabled( false );
return;
}
editSignal->blockSignals( TRUE );
editSignal->setEnabled( TRUE );
buttonRemoveSignal->setEnabled( TRUE );
editSignal->blockSignals( true );
editSignal->setEnabled( true );
buttonRemoveSignal->setEnabled( true );
editSignal->setText( i->text() );
editSignal->blockSignals( FALSE );
editSignal->blockSignals( false );
}
void CustomWidgetEditor::addSignal()
{
TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" );
listSignals->setCurrentItem( i );
listSignals->setSelected( i, TRUE );
listSignals->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w )
w->lstSignals.append( i->text().latin1() );
@ -449,7 +449,7 @@ void CustomWidgetEditor::removeSignal()
TQString s = listSignals->currentText();
delete listSignals->item( listSignals->currentItem() );
if ( listSignals->currentItem() != -1 )
listSignals->setSelected( listSignals->currentItem(), TRUE );
listSignals->setSelected( listSignals->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w )
w->lstSignals.remove( s.latin1() );
@ -464,9 +464,9 @@ void CustomWidgetEditor::signalNameChanged( const TQString &s )
TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
if ( it != w->lstSignals.end() )
w->lstSignals.remove( it );
listSignals->blockSignals( TRUE );
listSignals->blockSignals( true );
listSignals->changeItem( s, listSignals->currentItem() );
listSignals->blockSignals( FALSE );
listSignals->blockSignals( false );
w->lstSignals.append( s.latin1() );
}
@ -511,7 +511,7 @@ void CustomWidgetEditor::addSlot()
{
TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" );
listSlots->setCurrentItem( i );
listSlots->setSelected( i, TRUE );
listSlots->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w ) {
MetaDataBase::Function slot;
@ -532,7 +532,7 @@ void CustomWidgetEditor::removeSlot()
}
delete listSlots->currentItem();
if ( listSlots->currentItem() )
listSlots->setSelected( listSlots->currentItem(), TRUE );
listSlots->setSelected( listSlots->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w && slot.function != "1 2 3" )
w->lstSlots.remove( slot );
@ -540,29 +540,29 @@ void CustomWidgetEditor::removeSlot()
void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i )
{
editSlot->blockSignals( TRUE );
editSlot->blockSignals( true );
editSlot->setText( "" );
editSignal->blockSignals( FALSE );
editSignal->blockSignals( false );
if ( !i ) {
editSlot->setEnabled( FALSE );
comboAccess->setEnabled( FALSE );
buttonRemoveSlot->setEnabled( FALSE );
editSlot->setEnabled( false );
comboAccess->setEnabled( false );
buttonRemoveSlot->setEnabled( false );
return;
}
editSlot->setEnabled( TRUE );
comboAccess->setEnabled( TRUE );
buttonRemoveSlot->setEnabled( TRUE );
editSlot->blockSignals( TRUE );
comboAccess->blockSignals( TRUE );
editSlot->setEnabled( true );
comboAccess->setEnabled( true );
buttonRemoveSlot->setEnabled( true );
editSlot->blockSignals( true );
comboAccess->blockSignals( true );
editSlot->setText( i->text( 0 ) );
if ( i->text( 1 ) == i18n( "protected" ) )
comboAccess->setCurrentItem( 1 );
else
comboAccess->setCurrentItem( 0 );
editSlot->blockSignals( FALSE );
comboAccess->blockSignals( FALSE );
editSlot->blockSignals( false );
comboAccess->blockSignals( false );
}
void CustomWidgetEditor::propertyTypeChanged( const TQString &s )
@ -605,7 +605,7 @@ void CustomWidgetEditor::addProperty()
{
TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" );
listProperties->setCurrentItem( i );
listProperties->setSelected( i, TRUE );
listProperties->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w ) {
MetaDataBase::Property prop;
@ -625,7 +625,7 @@ void CustomWidgetEditor::removeProperty()
}
delete listProperties->currentItem();
if ( listProperties->currentItem() )
listProperties->setSelected( listProperties->currentItem(), TRUE );
listProperties->setSelected( listProperties->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w && property.property != "1 2 3" )
w->lstProperties.remove( property );
@ -633,22 +633,22 @@ void CustomWidgetEditor::removeProperty()
void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
{
editProperty->blockSignals( TRUE );
editProperty->blockSignals( true );
editProperty->setText( "" );
editSignal->blockSignals( FALSE );
editSignal->blockSignals( false );
if ( !i ) {
editProperty->setEnabled( FALSE );
comboType->setEnabled( FALSE );
buttonRemoveProperty->setEnabled( FALSE );
editProperty->setEnabled( false );
comboType->setEnabled( false );
buttonRemoveProperty->setEnabled( false );
return;
}
editProperty->setEnabled( TRUE );
comboType->setEnabled( TRUE );
buttonRemoveProperty->setEnabled( TRUE );
editProperty->blockSignals( TRUE );
comboType->blockSignals( TRUE );
editProperty->setEnabled( true );
comboType->setEnabled( true );
buttonRemoveProperty->setEnabled( true );
editProperty->blockSignals( true );
comboType->blockSignals( true );
editProperty->setText( i->text( 0 ) );
for ( int j = 0; j < comboType->count(); ++j ) {
@ -657,8 +657,8 @@ void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
break;
}
}
editProperty->blockSignals( FALSE );
comboType->blockSignals( FALSE );
editProperty->blockSignals( false );
comboType->blockSignals( false );
}
static TQString makeIndent2( int indent )

@ -82,13 +82,13 @@ bool QDesignerDataBrowser::event( TQEvent* e )
#endif
if ( e->type() == TQEvent::Show ) {
if ( con ) {
TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con );
setSqlCursor( cursor, TRUE );
TQSqlCursor* cursor = new TQSqlCursor( tbl, true, con );
setSqlCursor( cursor, true );
setForm( frm );
refresh();
first();
}
return TRUE;
return true;
}
#if defined(DESIGNER)
}
@ -110,7 +110,7 @@ bool QDesignerDataView::event( TQEvent* e )
if ( e->type() == TQEvent::Show ) {
setForm( frm );
readFields();
return TRUE;
return true;
}
#if defined(DESIGNER)
}

@ -60,20 +60,20 @@ void DatabaseConnectionEditor::accept()
void DatabaseConnectionEditor::init()
{
connectionWidget->editName->setEnabled( FALSE );
connectionWidget->editName->setEnabled( false );
connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
connectionWidget->editName->setText( conn->name() );
connectionWidget->comboDriver->setEnabled( FALSE );
connectionWidget->comboDriver->setEnabled( false );
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );
connectionWidget->editDatabase->setEnabled( FALSE );
connectionWidget->editDatabase->setEnabled( false );
connectionWidget->editDatabase->setText( conn->database() );
connectionWidget->editUsername->setEnabled( TRUE );
connectionWidget->editUsername->setEnabled( true );
connectionWidget->editUsername->setText( conn->username() );
connectionWidget->editPassword->setEnabled( TRUE );
connectionWidget->editPassword->setEnabled( true );
connectionWidget->editPassword->setText( "" );
connectionWidget->editHostname->setEnabled( TRUE );
connectionWidget->editHostname->setEnabled( true );
connectionWidget->editHostname->setText( conn->hostname() );
connectionWidget->editPort->setEnabled( TRUE );
connectionWidget->editPort->setEnabled( true );
connectionWidget->editPort->setValue( conn->port() );
connectionWidget->editUsername->setFocus();
connectionWidget->editUsername->selectAll();

@ -40,7 +40,7 @@ class DatabaseConnectionEditor : public DatabaseConnectionEditorBase
public:
DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
const char* name = 0, bool modal = false, WFlags fl = 0 );
~DatabaseConnectionEditor();
public slots:

@ -42,14 +42,14 @@
#include <tdelocale.h>
static bool blockChanges = FALSE;
static bool blockChanges = false;
/*
* Constructs a DatabaseConnectionsEditor which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: DatabaseConnectionBase( parent, name, modal, fl ), project( pro )
@ -64,7 +64,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa
connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() );
#endif
connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
enableAll( FALSE );
enableAll( false );
}
DatabaseConnectionsEditor::~DatabaseConnectionsEditor()
@ -81,15 +81,15 @@ void DatabaseConnectionsEditor::deleteConnection()
listConnections->setCurrentItem( 0 );
currentConnectionChanged( listConnections->currentText() );
} else {
enableAll( FALSE );
enableAll( false );
}
project->saveConnections();
}
void DatabaseConnectionsEditor::newConnection()
{
blockChanges = TRUE;
enableAll( TRUE );
blockChanges = true;
enableAll( true );
TQString n( "(default)" );
if ( project->databaseConnection( n ) ) {
n = "connection";
@ -100,9 +100,9 @@ void DatabaseConnectionsEditor::newConnection()
}
connectionWidget->editName->setText( n );
listConnections->clearSelection();
buttonConnect->setDefault( TRUE );
buttonConnect->setDefault( true );
connectionWidget->editName->setFocus();
blockChanges = FALSE;
blockChanges = false;
}
void DatabaseConnectionsEditor::doConnect()
@ -151,15 +151,15 @@ void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s )
{
#ifndef TQT_NO_SQL
DatabaseConnection *conn = project->databaseConnection( s );
blockChanges = TRUE;
blockChanges = true;
enableAll( conn != 0 );
connectionWidget->editName->setEnabled( FALSE );
blockChanges = FALSE;
connectionWidget->editName->setEnabled( false );
blockChanges = false;
if ( !conn )
return;
blockChanges = TRUE;
blockChanges = true;
connectionWidget->editName->setText( conn->name() );
blockChanges = FALSE;
blockChanges = false;
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );
connectionWidget->editDatabase->setText( conn->database() );
connectionWidget->editUsername->setText( conn->username() );

@ -39,7 +39,7 @@ class DatabaseConnectionsEditor : public DatabaseConnectionBase
public:
DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
const char* name = 0, bool modal = false, WFlags fl = 0 );
~DatabaseConnectionsEditor();
protected slots:

@ -33,9 +33,9 @@ public:
:TQAction(menuText, accel, parent, name) {}
DesignerAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
:TQAction(icon, menuText, accel, parent, name) {}
DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = false )
:TQAction(text, icon, menuText, accel, parent, name, toggle) {}
DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = false )
:TQAction(text, menuText, accel, parent, name, toggle) {}
DesignerAction ( TQObject * parent, const char * name, bool toggle )
:TQAction(parent, name, toggle) {}

@ -72,7 +72,7 @@ TQSplashScreen *DesignerApplication::showSplash()
TQRect mainRect;
TQString keybase = settingsKey();
bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE );
bool show = config.readBoolEntry( keybase + "SplashScreen", true );
mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) );
mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) );
mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) );
@ -151,7 +151,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
TQObjectList* l = MainWindow::self->queryList( "FormWindow" );
FormWindow* fw = (FormWindow*) l->first();
FormWindow* totop = 0;
bool haveit = FALSE;
bool haveit = false;
while ( fw ) {
haveit = haveit || fw->fileName() == arg;
if ( haveit )
@ -161,7 +161,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
}
if ( !haveit ) {
FlashWindow( MainWindow::self->winId(), TRUE );
FlashWindow( MainWindow::self->winId(), true );
MainWindow::self->openFormWindow( arg );
} else if ( totop ) {
totop->setFocus();
@ -169,7 +169,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
delete l;
}
}
return TRUE;
return true;
}
return TQApplication::winEventFilter( msg );
}

@ -585,7 +585,7 @@ void DesignerFormWindowImpl::insertWidget( TQWidget * )
TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name )
{
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
formWindow->insertWidget( w, TRUE );
formWindow->insertWidget( w, true );
formWindow->killAccels( formWindow->mainContainer() );
return w;
}
@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout()
void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{
formWindow->selectWidget( w, TRUE );
formWindow->selectWidget( w, true );
}
void DesignerFormWindowImpl::selectAll()
@ -688,7 +688,7 @@ void DesignerFormWindowImpl::clearSelection()
bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const
{
return FALSE;
return false;
}
TQWidgetList DesignerFormWindowImpl::selectedWidgets() const
@ -736,12 +736,12 @@ void DesignerFormWindowImpl::addAction( TQAction *a )
return;
formWindow->actionList().append( a );
MetaDataBase::addEntry( a );
setPropertyChanged( a, "name", TRUE );
setPropertyChanged( a, "text", TRUE );
setPropertyChanged( a, "menuText", TRUE );
setPropertyChanged( a, "accel", TRUE );
setPropertyChanged( a, "name", true );
setPropertyChanged( a, "text", true );
setPropertyChanged( a, "menuText", true );
setPropertyChanged( a, "accel", true );
if ( !a->iconSet().isNull() && !a->iconSet().pixmap().isNull() )
setPropertyChanged( a, "iconSet", TRUE );
setPropertyChanged( a, "iconSet", true );
}
void DesignerFormWindowImpl::removeAction( TQAction *a )
@ -770,8 +770,8 @@ void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQStr
void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value )
{
int id = o->metaObject()->findProperty( property, TRUE );
const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
int id = o->metaObject()->findProperty( property, true );
const TQMetaProperty* p = o->metaObject()->property( id, true );
if ( p && p->isValid() )
o->setProperty( property, value );
else
@ -780,8 +780,8 @@ void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, con
TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const
{
int id = o->metaObject()->findProperty( prop, TRUE );
const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
int id = o->metaObject()->findProperty( prop, true );
const TQMetaProperty* p = o->metaObject()->property( id, true );
if ( p && p->isValid() )
return o->property( prop );
return MetaDataBase::fakeProperty( o, prop );
@ -963,7 +963,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
TQString n = name;
formWindow->unify( popup, n, TRUE );
formWindow->unify( popup, n, true );
popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb ) {
@ -1009,7 +1009,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new QDesignerToolBar( mw );
TQString n = name;
formWindow->unify( tb, n, TRUE );
formWindow->unify( tb, n, true );
tb->setName( n );
mw->addToolBar( tb, text );
}
@ -1075,7 +1075,7 @@ void DesignerOutputDockImpl::appendError( const TQString &s, int l )
ls << s;
TQValueList<uint> ll;
ll << l;
outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() );
outWin->setErrorMessages( ls, ll, false, TQStringList(), TQObjectList() );
}
void DesignerOutputDockImpl::clearError()

@ -142,7 +142,7 @@ public:
void setTables( const TQStringList & );
TQMap<TQString, TQStringList> fields() const;
void setFields( const TQMap<TQString, TQStringList> & );
void open( bool suppressDialog = TRUE ) const;
void open( bool suppressDialog = true ) const;
void close() const;
TQSqlDatabase* connection();
private:
@ -205,7 +205,7 @@ public:
void setCurrentWidget( TQWidget * );
TQPtrList<TQAction> actionList() const;
TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
TQObject* parent, const char* name = 0, bool toggle = FALSE );
TQObject* parent, const char* name = 0, bool toggle = false );
void addAction( TQAction * );
void removeAction( TQAction * );
void preview() const;

@ -50,7 +50,7 @@
#include <tdelocale.h>
EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
: EditFunctionsBase( parent, 0, TRUE ), formWindow( fw )
: EditFunctionsBase( parent, 0, true ), formWindow( fw )
{
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@ -95,8 +95,8 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
}
}
boxProperties->setEnabled( FALSE );
functionName->setValidator( new AsciiValidator( TRUE, functionName ) );
boxProperties->setEnabled( false );
functionName->setValidator( new AsciiValidator( true, functionName ) );
if ( functionListView->firstChild() )
functionListView->setCurrentItem( functionListView->firstChild() );
@ -107,7 +107,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
// Enable rename for all TQListViewItems
TQListViewItemIterator lvit = functionListView->firstChild();
for ( ; *lvit; lvit++ )
(*lvit)->setRenameEnabled( 0, TRUE );
(*lvit)->setRenameEnabled( 0, true );
// Connect listview signal to signal-relay
TQObject::connect( functionListView,
@ -137,12 +137,12 @@ void EditFunctions::okClicked()
TQValueList<MetaDataBase::Function>::Iterator fit;
if ( !functionList.isEmpty() ) {
for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) {
bool functionFound = FALSE;
bool functionFound = false;
TQValueList<FunctItem>::Iterator it = functList.begin();
for ( ; it != functList.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).oldName ) ==
MetaDataBase::normalizeFunction( (*fit).function ) ) {
functionFound = TRUE;
functionFound = true;
break;
}
}
@ -156,7 +156,7 @@ void EditFunctions::okClicked()
}
}
bool invalidFunctions = FALSE;
bool invalidFunctions = false;
TQValueList<FunctItem> invalidItems;
if ( !functList.isEmpty() ) {
@ -179,15 +179,15 @@ void EditFunctions::okClicked()
bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' );
if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) {
invalidFunctions = TRUE;
invalidFunctions = true;
invalidItems.append( (*it) );
continue;
}
bool functionFound = FALSE;
bool functionFound = false;
for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) {
if ( MetaDataBase::normalizeFunction( (*fit).function ) ==
MetaDataBase::normalizeFunction( (*it).oldName ) ) {
functionFound = TRUE;
functionFound = true;
break;
}
}
@ -218,12 +218,12 @@ void EditFunctions::okClicked()
"Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
TQValueList<FunctItem>::Iterator it = functList.begin();
while ( it != functList.end() ) {
bool found = FALSE;
bool found = false;
TQValueList<FunctItem>::Iterator vit = invalidItems.begin();
for ( ; vit != invalidItems.end(); ++vit ) {
if ( (*vit).newName == (*it).newName ) {
invalidItems.remove( vit );
found = TRUE;
found = true;
break;
}
}
@ -237,7 +237,7 @@ void EditFunctions::okClicked()
functionIds.remove( fit );
delete litem;
if ( functionListView->currentItem() )
functionListView->setSelected( functionListView->currentItem(), TRUE );
functionListView->setSelected( functionListView->currentItem(), true );
currentItemChanged( functionListView->currentItem() );
break;
}
@ -249,7 +249,7 @@ void EditFunctions::okClicked()
}
if ( functionListView->firstChild() ) {
functionListView->setCurrentItem( functionListView->firstChild() );
functionListView->setSelected( functionListView->firstChild(), TRUE );
functionListView->setSelected( functionListView->firstChild(), true );
}
}
formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView();
@ -270,7 +270,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
{
TQListViewItem *i = new TQListViewItem( functionListView );
i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) );
i->setRenameEnabled( 0, TRUE );
i->setRenameEnabled( 0, true );
i->setText( 1, "void" );
i->setText( 2, "virtual" );
@ -301,7 +301,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
}
functionListView->setCurrentItem( i );
functionListView->setSelected( i, TRUE );
functionListView->setSelected( i, true );
functionListView->ensureItemVisible( i );
functionName->setFocus();
functionName->selectAll();
@ -329,7 +329,7 @@ void EditFunctions::functionRemove()
if ( !functionListView->currentItem() )
return;
functionListView->blockSignals( TRUE );
functionListView->blockSignals( true );
removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) );
int delId = functionIds[ functionListView->currentItem() ];
TQValueList<FunctItem>::Iterator it = functList.begin();
@ -343,24 +343,24 @@ void EditFunctions::functionRemove()
functionIds.remove( functionListView->currentItem() );
delete functionListView->currentItem();
if ( functionListView->currentItem() )
functionListView->setSelected( functionListView->currentItem(), TRUE );
functionListView->blockSignals( FALSE );
functionListView->setSelected( functionListView->currentItem(), true );
functionListView->blockSignals( false );
currentItemChanged( functionListView->currentItem() );
}
void EditFunctions::currentItemChanged( TQListViewItem *i )
{
functionName->blockSignals( TRUE );
functionName->blockSignals( true );
functionName->setText( "" );
functionAccess->setCurrentItem( 0 );
functionName->blockSignals( FALSE );
functionName->blockSignals( false );
if ( !i ) {
boxProperties->setEnabled( FALSE );
boxProperties->setEnabled( false );
return;
}
functionName->blockSignals( TRUE );
functionName->blockSignals( true );
functionName->setText( i->text( 0 ) );
editType->setText( i->text( 1 ) );
TQString specifier = i->text( 2 );
@ -385,8 +385,8 @@ void EditFunctions::currentItemChanged( TQListViewItem *i )
else
functionType->setCurrentItem( 1 );
functionName->blockSignals( FALSE );
boxProperties->setEnabled( TRUE );
functionName->blockSignals( false );
boxProperties->setEnabled( true );
}
void EditFunctions::currentTextChanged( const TQString &txt )
@ -490,7 +490,7 @@ void EditFunctions::setCurrentFunction( const TQString &function )
while ( it.current() ) {
if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) {
functionListView->setCurrentItem( it.current() );
functionListView->setSelected( it.current(), TRUE );
functionListView->setSelected( it.current(), true );
currentItemChanged( it.current() );
return;
}
@ -525,7 +525,7 @@ void EditFunctions::displaySlots( bool justSlots )
}
if ( functionListView->firstChild() )
functionListView->setSelected( functionListView->firstChild(), TRUE );
functionListView->setSelected( functionListView->firstChild(), true );
}
void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text )

@ -41,7 +41,7 @@ class EditFunctions : public EditFunctionsBase
public:
EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE );
EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = false );
void setCurrentFunction( const TQString &function );
void functionAdd( const TQString &access = TQString(),

@ -43,16 +43,16 @@ void FindDialog::doFind()
if ( !editor->find( comboFind->currentText(), checkCase->isChecked(),
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) )
checkBegin->setChecked( TRUE );
checkBegin->setChecked( true );
else
checkBegin->setChecked( FALSE );
checkBegin->setChecked( false );
}
void FindDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
checkBegin->setChecked( TRUE );
checkBegin->setChecked( true );
formWindow = fw;
if ( editor )
editor->release();

@ -66,8 +66,8 @@ static TQString make_func_pretty( const TQString &s )
FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name )
: filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ),
timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ),
cm( FALSE ), codeFileStat( None )
timeStamp( 0, fn + codeExtension() ), codeEdited( false ), pkg( false ),
cm( false ), codeFileStat( None )
{
MetaDataBase::addEntry( this );
fake = qstrcmp( name, "qt_fakewindow" ) == 0;
@ -75,7 +75,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name
pro->addFormFile( this );
loadCode();
if ( !temp )
checkFileName( FALSE );
checkFileName( false );
connect(this, TQ_SIGNAL(somethingChanged(FormFile* )), this, TQ_SLOT(emitNewStatus(FormFile* )));
}
@ -96,7 +96,7 @@ void FormFile::setFormWindow( FormWindow *f )
fw = f;
if ( fw )
fw->setFormFile( this );
parseCode( cod, FALSE );
parseCode( cod, false );
TQTimer::singleShot( 0, this, TQ_SLOT( notifyFormWindowChange() ) );
}
@ -110,12 +110,12 @@ void FormFile::setFileName( const TQString &fn )
if ( fn == filename )
return;
if ( fn.isEmpty() ) {
fileNameTemp = TRUE;
fileNameTemp = true;
if ( filename.find( "unnamed" ) != 0 )
filename = createUnnamedFileName();
return;
} else {
fileNameTemp = FALSE;
fileNameTemp = false;
}
filename = fn;
timeStamp.setFileName( filename + codeExtension() );
@ -166,14 +166,14 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
if ( fileNameTemp )
return saveAs();
if ( !ignoreModified && !isModified() )
return TRUE;
return true;
if ( ed )
ed->save();
if ( formWindow() && isModified( WFormWindow ) ) {
if ( withMsgBox ) {
if ( !formWindow()->checkCustomWidgets() )
return FALSE;
return false;
}
if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) {
@ -229,7 +229,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
if ( MainWindow::self )
MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) );
if ( formCodeOnly )
return FALSE;
return false;
return saveAs();
}
if ( MainWindow::self )
@ -237,11 +237,11 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
arg( formCodeOnly ? codeFile() : filename ));
} else {
if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) )
return FALSE;
return false;
}
timeStamp.update();
setModified( FALSE );
return TRUE;
setModified( false );
return true;
}
bool FormFile::saveAs( bool ignoreModified )
@ -252,7 +252,7 @@ bool FormFile::saveAs( bool ignoreModified )
f.replace( "::", "_" );
f = pro->makeAbsolute( f + ".ui" );
}
bool saved = FALSE;
bool saved = false;
if ( ignoreModified ) {
TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
f = TQFileInfo( f ).fileName();
@ -266,11 +266,11 @@ bool FormFile::saveAs( bool ignoreModified )
i18n( "Save Form '%1' As").arg( formName() )/*,
MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ );
if ( fn.isEmpty() )
return FALSE;
return false;
TQFileInfo fi( fn );
if ( fi.extension() != "ui" )
fn += ".ui";
fileNameTemp = FALSE;
fileNameTemp = false;
filename = pro->makeRelative( fn );
TQFileInfo relfi( filename );
if ( relfi.exists() ) {
@ -278,27 +278,27 @@ bool FormFile::saveAs( bool ignoreModified )
i18n( "The file already exists. Do you wish to overwrite it?" ),
TQMessageBox::Yes,
TQMessageBox::No ) == TQMessageBox::Yes ) {
saved = TRUE;
saved = true;
} else {
filename = f;
}
} else {
saved = TRUE;
saved = true;
}
}
if ( !checkFileName( TRUE ) ) {
if ( !checkFileName( true ) ) {
filename = f;
return FALSE;
return false;
}
pro->setModified( TRUE );
pro->setModified( true );
timeStamp.setFileName( pro->makeAbsolute( codeFile() ) );
if ( ed && formWindow() )
ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) );
setModified( TRUE );
setModified( true );
if ( pro->isDummy() )
fw->mainWindow()->addRecentlyOpenedFile( fn );
return save( TRUE, ignoreModified );
return save( true, ignoreModified );
}
bool FormFile::close()
@ -309,18 +309,18 @@ bool FormFile::close()
}
if ( formWindow() )
return formWindow()->close();
return TRUE;
return true;
}
bool FormFile::closeEvent()
{
if ( !isModified() && fileNameTemp ) {
pro->removeFormFile( this );
return TRUE;
return true;
}
if ( !isModified() )
return TRUE;
return true;
if ( editor() )
editor()->save();
@ -330,7 +330,7 @@ bool FormFile::closeEvent()
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
if ( !save() )
return FALSE;
return false;
case 1: // don't save
loadCode();
if ( ed )
@ -341,16 +341,16 @@ bool FormFile::closeEvent()
MainWindow::self->workspace()->update();
break;
case 2: // cancel
return FALSE;
return false;
default:
break;
}
setModified( FALSE );
setModified( false );
if ( MainWindow::self )
MainWindow::self->updateFunctionList();
setCodeEdited( FALSE );
return TRUE;
setCodeEdited( false );
return true;
}
void FormFile::setModified( bool m, int who )
@ -373,7 +373,7 @@ bool FormFile::isModified( int who )
bool FormFile::isFormWindowModified() const
{
if ( !formWindow() || !formWindow()->commandHistory() )
return FALSE;
return false;
return formWindow()->commandHistory()->isModified();
}
@ -422,7 +422,7 @@ void FormFile::showFormWindow()
formWindow()->setFocus();
return;
}
MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this );
MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), true, this );
}
bool FormFile::setupUihFile( bool askForUih )
@ -430,10 +430,10 @@ bool FormFile::setupUihFile( bool askForUih )
if ( !pro->isCpp() || !askForUih ) {
if ( !hasFormCode() ) {
createFormCode();
setModified( TRUE );
setModified( true );
}
codeFileStat = FormFile::Ok;
return TRUE;
return true;
}
if ( codeFileStat != FormFile::Ok && !ed ) {
if ( hasFormCode() ) {
@ -443,20 +443,20 @@ bool FormFile::setupUihFile( bool askForUih )
i18n( "Use Existing" ), i18n( "Create New" ),
i18n( "Cancel" ), 2, 2 );
if ( i == 2 )
return FALSE;
return false;
if ( i == 1 )
createFormCode();
} else {
if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ),
i18n( "Do you want to create an new \"ui.h\" file?" ),
TQMessageBox::Yes, TQMessageBox::No ) )
return FALSE;
return false;
createFormCode();
}
setModified( TRUE );
setModified( true );
}
codeFileStat = FormFile::Ok;
return TRUE;
return true;
}
SourceEditor *FormFile::showEditor( bool askForUih )
@ -535,7 +535,7 @@ void FormFile::createFormCode()
(*it).returnType, (*it).access ) +
"\n" + iface->createEmptyFunction();
}
parseCode( cod, FALSE );
parseCode( cod, false );
}
void FormFile::load()
@ -550,15 +550,15 @@ bool FormFile::loadCode()
if ( !f.open( IO_ReadOnly ) ) {
cod = "";
setCodeFileState( FormFile::None );
return FALSE;
return false;
}
TQTextStream ts( &f );
cod = ts.read();
parseCode( cod, FALSE );
parseCode( cod, false );
if ( hasFormCode() && codeFileStat != FormFile::Ok )
setCodeFileState( FormFile::Deleted );
timeStamp.update();
return TRUE;
return true;
}
bool FormFile::isCodeEdited() const
@ -585,13 +585,13 @@ void FormFile::parseCode( const TQString &txt, bool allowModify )
TQMap<TQString, TQString> funcs;
for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin();
it != functions.end(); ++it ) {
bool found = FALSE;
bool found = false;
for ( TQValueList<MetaDataBase::Function>::Iterator fit = oldFunctions.begin();
fit != oldFunctions.end(); ++fit ) {
TQString f( (*fit).function );
if ( MetaDataBase::normalizeFunction( f ) ==
MetaDataBase::normalizeFunction( (*it).name ) ) {
found = TRUE;
found = true;
MetaDataBase::Function function;
function.function = make_func_pretty( (*it).name );
function.specifier = (*fit).specifier;
@ -627,12 +627,12 @@ void FormFile::parseCode( const TQString &txt, bool allowModify )
newFunctions << function;
funcs.insert( (*it).name, (*it).body );
if ( allowModify )
setFormWindowModified( TRUE );
setFormWindowModified( true );
}
}
if ( allowModify && oldFunctions.count() > 0 )
setFormWindowModified( TRUE );
setFormWindowModified( true );
MetaDataBase::setFunctionList( formWindow(), newFunctions );
}
@ -641,7 +641,7 @@ void FormFile::syncCode()
{
if ( !editor() )
return;
parseCode( editor()->editorInterface()->text(), TRUE );
parseCode( editor()->editorInterface()->text(), true );
cod = editor()->editorInterface()->text();
}
@ -672,14 +672,14 @@ void FormFile::checkTimeStamp()
bool FormFile::isUihFileUpToDate()
{
if ( timeStamp.isUpToDate() )
return TRUE;
return true;
if ( !editor() ) {
MainWindow::self->editSource();
tqDebug( "parse Code" );
parseCode( editor()->editorInterface()->text(), TRUE );
parseCode( editor()->editorInterface()->text(), true );
}
checkTimeStamp();
return FALSE;
return false;
}
void FormFile::addFunctionCode( MetaDataBase::Function function )
@ -692,11 +692,11 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
TQValueList<LanguageInterface::Function> funcs;
iface->functions( cod, &funcs );
bool hasFunc = FALSE;
bool hasFunc = false;
for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) {
hasFunc = TRUE;
hasFunc = true;
break;
}
}
@ -718,7 +718,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
"\n" + iface->createEmptyFunction();
cod += body;
if ( codeEdited ) {
setModified( TRUE );
setModified( true );
emit somethingChanged( this );
}
}
@ -865,12 +865,12 @@ bool FormFile::checkFileName( bool allowBreak )
arg( formWindow()->name() )/*,
MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */);
if ( allowBreak && fn.isEmpty() )
return FALSE;
return false;
}
filename = pro->makeRelative( fn );
ff = pro->findFormFile( filename, this );
}
return TRUE;
return true;
}
void FormFile::addConnection( const TQString &sender, const TQString &signal,

@ -73,8 +73,8 @@ public:
bool loadCode();
void load();
bool save( bool withMsgBox = TRUE, bool ignoreModified = FALSE );
bool saveAs( bool ignoreModified = FALSE );
bool save( bool withMsgBox = true, bool ignoreModified = false );
bool saveAs( bool ignoreModified = false );
bool close();
bool closeEvent();
bool isModified( int who = WAnyOrAll );
@ -89,7 +89,7 @@ public:
void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType );
void showFormWindow();
SourceEditor *showEditor( bool askForUih = TRUE );
SourceEditor *showEditor( bool askForUih = true );
static TQString createUnnamedFileName();
TQString formName() const;
@ -106,7 +106,7 @@ public:
bool hasTempFileName() const { return fileNameTemp; }
void setCodeFileState( UihState );
int codeFileState() const;
bool setupUihFile( bool askForUih = TRUE );
bool setupUihFile( bool askForUih = true );
Project *project() const { return pro; }

@ -41,7 +41,7 @@
#include <tqcheckbox.h>
FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
: FormSettingsBase( parent, 0, TRUE ), formwindow( fw )
: FormSettingsBase( parent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
@ -56,11 +56,11 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) );
if ( formwindow->savePixmapInline() )
radioPixmapInline->setChecked( TRUE );
radioPixmapInline->setChecked( true );
else if ( formwindow->savePixmapInProject() )
radioProjectImageFile->setChecked( TRUE );
radioProjectImageFile->setChecked( true );
else
radioPixmapFunction->setChecked( TRUE );
radioPixmapFunction->setChecked( true );
editPixmapFunction->setText( formwindow->pixmapLoaderFunction() );
radioProjectImageFile->setEnabled( !fw->project()->isDummy() );
spinSpacing->setValue( formwindow->layoutDefaultSpacing() );
@ -81,7 +81,7 @@ void FormSettings::okClicked()
info.author = editAuthor->text();
MetaDataBase::setMetaInfo( formwindow, info );
formwindow->commandHistory()->setModified( TRUE );
formwindow->commandHistory()->setModified( true );
if ( formwindow->savePixmapInline() ) {
MetaDataBase::clearPixmapArguments( formwindow );
@ -93,20 +93,20 @@ void FormSettings::okClicked()
}
if ( radioPixmapInline->isChecked() ) {
formwindow->setSavePixmapInline( TRUE );
formwindow->setSavePixmapInProject( FALSE );
formwindow->setSavePixmapInline( true );
formwindow->setSavePixmapInProject( false );
} else if ( radioProjectImageFile->isChecked() ){
formwindow->setSavePixmapInline( FALSE );
formwindow->setSavePixmapInProject( TRUE );
formwindow->setSavePixmapInline( false );
formwindow->setSavePixmapInProject( true );
} else {
formwindow->setSavePixmapInline( FALSE );
formwindow->setSavePixmapInProject( FALSE );
formwindow->setSavePixmapInline( false );
formwindow->setSavePixmapInProject( false );
}
if ( checkLayoutFunctions->isChecked() )
formwindow->hasLayoutFunctions( TRUE );
formwindow->hasLayoutFunctions( true );
else
formwindow->hasLayoutFunctions( FALSE );
formwindow->hasLayoutFunctions( false );
formwindow->setPixmapLoaderFunction( editPixmapFunction->text() );
formwindow->setLayoutDefaultSpacing( spinSpacing->value() );

@ -112,7 +112,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw )
#include <tqt_windows.h>
static void flickerfree_update( TQWidget *w )
{
InvalidateRect( w->winId(), 0, FALSE );
InvalidateRect( w->winId(), 0, false );
}
#endif
@ -136,7 +136,7 @@ static void flickerfree_update( TQWidget *w )
FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name )
: TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ),
commands( 100 ), pixInline( TRUE ), pixProject( FALSE )
commands( 100 ), pixInline( true ), pixProject( false )
{
ff = f;
init();
@ -145,7 +145,7 @@ FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const cha
FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name )
: TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ),
commands( 100 ), pixInline( TRUE )
commands( 100 ), pixInline( true )
{
ff = f;
init();
@ -161,14 +161,14 @@ void FormWindow::init()
iface = 0;
proj = 0;
propertyWidget = 0;
toolFixed = FALSE;
checkedSelectionsForMove = FALSE;
toolFixed = false;
checkedSelectionsForMove = false;
mContainer = 0;
startWidget = endWidget = 0;
currTool = POINTER_TOOL;
unclippedPainter = 0;
widgetPressed = FALSE;
drawRubber = FALSE;
widgetPressed = false;
drawRubber = false;
setFocusPolicy( TQWidget::ClickFocus );
sizePreviewLabel = 0;
checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" );
@ -190,7 +190,7 @@ void FormWindow::init()
insertParent = 0;
connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
propShowBlocked = FALSE;
propShowBlocked = false;
setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
@ -202,11 +202,11 @@ void FormWindow::init()
setMainContainer( w );
propertyWidget = w;
targetContainer = 0;
hadOwnPalette = FALSE;
hadOwnPalette = false;
defSpacing = BOXLAYOUT_DEFAULT_SPACING;
defMargin = BOXLAYOUT_DEFAULT_MARGIN;
hasLayoutFunc = FALSE;
hasLayoutFunc = false;
}
void FormWindow::setMainWindow( MainWindow *w )
@ -365,7 +365,7 @@ void FormWindow::insertWidget()
}
TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient );
TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, true, &currRect, orient );
if ( !w )
return;
@ -393,7 +393,7 @@ void FormWindow::insertWidget()
}
TQString s = w->name();
unify( w, s, TRUE );
unify( w, s, true );
w->setName( s );
insertWidget( w );
TQRect r( currRect );
@ -497,7 +497,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
return;
if ( checkName ) {
TQString s = w->name();
unify( w, s, TRUE );
unify( w, s, true );
w->setName( s );
}
@ -565,7 +565,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
checkedSelectionsForMove = FALSE;
checkedSelectionsForMove = false;
checkSelectionsTimer->stop();
if ( !sizePreviewLabel ) {
sizePreviewLabel = new TQLabel( this );
@ -581,7 +581,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection
drawRubber = TRUE;
drawRubber = true;
currRect = TQRect( 0, 0, -1, -1 );
startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber );
break;
@ -590,19 +590,19 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
bool sel = isWidgetSelected( w );
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed...
if ( !sel ) { // ...and widget no selectted: unselect all
clearSelection( FALSE );
clearSelection( false );
} else { // ...widget selected
// only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) {
TQObjectList *l = w->queryList( "TQWidget" );
setPropertyShowingBlocked( TRUE );
setPropertyShowingBlocked( true );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !o->isWidgetType() )
continue;
if ( insertedWidgets.find( (TQWidget*)o ) )
selectWidget( o, FALSE );
selectWidget( o, false );
}
setPropertyShowingBlocked( FALSE );
setPropertyShowingBlocked( false );
delete l;
}
}
@ -610,7 +610,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
}
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget
selectWidget( w, FALSE );
selectWidget( w, false );
break;
}
@ -623,11 +623,11 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
w = w->parentWidget();
if ( e->button() == TQt::LeftButton ) { // left button: store original geometry and more as the widget might start moving
widgetPressed = TRUE;
widgetPressed = true;
widgetGeom = TQRect( w->pos(), w->size() );
oldPressPos = w->mapFromGlobal( e->globalPos() );
origPressPos = oldPressPos;
checkedSelectionsForMove = FALSE;
checkedSelectionsForMove = false;
moving.clear();
if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) {
targetContainer = w->parentWidget();
@ -637,9 +637,9 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
}
} else { // press was on the formwindow
if ( e->button() == TQt::LeftButton ) { // left button: start rubber selection and show formwindow properties
drawRubber = TRUE;
drawRubber = true;
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
clearSelection( FALSE );
clearSelection( false );
TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
@ -654,12 +654,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
case BUDDY_TOOL:
if ( e->button() != TQt::LeftButton )
break;
validForBuddy = FALSE;
validForBuddy = false;
if ( currTool == BUDDY_TOOL ) {
if ( !::tqt_cast<TQLabel*>(w) )
break;
clearSelection( FALSE );
validForBuddy = TRUE;
clearSelection( false );
validForBuddy = true;
mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) );
} else {
mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) );
@ -669,7 +669,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
currentPos = startPos;
startWidget = designerWidget( w );
endWidget = startWidget;
beginUnclippedPainter( FALSE );
beginUnclippedPainter( false );
drawConnectionLine();
break;
case ORDER_TOOL:
@ -686,7 +686,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
commandHistory()->addCommand( cmd, TRUE );
commandHistory()->addCommand( cmd, true );
updateOrderIndicators();
}
break;
@ -732,7 +732,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
commandHistory()->addCommand( cmd, TRUE );
commandHistory()->addCommand( cmd, true );
updateOrderIndicators();
}
default:
@ -800,9 +800,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move
if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected...
if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time
setPropertyShowingBlocked( TRUE );
setPropertyShowingBlocked( true );
selectWidget( w );
setPropertyShowingBlocked( FALSE );
setPropertyShowingBlocked( false );
}
checkSelectionsForMove( w );
}
@ -845,7 +845,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
sizePreviewLabel->raise();
sizePreviewLabel->show();
#if defined(TQ_WS_WIN32)
windowsRepaintWorkaroundTimer->start( 100, TRUE );
windowsRepaintWorkaroundTimer->start( 100, true );
#endif
} else { // if we don't need to move, do some indication
TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() );
@ -860,7 +860,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
break;
case CONNECT_TOOL:
restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE );
wid = tqApp->widgetAt( e->globalPos(), true );
if ( wid )
wid = designerWidget( wid );
if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
@ -884,7 +884,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( !validForBuddy )
break;
restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE );
wid = tqApp->widgetAt( e->globalPos(), true );
if ( wid )
wid = designerWidget( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
@ -974,20 +974,20 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
}
// doesn't need to be a command, the MoveCommand does reparenting too
bool emitSelChanged = FALSE;
bool emitSelChanged = false;
for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) {
TQWidget *i = it.key();
if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) {
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
emitSelChanged = TRUE;
emitSelChanged = true;
if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
MetaDataBase::setPropertyChanged( i, "buttonGroupId", false );
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) )
( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
}
}
TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) );
i->reparent( wa, pos, TRUE );
i->reparent( wa, pos, true );
raiseSelection( i );
raiseChildSelections( i );
widgetChanged( i );
@ -1015,9 +1015,9 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
oldPos, newPos, oldParent, newParent ) );
} else if ( drawRubber ) { // we were drawing a rubber selection
endRectDraw(); // get rid of the rectangle
blockSignals( TRUE );
blockSignals( true );
selectWidgets(); // select widgets which intersect the rect
blockSignals( FALSE );
blockSignals( false );
emitSelectionChanged(); // inform about selection changes
if ( propertyWidget )
emitShowProperties( propertyWidget );
@ -1049,7 +1049,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
"buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(),
oldBuddy );
commandHistory()->addCommand( cmd, TRUE );
commandHistory()->addCommand( cmd, true );
cmd->execute();
emitUpdateProperties( startWidget );
}
@ -1085,8 +1085,8 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
}
break;
}
widgetPressed = FALSE;
drawRubber = FALSE;
widgetPressed = false;
drawRubber = false;
insertParent = 0;
delete buffer;
buffer = 0;
@ -1104,7 +1104,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
e->key() == Key_Down ) &&
propertyWidget->isWidgetType() )
checkSelectionsForMove( (TQWidget*)propertyWidget );
checkSelectionsTimer->start( 1000, TRUE );
checkSelectionsTimer->start( 1000, true );
if ( e->key() == Key_Left || e->key() == Key_Right ||
e->key() == Key_Up || e->key() == Key_Down ) {
TQWidgetList widgets;
@ -1155,7 +1155,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
if ( !widgets.isEmpty() ) {
MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this,
widgets, oldPos, newPos, 0, 0 );
commandHistory()->addCommand( cmd, TRUE );
commandHistory()->addCommand( cmd, true );
cmd->execute();
}
}
@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) )
selectWidget( w, FALSE );
selectWidget( w, false );
else if ( s )
s->updateGeometry();
}
@ -1283,7 +1283,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay )
{
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
it.current()->setWidget( 0, FALSE );
it.current()->setWidget( 0, false );
usedSelections.clear();
if ( changePropertyDisplay ) {
@ -1300,8 +1300,8 @@ void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidge
{
TQPoint pos( p );
pos = mapFromGlobal( global );
oldRectValid = FALSE;
beginUnclippedPainter( TRUE );
oldRectValid = false;
beginUnclippedPainter( true );
if ( t == Rubber )
unclippedPainter->setPen( TQPen( color0, 1 ) );
if ( t == Insert )
@ -1335,7 +1335,7 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
if ( oldRectValid )
unclippedPainter->drawRect( currRect );
if ( r.width() > 1 || r.height() > 1 ) {
oldRectValid = TRUE;
oldRectValid = true;
currRect = r;
if ( t == Insert ) {
TQString t = i18n( "%1/%2" );
@ -1344,9 +1344,9 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
}
unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) );
unclippedPainter->drawRect( currRect );
unclippedPainter->setClipping( FALSE );
unclippedPainter->setClipping( false );
} else {
oldRectValid = FALSE;
oldRectValid = false;
if ( t == Insert )
drawSizePreview( pos, i18n("Use Size Hint") );
}
@ -1386,7 +1386,7 @@ bool FormWindow::isWidgetSelected( TQObject *w )
{
if ( w->isWidgetType() )
return usedSelections.find( (TQWidget*)w ) != 0;
return FALSE; // #### do stuff for TQObjects
return false; // #### do stuff for TQObjects
}
void FormWindow::moveSelectedWidgets( int dx, int dy )
@ -1449,9 +1449,9 @@ void FormWindow::updateChildSelections( TQWidget *w )
void FormWindow::checkSelectionsForMove( TQWidget *w )
{
checkedSelectionsForMove = TRUE;
checkedSelectionsForMove = true;
TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE );
TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, false, false );
moving.clear();
if ( l ) {
TQPtrDictIterator<WidgetSelection> it( usedSelections );
@ -1564,7 +1564,7 @@ TQLabel *FormWindow::sizePreview() const
void FormWindow::invalidCheckedSelections()
{
checkedSelectionsForMove = FALSE;
checkedSelectionsForMove = false;
}
void FormWindow::checkPreviewGeometry( TQRect &r )
@ -1603,10 +1603,10 @@ void FormWindow::resizeEvent( TQResizeEvent *e )
if ( currTool == ORDER_TOOL )
repositionOrderIndicators();
if ( isVisible() )
formFile()->setModified( TRUE, FormFile::WFormWindow );
formFile()->setModified( true, FormFile::WFormWindow );
#if defined(TQ_WS_WIN32)
windowsRepaintWorkaroundTimer->start( 100, TRUE );
windowsRepaintWorkaroundTimer->start( 100, true );
#endif
}
@ -1646,7 +1646,7 @@ void FormWindow::emitShowProperties( TQObject *w )
repaintSelection( (TQWidget*)opw );
}
showPropertiesTimer->stop();
// showPropertiesTimer->start( 0, TRUE );
// showPropertiesTimer->start( 0, true );
showPropertiesTimerDone();
}
@ -1654,14 +1654,14 @@ void FormWindow::emitUpdateProperties( TQObject *w )
{
if ( w == propertyWidget ) {
updatePropertiesTimer->stop();
updatePropertiesTimer->start( 0, TRUE );
updatePropertiesTimer->start( 0, true );
}
}
void FormWindow::emitSelectionChanged()
{
selectionChangedTimer->stop();
selectionChangedTimer->start( 0, TRUE );
selectionChangedTimer->start( 0, true );
}
void FormWindow::updatePropertiesTimerDone()
@ -1686,7 +1686,7 @@ void FormWindow::selectionChangedTimerDone()
void FormWindow::currentToolChanged()
{
CHECK_MAINWINDOW;
toolFixed = FALSE;
toolFixed = false;
int t = mainwindow->currentTool();
if ( currTool == t && t != ORDER_TOOL )
return;
@ -1718,8 +1718,8 @@ void FormWindow::currentToolChanged()
}
startWidget = endWidget = 0;
widgetPressed = FALSE;
drawRubber = FALSE;
widgetPressed = false;
drawRubber = false;
insertParent = 0;
delete buffer;
buffer = 0;
@ -1727,7 +1727,7 @@ void FormWindow::currentToolChanged()
currTool = t;
if ( hasFocus() )
clearSelection( FALSE );
clearSelection( false );
mainWindow()->statusBar()->clear();
@ -1770,7 +1770,7 @@ void FormWindow::currentToolChanged()
void FormWindow::showOrderIndicators()
{
hideOrderIndicators();
orderIndicators.setAutoDelete( TRUE );
orderIndicators.setAutoDelete( true );
TQObjectList *l = mainContainer()->queryList( "TQWidget" );
stackedWidgets = MetaDataBase::tabOrder( this );
if ( l ) {
@ -1839,9 +1839,9 @@ bool FormWindow::checkCustomWidgets()
"the generated code will not compile.\n"
"Do you want to save this form now?" );
if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 )
return FALSE;
return false;
}
return TRUE;
return true;
}
void FormWindow::setPropertyShowingBlocked( bool b )
@ -1910,11 +1910,11 @@ void FormWindow::checkAccels()
insertedWidgets[ (void*)o ] ) {
TQWidget *w = (TQWidget*)o;
const TQMetaProperty* text =
w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
const TQMetaProperty* title =
w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
const TQMetaProperty* pageTitle =
w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true );
if ( text )
find_accel( w->property( "text" ).toString(), accels, w );
if ( title )
@ -1928,20 +1928,20 @@ void FormWindow::checkAccels()
delete l;
}
bool ok = TRUE;
bool ok = true;
TQWidget *wid;
for ( TQMap<TQChar, TQWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it ) {
if ( (*it).count() > 1 ) {
ok = FALSE;
ok = false;
switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count()
).arg( it.key().upper() ),
i18n( "&Select" ),
i18n( "&Cancel" ), TQString(), 2 ) ) {
case 0: // select
clearSelection( FALSE );
clearSelection( false );
for ( wid = (*it).first(); wid; wid = (*it).next() )
selectWidget( wid, TRUE );
selectWidget( wid, true );
return;
case 1: // cancel
return;
@ -1976,8 +1976,8 @@ void FormWindow::paste( const TQString &cb, TQWidget *parent )
void FormWindow::selectAll()
{
checkedSelectionsForMove = FALSE;
blockSignals( TRUE );
checkedSelectionsForMove = false;
blockSignals( true );
TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
@ -1989,7 +1989,7 @@ void FormWindow::selectAll()
delete l;
}
blockSignals( FALSE );
blockSignals( false );
emitSelectionChanged();
if ( propertyWidget )
emitShowProperties( propertyWidget );
@ -2001,7 +2001,7 @@ void FormWindow::layoutHorizontal()
TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Horizontally" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2011,7 +2011,7 @@ void FormWindow::layoutVertical()
TQWidgetList widgets( selectedWidgets() );
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Vertically" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2021,7 +2021,7 @@ void FormWindow::layoutHorizontalSplit()
TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay Out Horizontally (in splitter)" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2031,7 +2031,7 @@ void FormWindow::layoutVerticalSplit()
TQWidgetList widgets( selectedWidgets() );
LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay Out Vertically (in splitter)" ),
this, mainContainer(), 0, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2044,7 +2044,7 @@ void FormWindow::layoutGrid()
TQWidgetList widgets( selectedWidgets() );
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ),
this, mainContainer(), 0, widgets, xres, yres );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2065,7 +2065,7 @@ void FormWindow::layoutHorizontalContainer( TQWidget *w )
}
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Children Horizontally" ),
this, mainContainer(), w, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2086,7 +2086,7 @@ void FormWindow::layoutVerticalContainer( TQWidget *w )
}
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Children Vertically" ),
this, mainContainer(), w, widgets );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2110,7 +2110,7 @@ void FormWindow::layoutGridContainer( TQWidget *w )
}
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ),
this, mainContainer(), w, widgets, xres, yres );
clearSelection( FALSE );
clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@ -2139,7 +2139,7 @@ void FormWindow::breakLayout( TQWidget *w )
if ( commands.isEmpty() )
return;
clearSelection( FALSE );
clearSelection( false );
MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands );
commandHistory()->addCommand( cmd );
cmd->execute();
@ -2177,14 +2177,14 @@ int FormWindow::numVisibleWidgets() const
bool FormWindow::hasInsertedChildren( TQWidget *w ) const
{
if ( !w )
return FALSE;
return false;
w = WidgetFactory::containerOfWidget( w );
if ( !w )
return FALSE;
return false;
TQObjectList *l = w->queryList( "TQWidget" );
if ( !l || !l->first() ) {
delete l;
return FALSE;
return false;
}
for ( TQObject *o = l->first(); o; o = l->next() ) {
@ -2192,12 +2192,12 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const
( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) &&
insertedWidgets.find( (TQWidget*)o ) ) {
delete l;
return TRUE;
return true;
}
}
delete l;
return FALSE;
return false;
}
bool FormWindow::allowMove( TQWidget *w )
@ -2205,10 +2205,10 @@ bool FormWindow::allowMove( TQWidget *w )
w = w->parentWidget();
while ( w ) {
if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
return TRUE;
return true;
w = w->parentWidget();
}
return FALSE;
return false;
}
@ -2363,7 +2363,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
for ( ; it.current();) {
if ( it.current() != w &&
qstrcmp( it.current()->name(), s.latin1() ) == 0 ) {
found = TRUE;
found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@ -2385,7 +2385,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
for ( a = al.first(); a; a = al.next() ) {
if ( a != w &&
qstrcmp( a->name(), s.latin1() ) == 0 ) {
found = TRUE;
found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@ -2398,7 +2398,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp ( o->name(), s.latin1() ) == 0 ) {
found = TRUE;
found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@ -2409,11 +2409,11 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) {
if ( !found ) {
TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE );
TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, true );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp( o->name(), s.latin1() ) == 0 ) {
found = TRUE;
found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@ -2426,8 +2426,8 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
if ( !found )
return TRUE;
return FALSE;
return true;
return false;
}
bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
@ -2436,11 +2436,11 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
return TRUE;
return true;
}
}
return FALSE;
return false;
}
bool FormWindow::isDatabaseWidgetUsed() const
@ -2452,21 +2452,21 @@ bool FormWindow::isDatabaseWidgetUsed() const
for ( ; it.current(); ++it ) {
TQString c( it.current()->className() );
if ( dbClasses.contains( c ) > 0 ) {
return TRUE;
return true;
}
}
#endif
return FALSE;
return false;
}
bool FormWindow::isDatabaseAware() const
{
#ifndef TQT_NO_SQL
if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" )
return TRUE;
return true;
return isDatabaseWidgetUsed();
#else
return FALSE;
return false;
#endif
}
@ -2513,10 +2513,10 @@ static bool isChildOf( TQWidget *c, TQWidget *p )
{
while ( c && !c->isTopLevel() ) {
if ( c == p )
return TRUE;
return true;
c = c->parentWidget();
}
return FALSE;
return false;
}
TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
@ -2627,14 +2627,14 @@ void FormWindow::setSavePixmapInline( bool b )
{
pixInline = b;
if ( b )
pixProject = FALSE;
pixProject = false;
}
void FormWindow::setSavePixmapInProject( bool b )
{
pixProject = b;
if ( b )
pixInline = FALSE;
pixInline = false;
}
void FormWindow::setPixmapLoaderFunction( const TQString &func )
@ -2676,7 +2676,7 @@ void FormWindow::killAccels( TQObject *top )
if ( !l )
return;
for ( TQObject *o = l->first(); o; o = l->next() )
( (TQAccel*)o )->setEnabled( FALSE );
( (TQAccel*)o )->setEnabled( false );
delete l;
}
@ -2690,7 +2690,7 @@ DesignerFormWindow *FormWindow::iFace()
bool FormWindow::isCentralWidget( TQObject *w ) const
{
if ( !::tqt_cast<TQMainWindow*>(mainContainer()) )
return FALSE;
return false;
return w == ((TQMainWindow*)mainContainer())->centralWidget();
}

@ -104,12 +104,12 @@ public:
virtual void breakLayout( TQWidget *w );
virtual void selectWidget( TQObject *w, bool select = TRUE );
virtual void selectWidget( TQObject *w, bool select = true );
virtual void selectAll();
virtual void updateSelection( TQWidget *w );
virtual void raiseSelection( TQWidget *w );
virtual void repaintSelection( TQWidget *w );
virtual void clearSelection( bool changePropertyDisplay = TRUE );
virtual void clearSelection( bool changePropertyDisplay = true );
virtual void selectWidgets();
bool isWidgetSelected( TQObject *w );
virtual void updateChildSelections( TQWidget *w );
@ -143,7 +143,7 @@ public:
virtual MainWindow *mainWindow() const { return mainwindow; }
bool checkCustomWidgets();
virtual void insertWidget( TQWidget *w, bool checkName = FALSE );
virtual void insertWidget( TQWidget *w, bool checkName = false );
virtual void removeWidget( TQWidget *w );
virtual void deleteWidgets();
virtual void editAdjustSize();
@ -178,7 +178,7 @@ public:
bool savePixmapInProject() const;
void setSavePixmapInProject( bool b );
void setToolFixed() { toolFixed = TRUE; }
void setToolFixed() { toolFixed = true; }
void setActiveObject( TQObject *o );

@ -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" ) );
@ -208,31 +208,31 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
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,7 +251,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
return 0;
if ( formWindow == o ) {
if ( deselect )
formWindow->clearSelection( FALSE );
formWindow->clearSelection( false );
formWindow->emitShowProperties( formWindow );
return 0;
}
@ -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( 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( w, TRUE );
formWindow->selectWidget( w, true );
}
}
@ -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 = ( (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 ||
@ -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;
@ -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, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
this, TQ_SLOT( renamed( TQListViewItem * ) ) );
popupOpen = FALSE;
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() );
@ -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 ||
@ -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,7 +1192,7 @@ 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] != ';' )
@ -1270,7 +1270,7 @@ HierarchyView::HierarchyView( TQWidget *parent )
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb );
setTabEnabled( cb.lv, FALSE );
setTabEnabled( cb.lv, false );
}
}
}
@ -1301,7 +1301,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
editor = 0;
}
setTabEnabled( listview, TRUE );
setTabEnabled( listview, true );
setTabEnabled( fView, fw && fw->project()->isCpp() );
if ( fw == formwindow ) {
@ -1374,7 +1374,7 @@ void HierarchyView::showClassesTimeout()
}
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();
}
}

@ -101,7 +101,7 @@ class HierarchyList : public TQListView
public:
HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE );
HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = true );
virtual void setup();
virtual void setCurrent( TQObject *o );
@ -111,9 +111,9 @@ public:
void setFormWindow( FormWindow *fw ) { formWindow = fw; }
void drawContentsOffset( TQPainter *p, int ox, int oy,
int cx, int cy, int cw, int ch ) {
setUpdatesEnabled( FALSE );
setUpdatesEnabled( false );
triggerUpdate();
setUpdatesEnabled( TRUE );
setUpdatesEnabled( true );
TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch );
}

@ -38,16 +38,16 @@
#include <tdelocale.h>
IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
: IconViewEditorBase( parent, 0, TRUE ), formwindow( fw )
: IconViewEditorBase( parent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
iconview = (TQIconView*)editWidget;
itemText->setText( "" );
itemText->setEnabled( FALSE );
itemText->setEnabled( false );
itemPixmap->setText( "" );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
TQIconViewItem *i = 0;
for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
@ -62,7 +62,7 @@ void IconViewEditor::insertNewItem()
{
TQIconViewItem *i = new TQIconViewItem( preview, i18n( "New Item" ) );
preview->setCurrentItem( i );
preview->setSelected( i, TRUE );
preview->setSelected( i, true );
itemText->setFocus();
itemText->selectAll();
}
@ -71,31 +71,31 @@ void IconViewEditor::deleteCurrentItem()
{
delete preview->currentItem();
if ( preview->currentItem() )
preview->setSelected( preview->currentItem(), TRUE );
preview->setSelected( preview->currentItem(), true );
}
void IconViewEditor::currentItemChanged( TQIconViewItem *i )
{
itemText->blockSignals( TRUE );
itemText->blockSignals( true );
itemText->setText( "" );
itemPixmap->setText( "" );
itemText->blockSignals( FALSE );
itemText->blockSignals( false );
if ( !i ) {
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemText->setEnabled( false );
itemChoosePixmap->setEnabled( false );
return;
}
itemText->blockSignals( TRUE );
itemText->setEnabled( TRUE );
itemChoosePixmap->setEnabled( TRUE );
itemText->blockSignals( true );
itemText->setEnabled( true );
itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
itemText->setText( i->text() );
if ( i->pixmap() )
itemPixmap->setPixmap( *i->pixmap() );
itemText->blockSignals( FALSE );
itemText->blockSignals( false );
}
void IconViewEditor::currentTextChanged( const TQString &txt )
@ -151,7 +151,7 @@ void IconViewEditor::choosePixmap()
preview->currentItem()->setPixmap( pix );
itemPixmap->setPixmap( pix );
itemDeletePixmap->setEnabled( TRUE );
itemDeletePixmap->setEnabled( true );
}
void IconViewEditor::deletePixmap()
@ -161,5 +161,5 @@ void IconViewEditor::deletePixmap()
preview->currentItem()->setPixmap( TQPixmap() );
itemPixmap->setText( "" );
itemDeletePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( false );
}

@ -203,7 +203,7 @@ bool KDevDesignerPart::openFile()
bool KDevDesignerPart::saveFile()
{
if (isReadWrite() == false)
if (!isReadWrite())
return false;
m_widget->actionFileSaveAll->activate();
return true;

@ -64,7 +64,7 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &
Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
: widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
{
widgets.setAutoDelete( FALSE );
widgets.setAutoDelete( false );
layoutBase = lb;
if ( !doSetup && layoutBase )
oldGeometry = layoutBase->geometry();
@ -103,7 +103,7 @@ void Layout::setup()
}
if ( !lastList ) {
TQWidgetList l;
l.setAutoDelete( FALSE );
l.setAutoDelete( false );
lists.append( l );
lastList = &lists.last();
}
@ -163,7 +163,7 @@ void Layout::widgetDestroyed()
bool Layout::prepareLayout( bool &needMove, bool &needReparent )
{
if ( !widgets.count() )
return FALSE;
return false;
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
needMove = !layoutBase;
@ -179,7 +179,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
WidgetFactory::deleteLayout( layoutBase );
}
return TRUE;
return true;
}
void Layout::finishLayout( bool needMove, TQLayout *layout )
@ -214,7 +214,7 @@ void Layout::undoLayout()
it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() );
}
formWindow->selectWidget( layoutBase, FALSE );
formWindow->selectWidget( layoutBase, false );
WidgetFactory::deleteLayout( layoutBase );
if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide();
@ -248,7 +248,7 @@ void Layout::breakLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent )
w->reparent( layoutBase->parentWidget(), 0,
layoutBase->pos() + w->pos(), TRUE );
layoutBase->pos() + w->pos(), true );
if ( needResize ) {
TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w );
if ( it != rects.end() )
@ -315,7 +315,7 @@ void HorizontalLayout::doLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@ -379,7 +379,7 @@ void VerticalLayout::doLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@ -495,10 +495,10 @@ bool Grid::isWidgetStartCol( int c ) const
int r;
for ( r = 0; r < nrows; r++ ) {
if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) {
return TRUE;
return true;
}
}
return FALSE;
return false;
}
bool Grid::isWidgetEndCol( int c ) const
@ -506,9 +506,9 @@ bool Grid::isWidgetEndCol( int c ) const
int r;
for ( r = 0; r < nrows; r++ ) {
if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool Grid::isWidgetStartRow( int r ) const
@ -516,9 +516,9 @@ bool Grid::isWidgetStartRow( int r ) const
int c;
for ( c = 0; c < ncols; c++ ) {
if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool Grid::isWidgetEndRow( int r ) const
@ -526,9 +526,9 @@ bool Grid::isWidgetEndRow( int r ) const
int c;
for ( c = 0; c < ncols; c++ ) {
if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) )
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -536,7 +536,7 @@ bool Grid::isWidgetTopLeft( int r, int c ) const
{
TQWidget* w = cell( r, c );
if ( !w )
return FALSE;
return false;
return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w);
}
@ -677,16 +677,16 @@ void Grid::merge()
{
int r,c;
for ( c = 0; c < ncols; c++ )
cols[c] = FALSE;
cols[c] = false;
for ( r = 0; r < nrows; r++ )
rows[r] = FALSE;
rows[r] = false;
for ( c = 0; c < ncols; c++ ) {
for ( r = 0; r < nrows; r++ ) {
if ( isWidgetTopLeft( r, c ) ) {
rows[r] = TRUE;
cols[c] = TRUE;
rows[r] = true;
cols[c] = true;
}
}
}
@ -718,11 +718,11 @@ bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & co
if ( cols[ c2] )
colspan++;
}
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
@ -757,7 +757,7 @@ void GridLayout::doLayout()
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( rs * cs == 1 ) {
layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} else {
@ -865,10 +865,10 @@ void GridLayout::buildGrid()
Spacer::Spacer( TQWidget *parent, const char *name )
: TQWidget( parent, name, WMouseNoMask ),
orient(TQt::Vertical ), interactive(TRUE), sh( TQSize(20,20) )
orient(TQt::Vertical ), interactive(true), sh( TQSize(20,20) )
{
setSizeType( Expanding );
setAutoMask( TRUE );
setAutoMask( true );
}
void Spacer::paintEvent( TQPaintEvent * )

@ -44,7 +44,7 @@ class Layout : public TQObject
public:
Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
virtual ~Layout() {}
virtual void doLayout() = 0;
@ -75,7 +75,7 @@ protected slots:
class HorizontalLayout : public Layout
{
public:
HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
void doLayout();
@ -87,7 +87,7 @@ protected:
class VerticalLayout : public Layout
{
public:
VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
void doLayout();
@ -101,7 +101,7 @@ class Grid;
class GridLayout : public Layout
{
public:
GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE );
GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = true );
~GridLayout();
void doLayout();

@ -35,7 +35,7 @@
class ListBoxItemDrag : public TQStoredDrag
{
public:
ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 );
ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = false, TQListBox * parent = 0, const char * name = 0 );
~ListBoxItemDrag() {};
static bool canDecode( TQDragMoveEvent * event );
static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint );
@ -48,7 +48,7 @@ ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name )
void ListBoxDnd::confirmDrop( TQListBoxItem * )
{
dropConfirmed = TRUE;
dropConfirmed = true;
}
bool ListBoxDnd::dropEvent( TQDropEvent * event )
@ -58,7 +58,7 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
event->accept();
emit dropped( 0 ); // a NullDrop
return TRUE;
return true;
}
TQPoint pos = event->pos();
@ -74,9 +74,9 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
}
line->hide();
dragInside = FALSE;
dragInside = false;
return TRUE;
return true;
}
bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
@ -104,15 +104,15 @@ bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
if ( dMode & Move ) {
if ( dropConfirmed ) {
// ###FIX: memleak ? in internal mode, only pointers are transfered...
//list.setAutoDelete( TRUE );
//list.setAutoDelete( true );
list.clear();
dropConfirmed = FALSE;
dropConfirmed = false;
}
insertList( list ); // "show" items
}
}
}
return FALSE;
return false;
}
int ListBoxDnd::buildList( ListBoxItemList & list )
@ -120,7 +120,7 @@ int ListBoxDnd::buildList( ListBoxItemList & list )
TQListBoxItem * i = ((TQListBox *)src)->firstItem();
while ( i ) {
if ( i->isSelected() ) {
((TQListBox *)src)->setSelected( i, FALSE );
((TQListBox *)src)->setSelected( i, false );
list.append( i );
}
i = i->next();
@ -299,7 +299,7 @@ bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBox
}
return TRUE;
return true;
}
return FALSE;
return false;
}

@ -41,16 +41,16 @@
#include <tdelocale.h>
ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
: ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw )
: ListBoxEditorBase( parent, 0, true ), formwindow( fw )
{
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
listbox = (TQListBox*)editWidget;
itemText->setText( "" );
itemText->setEnabled( FALSE );
itemText->setEnabled( false );
itemPixmap->setText( "" );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
TQListBoxItem *i = 0;
for ( i = listbox->firstItem(); i; i = i->next() ) {
@ -88,7 +88,7 @@ void ListBoxEditor::insertNewItem()
{
TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") );
preview->setCurrentItem( i );
preview->setSelected( i, TRUE );
preview->setSelected( i, true );
itemText->setFocus();
itemText->selectAll();
}
@ -97,32 +97,32 @@ void ListBoxEditor::deleteCurrentItem()
{
delete preview->item( preview->currentItem() );
if ( preview->currentItem() != -1 )
preview->setSelected( preview->currentItem(), TRUE );
preview->setSelected( preview->currentItem(), true );
}
void ListBoxEditor::currentItemChanged( TQListBoxItem *i )
{
itemText->blockSignals( TRUE );
itemText->blockSignals( true );
itemText->setText( "" );
itemPixmap->setText( "" );
itemText->blockSignals( FALSE );
itemText->blockSignals( false );
if ( !i ) {
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemText->setEnabled( false );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
return;
}
itemText->blockSignals( TRUE );
itemText->setEnabled( TRUE );
itemChoosePixmap->setEnabled( TRUE );
itemText->blockSignals( true );
itemText->setEnabled( true );
itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
itemText->setText( i->text() );
if ( i->pixmap() )
itemPixmap->setPixmap( *i->pixmap() );
itemText->blockSignals( FALSE );
itemText->blockSignals( false );
}
void ListBoxEditor::currentTextChanged( const TQString &txt )
@ -130,12 +130,12 @@ void ListBoxEditor::currentTextChanged( const TQString &txt )
if ( preview->currentItem() == -1 )
return;
preview->blockSignals( TRUE );
preview->blockSignals( true );
if ( preview->item( preview->currentItem() )->pixmap() )
preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() );
else
preview->changeItem( txt, preview->currentItem() );
preview->blockSignals( FALSE );
preview->blockSignals( false );
}
void ListBoxEditor::okClicked()
@ -183,7 +183,7 @@ void ListBoxEditor::choosePixmap()
TQString txt = preview->item( preview->currentItem() )->text();
preview->changeItem( pix, txt, preview->currentItem() );
itemDeletePixmap->setEnabled( TRUE );
itemDeletePixmap->setEnabled( true );
}
void ListBoxEditor::moveItemUp()
@ -241,5 +241,5 @@ void ListBoxEditor::deletePixmap()
TQListBoxItem *i = preview->item( preview->currentItem() );
preview->changeItem( i->text(), preview->currentItem() );
itemDeletePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( false );
}

@ -40,13 +40,13 @@ public:
ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name )
: TQObject( eventSource, name ),
clickedItem( 0 ), activity( FALSE )
clickedItem( 0 ), activity( false )
{
src = eventSource;
src->installEventFilter( this );
ed = new TQLineEdit( src->viewport() );
ed->hide();
ed->setFrame( FALSE );
ed->setFrame( false );
TQObject::connect( ed, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( renameClickedItem() ) );
@ -64,9 +64,9 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
clickedItem->isSelected() &&
(clickedItem == src->itemAt( pos )) ) {
TQTimer::singleShot( 500, this, TQ_SLOT( showLineEdit() ) );
activity = FALSE; // no drags or clicks for 500 ms before we start the renaming
activity = false; // no drags or clicks for 500 ms before we start the renaming
} else { // new item clicked
activity = TRUE;
activity = true;
clickedItem = src->itemAt( pos );
ed->hide();
}
@ -76,7 +76,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQEvent::MouseMove:
if ( ((TQMouseEvent *) event)->state() & TQt::LeftButton ) {
activity = TRUE; // drag
activity = true; // drag
}
break;
@ -86,7 +86,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_F2:
activity = FALSE;
activity = false;
clickedItem = src->item( src->currentItem() );
showLineEdit();
break;
@ -94,7 +94,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_Escape:
if ( !ed->isHidden() ) {
hideLineEdit(); // abort rename
return TRUE;
return true;
}
break;
@ -104,7 +104,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_PageDown:
if ( !ed->isHidden() )
return TRUE; // Filter out the keystrokes
return true; // Filter out the keystrokes
break;
}
@ -123,7 +123,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
break;
}
return FALSE;
return false;
}
void ListBoxRename::showLineEdit()

@ -30,10 +30,10 @@
ListDnd::ListDnd( TQScrollView * eventSource, const char * name )
: TQObject( eventSource, name ),
dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both )
dragInside( false ), dragDelete( true ), dropConfirmed( false ), dMode( Both )
{
src = eventSource;
src->setAcceptDrops( TRUE );
src->setAcceptDrops( true );
src->installEventFilter( this );
src->viewport()->installEventFilter( this );
@ -71,14 +71,14 @@ bool ListDnd::eventFilter( TQObject *, TQEvent * event )
default:
break;
}
return FALSE;
return false;
}
bool ListDnd::dragEnterEvent( TQDragEnterEvent * event )
{
if ( dMode == None ) {
return TRUE;
return true;
}
bool ok = ( ( ( dMode & Both ) == Both ) ||
@ -87,20 +87,20 @@ bool ListDnd::dragEnterEvent( TQDragEnterEvent * event )
if ( ok && canDecode( event ) ) {
event->accept();
dragInside = TRUE;
dragInside = true;
if ( !( dMode & NullDrop ) ) {
updateLine( event->pos() );
line->show();
}
}
return TRUE;
return true;
}
bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * )
{
dragInside = FALSE;
dragInside = false;
line->hide();
return TRUE;
return true;
}
bool ListDnd::dragMoveEvent( TQDragMoveEvent * event )
@ -108,26 +108,26 @@ bool ListDnd::dragMoveEvent( TQDragMoveEvent * event )
if ( dragInside && dMode && !( dMode & NullDrop ) ) {
updateLine( event->pos() );
}
return TRUE;
return true;
}
bool ListDnd::dropEvent( TQDropEvent * )
{
// do nothing
return FALSE;
return false;
}
bool ListDnd::mousePressEvent( TQMouseEvent * event )
{
if ( event->button() == TQt::LeftButton )
mousePressPos = event->pos();
return FALSE;
return false;
}
bool ListDnd::mouseMoveEvent( TQMouseEvent * )
{
// do nothing
return FALSE;
return false;
}
void ListDnd::updateLine( const TQPoint & )
@ -138,5 +138,5 @@ void ListDnd::updateLine( const TQPoint & )
bool ListDnd::canDecode( TQDragEnterEvent * )
{
// do nothing
return FALSE;
return false;
}

@ -22,14 +22,14 @@ void ListEditor::setList( const TQStringList &l )
for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
i = new TQListViewItem( listview, i );
i->setText( 0, *it );
i->setRenameEnabled( 0, TRUE );
i->setRenameEnabled( 0, true );
}
}
void ListEditor::addItem()
{
TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() );
i->setRenameEnabled( 0, TRUE );
i->setRenameEnabled( 0, true );
tqApp->processEvents();
i->startRename( 0 );
}

@ -48,7 +48,7 @@ ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name )
void ListViewDnd::confirmDrop( TQListViewItem * )
{
dropConfirmed = TRUE;
dropConfirmed = true;
}
bool ListViewDnd::dropEvent( TQDropEvent * event )
@ -58,7 +58,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
event->accept();
emit dropped( 0 ); // a NullDrop
return TRUE;
return true;
}
TQPoint pos = event->pos();
@ -85,9 +85,9 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
}
line->hide();
dragInside = FALSE;
dragInside = false;
return TRUE;
return true;
}
bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
@ -105,7 +105,7 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
if ( dMode & Move ) {
disabledItems = list;
setVisibleItems( FALSE );
setVisibleItems( false );
}
dragobject->dragCopy();
@ -116,29 +116,29 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
// Shouldn't autoDelete handle this?
for( list.first(); list.current(); list.next() )
delete list.current();
dropConfirmed = FALSE;
dropConfirmed = false;
} else {
// Reenable disabled items since
// drag'n'drop was aborted
setVisibleItems( TRUE );
setVisibleItems( true );
}
disabledItems.clear();
}
}
}
return FALSE;
return false;
}
int ListViewDnd::buildFlatList( ListViewItemList & list )
{
bool addKids = FALSE;
bool addKids = false;
TQListViewItem *nextSibling = 0;
TQListViewItem *nextParent = 0;
TQListViewItemIterator it = ((TQListView *)src)->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
addKids = FALSE;
addKids = false;
if ( (*it)->isSelected() ) {
if ( (*it)->childCount() == 0 ) {
@ -148,7 +148,7 @@ int ListViewDnd::buildFlatList( ListViewItemList & list )
// Children processing not set, so set it
// Also find the item were we shall quit
// processing children...if any such item
addKids = TRUE;
addKids = true;
nextSibling = (*it)->nextSibling();
nextParent = (*it)->parent();
while ( nextParent && !nextSibling ) {
@ -303,15 +303,15 @@ bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListV
for( int i = 0; i < count; i++ ) {
if ( itemParent ) {
insertPoint = new TQListViewItem( itemParent, insertPoint );
itemParent->setOpen( TRUE );
itemParent->setOpen( true );
} else { // No parent for insertPoint, use TQListView
insertPoint = new TQListViewItem( parent, insertPoint );
}
stream >> *insertPoint;
}
return TRUE;
return true;
}
return FALSE;
return false;
}

@ -47,13 +47,13 @@
#include <tdelocale.h>
ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
: ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw )
: ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
{
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemColumn->setEnabled( FALSE );
itemText->setEnabled( false );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
itemColumn->setEnabled( false );
setupColumns();
PopulateListViewCommand::transferItems( listview, itemsPreview );
@ -65,7 +65,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
// Clamp on drag and drop to TQListView
@ -77,7 +77,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
// Enable rename for all TQListViewItems
TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild();
for ( ; *it; it++ )
(*it)->setRenameEnabled( 0, TRUE );
(*it)->setRenameEnabled( 0, true );
// Connect listview signal to signal-relay
TQObject::connect( itemsPreview,
@ -161,7 +161,7 @@ void ListViewEditor::columnDownClicked()
colPreview->insertItem( i, below );
colPreview->setCurrentItem( i );
colPreview->setSelected( i, TRUE );
colPreview->setSelected( i, true );
}
void ListViewEditor::columnPixmapChosen()
@ -180,15 +180,15 @@ void ListViewEditor::columnPixmapChosen()
return;
c->pixmap = pix;
colPreview->blockSignals( TRUE );
colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setPixmap( c->pixmap );
colPreview->blockSignals( FALSE );
colDeletePixmap->setEnabled( TRUE );
colPreview->blockSignals( false );
colDeletePixmap->setEnabled( true );
}
void ListViewEditor::columnPixmapDeleted()
@ -198,15 +198,15 @@ void ListViewEditor::columnPixmapDeleted()
return;
c->pixmap = TQPixmap();
colPreview->blockSignals( TRUE );
colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setText( "" );
colPreview->blockSignals( FALSE );
colDeletePixmap->setEnabled( FALSE );
colPreview->blockSignals( false );
colDeletePixmap->setEnabled( false );
}
void ListViewEditor::columnResizable( bool b )
@ -224,13 +224,13 @@ void ListViewEditor::columnTextChanged( const TQString &txt )
return;
c->text = txt;
colPreview->blockSignals( TRUE );
colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPreview->blockSignals( FALSE );
colPreview->blockSignals( false );
}
void ListViewEditor::columnUpClicked()
@ -246,33 +246,33 @@ void ListViewEditor::columnUpClicked()
colPreview->insertItem( above, i );
colPreview->setCurrentItem( i );
colPreview->setSelected( i, TRUE );
colPreview->setSelected( i, true );
}
void ListViewEditor::currentColumnChanged( TQListBoxItem *i )
{
Column *c = findColumn( i );
if ( !i || !c ) {
colText->setEnabled( FALSE );
colPixmap->setEnabled( FALSE );
colDeletePixmap->setEnabled( FALSE );
colText->blockSignals( TRUE );
colText->setEnabled( false );
colPixmap->setEnabled( false );
colDeletePixmap->setEnabled( false );
colText->blockSignals( true );
colText->setText( "" );
colText->blockSignals( FALSE );
colClickable->setEnabled( FALSE );
colResizable->setEnabled( FALSE );
colText->blockSignals( false );
colClickable->setEnabled( false );
colResizable->setEnabled( false );
return;
}
colText->setEnabled( TRUE );
colPixmap->setEnabled( TRUE );
colText->setEnabled( true );
colPixmap->setEnabled( true );
colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
colClickable->setEnabled( TRUE );
colResizable->setEnabled( TRUE );
colClickable->setEnabled( true );
colResizable->setEnabled( true );
colText->blockSignals( TRUE );
colText->blockSignals( true );
colText->setText( c->text );
colText->blockSignals( FALSE );
colText->blockSignals( false );
if ( !c->pixmap.isNull() )
colPixmap->setPixmap( c->pixmap );
else
@ -286,15 +286,15 @@ void ListViewEditor::newColumnClicked()
Column col;
col.text = i18n( "New Column" );
col.pixmap = TQPixmap();
col.clickable = TRUE;
col.resizable = TRUE;
col.clickable = true;
col.resizable = true;
if ( !col.pixmap.isNull() )
col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text );
else
col.item = new TQListBoxText( colPreview, col.text );
columns.append( col );
colPreview->setCurrentItem( col.item );
colPreview->setSelected( col.item, TRUE );
colPreview->setSelected( col.item, true );
}
void ListViewEditor::deleteColumnClicked()
@ -312,40 +312,40 @@ void ListViewEditor::deleteColumnClicked()
}
if ( colPreview->currentItem() != -1 )
colPreview->setSelected( colPreview->currentItem(), TRUE );
colPreview->setSelected( colPreview->currentItem(), true );
}
void ListViewEditor::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemColumn->setEnabled( FALSE );
itemText->setEnabled( false );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
itemColumn->setEnabled( false );
return;
}
itemText->setEnabled( TRUE );
itemChoosePixmap->setEnabled( TRUE );
itemText->setEnabled( true );
itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) &&
!i->pixmap( itemColumn->value() )->isNull() );
itemColumn->setEnabled( TRUE );
itemColumn->setEnabled( true );
displayItem( i, itemColumn->value() );
}
void ListViewEditor::displayItem( TQListViewItem *i, int col )
{
itemText->blockSignals( TRUE );
itemText->blockSignals( true );
itemText->setText( i->text( col ) );
itemText->blockSignals( FALSE );
itemText->blockSignals( false );
itemPixmap->blockSignals( TRUE );
itemPixmap->blockSignals( true );
if ( i->pixmap( col ) )
itemPixmap->setPixmap( *i->pixmap( col ) );
else
itemPixmap->setText( "" );
itemPixmap->blockSignals( FALSE );
itemPixmap->blockSignals( false );
}
void ListViewEditor::itemColChanged( int col )
@ -367,7 +367,7 @@ void ListViewEditor::itemDeleteClicked()
delete i;
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
}
@ -397,9 +397,9 @@ void ListViewEditor::itemNewClicked()
{
TQListViewItem *item = new TQListViewItem( itemsPreview );
item->setText( 0, i18n( "Item" ) );
item->setRenameEnabled( 0, TRUE );
item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
itemsPreview->setSelected( item, TRUE );
itemsPreview->setSelected( item, true );
itemText->setFocus();
itemText->selectAll();
}
@ -410,14 +410,14 @@ void ListViewEditor::itemNewSubClicked()
TQListViewItem *item = 0;
if ( parent ) {
item = new TQListViewItem( parent );
parent->setOpen( TRUE );
parent->setOpen( true );
} else {
item = new TQListViewItem( itemsPreview );
}
item->setText( 0, i18n( "Subitem" ) );
item->setRenameEnabled( 0, TRUE );
item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
itemsPreview->setSelected( item, TRUE );
itemsPreview->setSelected( item, true );
}
void ListViewEditor::itemPixmapChoosen()
@ -437,7 +437,7 @@ void ListViewEditor::itemPixmapChoosen()
i->setPixmap( itemColumn->value(), TQPixmap( pix ) );
itemPixmap->setPixmap( pix );
itemDeletePixmap->setEnabled( TRUE );
itemDeletePixmap->setEnabled( true );
}
void ListViewEditor::itemPixmapDeleted()
@ -448,7 +448,7 @@ void ListViewEditor::itemPixmapDeleted()
i->setPixmap( itemColumn->value(), TQPixmap() );
itemPixmap->setText( "" );
itemDeletePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( false );
}
void ListViewEditor::itemTextChanged( const TQString &txt )
@ -518,7 +518,7 @@ void ListViewEditor::itemRightClicked()
}
itemsPreview->setCurrentItem( other );
itemsPreview->setSelected( other, TRUE );
itemsPreview->setSelected( other, true );
}
void ListViewEditor::itemLeftClicked()
@ -558,7 +558,7 @@ void ListViewEditor::itemLeftClicked()
}
itemsPreview->setCurrentItem( other );
itemsPreview->setSelected( other, TRUE );
itemsPreview->setSelected( other, true );
}
void ListViewEditor::setupColumns()
@ -579,10 +579,10 @@ void ListViewEditor::setupColumns()
columns.append( col );
}
colText->setEnabled( FALSE );
colPixmap->setEnabled( FALSE );
colClickable->setEnabled( FALSE );
colResizable->setEnabled( FALSE );
colText->setEnabled( false );
colPixmap->setEnabled( false );
colClickable->setEnabled( false );
colResizable->setEnabled( false );
if ( colPreview->firstItem() )
colPreview->setCurrentItem( colPreview->firstItem() );
@ -631,15 +631,15 @@ void ListViewEditor::initTabPage( const TQString &page )
if ( page == i18n( "&Items" ) ) {
setupItems();
if ( numColumns == 0 ) {
itemNew->setEnabled( FALSE );
itemNewSub->setEnabled( FALSE );
itemText->setEnabled( FALSE );
itemChoosePixmap->setEnabled( FALSE );
itemDeletePixmap->setEnabled( FALSE );
itemColumn->setEnabled( FALSE );
itemNew->setEnabled( false );
itemNewSub->setEnabled( false );
itemText->setEnabled( false );
itemChoosePixmap->setEnabled( false );
itemDeletePixmap->setEnabled( false );
itemColumn->setEnabled( false );
} else {
itemNew->setEnabled( TRUE );
itemNewSub->setEnabled( TRUE );
itemNew->setEnabled( true );
itemNewSub->setEnabled( true );
}
}
}

File diff suppressed because it is too large Load Diff

@ -85,7 +85,7 @@ class MainWindow : public TQMainWindow
public:
enum LineMode { Error, Step, StackFrame };
MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" );
MainWindow( KDevDesignerPart *part, bool asClient, bool single = false, const TQString &plgDir = "/designer" );
~MainWindow();
HierarchyView *objectHierarchy() const;
@ -112,7 +112,7 @@ public:
TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
FormWindow *openFormWindow( const TQString &fn, bool validFileName = true, FormFile *ff = 0 );
bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
void setGrid( const TQPoint &p );
@ -128,7 +128,7 @@ public:
TQString templatePath() const { return templPath; }
void editFunction( const TQString &func, bool rereadSource = FALSE );
void editFunction( const TQString &func, bool rereadSource = false );
bool isPreviewing() const { return previewing; }
@ -230,7 +230,7 @@ public slots:
void fileQuit();
void fileCloseProject(); // not visible in menu, called from fileClose
void fileOpen();
void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE );
void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = true );
bool fileSave();
bool fileSaveForm(); // not visible in menu, called from fileSave
bool fileSaveProject(); // not visible in menu, called from fileSaveProject
@ -267,7 +267,7 @@ public slots:
SourceEditor *createSourceEditor( TQObject *object, Project *project,
const TQString &lang = TQString(),
const TQString &func = TQString(),
bool rereadSource = FALSE );
bool rereadSource = false );
void editFormSettings();
void editProjectSettings();
void editPixmapCollection();

@ -128,37 +128,37 @@ void MainWindow::setupEditActions()
actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) );
actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) );
actionEditUndo->setEnabled( FALSE );
actionEditUndo->setEnabled( false );
actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 );
actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") );
actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) );
connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) );
actionEditRedo->setEnabled( FALSE );
actionEditRedo->setEnabled( false );
actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 );
actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) );
actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) );
connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) );
actionEditCut->setEnabled( FALSE );
actionEditCut->setEnabled( false );
actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 );
actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) );
actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) );
connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) );
actionEditCopy->setEnabled( FALSE );
actionEditCopy->setEnabled( false );
actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 );
actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) );
actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) );
connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) );
actionEditPaste->setEnabled( FALSE );
actionEditPaste->setEnabled( false );
actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 );
actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) );
actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) );
connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
actionEditDelete->setEnabled( FALSE );
actionEditDelete->setEnabled( false );
#ifdef TQ_WS_MAC
TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
@ -168,19 +168,19 @@ void MainWindow::setupEditActions()
actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) );
actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) );
actionEditSelectAll->setEnabled( TRUE );
actionEditSelectAll->setEnabled( true );
actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 );
actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) );
actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) );
connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) );
actionEditRaise->setEnabled( FALSE );
actionEditRaise->setEnabled( false );
actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 );
actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) );
actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) );
connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) );
actionEditLower->setEnabled( FALSE );
actionEditLower->setEnabled( false );
actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(),
i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
@ -271,25 +271,25 @@ void MainWindow::setupSearchActions()
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
i18n( "&Find..." ), CTRL + Key_F, this, 0 );
connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) );
actionSearchFind->setEnabled( FALSE );
actionSearchFind->setEnabled( false );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) );
actionSearchIncremetal->setEnabled( FALSE );
actionSearchIncremetal->setEnabled( false );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) );
actionSearchReplace->setEnabled( FALSE );
actionSearchReplace->setEnabled( false );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) );
actionSearchGotoLine->setEnabled( FALSE );
actionSearchGotoLine->setEnabled( false );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
/* TQToolBar *tb = new TQToolBar( this, "Search" );
@ -304,7 +304,7 @@ void MainWindow::setupSearchActions()
this, TQ_SLOT( searchIncremetalFind() ) );
connect( incrementalSearch, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( searchIncremetalFindNext() ) );
incrementalSearch->setEnabled( FALSE );
incrementalSearch->setEnabled( false );
TQPopupMenu *menu = new TQPopupMenu( this, "Search" );
menubar->insertItem( i18n( "&Search" ), menu );
@ -319,7 +319,7 @@ void MainWindow::setupLayoutActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
actionGroupTools->setExclusive( TRUE );
actionGroupTools->setExclusive( true );
connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) );
}
@ -328,53 +328,53 @@ void MainWindow::setupLayoutActions()
actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") );
actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) );
actionEditAdjustSize->setEnabled( FALSE );
actionEditAdjustSize->setEnabled( false );
actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 );
actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") );
actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) );
connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) );
actionEditHLayout->setEnabled( FALSE );
actionEditHLayout->setEnabled( false );
actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 );
actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") );
actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) );
connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) );
actionEditVLayout->setEnabled( FALSE );
actionEditVLayout->setEnabled( false );
actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"),
i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 );
actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") );
actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) );
actionEditGridLayout->setEnabled( FALSE );
actionEditGridLayout->setEnabled( false );
actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 );
actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") );
actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) );
connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) );
actionEditSplitHorizontal->setEnabled( FALSE );
actionEditSplitHorizontal->setEnabled( false );
actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 );
actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") );
actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) );
connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) );
actionEditSplitVertical->setEnabled( FALSE );
actionEditSplitVertical->setEnabled( false );
actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
i18n( "&Break Layout" ), CTRL + Key_B, this, 0 );
actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") );
actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) );
actionEditBreakLayout->setEnabled( FALSE );
actionEditBreakLayout->setEnabled( false );
int id = WidgetDatabase::idFromClassName( "Spacer" );
actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() );
actionInsertSpacer->setToggleAction( TRUE );
actionInsertSpacer->setToggleAction( true );
actionInsertSpacer->setText( WidgetDatabase::className( id ) );
actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) );
actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) );
@ -423,7 +423,7 @@ void MainWindow::setupToolActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
actionGroupTools->setExclusive( TRUE );
actionGroupTools->setExclusive( true );
connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ),
this, TQ_SLOT( toolSelected(TQAction*) ) );
}
@ -431,7 +431,7 @@ void MainWindow::setupToolActions()
actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"),
i18n("&Pointer"), Key_F2,
actionGroupTools,
TQString::number(POINTER_TOOL).latin1(), TRUE );
TQString::number(POINTER_TOOL).latin1(), true );
actionPointerTool->setStatusTip( i18n("Selects the pointer tool") );
actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) );
@ -440,21 +440,21 @@ void MainWindow::setupToolActions()
i18n("&Connect Signal/Slots"),
singleProjectMode() ? 0 : Key_F3,
actionGroupTools,
TQString::number(CONNECT_TOOL).latin1(), TRUE );
TQString::number(CONNECT_TOOL).latin1(), true );
actionConnectTool->setStatusTip( i18n("Selects the connection tool") );
actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) );
actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"),
i18n("Tab &Order"), Key_F4,
actionGroupTools,
TQString::number(ORDER_TOOL).latin1(), TRUE );
TQString::number(ORDER_TOOL).latin1(), true );
actionOrderTool->setStatusTip( i18n("Selects the tab order tool") );
actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) );
actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ),
i18n( "Set &Buddy" ), Key_F12,
actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(),
TRUE );
true );
actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) );
actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) );
@ -463,7 +463,7 @@ void MainWindow::setupToolActions()
toolsToolBar = tb;
TQWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE );
addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, false );
actionPointerTool->addTo( tb );
if ( !singleProjectMode() )
actionConnectTool->addTo( tb );
@ -518,7 +518,7 @@ void MainWindow::setupToolActions()
TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() );
mmenu->insertItem( grp, menu );
TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() );
TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, false, grp.latin1() );
tb2->setFrameStyle( TQFrame::NoFrame );
tb2->setOrientation( TQt::Vertical );
tb2->setBackgroundMode( PaletteBase );
@ -538,7 +538,7 @@ void MainWindow::setupToolActions()
continue; // only widgets, i.e. not forms and temp stuff
WidgetAction* a =
new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() );
a->setToggleAction( TRUE );
a->setToggleAction( true );
TQString atext = WidgetDatabase::className( i );
if ( atext[0] == 'Q' )
atext = atext.mid(1);
@ -594,7 +594,7 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget->addTo( customWidgetMenu );
customWidgetMenu->insertSeparator();
TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0,
toolBox, FALSE, "Custom Widgets" );
toolBox, false, "Custom Widgets" );
tb2->setBackgroundMode(PaletteBase);
tb2->setOrientation( TQt::Vertical );
tb2->setFrameStyle( TQFrame::NoFrame );
@ -638,9 +638,9 @@ void MainWindow::setupFileActions()
a->addTo( fileMenu );
actionNewFile = a;
} else {
actionGroupNew = new TQActionGroup( this, 0, FALSE );
actionGroupNew = new TQActionGroup( this, 0, false );
TQActionGroup* a = actionGroupNew;
( (TQActionGroup*)a )->setUsesDropDown( TRUE );
( (TQActionGroup*)a )->setUsesDropDown( true );
a->setText( i18n( "New" ) );
a->setMenuText( i18n( "&New..." ) );
a->setIconSet( createIconSet("designer_form.png") );
@ -790,14 +790,14 @@ void MainWindow::setupProjectActions()
TQActionGroup *ag = new TQActionGroup( this, 0 );
ag->setText( i18n( "Active Project" ) );
ag->setMenuText( i18n( "Active Project" ) );
ag->setExclusive( TRUE );
ag->setUsesDropDown( TRUE );
ag->setExclusive( true );
ag->setUsesDropDown( true );
connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) );
connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) );
DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE );
eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE );
DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, true );
eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, true );
projects.insert( a, eProject );
a->setOn( TRUE );
a->setOn( true );
ag->addTo( projectMenu );
ag->addTo( projectToolBar );
actionGroupProjects = ag;
@ -810,7 +810,7 @@ void MainWindow::setupProjectActions()
a->setStatusTip( i18n("Adds a file to the current project") );
a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) );
a->setEnabled( FALSE );
a->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( projectMenu );
@ -820,7 +820,7 @@ void MainWindow::setupProjectActions()
actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") );
actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) );
actionEditPixmapCollection->setEnabled( FALSE );
actionEditPixmapCollection->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu );
@ -830,7 +830,7 @@ void MainWindow::setupProjectActions()
actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") );
actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) );
//actionEditDatabaseConnections->setEnabled( FALSE );
//actionEditDatabaseConnections->setEnabled( false );
//connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
actionEditDatabaseConnections->addTo( projectMenu );
@ -841,7 +841,7 @@ void MainWindow::setupProjectActions()
actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") );
actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) );
actionEditProjectSettings->setEnabled( FALSE );
actionEditProjectSettings->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu );
@ -898,9 +898,9 @@ void MainWindow::setupPreviewActions()
void MainWindow::setupWindowActions()
{
/* static bool windowActionsSetup = FALSE;
/* static bool windowActionsSetup = false;
if ( !windowActionsSetup ) {
windowActionsSetup = TRUE;
windowActionsSetup = true;
*/
actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this );
actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") );
@ -1038,10 +1038,10 @@ void MainWindow::fileNewDialog()
while ( currentProject->findFormFile( n + ".ui" ) )
n = "Dialog" + TQString::number( ++forms );
FormWindow *fw = 0;
FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject );
FormFile *ff = new FormFile( n + ".ui", false, currentProject );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
ff->setModified( TRUE );
currentProject->setModified( TRUE );
ff->setModified( true );
currentProject->setModified( true );
workspace()->update();
fw->setProject( currentProject );
MetaDataBase::addEntry( fw );
@ -1051,10 +1051,10 @@ void MainWindow::fileNewDialog()
fw->resize( 600, 480 );
insertFormWindow( fw );
fw->killAccels( fw );
fw->project()->setModified( TRUE );
fw->project()->setModified( true );
fw->setFocus();
fw->setSavePixmapInProject( TRUE );
fw->setSavePixmapInline( FALSE );
fw->setSavePixmapInProject( true );
fw->setSavePixmapInline( false );
}
void MainWindow::fileNewFile()
@ -1064,10 +1064,10 @@ void MainWindow::fileNewFile()
return;
if ( name.right( 3 ) != ".qs" )
name += ".qs";
SourceFile *f = new SourceFile( name, FALSE, currentProject );
SourceFile *f = new SourceFile( name, false, currentProject );
MainWindow::self->editSource( f );
f->setModified( TRUE );
currentProject->setModified( TRUE );
f->setModified( true );
currentProject->setModified( true );
workspace()->update();
}
@ -1127,7 +1127,7 @@ void MainWindow::fileCloseProject()
}
TQWidgetList windows = qWorkspace()->windowList();
qWorkspace()->blockSignals( TRUE );
qWorkspace()->blockSignals( true );
TQWidgetListIt wit( windows );
while ( wit.current() ) {
TQWidget *w = wit.current();
@ -1146,7 +1146,7 @@ void MainWindow::fileCloseProject()
}
hierarchyView->clear();
windows = qWorkspace()->windowList();
qWorkspace()->blockSignals( FALSE );
qWorkspace()->blockSignals( false );
actionGroupProjects->removeChild( a );
projects.remove( a );
delete a;
@ -1164,16 +1164,16 @@ void MainWindow::fileCloseProject()
break;
}
} else {
emit hasActiveWindow( FALSE );
emit hasActiveForm( FALSE );
updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
emit hasActiveWindow( false );
emit hasActiveForm( false );
updateUndoRedo( false, false, TQString(), TQString() );
}
}
}
void MainWindow::fileOpen() // as called by the menu
{
fileOpen( "", "", "", FALSE );
fileOpen( "", "", "", false );
}
void MainWindow::projectInsertFile()
@ -1233,24 +1233,24 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co
if ( !filename.isEmpty() ) {
TQFileInfo fi( filename );
if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) {
if ( fi.extension( false ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) {
addRecentlyOpened( filename, recentlyProjects );
openProject( filename );
} else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) {
} else if ( fi.extension( false ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) {
if ( !inProject )
setCurrentProject( eProject );
openFormWindow( filename );
addRecentlyOpened( filename, recentlyFiles );
} else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 ||
additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) {
} else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( false ) ) != -1 ||
additionalSources.find( fi.extension( false ) ) != additionalSources.end() ) {
SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) );
if ( !sf )
sf = new SourceFile( project->makeRelative( filename ), FALSE, project );
sf = new SourceFile( project->makeRelative( filename ), false, project );
editSource( sf );
} else if ( extension.isEmpty() ) {
TQString filter;
for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) {
if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) {
if ( (*it2).contains( "." + fi.extension( false ), false ) ) {
filter = *it2;
break;
}
@ -1274,7 +1274,7 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co
setCurrentProject( eProject );
addRecentlyOpened( filename, recentlyFiles );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
openFormWindow( *it, FALSE );
openFormWindow( *it, false );
TQFile::remove( *it );
}
statusBar()->clear();
@ -1289,10 +1289,10 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile
if ( filename.isEmpty() )
return 0;
bool makeNew = FALSE;
bool makeNew = false;
if ( !TQFile::exists( filename ) ) {
makeNew = TRUE;
makeNew = true;
} else {
TQFile f( filename );
f.open( IO_ReadOnly );
@ -1318,7 +1318,7 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile
TQApplication::setOverrideCursor( WaitCursor );
Resource resource( this );
if ( !ff )
ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject );
ff = new FormFile( currentProject->makeRelative( filename ), false, currentProject );
bool b = resource.load( ff ) && (FormWindow*)resource.widget();
if ( !validFileName && resource.widget() )
( (FormWindow*)resource.widget() )->setFileName( TQString() );
@ -1360,7 +1360,7 @@ bool MainWindow::fileSaveForm()
fw = se->formWindow();
else if ( se->sourceFile() ) {
se->sourceFile()->save();
return TRUE;
return true;
}
}
}
@ -1368,16 +1368,16 @@ bool MainWindow::fileSaveForm()
if ( !fw )
fw = formWindow();
if ( !fw || !fw->formFile()->save() )
return FALSE;
return false;
TQApplication::restoreOverrideCursor();
return TRUE;
return true;
}
bool MainWindow::fileSaveProject()
{
currentProject->save();
statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */);
return TRUE;
return true;
}
bool MainWindow::fileSaveAs()
@ -1386,12 +1386,12 @@ bool MainWindow::fileSaveAs()
TQWidget *w = qworkspace->activeWindow();
if ( !w )
return TRUE;
return true;
if ( ::tqt_cast<FormWindow*>(w) )
return ( (FormWindow*)w )->formFile()->saveAs();
else if ( ::tqt_cast<SourceEditor*>(w) )
return ( (SourceEditor*)w )->saveAs();
return FALSE;
return false;
}
void MainWindow::fileSaveAll()
@ -1402,7 +1402,7 @@ void MainWindow::fileSaveAll()
void MainWindow::fileCreateTemplate()
{
CreateTemplate dia( this, 0, TRUE );
CreateTemplate dia( this, 0, true );
int i = 0;
for ( i = 0; i < WidgetDatabase::count(); ++i ) {
@ -1550,7 +1550,7 @@ void MainWindow::editPaste()
if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) );
hierarchyView->widgetInserted( 0 );
formWindow()->commandHistory()->setModified( TRUE );
formWindow()->commandHistory()->setModified( true );
} else {
TQMessageBox::information( this, i18n( "Paste Error" ),
i18n( "Cannot paste widgets. Designer could not find a container\n"
@ -1715,7 +1715,7 @@ void MainWindow::editFunctions()
return;
statusMessage( i18n( "Edit the current form's slots..." ) );
EditFunctions dlg( this, formWindow(), TRUE );
EditFunctions dlg( this, formWindow(), true );
dlg.exec();
statusBar()->clear();
}
@ -1809,7 +1809,7 @@ SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project
if ( editor->object() != object )
editor->setObject( object, project );
else if ( rereadSource )
editor->refresh( FALSE );
editor->refresh( false );
editor->show();
editor->setFocus();
@ -1839,7 +1839,7 @@ void MainWindow::editProjectSettings()
void MainWindow::editPixmapCollection()
{
PixmapCollectionEditor dia( this, 0, TRUE );
PixmapCollectionEditor dia( this, 0, true );
dia.setProject( currentProject );
dia.exec();
}
@ -1847,7 +1847,7 @@ void MainWindow::editPixmapCollection()
void MainWindow::editDatabaseConnections()
{
#ifndef TQT_NO_SQL
DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE );
DatabaseConnectionsEditor dia( currentProject, this, 0, true );
dia.exec();
#endif
}
@ -1855,7 +1855,7 @@ void MainWindow::editDatabaseConnections()
void MainWindow::editPreferences()
{
statusMessage( i18n( "Edit preferences..." ) );
Preferences *dia = new Preferences( this, 0, TRUE );
Preferences *dia = new Preferences( this, 0, true );
prefDia = dia;
connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
dia->buttonColor->setEditor( StyledButton::ColorEditor );
@ -1872,9 +1872,9 @@ void MainWindow::editPreferences()
if ( qworkspace->backgroundPixmap() )
dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() );
if ( backPix )
dia->radioPixmap->setChecked( TRUE );
dia->radioPixmap->setChecked( true );
else
dia->radioColor->setChecked( TRUE );
dia->radioColor->setChecked( true );
dia->checkBoxSplash->setChecked( splashScreen );
dia->checkAutoEdit->setChecked( !databaseAutoEdit );
dia->checkBoxStartDialog->setChecked( shStartDialog );
@ -1909,15 +1909,15 @@ void MainWindow::editPreferences()
if (dia->textEditPluginPaths->isModified()) {
pluginPaths = dia->textEditPluginPaths->text();
TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths));
savePluginPaths = TRUE;
savePluginPaths = true;
}
if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) {
qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() );
backPix = TRUE;
backPix = true;
} else {
qworkspace->setBackgroundColor( dia->buttonColor->color() );
backPix = FALSE;
backPix = false;
}
splashScreen = dia->checkBoxSplash->isChecked();
databaseAutoEdit = !dia->checkAutoEdit->isChecked();
@ -1934,7 +1934,7 @@ void MainWindow::editPreferences()
for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) {
Tab t = *it;
dia->tabWidget->removePage( t.w );
t.w->reparent( 0, TQPoint(0,0), FALSE );
t.w->reparent( 0, TQPoint(0,0), false );
}
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
@ -1952,7 +1952,7 @@ void MainWindow::searchFind()
return;
if ( !findDialog )
findDialog = new FindDialog( this, 0, FALSE );
findDialog = new FindDialog( this, 0, false );
findDialog->show();
findDialog->raise();
findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@ -1974,7 +1974,7 @@ void MainWindow::searchIncremetalFind()
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
FALSE, FALSE, TRUE, FALSE );
false, false, true, false );
}
void MainWindow::searchIncremetalFindNext()
@ -1984,7 +1984,7 @@ void MainWindow::searchIncremetalFindNext()
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
FALSE, FALSE, TRUE, TRUE );
false, false, true, true );
}
void MainWindow::searchReplace()
@ -1994,7 +1994,7 @@ void MainWindow::searchReplace()
return;
if ( !replaceDialog )
replaceDialog = new ReplaceDialog( this, 0, FALSE );
replaceDialog = new ReplaceDialog( this, 0, false );
replaceDialog->show();
replaceDialog->raise();
replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@ -2010,7 +2010,7 @@ void MainWindow::searchGotoLine()
return;
if ( !gotoLineDialog )
gotoLineDialog = new GotoLineDialog( this, 0, FALSE );
gotoLineDialog = new GotoLineDialog( this, 0, false );
gotoLineDialog->show();
gotoLineDialog->raise();
gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() );

@ -78,13 +78,13 @@ bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i )
TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
return FALSE;
return false;
TQ_LONG p = 0;
stream >> p;
*i = ( MenuBarEditorItem *) p;
return TRUE;
return true;
}
// MenuBarEditorItem ---------------------------------------------------
@ -93,9 +93,9 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, co
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
visible( TRUE ),
separator( FALSE ),
removable( FALSE )
visible( true ),
separator( false ),
removable( false )
{ }
MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar,
@ -103,9 +103,9 @@ MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * ba
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( menu ),
visible( TRUE ),
separator( FALSE ),
removable( TRUE )
visible( true ),
separator( false ),
removable( true )
{
text = menu->name();
}
@ -115,9 +115,9 @@ MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
visible( TRUE ),
separator( FALSE ),
removable( TRUE )
visible( true ),
separator( false ),
removable( true )
{
text = actionGroup->menuText();
popupMenu = new PopupMenuEditor( menuBar->formWindow(), menuBar );
@ -148,10 +148,10 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n
currentIndex( 0 ),
itemHeight( 0 ),
separatorWidth( 32 ),
hideWhenEmpty( TRUE ),
hasSeparator( FALSE )
hideWhenEmpty( true ),
hasSeparator( false )
{
setAcceptDrops( TRUE );
setAcceptDrops( true );
setFocusPolicy( TQWidget::StrongFocus );
addItem.setMenuText( i18n("new menu") );
@ -174,7 +174,7 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n
MenuBarEditor::~MenuBarEditor()
{
itemList.setAutoDelete( TRUE );
itemList.setAutoDelete( true );
}
FormWindow * MenuBarEditor::formWindow()
@ -238,9 +238,9 @@ void MenuBarEditor::insertSeparator( int index )
return;
MenuBarEditorItem * i = createItem( index );
i->setSeparator( TRUE );
i->setSeparator( true );
i->setMenuText( i18n( "separator" ) );
hasSeparator = TRUE;
hasSeparator = true;
}
void MenuBarEditor::removeItemAt( int index )
@ -255,7 +255,7 @@ void MenuBarEditor::removeItem( MenuBarEditorItem * item )
itemList.removeRef( item ) ) {
if ( item->isSeparator() )
hasSeparator = FALSE;
hasSeparator = false;
if ( hideWhenEmpty && itemList.count() == 0 )
hide();
@ -618,20 +618,20 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() & TQt::LeftButton ) {
if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) {
bool itemCreated = FALSE;
bool isSeparator = FALSE;
bool itemCreated = false;
bool isSeparator = false;
draggedItem = item( findItem( mousePressPos ) );
if ( draggedItem == &addItem ) {
draggedItem = createItem();
itemCreated = TRUE;
itemCreated = true;
} else if ( draggedItem == &addSeparator ) {
if (hasSeparator) // we can only have one separator
return;
draggedItem = createItem();
draggedItem->setSeparator( TRUE );
draggedItem->setSeparator( true );
draggedItem->setMenuText( "separator" );
isSeparator = TRUE;
itemCreated = TRUE;
isSeparator = true;
itemCreated = true;
} else {
isSeparator = draggedItem->isSeparator();
}
@ -640,7 +640,7 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
new MenuBarEditorItemPtrDrag( draggedItem, this );
d->setPixmap( createTextPixmap( draggedItem->menuText() ) );
hideItem();
draggedItem->setVisible( FALSE );
draggedItem->setVisible( false );
update();
// If the item is dropped in the same list,
@ -648,21 +648,21 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
// in the list.
itemList.find( draggedItem );
TQLNode * node = itemList.currentNode();
dropConfirmed = FALSE;
dropConfirmed = false;
d->dragCopy(); // dragevents and stuff happens
if ( draggedItem ) { // item was not dropped
if ( itemCreated ) {
removeItem( draggedItem );
} else {
hideItem();
draggedItem->setVisible( TRUE );
draggedItem->setVisible( true );
draggedItem = 0;
showItem();
}
} else if ( dropConfirmed ) { // item was dropped
dropConfirmed = FALSE;
dropConfirmed = false;
hideItem();
itemList.takeNode( node )->setVisible( TRUE );
itemList.takeNode( node )->setVisible( true );
hasSeparator = isSeparator || hasSeparator;
showItem();
} else {
@ -1007,10 +1007,10 @@ void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos )
int iidx = itemList.findRef( i );
if ( iidx != -1 ) { // internal dnd
cmd = new MoveMenuCommand( i18n( "Item Dragged" ), formWnd, this, iidx, idx );
item( iidx )->setVisible( TRUE );
item( iidx )->setVisible( true );
} else {
cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, idx );
dropConfirmed = TRUE; // let mouseMoveEvent set the item visible
dropConfirmed = true; // let mouseMoveEvent set the item visible
}
formWnd->commandHistory()->addCommand( cmd );
cmd->execute();

@ -90,7 +90,7 @@ public:
FormWindow * formWindow();
MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE );
MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = true );
void insertItem( MenuBarEditorItem * item, int index = -1 );
void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 );
void insertItem( TQString text, TQActionGroup * group, int index = -1 );

@ -85,7 +85,7 @@ public:
static TQPtrDict<MetaDataBaseRecord> *db = 0;
static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
static bool doUpdate = TRUE;
static bool doUpdate = true;
static TQStringList langList;
static TQStringList editorLangList;
static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0;
@ -107,9 +107,9 @@ inline void setupDataBase()
{
if ( !db || !cWidgets ) {
db = new TQPtrDict<MetaDataBaseRecord>( 1481 );
db->setAutoDelete( TRUE );
db->setAutoDelete( true );
cWidgets = new TQPtrList<MetaDataBase::CustomWidget>;
cWidgets->setAutoDelete( TRUE );
cWidgets->setAutoDelete( true );
}
}
@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
if ( doUpdate &&
( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) {
doUpdate = FALSE;
doUpdate = false;
setPropertyChanged( o, "alignment", changed ||
isPropertyChanged( o, "hAlign" ) ||
isPropertyChanged( o, "vAlign" ) ||
isPropertyChanged( o, "wordwrap" ) );
doUpdate = TRUE;
doUpdate = true;
}
if ( doUpdate && property == "alignment" ) {
doUpdate = FALSE;
doUpdate = false;
setPropertyChanged( o, "hAlign", changed );
setPropertyChanged( o, "vAlign", changed );
setPropertyChanged( o, "wordwrap", changed );
doUpdate = TRUE;
doUpdate = true;
}
}
@ -192,7 +192,7 @@ bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
return r->changedProperties.findIndex( property ) != -1;
@ -349,13 +349,13 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
TQLayout * layout = 0;
WidgetFactory::layoutType( (TQWidget*)o, layout );
bool isInnerLayout = TRUE;
bool isInnerLayout = true;
TQWidget *widget = (TQWidget*)o;
if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
isInnerLayout = FALSE;
isInnerLayout = false;
if ( layout ) {
@ -527,7 +527,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
formfile->formWindow()->mainContainer() :
formfile->project()->objectForFakeFormFile( formfile ),
(*cit).slot.latin1(),
FALSE );
false );
}
}
@ -539,7 +539,7 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
@ -548,9 +548,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString
conn.signal == signal &&
conn.receiver ==receiver &&
conn.slot == slot )
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -628,7 +628,7 @@ void MetaDataBase::doConnections( TQObject *o )
if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) {
sender = o;
} else {
l = o->queryList( 0, conn.sender->name(), FALSE );
l = o->queryList( 0, conn.sender->name(), false );
if ( !l || !l->first() ) {
delete l;
continue;
@ -639,7 +639,7 @@ void MetaDataBase::doConnections( TQObject *o )
if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) {
receiver = o;
} else {
l = o->queryList( 0, conn.receiver->name(), FALSE );
l = o->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
delete l;
continue;
@ -652,8 +652,8 @@ void MetaDataBase::doConnections( TQObject *o )
TQString s2 = "1""%1";
s2 = s2.arg( conn.slot.data() );
TQStrList signalList = sender->metaObject()->signalNames( TRUE );
TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
TQStrList signalList = sender->metaObject()->signalNames( true );
TQStrList slotList = receiver->metaObject()->slotNames( true );
// avoid warnings
if ( signalList.find( conn.signal ) == -1 ||
@ -671,19 +671,19 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
if ( !onlyCustom ) {
TQStrList slotList = o->metaObject()->slotNames( TRUE );
TQStrList slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
return TRUE;
return true;
if ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer();
slotList = o->metaObject()->slotNames( TRUE );
slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
return TRUE;
return true;
}
//if ( ::tqt_cast<CustomWidget*>(o) ) {
@ -694,7 +694,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
if ( !s.data() )
continue;
if ( s == slot )
return TRUE;
return true;
}
}
}
@ -702,10 +702,10 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
@ -715,15 +715,15 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
TQValueList<Connection> conns = connections( o );
for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
if ( (*it).slot == slot )
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -901,19 +901,19 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
if ( !onlyCustom ) {
TQStrList functionList = o->metaObject()->slotNames( TRUE );
TQStrList functionList = o->metaObject()->slotNames( true );
if ( functionList.find( function ) != -1 )
return TRUE;
return true;
if ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer();
functionList = o->metaObject()->slotNames( TRUE );
functionList = o->metaObject()->slotNames( true );
if ( functionList.find( function ) != -1 )
return TRUE;
return true;
}
//if ( ::tqt_cast<CustomWidget*>(o) ) {
@ -924,7 +924,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
if ( !s.data() )
continue;
if ( s == function )
return TRUE;
return true;
}
}
}
@ -932,10 +932,10 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( function ) )
return TRUE;
return true;
}
return FALSE;
return false;
}
TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function )
@ -975,7 +975,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
w->lstProperties.append( *it3 );
}
delete wid;
return FALSE;
return false;
}
}
@ -988,7 +988,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
r->isContainer = wid->isContainer;
wid->id = WidgetDatabase::addCustomWidget( r );
cWidgets->append( wid );
return TRUE;
return true;
}
void MetaDataBase::removeCustomWidget( CustomWidget *w )
@ -1017,18 +1017,18 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid )
if ( w == wid )
continue;
if ( wid->className == w->className )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool MetaDataBase::hasCustomWidget( const TQString &className )
{
for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
if ( w->className == className )
return TRUE;
return true;
}
return FALSE;
return false;
}
void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
@ -1175,15 +1175,15 @@ bool MetaDataBase::hasVariable( TQObject *o, const TQString &name )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return FALSE;
return false;
}
TQValueList<Variable>::Iterator it = r->variables.begin();
for ( ; it != r->variables.end(); ++it ) {
if ( extractVariableName( name ) == extractVariableName( (*it).varName ) )
return TRUE;
return true;
}
return FALSE;
return false;
}
TQString MetaDataBase::extractVariableName( const TQString &name )
@ -1280,7 +1280,7 @@ MetaDataBase::CustomWidget::CustomWidget()
pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) );
id = -1;
sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
isContainer = FALSE;
isContainer = false;
}
MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
@ -1354,40 +1354,40 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
{
TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE );
TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true );
if ( sigList.find( signal ) != -1 )
return TRUE;
return true;
for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
if ( normalizeFunction( *it ) == normalizeFunction( signal ) )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
{
TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE );
TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true );
if ( slotList.find( normalizeFunction( slot ) ) != -1 )
return TRUE;
return true;
for ( TQValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) )
return TRUE;
return true;
}
return FALSE;
return false;
}
bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const
{
TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE );
TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true );
if ( propList.find( prop ) != -1 )
return TRUE;
return true;
for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
if ( (*it).property == prop )
return TRUE;
return true;
}
return FALSE;
return false;
}
void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg )

@ -135,7 +135,7 @@ public:
struct MetaInfo
{
MetaInfo() : classNameChanged( FALSE ) { }
MetaInfo() : classNameChanged( false ) { }
TQString className;
bool classNameChanged;
TQString comment;
@ -166,7 +166,7 @@ public:
static TQString resizeMode( TQObject *o );
static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
TQObject *receiver, const TQCString &slot, bool addCode = TRUE );
TQObject *receiver, const TQCString &slot, bool addCode = true );
static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal,
TQObject *receiver, const TQCString &slot );
static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal,
@ -184,11 +184,11 @@ public:
const TQString &access, const TQString &type, const TQString &language,
const TQString &returnType );
static void removeFunction( TQObject *o, const TQString &function );
static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = FALSE );
static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = false );
static TQValueList<Function> slotList( TQObject *o );
static bool isSlotUsed( TQObject *o, const TQCString &slot );
static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE );
static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE );
static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = false );
static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = false );
static void changeFunction( TQObject *o, const TQString &function, const TQString &newName,
const TQString &returnType );
static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName,

@ -84,7 +84,7 @@ TQTextParagraph* TextEdit::paragraph()
MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget,
FormWindow *fw, const TQString &text )
: MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE )
: MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( false )
{
callStatic = call_static;
@ -212,7 +212,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
optionsToolBar = new TQToolBar( "Options", this, DockTop );
wrapAction = new TQAction( this );
wrapAction->setToggleAction( TRUE );
wrapAction->setToggleAction( true );
wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", KDevDesignerPartFactory::instance() ) );
wrapAction->setText( i18n( "Word Wrapping" ) );
wrapAction->addTo( optionsToolBar );
@ -224,22 +224,22 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
textEdit->document()->setFormatter( new TQTextFormatterBreakInWords );
textEdit->document()->setUseFormatCollection( FALSE );
textEdit->document()->setUseFormatCollection( false );
textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML );
if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) {
mlined = (TQTextEdit*)editWidget;
mlined->setReadOnly( TRUE );
mlined->setReadOnly( true );
const TQMetaProperty *wordWrap = mlined->metaObject()->property(
mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE );
mlined->metaObject()->findProperty( "wordWrap", true ), true );
oldWrapMode = 0;
oldWrapString = "NoWrap";
if ( wordWrap ) {
oldWrapMode = mlined->property( "wordWrap" );
oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) );
if ( oldWrapString != "NoWrap" )
doWrap = TRUE;
doWrap = true;
}
textEdit->setAlignment( mlined->alignment() );
textEdit->setWordWrap( mlined->wordWrap() );
@ -296,7 +296,7 @@ void MultiLineEditor::applyClicked()
TQVariant( 0 ), "NoWrap", oldWrapString );
propcmd->execute();
formwindow->commandHistory()->addCommand( propcmd, TRUE );
formwindow->commandHistory()->addCommand( propcmd, true );
}
textEdit->setFocus();
}
@ -346,11 +346,11 @@ void MultiLineEditor::insertBR()
void MultiLineEditor::showFontDialog()
{
bool selText = FALSE;
bool selText = false;
int pfrom, pto, ifrom, ito;
if ( textEdit->hasSelectedText() ) {
textEdit->getSelection( &pfrom, &ifrom, &pto, &ito );
selText = TRUE;
selText = true;
}
RichTextFontDialog *fd = new RichTextFontDialog( this );
if ( fd->exec() == TQDialog::Accepted ) {
@ -380,7 +380,7 @@ TQString MultiLineEditor::getStaticText()
TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap )
{
MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text );
MultiLineEditor medit( true, richtextMode, parent, 0, 0, text );
if ( richtextMode )
medit.setUseWrapping( *useWrap );
if ( medit.exec() == TQDialog::Accepted ) {

@ -74,7 +74,7 @@ void FormItem::insert( Project *pro )
{
TQString n = "Form" + TQString::number( ++forms );
FormWindow *fw = 0;
FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro );
FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), true, pro );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
fw->setProject( pro );
MetaDataBase::addEntry( fw );
@ -113,11 +113,11 @@ void FormItem::insert( Project *pro )
MainWindow::self->objectHierarchy()->formDefinitionView()->refresh();
MainWindow::self->objectHierarchy()->rebuild();
fw->killAccels( fw );
fw->project()->setModified( TRUE );
fw->project()->setModified( true );
fw->setFocus();
if ( !pro->isDummy() ) {
fw->setSavePixmapInProject( TRUE );
fw->setSavePixmapInline( FALSE );
fw->setSavePixmapInProject( true );
fw->setSavePixmapInline( false );
}
}
@ -155,7 +155,7 @@ void CustomFormItem::insert( Project *pro )
TQString filename = templateFileName();
if ( !filename.isEmpty() && TQFile::exists( filename ) ) {
Resource resource( MainWindow::self );
FormFile *ff = new FormFile( filename, TRUE, pro );
FormFile *ff = new FormFile( filename, true, pro );
if ( !resource.load( ff ) ) {
TQMessageBox::information( MainWindow::self, i18n("Load Template"),
i18n("Could not load form description from template '%1'" ).arg( filename ) );
@ -167,8 +167,8 @@ void CustomFormItem::insert( Project *pro )
MainWindow::self->formWindow()->setFileName( TQString() );
unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() );
if ( !pro->isDummy() ) {
MainWindow::self->formWindow()->setSavePixmapInProject( TRUE );
MainWindow::self->formWindow()->setSavePixmapInline( FALSE );
MainWindow::self->formWindow()->setSavePixmapInProject( true );
MainWindow::self->formWindow()->setSavePixmapInline( false );
}
}
}
@ -177,13 +177,13 @@ void CustomFormItem::insert( Project *pro )
SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text )
: NewItem( view, text ), visible( TRUE )
: NewItem( view, text ), visible( true )
{
}
void SourceFileItem::insert( Project *pro )
{
SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro );
SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), true, pro );
MainWindow::self->editSource( f );
}
@ -203,7 +203,7 @@ void SourceFileItem::setProject( Project *pro )
SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text )
: NewItem( view, text ), visible( TRUE )
: NewItem( view, text ), visible( true )
{
}
@ -217,13 +217,13 @@ void SourceTemplateItem::insert( Project *pro )
if ( src.type == SourceTemplateInterface::Source::Invalid )
return;
if ( src.type == SourceTemplateInterface::Source::FileName )
f = new SourceFile( src.filename, FALSE, pro );
f = new SourceFile( src.filename, false, pro );
else
f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro );
f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), true, pro );
if ( f->isAccepted()) {
f->setText( src.code );
MainWindow::self->editSource( f );
f->setModified( TRUE );
f->setModified( true );
} else {
delete f;
}
@ -253,7 +253,7 @@ void NewForm::insertTemplates( TQIconView *tView,
allItems.append( pi );
pi->setLanguage( *it );
pi->setPixmap( BarIcon( "designer_project.png" , KDevDesignerPartFactory::instance()) );
pi->setDragEnabled( FALSE );
pi->setDragEnabled( false );
}
}
TQIconViewItem *cur = 0;
@ -261,24 +261,24 @@ void NewForm::insertTemplates( TQIconView *tView,
allItems.append( fi );
fi->setFormType( FormItem::Dialog );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
fi->setDragEnabled( FALSE );
fi->setDragEnabled( false );
cur = fi;
if ( !MainWindow::self->singleProjectMode() ) {
fi = new FormItem( tView,i18n( "Wizard" ) );
allItems.append( fi );
fi->setFormType( FormItem::Wizard );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
fi->setDragEnabled( FALSE );
fi->setDragEnabled( false );
fi = new FormItem( tView, i18n( "Widget" ) );
allItems.append( fi );
fi->setFormType( FormItem::Widget );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
fi->setDragEnabled( FALSE );
fi->setDragEnabled( false );
fi = new FormItem( tView, i18n( "Main Window" ) );
allItems.append( fi );
fi->setFormType( FormItem::MainWindow );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
fi->setDragEnabled( FALSE );
fi->setDragEnabled( false );
TQString templPath = templatePath;
TQStringList templRoots;
@ -309,7 +309,7 @@ void NewForm::insertTemplates( TQIconView *tView,
name = name.replace( '_', ' ' );
CustomFormItem *ci = new CustomFormItem( tView, name );
allItems.append( ci );
ci->setDragEnabled( FALSE );
ci->setDragEnabled( false );
ci->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
ci->setTemplateFile( fi->absFilePath() );
}
@ -329,7 +329,7 @@ void NewForm::insertTemplates( TQIconView *tView,
si->setExtension( eit.key() );
si->setLanguage( *it );
si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) );
si->setDragEnabled( FALSE );
si->setDragEnabled( false );
}
iface->release();
}
@ -346,7 +346,7 @@ void NewForm::insertTemplates( TQIconView *tView,
si->setTemplate( *sit );
si->setLanguage( siface->language( *sit ) );
si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) );
si->setDragEnabled( FALSE );
si->setDragEnabled( false );
siface->release();
}
}
@ -366,7 +366,7 @@ NewForm::NewForm( TQIconView *templateView, const TQString &templatePath )
NewForm::NewForm( TQWidget *parent, const TQStringList& projects,
const TQString& currentProject, const TQString &templatePath )
: NewFormBase( parent, 0, TRUE )
: NewFormBase( parent, 0, true )
{
connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@ -399,7 +399,7 @@ void NewForm::projectChanged( const TQString &project )
for ( i = allItems.first(); i; i = allItems.next() )
( (NewItem*)i )->setProject( pro );
templateView->setCurrentItem( templateView->firstItem() );
templateView->arrangeItemsInGrid( TRUE );
templateView->arrangeItemsInGrid( true );
}
void NewForm::itemChanged( TQIconViewItem *item )

@ -39,7 +39,7 @@ OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw )
order = -1;
widget = w;
setBackgroundMode( NoBackground );
setAutoMask( TRUE );
setAutoMask( true );
setOrder( i, w );
}
@ -67,7 +67,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
int w = fontMetrics().width( TQString::number( i ) ) + 10;
int h = fontMetrics().lineSpacing() * 3 / 2;
TQFont f( font() );
f.setBold( TRUE );
f.setBold( true );
setFont( f );
resize( TQMAX( w, h ), h );
update(); // in case the size didn't change

@ -40,7 +40,7 @@
#include <tdelocale.h>
static TQTextEdit *debugoutput = 0;
bool debugToStderr = FALSE;
bool debugToStderr = false;
TQtMsgHandler OutputWindow::oldMsgHandler = 0;
@ -89,7 +89,7 @@ void OutputWindow::setupError()
errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) );
errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) );
errorView->setColumnAlignment( 2, TQt::AlignRight );
errorView->setAllColumnsShowFocus( TRUE );
errorView->setAllColumnsShowFocus( true );
}
static void debugMessageOutput( TQtMsgType type, const char *msg )
@ -115,7 +115,7 @@ static void debugMessageOutput( TQtMsgType type, const char *msg )
void OutputWindow::setupDebug()
{
debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" );
//debugView->setReadOnly( TRUE );
//debugView->setReadOnly( true );
addTab( debugView, "Debug Output" );
if ( !debugToStderr )
@ -169,7 +169,7 @@ void OutputWindow::currentErrorChanged( TQListViewItem *i )
if ( !i )
return;
ErrorItem *ei = (ErrorItem*)i;
ei->setRead( TRUE );
ei->setRead( true );
MainWindow::self->showSourceLine( ei->location(), ei->line() - 1, MainWindow::Error );
}
@ -179,7 +179,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString
const TQString &locationString, TQObject *locationObject )
: TQListViewItem( parent, after )
{
setMultiLinesEnabled( TRUE );
setMultiLinesEnabled( true );
TQString m( message );
type = m.startsWith( "Warning: " ) ? Warning : Error;
m = m.mid( m.find( ':' ) + 1 );
@ -190,7 +190,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString
object = locationObject;
read = !after;
if ( !after ) {
parent->setSelected( this, TRUE );
parent->setSelected( this, true );
parent->setCurrentItem( this );
}
}
@ -202,7 +202,7 @@ void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg,
g.setColor( TQColorGroup::Text, type == Error ? TQt::red : TQt::darkYellow );
if ( !read ) {
TQFont f( p->font() );
f.setBold( TRUE );
f.setBold( true );
p->setFont( f );
}
TQListViewItem::paintCell( p, g, column, width, alignment );

@ -59,7 +59,7 @@ BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb )
void BoldListBoxText::paint( TQPainter* painter )
{
TQFont f = painter->font();
f.setBold( TRUE );
f.setBold( true );
painter->setFont( f );
TQListBoxText::paint( painter );
@ -79,8 +79,8 @@ PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
buttonPixmap->setFormWindow( formWindow );
// force toggle event
checkBuildEffect->setChecked(FALSE);
checkBuildEffect->setChecked(TRUE);
checkBuildEffect->setChecked(false);
checkBuildEffect->setChecked(true);
}
PaletteEditorAdvanced::~PaletteEditorAdvanced()
@ -126,8 +126,8 @@ void PaletteEditorAdvanced::paletteSelected(int p)
groupEffect->setDisabled(checkBuildDisabled->isChecked());
}
else {
groupCentral->setEnabled(TRUE);
groupEffect->setEnabled(TRUE);
groupCentral->setEnabled(true);
groupEffect->setEnabled(true);
}
updateStyledButtons();
}
@ -622,7 +622,7 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
BackgroundMode mode, TQWidget* parent,
const char* name, FormWindow *fw )
{
PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE );
PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
@ -632,11 +632,11 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
TQPalette result = init;
if ( resultCode == TQDialog::Accepted ) {
if ( ok )
*ok = TRUE;
*ok = true;
result = dlg->pal();
} else {
if ( ok )
*ok = FALSE;
*ok = false;
}
delete dlg;
return result;

@ -37,7 +37,7 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
public:
PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
bool modal=FALSE, WFlags f=0 );
bool modal=false, WFlags f=0 );
~PaletteEditorAdvanced();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,

@ -283,7 +283,7 @@ TQPalette PaletteEditor::pal() const
TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
TQWidget* parent, const char* name, FormWindow *fw )
{
PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE );
PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
@ -293,11 +293,11 @@ TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, Background
TQPalette result = init;
if ( resultCode == TQDialog::Accepted ) {
if ( ok )
*ok = TRUE;
*ok = true;
result = dlg->pal();
} else {
if ( ok )
*ok = FALSE;
*ok = false;
}
delete dlg;
return result;

@ -37,7 +37,7 @@ class PaletteEditor : public PaletteEditorBase
public:
PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=false, WFlags f=0 );
~PaletteEditor();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,

@ -66,7 +66,7 @@ void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
viewport()->repaint( FALSE );
viewport()->repaint( false );
}
void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
@ -114,9 +114,9 @@ TQStringList qChoosePixmaps( TQWidget *parent )
TQString all;
buildImageFormatList( filter, all );
TQFileDialog fd( TQString(), filter, parent, 0, TRUE );
TQFileDialog fd( TQString(), filter, parent, 0, true );
fd.setMode( TQFileDialog::ExistingFiles );
fd.setContentsPreviewEnabled( TRUE );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
@ -148,8 +148,8 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQString all;
buildImageFormatList( filter, all );
TQFileDialog fd( TQString(), filter, parent, 0, TRUE );
fd.setContentsPreviewEnabled( TRUE );
TQFileDialog fd( TQString(), filter, parent, 0, true );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
@ -178,9 +178,9 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
return pix;
}
} else if ( fw && fw->savePixmapInProject() ) {
PixmapCollectionEditor dia( parent, 0, TRUE );
PixmapCollectionEditor dia( parent, 0, true );
dia.setProject( fw->project() );
dia.setChooserMode( TRUE );
dia.setChooserMode( true );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
@ -188,7 +188,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
return pix;
}
} else {
PixmapFunction dia( parent, 0, TRUE );
PixmapFunction dia( parent, 0, true );
TQObject::connect( dia.helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );

@ -54,14 +54,14 @@ bool PixmapCollection::addPixmap( const Pixmap &pix, bool force )
if ( !force ) {
for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( (*it).name == pixmap.name )
return FALSE;
return false;
}
}
pixList.append( pixmap );
mimeSourceFactory->setPixmap( pixmap.name, pixmap.pix );
project->setModified( TRUE );
return TRUE;
project->setModified( true );
return true;
}
void PixmapCollection::removePixmap( const TQString &name )
@ -72,7 +72,7 @@ void PixmapCollection::removePixmap( const TQString &name )
break;
}
}
project->setModified( TRUE );
project->setModified( true );
}
TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
@ -83,18 +83,18 @@ TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
TQString PixmapCollection::unifyName( const TQString &n )
{
TQString name = n;
bool restart = FALSE;
bool restart = false;
int added = 1;
for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( restart )
it = pixList.begin();
restart = FALSE;
restart = false;
if ( name == (*it).name ) {
name = n;
name += "_" + TQString::number( added );
++added;
restart = TRUE;
restart = true;
}
}
@ -138,13 +138,13 @@ void PixmapCollection::savePixmap( Pixmap &pix )
TQString PixmapCollection::imageDir() const
{
return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images";
return TQFileInfo( project->fileName() ).dirPath( true ) + "/images";
}
void PixmapCollection::mkdir()
{
TQString f = project->fileName();
TQDir d( TQFileInfo( f ).dirPath( TRUE ) );
TQDir d( TQFileInfo( f ).dirPath( true ) );
d.mkdir( "images" );
}
@ -156,7 +156,7 @@ void PixmapCollection::load( const TQString& filename )
if ( filename[0] == '/' )
absfile = filename;
else
absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename;
absfile = TQFileInfo( project->fileName() ).dirPath( true ) + "/" + filename;
TQPixmap pm( absfile );
if ( pm.isNull() )
@ -166,7 +166,7 @@ void PixmapCollection::load( const TQString& filename )
pix.name = TQFileInfo( absfile ).fileName();
pix.absname = absfile;
pix.pix = pm;
addPixmap( pix, TRUE );
addPixmap( pix, true );
}
DesignerPixmapCollection *PixmapCollection::iFace()

@ -49,7 +49,7 @@ public:
PixmapCollection( Project *pro );
~PixmapCollection();
bool addPixmap( const Pixmap &pix, bool force = TRUE );
bool addPixmap( const Pixmap &pix, bool force = true );
void removePixmap( const TQString &name );
TQPixmap pixmap( const TQString &name );

@ -28,7 +28,7 @@
void PixmapCollectionEditor::init()
{
project = 0;
setChooserMode( FALSE );
setChooserMode( false );
}
void PixmapCollectionEditor::destroy()
@ -55,7 +55,7 @@ void PixmapCollectionEditor::addPixmap()
TQFileInfo fi ( *it );
pixmap.name = fi.fileName();
pixmap.absname = fi.filePath();
if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) )
if ( !project->pixmapCollection()->addPixmap( pixmap, false ) )
continue;
lastName = pixmap.name;
}
@ -88,9 +88,9 @@ void PixmapCollectionEditor::updateView()
for ( TQValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
// #### might need to scale down the pixmap
TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) );
//item->setRenameEnabled( TRUE ); // this will be a bit harder to implement
item->setDragEnabled( FALSE );
item->setDropEnabled( FALSE );
//item->setRenameEnabled( true ); // this will be a bit harder to implement
item->setDragEnabled( false );
item->setDropEnabled( false );
}
viewPixmaps->setCurrentItem( viewPixmaps->firstItem() );
currentChanged( viewPixmaps->firstItem() );
@ -108,8 +108,8 @@ void PixmapCollectionEditor::setChooserMode( bool c )
buttonClose->hide();
buttonOk->show();
buttonCancel->show();
buttonOk->setEnabled( FALSE );
buttonOk->setDefault( TRUE );
buttonOk->setEnabled( false );
buttonOk->setDefault( true );
connect( viewPixmaps, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) );
connect( viewPixmaps, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) );
setCaption( i18n( "Choose Image" ) );
@ -117,7 +117,7 @@ void PixmapCollectionEditor::setChooserMode( bool c )
buttonClose->show();
buttonOk->hide();
buttonCancel->hide();
buttonClose->setDefault( TRUE );
buttonClose->setDefault( true );
}
updateView();
}

@ -84,13 +84,13 @@ bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem **
TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
return FALSE;
return false;
TQ_LONG p = 0;
stream >> p;
*i = ( PopupMenuEditorItem *) p;
return TRUE;
return true;
}
// PopupMenuEditorItem Implementation -----------------------------------
@ -100,8 +100,8 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * par
a( 0 ),
s( 0 ),
m( menu ),
separator( FALSE ),
removable( FALSE )
separator( false ),
removable( false )
{
init();
a = new TQAction( this );
@ -115,12 +115,12 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m
a( action ),
s( 0 ),
m( menu ),
separator( FALSE ),
removable( TRUE )
separator( false ),
removable( true )
{
init();
if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<QSeparatorAction*>(a) )
separator = TRUE;
separator = true;
if ( a && !a->childrenListObject().isEmpty() )
a->installEventFilter( this );
}
@ -151,7 +151,7 @@ void PopupMenuEditorItem::init()
if ( m && !isSeparator() ) {
s = new PopupMenuEditor( m->formWindow(), m );
TQString n = "PopupMenuEditor";
m->formWindow()->unify( s, n, TRUE );
m->formWindow()->unify( s, n, true );
s->setName( n );
MetaDataBase::addEntry( s );
}
@ -180,7 +180,7 @@ bool PopupMenuEditorItem::isVisible() const
return ( g->isVisible() && g->usesDropDown() );
else if ( a )
return a->isVisible();
return FALSE;
return false;
}
void PopupMenuEditorItem::showMenu( int x, int y )
@ -223,20 +223,20 @@ int PopupMenuEditorItem::count() const
bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
{
if ( ! ::tqt_cast<TQActionGroup*>( o ) )
return FALSE;
return false;
if ( event->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = ( TQChildEvent * ) event;
TQObject * c = ce->child();
TQAction * action = ::tqt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates
return FALSE;
return false;
TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c );
if ( actionGroup )
s->insert( actionGroup );
else if ( action )
s->insert( action );
}
return FALSE;
return false;
}
void PopupMenuEditorItem::selfDestruct()
@ -293,7 +293,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu,
PopupMenuEditor::~PopupMenuEditor()
{
itemList.setAutoDelete( TRUE );
itemList.setAutoDelete( true );
}
void PopupMenuEditor::init()
@ -303,7 +303,7 @@ void PopupMenuEditor::init()
addItem.action()->setMenuText( i18n("new item") );
addSeparator.action()->setMenuText( i18n("new separator") );
setAcceptDrops( TRUE );
setAcceptDrops( true );
setFocusPolicy( TQWidget::StrongFocus );
lineEdit = new TQLineEdit( this );
@ -357,7 +357,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0,
TQString( actionGroup->name() ) + "Menu" );
TQActionGroup *g = 0;
TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE );
TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
insert( i, index );
for ( ; it.current(); ++it ) {
@ -566,7 +566,7 @@ void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index
if ( n < 4 )
keys[n] = key | shift | ctrl | alt | meta;
a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) );
MetaDataBase::setPropertyChanged( a, "accel", TRUE );
MetaDataBase::setPropertyChanged( a, "accel", true );
resizeToContents();
}
@ -625,7 +625,7 @@ PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a )
a = ae->newActionEx();
PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this );
TQString n = TQString( a->name() ) + "Item";
formWindow()->unify( i, n, FALSE );
formWindow()->unify( i, n, false );
i->setName( n );
AddActionToPopupCommand * cmd =
new AddActionToPopupCommand( i18n( "Add Item" ), formWnd, this, i );
@ -748,7 +748,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
setFocusAt( mousePressPos );
if ( currentItem() == &addSeparator ) {
PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) );
i->setSeparator( TRUE );
i->setSeparator( true );
return;
}
if ( currentField == 0 ) {
@ -772,7 +772,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
// FIXME: start rename after drop
} else if ( draggedItem == &addSeparator ) {
draggedItem = createItem( new QSeparatorAction( 0 ) );
draggedItem->setSeparator( TRUE );
draggedItem->setSeparator( true );
}
PopupMenuEditorItemPtrDrag * d =
@ -780,7 +780,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
hideSubMenu();
draggedItem->setVisible( FALSE );
draggedItem->setVisible( false );
resizeToContents();
// If the item is dropped in the same list,
@ -792,7 +792,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
d->dragCopy(); // dragevents and stuff happens
if ( draggedItem ) { // item was not dropped
draggedItem->setVisible( TRUE );
draggedItem->setVisible( true );
draggedItem = 0;
if ( hasFocus() ) {
hideSubMenu();
@ -800,7 +800,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
showSubMenu();
}
} else { // item was dropped
itemList.takeNode( node )->setVisible( TRUE );
itemList.takeNode( node )->setVisible( true );
if ( currentIndex > 0 && currentIndex > idx )
--currentIndex;
// the drop might happen in another menu, so we'll resize
@ -861,9 +861,9 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
if ( g->usesDropDown() ) {
i = new PopupMenuEditorItem( g, this );
TQString n = TQString( g->name() ) + "Item";
formWindow()->unify( i, n, FALSE );
formWindow()->unify( i, n, false );
i->setName( n );
TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE );
TQObjectList *l = g->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
for ( ; it.current(); ++it ) {
g = ::tqt_cast<TQActionGroup*>(it.current());
@ -1416,10 +1416,10 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e )
a->setMenuText( menuText );
i = createItem( a );
TQString n = constructName( i );
formWindow()->unify( a, n, TRUE );
formWindow()->unify( a, n, true );
a->setName( n );
MetaDataBase::addEntry( a );
MetaDataBase::setPropertyChanged( a, "menuText", TRUE );
MetaDataBase::setPropertyChanged( a, "menuText", true );
ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" );
if ( ae )
ae->updateActionName( a );

@ -57,9 +57,9 @@ bool PreviewWidget::eventFilter(TQObject *, TQEvent *e)
case TQEvent::KeyRelease:
case TQEvent::Enter:
case TQEvent::Leave:
return TRUE; // ignore;
return true; // ignore;
default:
break;
}
return FALSE;
return false;
}

@ -71,9 +71,9 @@ bool DatabaseConnection::refreshCatalog()
{
#ifndef TQT_NO_SQL
if ( loaded )
return TRUE;
return true;
if ( !open() )
return FALSE;
return false;
tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) );
flds.clear();
for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) {
@ -83,11 +83,11 @@ bool DatabaseConnection::refreshCatalog()
lst << fil.field( j )->name();
flds.insert( *it, lst );
}
loaded = TRUE;
loaded = true;
conn->close();
return loaded;
#else
return FALSE;
return false;
#endif
}
@ -124,16 +124,16 @@ bool DatabaseConnection::open( bool suppressDialog )
conn->setHostName( hname );
conn->setPort( prt );
bool success = conn->open();
for( ; suppressDialog == FALSE ; ) {
bool done = FALSE;
for( ; !suppressDialog ; ) {
bool done = false;
if ( !success ) {
DatabaseConnectionEditor dia( this, 0 , 0 , TRUE );
DatabaseConnectionEditor dia( this, 0 , 0 , true );
switch( dia.exec() ) {
case TQDialog::Accepted:
done = FALSE;
done = false;
break;
case TQDialog::Rejected:
done = TRUE;
done = true;
break;
}
}
@ -156,7 +156,7 @@ bool DatabaseConnection::open( bool suppressDialog )
case 0: // OK or Enter
continue;
case 1: // Cancel or Escape
done = TRUE;
done = true;
break;
}
} else
@ -170,7 +170,7 @@ bool DatabaseConnection::open( bool suppressDialog )
}
return success;
#else
return FALSE;
return false;
#endif
}
@ -206,7 +206,7 @@ Project::Project( const TQString &fn, const TQString &pName,
const TQString &l )
: proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy )
{
modified = TRUE;
modified = true;
pixCollection = new PixmapCollection( this );
iface = 0;
lang = l;
@ -216,10 +216,10 @@ Project::Project( const TQString &fn, const TQString &pName,
setFileName( fn );
if ( !pName.isEmpty() )
proName = pName;
sourcefiles.setAutoDelete( TRUE );
modified = FALSE;
objs.setAutoDelete( FALSE );
fakeFormFiles.setAutoDelete( FALSE );
sourcefiles.setAutoDelete( true );
modified = false;
objs.setAutoDelete( false );
fakeFormFiles.setAutoDelete( false );
}
Project::~Project()
@ -315,13 +315,13 @@ TQString Project::projectName() const
static TQString parse_part( const TQString &part )
{
TQString res;
bool inName = FALSE;
bool inName = false;
TQString currName;
for ( int i = 0; i < (int)part.length(); ++i ) {
TQChar c = part[ i ];
if ( !inName ) {
if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' )
inName = TRUE;
inName = true;
else
continue;
}
@ -373,15 +373,15 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key
if ( start )
*start = i - lastWord.length() - extraWhiteSpaceCount + 1;
TQStringList lst;
bool inName = FALSE;
bool inName = false;
TQString currName;
bool hadEqual = FALSE;
bool hadEqual = false;
for ( ; i < (int)contents.length(); ++i ) {
c = contents[ i ];
if ( !hadEqual && c != '=' )
continue;
if ( !hadEqual ) {
hadEqual = TRUE;
hadEqual = true;
continue;
}
if ( ( c.isLetter() || c.isDigit() || c == '.' || c == '/' || c == '_' || c == '\\' ||
@ -392,11 +392,11 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key
currName = TQString();
if ( c != '\\' || contents[i+1] != '\n' ) {
currName += c;
inName = TRUE;
inName = true;
}
} else {
if ( inName ) {
inName = FALSE;
inName = false;
if ( currName.simplifyWhiteSpace() != "\\" )
lst.append( currName );
}
@ -427,7 +427,7 @@ void Project::parse()
int i = contents.find( "LANGUAGE" );
if ( i != -1 ) {
lang = "";
is_cpp = FALSE;
is_cpp = false;
TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() );
lang = parse_part( part );
is_cpp = lang == "C++";
@ -445,7 +445,7 @@ void Project::parse()
for ( it = uifiles.begin(); it != uifiles.end(); ++it ) {
if ( (*it).startsWith( "__APPOBJ" ) )
continue;
(void) new FormFile( *it, FALSE, this );
(void) new FormFile( *it, false, this );
}
@ -470,7 +470,7 @@ void Project::parse()
for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) {
TQStringList lst = parse_multiline_part( contents, *it );
for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
(void) new SourceFile( *it, FALSE, this );
(void) new SourceFile( *it, false, this );
}
}
@ -491,11 +491,11 @@ void Project::parse()
TQStringList images = parse_multiline_part( contents, "IMAGES" );
// ### remove that for the final - this is beta-compatibility
if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) {
images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList();
if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).exists() ) {
images = TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).entryList();
for ( int i = 0; i < (int)images.count(); ++i )
images[ i ].prepend( "images/" );
modified = TRUE;
modified = true;
}
for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit )
@ -512,13 +512,13 @@ void Project::clear()
bool Project::removeSourceFile( SourceFile *sf )
{
if ( !sourcefiles.containsRef( sf ) )
return FALSE;
return false;
if ( !sf->close() )
return FALSE;
return false;
sourcefiles.removeRef( sf );
modified = TRUE;
modified = true;
emit sourceFileRemoved( sf );
return TRUE;
return true;
}
void Project::setDatabaseDescription( const TQString &db )
@ -541,16 +541,16 @@ bool Project::isValid() const
{
// #### do more checking here?
if ( filename.isEmpty() || proName.isEmpty() )
return FALSE;
return false;
return TRUE;
return true;
}
TQString Project::makeAbsolute( const TQString &f )
{
if ( isDummy() )
return f;
TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE );
TQString encodedUrl = TQFileInfo( filename ).dirPath( true );
TQUrl::encode( encodedUrl );
TQUrl u( encodedUrl, f );
return u.path();
@ -560,7 +560,7 @@ TQString Project::makeRelative( const TQString &f )
{
if ( isDummy() )
return f;
TQString p = TQFileInfo( filename ).dirPath( TRUE );
TQString p = TQFileInfo( filename ).dirPath( true );
TQString f2 = f;
if ( f2.left( p.length() ) == p )
f2.remove( 0, p.length() + 1 );
@ -585,7 +585,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in
if ( strt )
*strt = i;
int start = i;
bool lastWasBackspash = FALSE;
bool lastWasBackspash = false;
if ( i != -1 && ( i == 0 || contents[ i - 1 ] != '{' || contents[ i - 1 ] != ':' ) ) {
for ( ; i < (int)contents.length(); ++i ) {
if ( contents[ i ] == '\n' && !lastWasBackspash )
@ -599,7 +599,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in
void Project::save( bool onlyProjectFile )
{
bool anythingModified = FALSE;
bool anythingModified = false;
// save sources and forms
if ( !onlyProjectFile ) {
@ -635,12 +635,12 @@ void Project::save( bool onlyProjectFile )
TQString original = "";
// read the existing file
bool hasPreviousContents = FALSE;
bool hasPreviousContents = false;
if ( f.open( IO_ReadOnly ) ) {
TQTextStream ts( &f );
original = ts.read();
f.close();
hasPreviousContents = TRUE;
hasPreviousContents = true;
remove_contents( original, "{SOURCES+=" ); // ### compatibility with early 3.0 betas
remove_contents( original, "DBFILE" );
remove_contents( original, "LANGUAGE" );
@ -769,12 +769,12 @@ void Project::save( bool onlyProjectFile )
f.close();
setModified( FALSE );
setModified( false );
if ( singleProjectMode() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( language() );
if ( iface && iface->supports( LanguageInterface::CompressProject ) )
iface->compressProject( makeAbsolute( filename ), singleProFileName, TRUE );
iface->compressProject( makeAbsolute( filename ), singleProFileName, true );
}
}
@ -796,7 +796,7 @@ void Project::setDatabaseConnections( const TQPtrList<DatabaseConnection> &lst )
void Project::addDatabaseConnection( DatabaseConnection *conn )
{
dbConnections.append( conn );
modified = TRUE;
modified = true;
}
#endif
@ -879,7 +879,7 @@ void Project::saveConnections()
if ( f.exists() )
f.remove();
setDatabaseDescription( "" );
modified = TRUE;
modified = true;
return;
}
@ -1026,13 +1026,13 @@ bool Project::openDatabase( const TQString &connection, bool suppressDialog )
if ( connection.isEmpty() && !conn )
conn = databaseConnection( "(default)" );
if ( !conn )
return FALSE;
return false;
bool b = conn->open( suppressDialog );
return b;
#else
Q_UNUSED( connection );
Q_UNUSED( suppressDialog );
return FALSE;
return false;
#endif
}
@ -1088,7 +1088,7 @@ void Project::setLanguage( const TQString &l )
lang = l;
is_cpp = lang == "C++";
updateCustomSettings();
modified = TRUE;
modified = true;
}
TQString Project::language() const
@ -1100,7 +1100,7 @@ void Project::setCustomSetting( const TQString &key, const TQString &value )
{
customSettings.remove( key );
customSettings.insert( key, value );
modified = TRUE;
modified = true;
}
TQString Project::customSetting( const TQString &key ) const
@ -1139,7 +1139,7 @@ void Project::setActive( bool b )
void Project::addSourceFile( SourceFile *sf )
{
sourcefiles.append( sf );
modified = TRUE;
modified = true;
emit sourceFileAdded( sf );
}
@ -1171,7 +1171,7 @@ void Project::setIncludePath( const TQString &platform, const TQString &path )
if ( inclPath[platform] == path )
return;
inclPath.replace( platform, path );
modified = TRUE;
modified = true;
}
void Project::setLibs( const TQString &platform, const TQString &path )
@ -1275,27 +1275,27 @@ void Project::writePlatformSettings( TQString &contents, const TQString &setting
void Project::addFormFile( FormFile *ff )
{
formfiles.append( ff );
modified = TRUE;
modified = true;
emit formFileAdded( ff );
}
bool Project::removeFormFile( FormFile *ff )
{
if ( !formfiles.containsRef( ff ) )
return FALSE;
return false;
if ( !ff->close() )
return FALSE;
return false;
formfiles.removeRef( ff );
modified = TRUE;
modified = true;
emit formFileRemoved( ff );
return TRUE;
return true;
}
void Project::addObject( TQObject *o )
{
bool wasModified = modified;
objs.append( o );
FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" );
FormFile *ff = new FormFile( "", false, this, "qt_fakewindow" );
ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" );
fakeFormFiles.insert( (void*)o, ff );
MetaDataBase::addEntry( o );
@ -1305,7 +1305,7 @@ void Project::addObject( TQObject *o )
fw->setProject( this );
if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
MetaDataBase::languageInterface( language() ), FALSE );
MetaDataBase::languageInterface( language() ), false );
if ( MainWindow::self )
fw->setMainWindow( MainWindow::self );
if ( MainWindow::self ) {
@ -1323,7 +1323,7 @@ void Project::addObject( TQObject *o )
} else {
if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
MetaDataBase::languageInterface( language() ), FALSE );
MetaDataBase::languageInterface( language() ), false );
}
emit objectAdded( o );
modified = wasModified;
@ -1415,11 +1415,11 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func
if ( i != -1 )
func = func.left( i );
bool found = FALSE;
bool found = false;
for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) {
found = TRUE;
found = true;
break;
}
}
@ -1433,7 +1433,7 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func
"()\n" + functionBody + "\n";
f->setText( code );
if ( f->editor() )
f->editor()->refresh( FALSE );
f->editor()->refresh( false );
}
if ( openDeveloper ) {
@ -1452,9 +1452,9 @@ bool Project::hasParentObject( TQObject *o )
for ( TQObject *p = objs.first(); p; p = objs.next() ) {
TQObject *c = p->child( o->name(), o->className() );
if ( c )
return TRUE;
return true;
}
return FALSE;
return false;
}
TQString Project::qualifiedName( TQObject *o )
@ -1491,7 +1491,7 @@ void Project::designerCreated()
const TQString & ) ),
MainWindow::self, TQ_SLOT( updateUndoRedo( bool, bool,
const TQString &, const TQString & ) ) );
fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE );
fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), false );
TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(),
TQEvent::ChildInserted );
fw->parentWidget()->setFixedSize( 1, 1 );

@ -57,11 +57,11 @@ public:
#ifndef TQT_NO_SQL
conn( 0 ),
#endif
project( p ), loaded( FALSE ), iface( 0 ) {}
project( p ), loaded( false ), iface( 0 ) {}
~DatabaseConnection();
bool refreshCatalog();
bool open( bool suppressDialog = TRUE );
bool open( bool suppressDialog = true );
void close();
DesignerDatabase *iFace();
@ -116,12 +116,12 @@ class Project : public TQObject
public:
Project( const TQString &fn, const TQString &pName = TQString(),
TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = FALSE,
TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = false,
const TQString &l = "C++" );
~Project();
void setFileName( const TQString &fn, bool doClear = TRUE );
TQString fileName( bool singlePro = FALSE ) const;
void setFileName( const TQString &fn, bool doClear = true );
TQString fileName( bool singlePro = false ) const;
TQString projectName() const;
void setDatabaseDescription( const TQString &db );
@ -136,13 +136,13 @@ public:
bool isValid() const;
// returns TRUE if this project is the <No Project> project
// returns true if this project is the <No Project> project
bool isDummy() const;
TQString makeAbsolute( const TQString &f );
TQString makeRelative( const TQString &f );
void save( bool onlyProjectFile = FALSE );
void save( bool onlyProjectFile = false );
#ifndef TQT_NO_SQL
TQPtrList<DatabaseConnection> databaseConnections() const;
@ -157,10 +157,10 @@ public:
void saveConnections();
void loadConnections();
bool openDatabase( const TQString &connection, bool suppressDialog = TRUE );
bool openDatabase( const TQString &connection, bool suppressDialog = true );
void closeDatabase( const TQString &connection );
TQObjectList *formList( bool resolveFakeObjects = FALSE ) const;
TQObjectList *formList( bool resolveFakeObjects = false ) const;
DesignerProject *iFace();

@ -52,7 +52,7 @@
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: ProjectSettingsBase( parent, name, modal, fl ), project( pro )
@ -62,7 +62,7 @@ ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* n
editProjectFile->setFocus();
if ( project->isDummy() ) {
editProjectFile->setEnabled( FALSE );
editProjectFile->setEnabled( false );
editProjectFile->setText( project->projectName() );
} else {
if ( project->fileName().isEmpty() || project->fileName() == ".pro" ) {
@ -114,10 +114,10 @@ void ProjectSettings::helpClicked()
void ProjectSettings::okClicked()
{
// ### check for validity
project->setFileName( editProjectFile->text(), FALSE );
project->setFileName( editProjectFile->text(), false );
project->setDatabaseDescription( editDatabaseFile->text() );
project->setLanguage( comboLanguage->text( comboLanguage->currentItem() ) );
project->setModified( TRUE );
project->setModified( true );
accept();
}

@ -40,7 +40,7 @@ class ProjectSettings : public ProjectSettingsBase
public:
ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~ProjectSettings();
protected slots:

File diff suppressed because it is too large Load Diff

@ -85,7 +85,7 @@ public:
TQString name() const;
virtual void notifyValueChange();
virtual void setChanged( bool b, bool updateDb = TRUE );
virtual void setChanged( bool b, bool updateDb = true );
bool isChanged() const;
virtual void placeEditor( TQWidget *w );
@ -143,7 +143,7 @@ class PropertyTextItem : public TQObject,
public:
PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
const TQString &propName, bool comment, bool multiLine, bool ascii = false, bool a = false );
~PropertyTextItem();
virtual void createChildren();
@ -156,7 +156,7 @@ public:
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
virtual void setChanged( bool b, bool updateDb = TRUE );
virtual void setChanged( bool b, bool updateDb = true );
private slots:
void setValue();
@ -579,7 +579,7 @@ private:
struct EnumItem {
EnumItem( const TQString &k, bool s )
: key( k ), selected( s ) {}
EnumItem() : key( TQString() ), selected( FALSE ) {}
EnumItem() : key( TQString() ), selected( false ) {}
bool operator==( const EnumItem &item ) const {
return key == item.key;
}
@ -690,7 +690,7 @@ public:
virtual void setPropertyValue( PropertyItem *i );
virtual void setCurrentProperty( const TQString &n );
void layoutInitValue( PropertyItem *i, bool changed = FALSE );
void layoutInitValue( PropertyItem *i, bool changed = false );
PropertyEditor *propertyEditor() const;
TQString whatsThisAt( const TQPoint &p );
void showCurrentWhatsThis();

@ -36,7 +36,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
{
TQPtrVector<TQPtrList<TQMetaObject> > v;
v.resize( objects.count() );
v.setAutoDelete( TRUE );
v.setAutoDelete( true );
for ( TQObject *o = objects.first(); o; o = objects.next() ) {
const TQMetaObject *m = o->metaObject();
@ -77,7 +77,7 @@ bool PropertyObject::setProperty( const char *name, const TQVariant& value )
for ( TQObject *o = objects.first(); o; o = objects.next() )
o->setProperty( name, value );
return TRUE;
return true;
}
TQVariant PropertyObject::property( const char *name ) const
@ -95,9 +95,9 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property )
{
for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( MetaDataBase::isPropertyChanged( o, property ) )
return TRUE;
return true;
}
return FALSE;
return false;
}
void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment )

@ -31,7 +31,7 @@
#include <tqvbox.h>
QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
: TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE )
: TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
{
popup = new TQVBox( 0, 0, WType_Popup );
popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
@ -98,7 +98,7 @@ void QCompletionEdit::placeListBox()
popup->move( p.x(), p.y() - listbox->height() );
popup->show();
listbox->setCurrentItem( 0 );
listbox->setSelected( 0, TRUE );
listbox->setSelected( 0, true );
setFocus();
}
@ -123,20 +123,20 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
if ( ke->key() == Key_Tab && listbox->count() > 1 &&
listbox->currentItem() < (int)listbox->count() - 1 ) {
listbox->setCurrentItem( listbox->currentItem() + 1 );
return TRUE;
return true;
}
popup->close();
setFocus();
blockSignals( TRUE );
blockSignals( true );
setText( listbox->currentText() );
blockSignals( FALSE );
blockSignals( false );
emit chosen( text() );
return TRUE;
return true;
} else if ( ke->key() == Key_Left || ke->key() == Key_Right ||
ke->key() == Key_Up || ke->key() == Key_Down ||
ke->key() == Key_Home || ke->key() == Key_End ||
ke->key() == Key_Prior || ke->key() == Key_Next ) {
return FALSE;
return false;
} else if ( ke->key() == Key_Escape ) {
popup->close();
setFocus();
@ -148,16 +148,16 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
setFocus();
}
TQApplication::sendEvent( this, e );
return TRUE;
return true;
}
} else if ( e->type() == TQEvent::MouseButtonDblClick ) {
popup->close();
setFocus();
blockSignals( TRUE );
blockSignals( true );
setText( listbox->currentText() );
blockSignals( FALSE );
blockSignals( false );
emit chosen( text() );
return TRUE;
return true;
}
} else if ( o == this ) {
if ( e->type() == TQEvent::KeyPress ) {
@ -171,7 +171,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
ke->key() == Key_Tab ||
ke->key() == Key_Escape ) {
TQApplication::sendEvent( listbox, e );
return TRUE;
return true;
}
}
}

@ -45,10 +45,10 @@ void ReplaceDialog::doReplace()
return;
if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(),
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) )
checkBegin->setChecked( TRUE );
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), false ) )
checkBegin->setChecked( true );
else
checkBegin->setChecked( FALSE );
checkBegin->setChecked( false );
}
void ReplaceDialog::doReplaceAll()
@ -57,16 +57,16 @@ void ReplaceDialog::doReplaceAll()
return;
if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(),
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) )
checkBegin->setChecked( TRUE );
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), true ) )
checkBegin->setChecked( true );
else
checkBegin->setChecked( FALSE );
checkBegin->setChecked( false );
}
void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
checkBegin->setChecked( TRUE );
checkBegin->setChecked( true );
formWindow = fw;
if ( editor )
editor->release();

@ -94,7 +94,7 @@ static TQString makeIndent( int indent )
return s;
}
static TQString entitize( const TQString &s, bool attribute = FALSE )
static TQString entitize( const TQString &s, bool attribute = false )
{
TQString s2 = s;
s2 = s2.replace( "&", "&amp;" );
@ -273,11 +273,11 @@ Resource::Resource()
mainwindow = 0;
formwindow = 0;
toplevel = 0;
copying = FALSE;
pasting = FALSE;
hadGeometry = FALSE;
copying = false;
pasting = false;
hadGeometry = false;
langIface = 0;
hasFunctions = FALSE;
hasFunctions = false;
}
Resource::Resource( MainWindow* mw )
@ -285,11 +285,11 @@ Resource::Resource( MainWindow* mw )
{
formwindow = 0;
toplevel = 0;
copying = FALSE;
pasting = FALSE;
hadGeometry = FALSE;
copying = false;
pasting = false;
hadGeometry = false;
langIface = 0;
hasFunctions = FALSE;
hasFunctions = false;
}
Resource::~Resource()
@ -312,9 +312,9 @@ TQWidget *Resource::widget() const
bool Resource::load( FormFile *ff, Project *defProject )
{
if ( !ff || ff->absFileName().isEmpty() )
return FALSE;
return false;
currFileName = ff->absFileName();
mainContainerSet = FALSE;
mainContainerSet = false;
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly | IO_Translate );
@ -334,7 +334,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
TQString errMsg;
int errLine;
if ( !doc.setContent( dev, &errMsg, &errLine ) ) {
return FALSE;
return false;
}
DomTool::fixDocument( doc );
@ -462,14 +462,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
metaInfo.className = e.firstChild().toText().data();
} else if ( e.tagName() == "pixmapfunction" ) {
if ( formwindow ) {
formwindow->setSavePixmapInline( FALSE );
formwindow->setSavePixmapInProject( FALSE );
formwindow->setSavePixmapInline( false );
formwindow->setSavePixmapInProject( false );
formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() );
}
} else if ( e.tagName() == "pixmapinproject" ) {
if ( formwindow ) {
formwindow->setSavePixmapInline( FALSE );
formwindow->setSavePixmapInProject( TRUE );
formwindow->setSavePixmapInline( false );
formwindow->setSavePixmapInProject( true );
}
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
@ -480,7 +480,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() )
formwindow->hasLayoutFunctions( TRUE );
formwindow->hasLayoutFunctions( true );
}
e = e.nextSibling().toElement();
@ -492,7 +492,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadCustomWidgets( customWidgets, this );
if ( !createObject( widget, formwindow) )
return FALSE;
return false;
if ( !forwards.isNull() ) {
for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
@ -569,7 +569,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void";
function.type = "slot";
function.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, "slot", function.language, function.returnType );
else
@ -597,7 +597,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( function.returnType.isEmpty() )
function.returnType = "void";
function.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, function.type, function.language,
function.returnType );
@ -648,7 +648,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
}
return TRUE;
return true;
}
static bool saveCode( const TQString &filename, const TQString &code )
@ -657,15 +657,15 @@ static bool saveCode( const TQString &filename, const TQString &code )
if ( f.open(IO_WriteOnly | IO_Translate) ) {
TQTextStream ts( &f );
ts << code;
return TRUE;
return true;
}
return FALSE;
return false;
}
bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
return FALSE;
return false;
if (!langIface) {
TQString lang = "TQt Script";
if ( mainwindow )
@ -676,8 +676,8 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
}
if ( formCodeOnly && langIface ) {
if ( saveFormCode(formwindow->formFile(), langIface) )
return TRUE;
bool breakout = FALSE;
return true;
bool breakout = false;
FormFile *ff = formwindow->formFile();
TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() );
TQString filter = langIface->fileFilterList().join("\n");
@ -686,7 +686,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
breakout = fn.isEmpty();
if ( !breakout ) {
if ( saveCode(fn, ff->code()) )
return TRUE;
return true;
}
}
}
@ -694,7 +694,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return FALSE;
return false;
bool b = save( &f );
f.close();
return b;
@ -703,7 +703,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
return FALSE;
return false;
if ( !langIface ) {
TQString lang = "C++";
@ -747,7 +747,7 @@ TQString Resource::copy()
if ( !formwindow )
return TQString();
copying = TRUE;
copying = true;
TQString s;
TQTextOStream ts( &s );
@ -756,10 +756,10 @@ TQString Resource::copy()
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
TQWidget *p = w->parentWidget();
bool save = TRUE;
bool save = true;
while ( p ) {
if ( tmp.findRef( p ) != -1 ) {
save = FALSE;
save = false;
break;
}
p = p->parentWidget();
@ -781,9 +781,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
{
if ( !formwindow )
return;
mainContainerSet = TRUE;
mainContainerSet = true;
pasting = TRUE;
pasting = true;
TQDomDocument doc;
TQString errMsg;
int errLine;
@ -806,9 +806,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
loadCustomWidgets( customWidgets, this );
TQWidgetList widgets;
formwindow->clearSelection( FALSE );
formwindow->setPropertyShowingBlocked( TRUE );
formwindow->clearSelection( FALSE );
formwindow->clearSelection( false );
formwindow->setPropertyShowingBlocked( true );
formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
@ -841,7 +841,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
}
firstWidget = firstWidget.nextSibling().toElement();
}
formwindow->setPropertyShowingBlocked( FALSE );
formwindow->setPropertyShowingBlocked( false );
formwindow->emitShowProperties();
PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets );
@ -1026,7 +1026,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
} else if ( ::tqt_cast<TQMainWindow*>(obj) ) {
saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
bool saved = FALSE;
bool saved = false;
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( isPlugin ) {
WidgetInterface *iface = 0;
@ -1038,7 +1038,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
if ( iface2->supportsPages( className ) ) {
TQWidgetList containers = iface2->pages( className, (TQWidget*)obj );
if ( !containers.isEmpty() ) {
saved = TRUE;
saved = true;
int i = 0;
for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase::
@ -1067,7 +1067,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
} else {
saved = TRUE;
saved = true;
TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\""
@ -1089,14 +1089,14 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget;
cw->className = className;
cw->includeFile = WidgetDatabase::includeFile( classID );
TQStrList lst = w->metaObject()->signalNames( TRUE );
TQStrList lst = w->metaObject()->signalNames( true );
for ( TQPtrListIterator<char> it(lst); it.current(); ++it )
cw->lstSignals.append(it.current());
int i;
int total = w->metaObject()->numProperties( TRUE );
int total = w->metaObject()->numProperties( true );
for ( i = 0; i < total; i++ ) {
const TQMetaProperty *p = w->metaObject()->property( i, TRUE );
const TQMetaProperty *p = w->metaObject()->property( i, true );
if ( p->designable(w) ) {
MetaDataBase::Property prop;
prop.property = p->name();
@ -1114,9 +1114,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
total = w->metaObject()->numSlots( TRUE );
total = w->metaObject()->numSlots( true );
for ( i = 0; i < total; i++ ) {
const TQMetaData *md = w->metaObject()->slot( i, TRUE );
const TQMetaData *md = w->metaObject()->slot( i, true );
MetaDataBase::Function funky;
// Find out if we have a return type.
if ( md->method->count > 0 ) {
@ -1203,7 +1203,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << lv->header()->label( i );
TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
pix.setAutoDelete( true );
if ( lv->header()->iconSet( i ) )
pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@ -1245,7 +1245,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->horizontalHeader()->label( i );
TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
pix.setAutoDelete( true );
if ( table->horizontalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@ -1269,7 +1269,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->verticalHeader()->label( i );
TQPtrList<TQPixmap> pix;
pix.setAutoDelete( TRUE );
pix.setAutoDelete( true );
if ( table->verticalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@ -1482,7 +1482,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
continue;
saved << TQString::fromLatin1( it.current() );
const TQMetaProperty* p = w->metaObject()->
property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
property( w->metaObject()->findProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
@ -1538,7 +1538,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@ -1551,7 +1551,7 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty
void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
@ -1824,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
// ### TODO loading for custom container widgets without pages
#endif
if ( !className.isNull() ) {
obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE );
obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
if ( !obj ) {
TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n"
@ -1835,7 +1835,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !mainContainerSet ) {
if ( formwindow )
formwindow->setMainContainer( (TQWidget*)obj );
mainContainerSet = TRUE;
mainContainerSet = true;
}
w = (TQWidget*)obj;
if ( ::tqt_cast<TQMainWindow*>(w) )
@ -1980,9 +1980,9 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
bool clickable = TRUE, resizable = TRUE;
bool clickable = true, resizable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@ -2020,7 +2020,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
TQString field;
TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
@ -2056,7 +2056,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
TQDomElement n = e;
hasPixmap = FALSE;
hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@ -2080,7 +2080,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
@ -2096,7 +2096,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else if ( ::tqt_cast<TQIconView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQIconView *iv = (TQIconView*)widget;
@ -2131,7 +2131,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
}
}
} else if ( n.tagName() == "item" ) {
item->setOpen( TRUE );
item->setOpen( true );
createItem( n, widget, item );
}
@ -2159,15 +2159,15 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
parent, "spacer", FALSE);
parent, "spacer", false);
spacer->setOrientation( o );
spacer->setInteraciveMode( FALSE );
spacer->setInteraciveMode( false );
while ( !n.isNull() ) {
if ( n.tagName() == "property" )
setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement();
}
spacer->setInteraciveMode( TRUE );
spacer->setInteraciveMode( true );
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
@ -2185,7 +2185,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
*/
void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
@ -2193,7 +2193,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
return;
}
MetaDataBase::setPropertyChanged( obj, prop, TRUE );
MetaDataBase::setPropertyChanged( obj, prop, true );
}
TQVariant defVarient;
@ -2290,11 +2290,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "geometry" ) {
if ( obj == toplevel ) {
hadGeometry = TRUE;
hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
} else if ( obj == formwindow->mainContainer() ) {
hadGeometry = TRUE;
hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
}
@ -2316,7 +2316,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
formwindow->unify( obj, s, TRUE );
formwindow->unify( obj, s, true );
obj->setName( s );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@ -2363,12 +2363,12 @@ void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
TQBuffer buf( ba );
buf.open( IO_WriteOnly | IO_Translate );
TQString format;
bool compress = FALSE;
bool compress = false;
if (img.hasAlphaBuffer()) {
format = "PNG";
} else {
format = img.depth() > 1 ? "XPM" : "XBM";
compress = TRUE;
compress = true;
}
TQImageIO iio( &buf, format );
iio.setImage( img );
@ -2546,7 +2546,7 @@ void Resource::loadConnections( const TQDomElement &e )
} else {
if ( name == "this" )
name = toplevel->name();
TQObjectList *l = toplevel->queryList( 0, name, FALSE );
TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@ -2564,7 +2564,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.receiver = toplevel;
} else {
TQObjectList *l = toplevel->queryList( 0, name, FALSE );
TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@ -2604,7 +2604,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) )
if ( !MetaDataBase::hasFunction( formwindow, slot.function, true ) )
MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType );
else
@ -2777,7 +2777,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
TQString name = n.firstChild().toText().data();
if ( name.isEmpty() )
continue;
TQObjectList *l = toplevel->queryList( 0, name, FALSE );
TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@ -2817,12 +2817,12 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
if ( !langIface || formwindow->project()->isCpp() ) {
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQString extensionInclude;
bool needExtensionInclude = FALSE;
bool needExtensionInclude = false;
if ( langIface &&
formwindow->formFile()->hasFormCode() &&
formwindow->formFile()->codeFileState() != FormFile::Deleted ) {
extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension();
needExtensionInclude = TRUE;
needExtensionInclude = true;
}
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, true );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
@ -3038,13 +3038,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
a = new QDesignerAction( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
hasMenuText = TRUE;
hasMenuText = true;
TQDomElement value(n3.firstChild().toElement());
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@ -3058,13 +3058,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
a = new QDesignerActionGroup( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
hasMenuText = TRUE;
hasMenuText = true;
TQDomElement value = n3.firstChild().toElement();
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@ -3147,7 +3147,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove
MetaDataBase::setPropertyChanged( mb, "name", true ); // FIXME: remove
saveObjectProperties( mb, ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) {
@ -3268,7 +3268,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
PopupMenuEditorItem *i = p->at( p->find( a ) );
if ( i ) {
TQString name = n.attribute( "name" );
formwindow->unify( i, name, TRUE );
formwindow->unify( i, name, true );
i->setName( name );
MetaDataBase::addEntry( i );
loadPopupMenu( i->subMenu(), n );
@ -3288,7 +3288,7 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface
formfile->code().isEmpty() ||
!formfile->hasFormCode() ||
!formfile->isModified(FormFile::WFormCode) )
return TRUE; // There is no code to be saved.
return true; // There is no code to be saved.
return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()),
formfile->code() );
}

@ -75,7 +75,7 @@ public:
bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 );
TQString copy();
bool save( const TQString& filename, bool formCodeOnly = FALSE);
bool save( const TQString& filename, bool formCodeOnly = false);
bool save( TQIODevice* );
void paste( const TQString &cb, TQWidget *parent );

@ -38,12 +38,12 @@
SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
: TQWidget( parent )
{
active = TRUE;
active = true;
setBackgroundMode( active ? PaletteText : PaletteDark );
setFixedSize( 6, 6 );
widget = 0;
dir =d ;
setMouseTracking( FALSE );
setMouseTracking( false );
formWindow = parent;
sel = s;
updateCursor();

@ -77,7 +77,7 @@ class WidgetSelection
public:
WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict );
void setWidget( TQWidget *w, bool updateDict = TRUE );
void setWidget( TQWidget *w, bool updateDict = true );
bool isUsed() const;
void updateGeometry();

@ -57,7 +57,7 @@ SourceEditor::~SourceEditor()
saveBreakPoints();
editor = 0;
if ( formWindow() ) {
formWindow()->formFile()->setCodeEdited( FALSE );
formWindow()->formFile()->setCodeEdited( false );
formWindow()->formFile()->setEditor( 0 );
} else if ( sourceFile() ) {
sourceFile()->setEditor( 0 );
@ -74,16 +74,16 @@ void SourceEditor::setObject( TQObject *o, Project *p )
if ( sourceFile() )
sourceFile()->setEditor( 0 );
if ( formWindow() ) {
formWindow()->formFile()->setCodeEdited( FALSE );
formWindow()->formFile()->setCodeEdited( false );
formWindow()->formFile()->setEditor( 0 );
}
if ( ::tqt_cast<FormWindow*>(o) )
( (FormWindow*)o )->formFile()->setCodeEdited( TRUE );
( (FormWindow*)o )->formFile()->setCodeEdited( true );
save();
bool changed = FALSE;
bool changed = false;
if ( &(*obj) != o ) {
saveBreakPoints();
changed = TRUE;
changed = true;
}
obj = o;
pro = p;
@ -244,7 +244,7 @@ void SourceEditor::resetContext()
void SourceEditor::setFocus()
{
if ( formWindow() )
formWindow()->formFile()->setCodeEdited( TRUE );
formWindow()->formFile()->setCodeEdited( true );
if ( editor )
editor->setFocus();
}
@ -302,7 +302,7 @@ bool SourceEditor::saveAs()
return formWindow()->formFile()->saveAs();
else if ( sourceFile() )
return sourceFile()->saveAs();
return FALSE;
return false;
}
SourceFile *SourceEditor::sourceFile() const

@ -42,13 +42,13 @@
SourceFile::SourceFile( const TQString &fn, bool temp, Project *p )
: filename( fn ), ed( 0 ), fileNameTemp( temp ),
timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE )
, accepted( TRUE )
timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( false )
, accepted( true )
{
iface = 0;
if ( !temp )
accepted = checkFileName( TRUE );
accepted = checkFileName( true );
if (accepted) {
load();
@ -79,7 +79,7 @@ bool SourceFile::save( bool ignoreModified )
if ( fileNameTemp )
return saveAs();
if ( !ignoreModified && !isModified() )
return TRUE;
return true;
if ( ed )
ed->save();
@ -108,8 +108,8 @@ bool SourceFile::save( bool ignoreModified )
TQTextStream ts( &f );
ts << txt;
timeStamp.update();
setModified( FALSE );
return TRUE;
setModified( false );
return true;
}
bool SourceFile::saveAs( bool ignoreModified )
@ -128,18 +128,18 @@ bool SourceFile::saveAs( bool ignoreModified )
}
TQString fn = KFileDialog::getSaveFileName( initFn, filter );
if ( fn.isEmpty() )
return FALSE;
fileNameTemp = FALSE;
return false;
fileNameTemp = false;
filename = pro->makeRelative( fn );
if ( !checkFileName( TRUE ) ) {
if ( !checkFileName( true ) ) {
filename = old;
return FALSE;
return false;
}
pro->setModified( TRUE );
pro->setModified( true );
timeStamp.setFileName( pro->makeAbsolute( filename ) );
if ( ed )
ed->setCaption( i18n( "Edit %1" ).arg( filename ) );
setModified( TRUE );
setModified( true );
if ( pro->isDummy() ) {
TQObject *o = ed->parent();
while ( o && !o->isA( "MainWindow" ) )
@ -154,11 +154,11 @@ bool SourceFile::load()
{
TQFile f( pro->makeAbsolute( filename ) );
if ( !f.open( IO_ReadOnly ) )
return FALSE;
return false;
TQTextStream ts( &f );
txt = ts.read();
timeStamp.update();
return TRUE;
return true;
}
DesignerSourceFile *SourceFile::iFace()
@ -176,7 +176,7 @@ void SourceFile::setEditor( SourceEditor *e )
bool SourceFile::isModified() const
{
if ( !ed )
return FALSE;
return false;
return ed->isModified();
}
@ -210,11 +210,11 @@ bool SourceFile::closeEvent()
{
if ( !isModified() && fileNameTemp ) {
pro->removeSourceFile( this );
return TRUE;
return true;
}
if ( !isModified() )
return TRUE;
return true;
if ( ed )
ed->save();
@ -224,7 +224,7 @@ bool SourceFile::closeEvent()
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
if ( !save() )
return FALSE;
return false;
break;
case 1: // don't save
load();
@ -232,24 +232,24 @@ bool SourceFile::closeEvent()
ed->editorInterface()->setText( txt );
if ( fileNameTemp ) {
pro->removeSourceFile( this );
return TRUE;
return true;
}
if ( MainWindow::self )
MainWindow::self->workspace()->update();
break;
case 2: // cancel
return FALSE;
return false;
default:
break;
}
setModified( FALSE );
return TRUE;
setModified( false );
return true;
}
bool SourceFile::close()
{
if ( !ed )
return TRUE;
return true;
return ed->close();
}
@ -289,10 +289,10 @@ bool SourceFile::checkFileName( bool allowBreak )
while ( fn.isEmpty() ) {
fn = KFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter );
if ( allowBreak && fn.isEmpty() )
return FALSE;
return false;
}
filename = pro->makeRelative( fn );
sf = pro->findSourceFile( filename, this );
}
return TRUE;
return true;
}

@ -46,8 +46,8 @@ public:
void setText( const TQString &s );
void setModified( bool m );
bool save( bool ignoreModified = FALSE );
bool saveAs( bool ignoreModified = FALSE );
bool save( bool ignoreModified = false );
bool saveAs( bool ignoreModified = false );
bool load();
bool close();
bool closeEvent();

@ -43,7 +43,7 @@ StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath )
newForm = new NewForm( templateView, templatePath );
recentFiles.clear();
initFileOpen();
showInFuture = TRUE;
showInFuture = true;
connect( buttonHelp, TQ_SIGNAL( clicked() ),
MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@ -119,12 +119,12 @@ void StartDialog::clearFileInfo()
void StartDialog::setRecentlyFiles( TQStringList &files )
{
insertRecentItems( files, FALSE );
insertRecentItems( files, false );
}
void StartDialog::setRecentlyProjects( TQStringList &projects )
{
insertRecentItems( projects, TRUE );
insertRecentItems( projects, true );
}
void StartDialog::insertRecentItems( TQStringList &files, bool isProject )
@ -139,7 +139,7 @@ void StartDialog::insertRecentItems( TQStringList &files, bool isProject )
item = new TQIconViewItem( recentView, fi.fileName() );
recentFiles[recentView->index( item )] = *it;
item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) );
item->setDragEnabled( FALSE );
item->setDragEnabled( false );
}
}
@ -160,7 +160,7 @@ void StartDialog::initFileOpen()
}
delete l;
fd->setSizeGripEnabled ( FALSE );
fd->setSizeGripEnabled ( false );
tabLayout->addWidget( fd );
TQPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(),

@ -39,10 +39,10 @@
#include <tqstyle.h>
StyledButton::StyledButton(TQWidget* parent, const char* name)
: TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE )
: TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
{
setMinimumSize( minimumSizeHint() );
setAcceptDrops( TRUE );
setAcceptDrops( true );
connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor()));
@ -209,7 +209,7 @@ void StyledButton::onEditor()
void StyledButton::mousePressEvent(TQMouseEvent* e)
{
TQButton::mousePressEvent(e);
mousePressed = TRUE;
mousePressed = true;
pressPos = e->pos();
}
@ -228,7 +228,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
mousePressed = FALSE;
mousePressed = false;
drg->dragCopy();
}
else if ( edit == PixmapEditor && pix && !pix->isNull() ) {
@ -236,7 +236,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
TQImageDrag *drg = new TQImageDrag( img, this );
if(spix)
drg->setPixmap( *spix );
mousePressed = FALSE;
mousePressed = false;
drg->dragCopy();
}
}

@ -66,7 +66,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
if ( string->prev() ) {
if ( string->prev()->endState() == -1 )
process( doc, string->prev(), 0, FALSE );
process( doc, string->prev(), 0, false );
state = string->prev()->endState();
}
@ -77,50 +77,50 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
if ( c == '<' ) {
if ( state != StateStandard )
string->setFormat( i - buffer.length(), buffer.length(), formatStandard, FALSE );
string->setFormat( i - buffer.length(), buffer.length(), formatStandard, false );
buffer = c;
state = StateTag;
string->setFormat( i, 1, formatKeyword, FALSE );
string->setFormat( i, 1, formatKeyword, false );
}
else if ( c == '>' && ( state != StateStandard ) ) {
string->setFormat( i, 1, formatKeyword, FALSE );
string->setFormat( i, 1, formatKeyword, false );
buffer = "";
state = StateStandard;
}
else if ( c == ' ' && state == StateTag ) {
buffer += c;
string->setFormat( i, 1, formatStandard, FALSE );
string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( c == '=' && state == StateAttribute ) {
buffer += c;
string->setFormat( i, 1, formatStandard, FALSE );
string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( c == '\"' && state == StateAttribute ) {
buffer += c;
string->setFormat( i, 1, formatStandard, FALSE );
string->setFormat( i, 1, formatStandard, false );
state = StateAttribVal;
}
else if ( c == '\"' && state == StateAttribVal ) {
buffer += c;
string->setFormat( i, 1, formatStandard, FALSE );
string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( state == StateAttribute ) {
buffer += c;
string->setFormat( i, 1, formatAttribute, FALSE );
string->setFormat( i, 1, formatAttribute, false );
}
else if ( state == StateAttribVal ) {
buffer += c;
string->setFormat( i, 1, formatAttribValue, FALSE );
string->setFormat( i, 1, formatAttribValue, false );
}
else if ( state == StateTag ) {
string->setFormat( i, 1, formatKeyword, FALSE );
string->setFormat( i, 1, formatKeyword, false );
buffer += c;
}
else if ( state == StateStandard ) {
string->setFormat( i, 1, formatStandard, FALSE );
string->setFormat( i, 1, formatStandard, false );
}
i++;
@ -129,7 +129,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
}
string->setEndState( state );
string->setFirstPreProcess( FALSE );
string->setFirstPreProcess( false );
if ( invalidate && string->next() &&
!string->next()->firstPreProcess() && string->next()->endState() != -1 ) {

@ -42,7 +42,7 @@ public:
SyntaxHighlighter_HTML();
virtual ~SyntaxHighlighter_HTML();
void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE );
void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = true );
TQTextFormat *format( int id );
private:

@ -73,7 +73,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
// TabWidget->removePage( rows_tab );
// rows_tab->hide();
// ## do this in the meantime...
TabWidget->setTabEnabled( rows_tab, FALSE );
TabWidget->setTabEnabled( rows_tab, false );
}
if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) {
@ -118,9 +118,9 @@ void TableEditor::columnTextChanged( const TQString &s )
{
if ( listColumns->currentItem() == -1 )
return;
listColumns->blockSignals( TRUE );
listColumns->blockSignals( true );
listColumns->changeItem( s, listColumns->currentItem() );
listColumns->blockSignals( FALSE );
listColumns->blockSignals( false );
#ifndef TQT_NO_TABLE
if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) )
table->horizontalHeader()->setLabel( listColumns->currentItem(),
@ -150,13 +150,13 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
{
if ( !i )
return;
editColumnText->blockSignals( TRUE );
editColumnText->blockSignals( true );
editColumnText->setText( i->text() );
if ( i->pixmap() )
labelColumnPixmap->setPixmap( *i->pixmap() );
else
labelColumnPixmap->setText( "" );
editColumnText->blockSignals( FALSE );
editColumnText->blockSignals( false );
#ifndef TQT_NO_SQL
if ( ::tqt_cast<TQDataTable*>(editTable) ) {
@ -177,24 +177,24 @@ void TableEditor::currentFieldChanged( const TQString &s )
return;
fieldMap.remove( listColumns->currentItem() );
fieldMap.insert( listColumns->currentItem(), s );
editColumnText->blockSignals( TRUE ); //## necessary
editColumnText->blockSignals( true ); //## necessary
TQString newColText = s.mid(0,1).upper() + s.mid(1);
editColumnText->setText( newColText );
columnTextChanged( newColText );
editColumnText->blockSignals( FALSE );
editColumnText->blockSignals( false );
}
void TableEditor::currentRowChanged( TQListBoxItem *i )
{
if ( !i )
return;
editRowText->blockSignals( TRUE );
editRowText->blockSignals( true );
editRowText->setText( i->text() );
if ( i->pixmap() )
labelRowPixmap->setPixmap( *i->pixmap() );
else
labelRowPixmap->setText( "" );
editRowText->blockSignals( FALSE );
editRowText->blockSignals( false );
}
void TableEditor::deleteColumnClicked()
@ -207,7 +207,7 @@ void TableEditor::deleteColumnClicked()
readColumns();
if ( listColumns->firstItem() ) {
listColumns->setCurrentItem( listColumns->firstItem() );
listColumns->setSelected( listColumns->firstItem(), TRUE );
listColumns->setSelected( listColumns->firstItem(), true );
}
#endif
}
@ -222,7 +222,7 @@ void TableEditor::deleteRowClicked()
readRows();
if ( listRows->firstItem() ) {
listRows->setCurrentItem( listRows->firstItem() );
listRows->setSelected( listRows->firstItem(), TRUE );
listRows->setSelected( listRows->firstItem(), true );
}
#endif
}
@ -233,7 +233,7 @@ void TableEditor::newColumnClicked()
table->setNumCols( table->numCols() + 1 );
TQMap<TQString, bool> m;
for ( int i = 0; i < table->numCols() - 1; ++i )
m.insert( table->horizontalHeader()->label( i ), TRUE );
m.insert( table->horizontalHeader()->label( i ), true );
int n = table->numCols() - 1;
TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
@ -242,7 +242,7 @@ void TableEditor::newColumnClicked()
listColumns->insertItem( t );
TQListBoxItem *item = listColumns->item( listColumns->count() - 1 );
listColumns->setCurrentItem( item );
listColumns->setSelected( item, TRUE );
listColumns->setSelected( item, true );
#ifndef TQT_NO_SQL
if ( ::tqt_cast<TQDataTable*>(editTable) ) {
comboFields->setFocus();
@ -261,7 +261,7 @@ void TableEditor::newRowClicked()
table->setNumRows( table->numRows() + 1 );
TQMap<TQString, bool> m;
for ( int i = 0; i < table->numRows() - 1; ++i )
m.insert( table->verticalHeader()->label( i ), TRUE );
m.insert( table->verticalHeader()->label( i ), true );
int n = table->numRows() - 1;
TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
@ -270,7 +270,7 @@ void TableEditor::newRowClicked()
listRows->insertItem( t );
TQListBoxItem *item = listRows->item( listRows->count() - 1 );
listRows->setCurrentItem( item );
listRows->setSelected( item, TRUE );
listRows->setSelected( item, true );
#endif
}
@ -429,7 +429,7 @@ void TableEditor::readFromTable()
if ( listColumns->firstItem() ) {
listColumns->setCurrentItem( listColumns->firstItem() );
listColumns->setSelected( listColumns->firstItem(), TRUE );
listColumns->setSelected( listColumns->firstItem(), true );
}
TQHeader *rows = editTable->verticalHeader();
@ -448,7 +448,7 @@ void TableEditor::readFromTable()
if ( listRows->firstItem() ) {
listRows->setCurrentItem( listRows->firstItem() );
listRows->setSelected( listRows->firstItem(), TRUE );
listRows->setSelected( listRows->firstItem(), true );
}
#endif
}

@ -41,7 +41,7 @@ class TableEditor : public TableEditorBase
public:
TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
const char* name = 0, bool modal = false, WFlags fl = 0 );
~TableEditor();
protected slots:

@ -31,7 +31,7 @@
class TQTimer;
TimeStamp::TimeStamp( TQObject *parent, const TQString &f )
: TQObject( parent ), filename( f ), autoCheck( FALSE )
: TQObject( parent ), filename( f ), autoCheck( false )
{
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoCheckTimeStamp() ) );
@ -70,7 +70,7 @@ bool TimeStamp::isUpToDate() const
{
TQFile f( filename );
if ( !f.exists() )
return TRUE;
return true;
return lastTimeStamp == TQFileInfo( f ).lastModified();
}

@ -55,7 +55,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent )
if ( varView->firstChild() )
varView->setCurrentItem( varView->firstChild() );
else
propBox->setEnabled( FALSE );
propBox->setEnabled( false );
}
VariableDialog::~VariableDialog()
@ -131,7 +131,7 @@ void VariableDialog::addVariable()
i->setText( 0, "int newVariable" );
i->setText( 1, "protected" );
varView->setCurrentItem( i );
varView->setSelected( i, TRUE );
varView->setSelected( i, true );
varName->setFocus();
varName->selectAll();
}
@ -144,7 +144,7 @@ void VariableDialog::deleteVariable()
delete i;
i = 0;
if ( varView->firstChild() )
varView->setSelected( varView->firstChild(), TRUE );
varView->setSelected( varView->firstChild(), true );
}
void VariableDialog::currentItemChanged( TQListViewItem *i )
@ -152,7 +152,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i )
if ( !i ) {
varName->clear();
accessCombo->setCurrentItem( 1 );
propBox->setEnabled( FALSE );
propBox->setEnabled( false );
return;
}
varName->setText( i->text( 0 ) );
@ -162,7 +162,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i )
accessCombo->setCurrentItem( 1 );
else
accessCombo->setCurrentItem( 2 );
propBox->setEnabled( TRUE );
propBox->setEnabled( true );
}
void VariableDialog::nameChanged()

@ -39,7 +39,7 @@ void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
if ( !windowsStyle )
windowsStyle = TQStyleFactory::create( "windows" );
w->setStyle( windowsStyle );
( (TQToolButton*)w )->setUsesTextLabel( TRUE );
( (TQToolButton*)w )->setUsesTextLabel( true );
( (TQToolButton*)w )->setTextPosition( TQToolButton::Right );
w->setBackgroundMode( container->backgroundMode() );
}

@ -36,15 +36,15 @@ class WidgetAction : public TQAction
public:
WidgetAction( const TQString &grp, TQObject* parent,
const char* name = 0, bool toggle = FALSE )
const char* name = 0, bool toggle = false )
: TQAction( parent, name, toggle ) { init( grp ); }
WidgetAction( const TQString &grp, const TQString& text,
const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
TQObject* parent, const char* name = 0, bool toggle = FALSE )
TQObject* parent, const char* name = 0, bool toggle = false )
: TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); }
WidgetAction( const TQString &grp, const TQString& text,
const TQString& menuText, TQKeySequence accel, TQObject* parent,
const char* name = 0, bool toggle = FALSE )
const char* name = 0, bool toggle = false )
: TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); }
~WidgetAction();

@ -124,9 +124,9 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* )
QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
: TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE )
: TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( TRUE );
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
}
@ -170,11 +170,11 @@ int QDesignerTabWidget::count() const
bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
if ( o != tabBar() ) return FALSE;
if ( o != tabBar() ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
mousePressed = TRUE;
mousePressed = true;
TQMouseEvent *me = (TQMouseEvent*)e;
pressPoint = me->pos();
}
@ -183,7 +183,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
TQMouseEvent *me = (TQMouseEvent*)e;
if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) {
TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this );
mousePressed = FALSE;
mousePressed = false;
dragPage = TQTabWidget::currentPage();
dragLabel = TQTabWidget::tabLabel( dragPage );
@ -212,7 +212,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( text == TQString::number( (long)this ) )
de->accept();
else
return FALSE;
return false;
}
int index = 0;
@ -286,7 +286,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
return FALSE;
return false;
}
@ -294,12 +294,12 @@ QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name )
: TQWidgetStack( parent, name )
{
prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" );
prev->setAutoRaise( TRUE );
prev->setAutoRepeat( TRUE );
prev->setAutoRaise( true );
prev->setAutoRepeat( true );
prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" );
next->setAutoRaise( TRUE );
next->setAutoRepeat( TRUE );
next->setAutoRaise( true );
next->setAutoRepeat( true );
next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
connect( prev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) );
connect( next, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) );
@ -498,7 +498,7 @@ TQMap< int, TQStringList > *changedProperties = 0;
void WidgetFactory::saveDefaultProperties( TQObject *w, int id )
{
TQMap< TQString, TQVariant> propMap;
TQStrList lst = w->metaObject()->propertyNames( TRUE );
TQStrList lst = w->metaObject()->propertyNames( true );
for ( uint i = 0; i < lst.count(); ++i ) {
TQVariant var = w->property( lst.at( i ) );
if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
@ -517,7 +517,7 @@ void WidgetFactory::saveChangedProperties( TQObject *w, int id )
}
/*! Creates a widget of the type which is registered as \a id as
child of \a parent. The \a name is optional. If \a init is TRUE, the
child of \a parent. The \a name is optional. If \a init is true, the
widget is initialized with some defaults, else the plain widget is
created.
*/
@ -679,7 +679,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
/*! Factory functions for creating a widget of the type \a className
as child of \a parent with the name \a name.
If \a init is TRUE, some initial default properties are set. This
If \a init is true, some initial default properties are set. This
has to be in sync with the initChangedProperties() function!
*/
@ -701,9 +701,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( init ) {
QDesignerToolButton *tb = new QDesignerToolButton( parent, name );
if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) {
tb->setUsesTextLabel(TRUE);
tb->setUsesTextLabel(true);
tb->setTextLabel("...");
tb->setAutoRaise(TRUE);
tb->setAutoRaise(true);
tb->setTextPosition(TQToolButton::BesideIcon);
} else {
tb->setText( "..." );
@ -791,17 +791,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( init ) {
l->setText( TQString::fromLatin1( name ) );
MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( l, "text", TRUE );
MetaDataBase::setPropertyChanged( l, "text", true );
}
return l;
} else if ( className == "PixmapLabel" ) {
QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) {
l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) );
l->setScaledContents( TRUE );
l->setScaledContents( true );
MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( l, "pixmap", TRUE );
MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE );
MetaDataBase::setPropertyChanged( l, "pixmap", true );
MetaDataBase::setPropertyChanged( l, "scaledContents", true );
}
return l;
} else if ( className == "TQLayoutWidget" )
@ -830,7 +830,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
return ws;
} else if ( className == "TQComboBox" ) {
return new TQComboBox( FALSE, parent, name );
return new TQComboBox( false, parent, name );
} else if ( className == "TQWidget" ) {
if ( parent &&
( ::tqt_cast<FormWindow*>(parent) ||
@ -854,12 +854,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else
dia = new TQDialog( parent, name );
if ( parent )
dia->reparent( parent, TQPoint( 0, 0 ), TRUE );
dia->reparent( parent, TQPoint( 0, 0 ), true );
return dia;
} else if ( className == "TQWizard" ) {
TQWizard *wiz = new QDesignerWizard( parent, name );
if ( parent )
wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
wiz->reparent( parent, TQPoint( 0, 0 ), true );
if ( init && ::tqt_cast<FormWindow*>(parent) ) {
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
MetaDataBase::addEntry( dw );
@ -870,8 +870,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == "Spacer" ) {
Spacer *s = new Spacer( parent, name );
MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
MetaDataBase::setPropertyChanged( s, "sizeType", TRUE );
MetaDataBase::setPropertyChanged( s, "orientation", true );
MetaDataBase::setPropertyChanged( s, "sizeType", true );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@ -900,7 +900,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
} else if ( className == "TQScrollBar" ) {
TQScrollBar *s = new TQScrollBar( parent, name );
@ -911,7 +911,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
} else if ( className == "TQFrame" ) {
if ( !init )
@ -922,9 +922,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == "Line" ) {
Line *l = new Line( parent, name );
MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( l, "orientation", TRUE );
MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE );
MetaDataBase::setPropertyChanged( l, "frameShape", TRUE );
MetaDataBase::setPropertyChanged( l, "orientation", true );
MetaDataBase::setPropertyChanged( l, "frameShadow", true );
MetaDataBase::setPropertyChanged( l, "frameShape", true );
if ( !r )
return l;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@ -934,9 +934,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return l;
} else if ( className == "TQMainWindow" ) {
TQMainWindow *mw = new TQMainWindow( parent, name, 0 );
mw->setDockEnabled( TQt::DockMinimized, FALSE );
mw->setDockEnabled( TQt::DockMinimized, false );
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" );
mw->setDockMenuEnabled( FALSE );
mw->setDockMenuEnabled( false );
MetaDataBase::addEntry( dw );
mw->setCentralWidget( dw );
(void)mw->statusBar();
@ -961,12 +961,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( className == "TQDataBrowser" ) {
TQWidget *w = new QDesignerDataBrowser( parent, name );
if ( parent )
w->reparent( parent, TQPoint( 0, 0 ), TRUE );
w->reparent( parent, TQPoint( 0, 0 ), true );
return w;
} else if ( className == "TQDataView" ) {
TQWidget *w = new QDesignerDataView( parent, name );
if ( parent )
w->reparent( parent, TQPoint( 0, 0 ), TRUE );
w->reparent( parent, TQPoint( 0, 0 ), true );
return w;
}
#endif
@ -1145,40 +1145,40 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
Returns whether \a o is a passive interactor or not.
*/
bool WidgetFactory::lastWasAPassiveInteractor = FALSE;
bool WidgetFactory::lastWasAPassiveInteractor = false;
TQGuardedPtr<TQObject> *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr<TQObject>();
bool WidgetFactory::isPassiveInteractor( TQObject* o )
{
if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o )
return lastWasAPassiveInteractor;
lastWasAPassiveInteractor = FALSE;
lastWasAPassiveInteractor = false;
(*lastPassiveInteractor) = o;
if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
if ( ::tqt_cast<TQTabBar*>(o) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQSizeGrip*>(o) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQButton*>(o) &&
( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
// else if ( ::tqt_cast<TQDockWindowHandle*>(o) )
else if ( o->inherits( "TQDockWindowHandle" ) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
// else if ( ::tqt_cast<TQHideDock*>(o) )
else if ( o->inherits( "TQHideDock" ) )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 )
return ( lastWasAPassiveInteractor = TRUE );
return ( lastWasAPassiveInteractor = true );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( !o->isWidgetType() )
return ( lastWasAPassiveInteractor = FALSE );
return ( lastWasAPassiveInteractor = false );
WidgetInterface *iface = 0;
TQWidget *w = (TQWidget*)o;
while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) {
@ -1186,17 +1186,17 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
w = w->parentWidget();
}
if ( !iface )
return ( lastWasAPassiveInteractor = FALSE );
return ( lastWasAPassiveInteractor = false );
TQWidgetContainerInterfacePrivate *iface2 = 0;
iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 );
if ( !iface2 )
return ( lastWasAPassiveInteractor = FALSE );
return ( lastWasAPassiveInteractor = false );
TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o );
if ( !fw )
return ( lastWasAPassiveInteractor = FALSE );
return ( lastWasAPassiveInteractor = false );
TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o );
if ( !dw )
return ( lastWasAPassiveInteractor = FALSE );
return ( lastWasAPassiveInteractor = false );
lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o );
iface2->release();
iface->release();
@ -1298,50 +1298,50 @@ void WidgetFactory::initChangedProperties( TQObject *o )
if ( MainWindow::self && MainWindow::self->currProject() &&
MainWindow::self->currProject()->fakeFormFileFor( o ) )
return;
MetaDataBase::setPropertyChanged( o, "name", TRUE );
MetaDataBase::setPropertyChanged( o, "name", true );
if ( !::tqt_cast<QDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) )
MetaDataBase::setPropertyChanged( o, "geometry", TRUE );
MetaDataBase::setPropertyChanged( o, "geometry", true );
if ( ::tqt_cast<TQPushButton*>(o) ||
::tqt_cast<TQRadioButton*>(o) ||
::tqt_cast<TQCheckBox*>(o) ||
::tqt_cast<TQToolButton*>(o) ) {
if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
MetaDataBase::setPropertyChanged( o, "textPosition", TRUE );
MetaDataBase::setPropertyChanged( o, "usesTextLabel", true );
MetaDataBase::setPropertyChanged( o, "textLabel", true );
MetaDataBase::setPropertyChanged( o, "autoRaise", true );
MetaDataBase::setPropertyChanged( o, "textPosition", true );
} else {
MetaDataBase::setPropertyChanged( o, "text", TRUE );
MetaDataBase::setPropertyChanged( o, "text", true );
}
}
else if ( ::tqt_cast<TQGroupBox*>(o) )
MetaDataBase::setPropertyChanged( o, "title", TRUE );
MetaDataBase::setPropertyChanged( o, "title", true );
else if ( o->isA( "TQFrame" ) ) {
MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );
MetaDataBase::setPropertyChanged( o, "frameShape", TRUE );
MetaDataBase::setPropertyChanged( o, "frameShadow", true );
MetaDataBase::setPropertyChanged( o, "frameShape", true );
} else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
MetaDataBase::setPropertyChanged( o, "pageTitle", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
MetaDataBase::setPropertyChanged( o, "currentPage", true );
} else if ( ::tqt_cast<TQWidgetStack*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
MetaDataBase::setPropertyChanged( o, "currentPage", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
} else if ( ::tqt_cast<TQToolBox*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE );
MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE );
MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE );
MetaDataBase::setPropertyChanged( o, "currentIndex", true );
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemLabel", true );
MetaDataBase::setPropertyChanged( o, "itemIconSet", true );
MetaDataBase::setPropertyChanged( o, "itemToolTip", true );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
#ifndef TQT_NO_TABLE
} else if ( ::tqt_cast<TQTable*>(o) ) {
# ifndef TQT_NO_SQL
if (!::tqt_cast<TQDataTable*>(o) )
# endif
{
MetaDataBase::setPropertyChanged( o, "numRows", TRUE );
MetaDataBase::setPropertyChanged( o, "numCols", TRUE );
MetaDataBase::setPropertyChanged( o, "numRows", true );
MetaDataBase::setPropertyChanged( o, "numCols", true );
TQTable *t = (TQTable*)o;
for ( int i = 0; i < 3; ++i ) {
t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) );
@ -1350,13 +1350,13 @@ void WidgetFactory::initChangedProperties( TQObject *o )
}
#endif
} else if ( ::tqt_cast<TQSplitter*>(o) ) {
MetaDataBase::setPropertyChanged( o, "orientation", TRUE );
MetaDataBase::setPropertyChanged( o, "orientation", true );
} else if ( ::tqt_cast<QDesignerToolBar*>(o) ) {
MetaDataBase::setPropertyChanged( o, "label", TRUE );
MetaDataBase::setPropertyChanged( o, "label", true );
} else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE );
MetaDataBase::setPropertyChanged( o, "itemText", TRUE );
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemNumber", true );
MetaDataBase::setPropertyChanged( o, "itemText", true );
}
}
@ -1365,19 +1365,19 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) )
return TRUE;
return true;
if ( className.contains( "ComboBox" ) )
return TRUE;
return true;
if ( className.contains( "ListView" ) )
return TRUE;
return true;
if ( className.contains( "IconView" ) )
return TRUE;
return true;
if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
return TRUE;
return true;
if ( ::tqt_cast<TQTable*>(editorWidget) != 0 )
return TRUE;
return true;
return FALSE;
return false;
}
bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
@ -1387,9 +1387,9 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
::tqt_cast<TQTable*>(editorWidget) != 0 )
return TRUE;
return true;
return FALSE;
return false;
}
void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
@ -1436,7 +1436,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) {
MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw );
MultiLineEditor *e = new MultiLineEditor( false, true, parent, editWidget, fw );
e->exec();
delete e;
return;
@ -1454,7 +1454,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
return FALSE;
return false;
TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
return l.findIndex( propName ) == -1;
}
@ -1462,9 +1462,9 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
findProperty( propName, TRUE ), TRUE );
findProperty( propName, true ), true );
if (!p )
return FALSE;
return false;
return p->reset( w );
}
@ -1489,7 +1489,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->metaObject()->
property( w->metaObject()->findProperty( propName, TRUE ), TRUE );
property( w->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
int v = defaultValue( w, "alignment" ).toInt();
if ( propName == "hAlign" ) {
@ -1528,8 +1528,8 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name,
TQVariant WidgetFactory::property( TQObject *w, const char *name )
{
int id = w->metaObject()->findProperty( name, TRUE );
const TQMetaProperty* p = w->metaObject()->property( id, TRUE );
int id = w->metaObject()->findProperty( name, true );
const TQMetaProperty* p = w->metaObject()->property( id, true );
if ( !p || !p->isValid() )
return MetaDataBase::fakeProperty( w, name );
return w->property( name );
@ -1541,7 +1541,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE );
TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;

@ -76,7 +76,7 @@ public:
NoLayout
};
static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = true,
const TQRect *rect = 0, Orientation orient = TQt::Horizontal );
static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
static void deleteLayout( TQWidget *widget );
@ -204,7 +204,7 @@ class QDesignerWizard : public TQWizard
public:
QDesignerWizard( TQWidget *parent, const char *name )
: TQWizard( parent, name ), modal(FALSE) {}
: TQWizard( parent, name ), modal(false) {}
int currentPageNum() const;
void setCurrentPage( int i );
@ -377,7 +377,7 @@ class QDesignerDialog : public TQDialog
public:
QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
: TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {}
: TQDialog( parent, name, false, WResizeNoErase ), formwindow( fw ), modal(false) {}
bool isModal() const { return modal; }
void setModal(bool b) { modal = b; }

@ -61,7 +61,7 @@ WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
WizardEditor::~WizardEditor()
{
commands.setAutoDelete( TRUE );
commands.setAutoDelete( true );
}
void WizardEditor::okClicked()
@ -93,20 +93,20 @@ void WizardEditor::applyClicked()
TQWidget * page = wizard->page( i );
if ( i == 0 ) { // first page
wizard->setBackEnabled( page, FALSE );
wizard->setNextEnabled( page, TRUE );
wizard->setBackEnabled( page, false );
wizard->setNextEnabled( page, true );
}
else if ( i == wizard->pageCount() - 1 ) { // last page
wizard->setBackEnabled( page, TRUE );
wizard->setNextEnabled( page, FALSE );
wizard->setBackEnabled( page, true );
wizard->setNextEnabled( page, false );
}
else {
wizard->setBackEnabled( page, TRUE );
wizard->setNextEnabled( page, TRUE );
wizard->setBackEnabled( page, true );
wizard->setNextEnabled( page, true );
}
wizard->setFinishEnabled( page, FALSE );
wizard->setFinishEnabled( page, false );
}
// update listbox
@ -131,7 +131,7 @@ void WizardEditor::addClicked()
// schedule add command
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wizard->name() ),
formwindow, wizard, "Page", index, FALSE);
formwindow, wizard, "Page", index, false);
commands.append( cmd );
// update buttons
@ -150,7 +150,7 @@ void WizardEditor::removeClicked()
// schedule remove command
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" )
.arg( listBox->text( index ) ).arg( wizard->name() ),
formwindow, wizard, index, FALSE );
formwindow, wizard, index, false );
commands.append( cmd );
// update buttons
@ -231,7 +231,7 @@ void WizardEditor::updateButtons()
buttonRemove->setEnabled( index >= 0 );
if ( listBox->count() < 2 )
buttonRemove->setEnabled( FALSE );
buttonRemove->setEnabled( false );
}
void WizardEditor::itemDragged( TQListBoxItem * i )

@ -60,7 +60,7 @@ WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
project = p;
t = ProjectType;
setPixmap( 0, SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()) );
setExpandable( FALSE );
setExpandable( false );
}
WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
@ -104,8 +104,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
void WorkspaceItem::init()
{
autoOpen = FALSE;
useOddColor = FALSE;
autoOpen = false;
useOddColor = false;
project = 0;
sourceFile = 0;
formFile = 0;
@ -130,7 +130,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( isModified() ) {
TQFont f = p->font();
f.setBold( TRUE );
f.setBold( true );
p->setFont( f );
}
@ -215,7 +215,7 @@ bool WorkspaceItem::checkCompletion( const TQString& completion )
case ObjectType:
return completion == object->name();
}
return FALSE;
return false;
}
@ -234,7 +234,7 @@ bool WorkspaceItem::isModified() const
return project->fakeFormFileFor( object )->isModified();
break;
}
return FALSE; // shut up compiler
return false; // shut up compiler
}
TQString WorkspaceItem::key( int column, bool ) const
@ -261,7 +261,7 @@ TQColor WorkspaceItem::backgroundColor()
void WorkspaceItem::setOpen( bool b )
{
TQListViewItem::setOpen( b );
autoOpen = FALSE;
autoOpen = false;
}
void WorkspaceItem::setAutoOpen( bool b )
@ -273,14 +273,14 @@ void WorkspaceItem::setAutoOpen( bool b )
Workspace::Workspace( TQWidget *parent, MainWindow *mw )
: TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
project( 0 ), completionDirty( FALSE )
project( 0 ), completionDirty( false )
{
init_colors();
setDefaultRenameAction( Accept );
blockNewForms = FALSE;
blockNewForms = false;
bufferEdit = 0;
header()->setStretchEnabled( TRUE );
header()->setStretchEnabled( true );
header()->hide();
setSorting( 0 );
setResizePolicy( TQScrollView::Manual );
@ -291,7 +291,7 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
setPalette( p );
#endif
addColumn( i18n( "Files" ) );
setAllColumnsShowFocus( TRUE );
setAllColumnsShowFocus( true );
connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ),
this, TQ_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ),
connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
@ -300,8 +300,8 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
this, TQ_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ),
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
viewport()->setAcceptDrops( TRUE );
setAcceptDrops( TRUE );
viewport()->setAcceptDrops( true );
setAcceptDrops( true );
setColumnWidthMode( 1, Manual );
}
@ -343,7 +343,7 @@ void Workspace::setCurrentProject( Project *pro )
projectItem = new WorkspaceItem( this, project );
projectItem->setOpen( TRUE );
projectItem->setOpen( true );
for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
@ -368,7 +368,7 @@ void Workspace::setCurrentProject( Project *pro )
}
updateColors();
completionDirty = TRUE;
completionDirty = true;
}
void Workspace::sourceFileAdded( SourceFile* sf )
@ -411,7 +411,7 @@ void Workspace::objectRemoved( TQObject *o )
void Workspace::update()
{
completionDirty = TRUE;
completionDirty = true;
triggerUpdate();
}
@ -431,9 +431,9 @@ void Workspace::activeFormChanged( FormWindow *fw )
WorkspaceItem *i = findItem( fw->formFile() );
if ( i ) {
setCurrentItem( i );
setSelected( i, TRUE );
setSelected( i, true );
if ( !i->isOpen() )
i->setAutoOpen( TRUE );
i->setAutoOpen( true );
}
closeAutoOpenItems();
@ -449,15 +449,15 @@ void Workspace::activeEditorChanged( SourceEditor *se )
WorkspaceItem *i = findItem( se->formWindow()->formFile() );
if ( i && i->firstChild() ) {
if ( !i->isOpen() )
i->setAutoOpen( TRUE );
i->setAutoOpen( true );
setCurrentItem( i->firstChild() );
setSelected( i->firstChild(), TRUE );
setSelected( i->firstChild(), true );
}
} else {
WorkspaceItem *i = findItem( se->sourceFile() );
if ( i ) {
setCurrentItem( i );
setSelected( i, TRUE );
setSelected( i, true );
}
}
@ -503,7 +503,7 @@ void Workspace::closeAutoOpenItems()
if ( i->type() == WorkspaceItem::FormSourceType ) {
if ( !i->isSelected() && !ip->isSelected()
&& ip->isAutoOpen() ) {
ip->setAutoOpen( FALSE );
ip->setAutoOpen( false );
}
}
}
@ -518,7 +518,7 @@ void Workspace::closeEvent( TQCloseEvent *e )
void Workspace::itemDoubleClicked( TQListViewItem *i )
{
if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType )
i->setOpen( TRUE );
i->setOpen( true );
}
void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
@ -536,7 +536,7 @@ void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
wi->formFile->showFormWindow();
break;
case WorkspaceItem::FormSourceType:
wi->formFile->showEditor( FALSE );
wi->formFile->showEditor( false );
break;
case WorkspaceItem::SourceFileType:
mainWindow->editSource( wi->sourceFile );
@ -592,7 +592,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM,
OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE };
TQPopupMenu menu( this );
menu.setCheckable( TRUE );
menu.setCheckable( true );
switch ( wi->type() ) {
case WorkspaceItem::SourceFileType:
menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE );
@ -632,7 +632,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
project->removeFormFile( wi->formFile );
break;
case REMOVE_FORM_SOURCE:
( (WorkspaceItem*)i )->formFile->setModified( TRUE );
( (WorkspaceItem*)i )->formFile->setModified( true );
( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted );
delete ( (WorkspaceItem*)i )->formFile->editor();
break;
@ -665,7 +665,7 @@ void Workspace::updateBufferEdit()
{
if ( !bufferEdit || !completionDirty || !MainWindow::self)
return;
completionDirty = FALSE;
completionDirty = false;
TQStringList completion = MainWindow::self->projectFileNames();
TQListViewItemIterator it( this );
while ( it.current() ) {
@ -701,7 +701,7 @@ void Workspace::updateColors()
TQListViewItem* i = firstChild();
if ( i )
i = i->firstChild();
bool b = TRUE;
bool b = true;
while ( i ) {
WorkspaceItem* wi = ( WorkspaceItem*) i;
i = i->nextSibling();

@ -158,7 +158,7 @@ struct DesignerDatabase
virtual void setTables( const TQStringList & ) = 0;
virtual TQMap<TQString, TQStringList> fields() const = 0;
virtual void setFields( const TQMap<TQString, TQStringList> & ) = 0;
virtual void open( bool suppressDialog = FALSE ) const = 0;
virtual void open( bool suppressDialog = false ) const = 0;
virtual void close() const = 0;
virtual TQSqlDatabase* connection() = 0;
@ -209,7 +209,7 @@ struct DesignerFormWindow
virtual void setCurrentWidget( TQWidget * ) = 0;
virtual TQPtrList<TQAction> actionList() const = 0;
virtual TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
TQObject* parent, const char* name = 0, bool toggle = FALSE ) = 0;
TQObject* parent, const char* name = 0, bool toggle = false ) = 0;
virtual void addAction( TQAction * ) = 0;
virtual void removeAction( TQAction * ) = 0;
virtual void preview() const = 0;

@ -163,10 +163,10 @@ TQString LanguageInterfaceImpl::createEmptyFunction()
bool LanguageInterfaceImpl::supports( Support s ) const
{
if ( s == ReturnType )
return TRUE;
return true;
if ( s == ConnectionsToCustomSlots )
return TRUE;
return FALSE;
return true;
return false;
}
TQStringList LanguageInterfaceImpl::fileFilterList() const
@ -231,7 +231,7 @@ void LanguageInterfaceImpl::preferedExtensions( TQMap<TQString, TQString> &exten
TQStrList LanguageInterfaceImpl::signalNames( TQObject *obj ) const
{
TQStrList sigs;
sigs = obj->metaObject()->signalNames( TRUE );
sigs = obj->metaObject()->signalNames( true );
sigs.remove( "destroyed()" );
return sigs;
}

@ -86,10 +86,10 @@ bool DomTool::hasProperty( const TQDomElement& e, const TQString& name )
if ( n.tagName() == "property" ) {
if ( n.attribute( "name" ) != name )
continue;
return TRUE;
return true;
}
}
return FALSE;
return false;
}
TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type )
@ -186,7 +186,7 @@ TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& def
} else if ( e.tagName() == "cstring" ) {
v = TQVariant( TQCString( e.firstChild().toText().data().ascii() ) );
} else if ( e.tagName() == "number" ) {
bool ok = TRUE;
bool ok = true;
v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
if ( !ok )
v = TQVariant( e.firstChild().toText().data().toDouble() );
@ -340,10 +340,10 @@ bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name )
if ( n.tagName() == "attribute" ) {
if ( n.attribute( "name" ) != name )
continue;
return TRUE;
return true;
}
}
return FALSE;
return false;
}
static bool toBool( const TQString& s )

@ -176,7 +176,7 @@ private:
void UibIndexMap::setName( int no, const TQString& name )
{
if ( !name.isEmpty() ) {
if ( *nameMap.insert(name, no, FALSE) != no )
if ( *nameMap.insert(name, no, false) != no )
conflicts.insert( name, 0 );
}
}

@ -55,21 +55,21 @@ static int dbcount = 0;
static int dbcustomcount = 200;
static TQStrList *wGroups;
static TQStrList *invisibleGroups;
static bool whatsThisLoaded = FALSE;
static bool whatsThisLoaded = false;
static TQPluginManager<WidgetInterface> *widgetPluginManager = 0;
static bool plugins_set_up = FALSE;
static bool was_in_setup = FALSE;
static bool plugins_set_up = false;
static bool was_in_setup = false;
TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager;
WidgetDatabaseRecord::WidgetDatabaseRecord()
{
isForm = FALSE;
isContainer = FALSE;
isForm = false;
isContainer = false;
icon = 0;
nameCounter = 0;
isCommon = FALSE;
isPlugin = FALSE;
isCommon = false;
isPlugin = false;
}
WidgetDatabaseRecord::~WidgetDatabaseRecord()
@ -108,7 +108,7 @@ WidgetDatabase::WidgetDatabase()
void WidgetDatabase::setupDataBase( int id )
{
was_in_setup = TRUE;
was_in_setup = true;
#ifndef UIC
Q_UNUSED( id )
if ( dbcount )
@ -129,7 +129,7 @@ void WidgetDatabase::setupDataBase( int id )
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
className2Id = new TQDict<int>( dbdictsize );
className2Id->setAutoDelete( TRUE );
className2Id->setAutoDelete( true );
WidgetDatabaseRecord *r = 0;
@ -138,7 +138,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -155,7 +155,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -164,7 +164,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -173,7 +173,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -182,8 +182,8 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = TRUE;
r->isCommon = TRUE;
r->isContainer = true;
r->isCommon = true;
append( r );
@ -192,7 +192,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -201,7 +201,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -210,7 +210,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQWidgetStack";
r->group = widgetGroup( "Containers" );
r->toolTip = "Widget Stack";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -219,7 +219,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQToolBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tool Box";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -228,7 +228,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -276,7 +276,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -285,7 +285,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -329,7 +329,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQTextEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Rich Text Edit";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -338,7 +338,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -380,7 +380,7 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup( "Display" );
r->toolTip = "Text Label";
r->whatsThis = "The Text Label provides a widget to display static text.";
r->isCommon = TRUE;
r->isCommon = true;
append( r );
@ -446,7 +446,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->name = "TQWidget";
r->isForm = TRUE;
r->isForm = true;
r->group = widgetGroup( "Forms" );
append( r );
@ -454,21 +454,21 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isForm = TRUE;
r->isForm = true;
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
r = new WidgetDatabaseRecord;
r->name = "TQDesignerWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -476,7 +476,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQLayoutWidget";
r->group = widgetGroup( "Temp" );
r->includeFile = "";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -484,7 +484,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQSplitter";
r->group = widgetGroup( "Temp" );
r->includeFile = "tqsplitter.h";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -492,7 +492,7 @@ void WidgetDatabase::setupDataBase( int id )
r->iconSet = "designer_tabwidget.png";
r->name = "TQDesignerTabWidget";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -500,7 +500,7 @@ void WidgetDatabase::setupDataBase( int id )
r->iconSet = "designer_tabwidget.png";
r->name = "TQDesignerWidget";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -508,7 +508,7 @@ void WidgetDatabase::setupDataBase( int id )
r->iconSet = "designer_tabwidget.png";
r->name = "TQDesignerDialog";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -517,7 +517,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQMainWindow";
r->includeFile = "tqmainwindow.h";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -526,7 +526,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQDesignerAction";
r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" );
r->isContainer = FALSE;
r->isContainer = false;
append( r );
@ -535,7 +535,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQDesignerActionGroup";
r->includeFile = "tqaction.h";
r->group = widgetGroup( "Temp" );
r->isContainer = FALSE;
r->isContainer = false;
append( r );
@ -544,7 +544,7 @@ void WidgetDatabase::setupDataBase( int id )
r->name = "TQScrollView";
r->includeFile = "tqscrollview.h";
r->group = widgetGroup( "Temp" );
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -556,7 +556,7 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup( "Database" );
r->toolTip = "Data Browser";
r->iconSet = "designer_databrowser.png";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
@ -567,7 +567,7 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup( "Database" );
r->toolTip = "Data View";
r->iconSet = "designer_dataview.png";
r->isContainer = TRUE;
r->isContainer = true;
append( r );
#endif
@ -581,7 +581,7 @@ void WidgetDatabase::setupPlugins()
{
if ( plugins_set_up )
return;
plugins_set_up = TRUE;
plugins_set_up = true;
TQStringList widgets = widgetManager()->featureList();
for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) {
if ( hasWidget( *it ) )
@ -606,7 +606,7 @@ void WidgetDatabase::setupPlugins()
r->includeFile = iface->includeFile( *it );
r->isContainer = iface->isContainer( *it );
r->name = *it;
r->isPlugin = TRUE;
r->isPlugin = true;
append( r );
iface->release();
}
@ -731,7 +731,7 @@ bool WidgetDatabase::isForm( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return FALSE;
return false;
return r->isForm;
}
@ -743,7 +743,7 @@ bool WidgetDatabase::isContainer( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return FALSE;
return false;
return r->isContainer || r->isForm;
}
@ -752,7 +752,7 @@ bool WidgetDatabase::isCommon( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return FALSE;
return false;
return r->isCommon;
}
@ -844,9 +844,9 @@ bool WidgetDatabase::isGroupEmpty( const TQString &grp )
if ( !( r = db[ i ] ) )
continue;
if ( r->group == grp )
return FALSE;
return false;
}
return TRUE;
return true;
}
TQString WidgetDatabase::widgetGroup( int i )
@ -890,8 +890,8 @@ void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName,
bool WidgetDatabase::isCustomWidget( int id )
{
if ( id >= dbcustom && id < dbcustomcount )
return TRUE;
return FALSE;
return true;
return false;
}
bool WidgetDatabase::isCustomPluginWidget( int id )
@ -899,7 +899,7 @@ bool WidgetDatabase::isCustomPluginWidget( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return FALSE;
return false;
return r->isPlugin;
}
@ -923,13 +923,13 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath )
if ( r )
r->whatsThis = l[ 0 ];
}
whatsThisLoaded = TRUE;
whatsThisLoaded = true;
}
// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API
#if defined(UIC)
bool dbnounload = FALSE;
bool dbnounload = false;
TQStringList *dbpaths = 0;
#else
extern TQString *qwf_plugin_dir;
@ -948,7 +948,7 @@ TQPluginManager<WidgetInterface> *widgetManager()
cleanup_manager.add( &widgetPluginManager );
#if defined(UIC)
if ( dbnounload )
widgetPluginManager->setAutoUnload( FALSE );
widgetPluginManager->setAutoUnload( false );
if ( dbpaths ) {
TQStringList::ConstIterator it = dbpaths->begin();
for ( ; it != dbpaths->end(); ++it )

@ -192,7 +192,7 @@ void KDevDesigner::fileOpen()
KURL url =
KFileDialog::getOpenURL( TQString(), TQString(), this );
if (url.isEmpty() == false)
if (!url.isEmpty())
{
// About this function, the style guide (
// http://developer.kde.org/documentation/standards/kde/style/basics/index.html )

@ -82,13 +82,13 @@ bool TQDesignerDataBrowser::event( TQEvent* e )
#endif
if ( e->type() == TQEvent::Show ) {
if ( con ) {
TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con );
setSqlCursor( cursor, TRUE );
TQSqlCursor* cursor = new TQSqlCursor( tbl, true, con );
setSqlCursor( cursor, true );
setForm( frm );
refresh();
first();
}
return TRUE;
return true;
}
#if defined(DESIGNER)
}
@ -110,7 +110,7 @@ bool TQDesignerDataView::event( TQEvent* e )
if ( e->type() == TQEvent::Show ) {
setForm( frm );
readFields();
return TRUE;
return true;
}
#if defined(DESIGNER)
}

@ -115,8 +115,8 @@ static TQStringList *availableWidgetList = 0;
TQMap<TQWidget*, TQString> *qwf_forms = 0;
TQString *qwf_language = 0;
bool qwf_execute_code = TRUE;
bool qwf_stays_on_top = FALSE;
bool qwf_execute_code = true;
bool qwf_stays_on_top = false;
TQString qwf_currFileName = "";
TQObject *qwf_form_object = 0;
TQString *qwf_plugin_dir = 0;
@ -158,7 +158,7 @@ static void setupWidgetListAndMap()
availableWidgetMap = new TQMap<TQString, bool>;
for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it )
availableWidgetMap->insert( *it, TRUE );
availableWidgetMap->insert( *it, true );
}
static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data )
@ -243,10 +243,10 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str )
TQWidgetFactory::TQWidgetFactory()
: d( new TQWidgetFactoryPrivate() ), dbControls( 0 ),
usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 )
usePixmapCollection( false ), defMargin( 11 ), defSpacing( 6 )
{
widgetFactories.setAutoDelete( TRUE );
d->customWidgets.setAutoDelete( TRUE );
widgetFactories.setAutoDelete( true );
d->customWidgets.setAutoDelete( true );
}
/*! \fn TQWidgetFactory::~TQWidgetFactory()
@ -282,9 +282,9 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
{
setupPluginDir();
TQFile f( uiFile );
bool failed = FALSE;
bool failed = false;
if ( !f.open( IO_ReadOnly ) )
failed = TRUE;
failed = true;
if ( failed && tqApp->type() == TQApplication::Tty ) {
// for TQSA: If we have no GUI, we have no form definition
// files, but just the code. So try if only the code exists.
@ -379,10 +379,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
c = new TQSqlCursor( (*it)[ 1 ] );
} else {
db = TQSqlDatabase::database( conn );
c = new TQSqlCursor( (*it)[ 1 ], TRUE, db );
c = new TQSqlCursor( (*it)[ 1 ], true, db );
}
if ( db ) {
table->setSqlCursor( c, fieldMap.isEmpty(), TRUE );
table->setSqlCursor( c, fieldMap.isEmpty(), true );
table->refresh( TQDataTable::RefreshAll );
}
}
@ -455,7 +455,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
} else if ( e.tagName() == "widget" ) {
widget = e;
} else if ( e.tagName() == "pixmapinproject" ) {
usePixmapCollection = TRUE;
usePixmapCollection = true;
} else if ( e.tagName() == "layoutdefaults" ) {
defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt();
defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt();
@ -658,7 +658,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
TQVariant value;
TQCString comment;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
bool vertical = FALSE;
bool vertical = false;
int w = 0;
int h = 0;
TQ_UINT16 column = 0;
@ -720,8 +720,8 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
TQString text;
TQPixmap pixmap;
TQString field;
bool clickable = TRUE;
bool resizable = TRUE;
bool clickable = true;
bool resizable = true;
TQCString name;
TQVariant value;
@ -803,7 +803,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
switch ( objectTag ) {
case Object_Item:
if ( listView != 0 )
d->lastItem->setOpen( TRUE );
d->lastItem->setOpen( true );
inputItem( strings, in, parent, item );
break;
case Object_TextProperty:
@ -994,7 +994,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
metAttribute = 2;
break;
case Object_Column:
inputColumnOrRow( strings, in, obj, FALSE );
inputColumnOrRow( strings, in, obj, false );
break;
case Object_Event:
unpackCString( strings, in, name );
@ -1020,13 +1020,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
font.setPointSize( pointSize );
}
if ( fontFlags & Font_Bold )
font.setBold( TRUE );
font.setBold( true );
if ( fontFlags & Font_Italic )
font.setItalic( TRUE );
font.setItalic( true );
if ( fontFlags & Font_Underline )
font.setUnderline( TRUE );
font.setUnderline( true );
if ( fontFlags & Font_StrikeOut )
font.setStrikeOut( TRUE );
font.setStrikeOut( true );
if ( obj != 0 )
setProperty( obj, name, font );
@ -1089,7 +1089,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
}
break;
case Object_Row:
inputColumnOrRow( strings, in, obj, TRUE );
inputColumnOrRow( strings, in, obj, true );
break;
case Object_Spacer:
inputSpacer( strings, in, layout );
@ -1291,7 +1291,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
unpackCString( strings, in, d->translationContext );
if ( introFlags & Intro_Pixmapinproject )
usePixmapCollection = TRUE;
usePixmapCollection = true;
if ( defaultMargin != -32768 )
defMargin = defaultMargin;
if ( defaultSpacing != -32768 )
@ -1447,7 +1447,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
} else if ( className == "TQTabWidget" ) {
return new TQTabWidget( parent, name );
} else if ( className == "TQComboBox" ) {
return new TQComboBox( FALSE, parent, name );
return new TQComboBox( false, parent, name );
} else if ( className == "TQWidget" ) {
if ( !qwf_stays_on_top )
return new TQWidget( parent, name );
@ -1455,7 +1455,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
} else if ( className == "TQDialog" ) {
if ( !qwf_stays_on_top )
return new TQDialog( parent, name );
return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop );
return new TQDialog( parent, name, false, TQt::WStyle_StaysOnTop );
} else if ( className == "TQWizard" ) {
return new TQWizard( parent, name );
} else if ( className == "TQLCDNumber" ) {
@ -1534,7 +1534,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
if ( iface ) {
TQWidget *w = iface->create( className, parent, name );
if ( w ) {
d->customWidgets.replace( className.latin1(), new bool(TRUE) );
d->customWidgets.replace( className.latin1(), new bool(true) );
return w;
}
}
@ -1586,12 +1586,12 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
if ( colspan < 1 )
colspan = 1;
bool isTQLayoutWidget = FALSE;
bool isTQLayoutWidget = false;
if ( !className.isEmpty() ) {
if ( !layout && className == "TQLayoutWidget" ) {
className = "TQWidget";
isTQLayoutWidget = TRUE;
isTQLayoutWidget = true;
}
if ( layout && className == "TQLayoutWidget" ) {
// hide layout widgets
@ -1627,7 +1627,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
TQString parentClassName = parent ? parent->className() : 0;
bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE;
bool isPlugin = parent ? d->customWidgets.find( parent->className() ) : false;
if ( isPlugin )
tqWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
@ -1808,7 +1808,7 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) cons
void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
TQVariant value )
{
int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE );
int offset = obj->metaObject()->findProperty( prop.ascii(), true );
if ( offset != -1 ) {
if ( prop == "geometry" && obj == toplevel ) {
@ -1819,7 +1819,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
if ( value.type() == TQVariant::String ||
value.type() == TQVariant::CString ) {
const TQMetaProperty *metaProp =
obj->metaObject()->property( offset, TRUE );
obj->metaObject()->property( offset, true );
if ( metaProp != 0 && metaProp->isEnumType() ) {
if ( metaProp->isSetType() ) {
TQStrList flagsCStr;
@ -2073,7 +2073,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
} else {
if ( name == "this" )
name = toplevel->name();
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@ -2089,7 +2089,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.receiver = toplevel;
} else {
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@ -2111,7 +2111,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
}
TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE );
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
sender = toplevel;
} else {
@ -2129,7 +2129,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
receiver = toplevel;
} else {
l = toplevel->queryList( 0, conn.receiver->name(), FALSE );
l = toplevel->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
delete l;
n = n.nextSibling().toElement();
@ -2144,12 +2144,12 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQString s2 = "1""%1";
s2 = s2.arg( conn.slot.data() );
TQStrList signalList = sender->metaObject()->signalNames( TRUE );
TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
TQStrList signalList = sender->metaObject()->signalNames( true );
TQStrList slotList = receiver->metaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
if ( slotList.find( conn.slot ) == -1 && (receiver == toplevel) && connector ) {
slotList = connector->metaObject()->slotNames( TRUE );
slotList = connector->metaObject()->slotNames( true );
receiver = connector;
}
@ -2172,7 +2172,7 @@ void TQWidgetFactory::loadTabOrder( const TQDomElement &e )
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
TQString name = n.firstChild().toText().data();
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
TQObjectList *l = toplevel->queryList( 0, name.ascii(), false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@ -2261,7 +2261,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget )
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
TQString txt;
bool clickable = TRUE, resizable = TRUE;
bool clickable = true, resizable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@ -2310,7 +2310,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget )
void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
TQDomElement n = e;
hasPixmap = FALSE;
hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@ -2331,7 +2331,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
@ -2348,7 +2348,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
} else if ( widget->inherits( "TQIconView" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
@ -2382,7 +2382,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
}
}
} else if ( n.tagName() == "item" ) {
item->setOpen( TRUE );
item->setOpen( true );
createItem( n, widget, item );
}
@ -2403,7 +2403,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
bool hasMenuText = FALSE;
bool hasMenuText = false;
if ( n.tagName() == "action" ) {
a = new TQAction( parent );
TQDomElement n2 = n.firstChild().toElement();
@ -2412,7 +2412,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
if ( n2.tagName() == "property" ) {
TQString prop(n2.attribute("name"));
if (prop == "menuText")
hasMenuText = TRUE;
hasMenuText = true;
setProperty( a, prop, n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
@ -2426,7 +2426,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
if ( n2.tagName() == "property" ) {
TQString prop(n2.attribute("name"));
if (prop == "menuText")
hasMenuText = TRUE;
hasMenuText = true;
setProperty( a, prop, n2.firstChild().toElement() );
} else if ( n2.tagName() == "action" ||
n2.tagName() == "actiongroup" ) {

@ -67,7 +67,7 @@ private:
void loadConnections( const TQDomElement &e, TQObject *connector );
void loadTabOrder( const TQDomElement &e );
TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = FALSE );
TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = false );
LayoutType layoutType( TQLayout *l ) const;
void setProperty( TQObject* widget, const TQString &prop, TQVariant value );
void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );

@ -88,7 +88,7 @@ ProblemReporter::ProblemReporter( AdaSupportPart* part, TQWidget* parent, const
addColumn( i18n("File") );
addColumn( i18n("Line") );
//addColumn( i18n("Column") );
setAllColumnsShowFocus( TRUE );
setAllColumnsShowFocus( true );
m_timer = new TQTimer( this );
@ -246,7 +246,7 @@ void ProblemReporter::configure()
kdDebug() << "ProblemReporter::configure()" << endl;
TDEConfig* config = kapp->config();
config->setGroup( "General Options" );
m_active = config->readBoolEntry( "EnableAdaBgParser", TRUE );
m_active = config->readBoolEntry( "EnableAdaBgParser", true );
m_delay = config->readNumEntry( "BgParserDelay", 500 );
}

@ -183,7 +183,7 @@ void BashSupportPart::startApplication(const TQString &program)
{
kdDebug() << "starting application" << program << endl;
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("TDevelop/AppFrontend"))
appFrontend->startAppCommand(TQString(), program, TRUE);
appFrontend->startAppCommand(TQString(), program, true);
}

@ -32,7 +32,7 @@ class AddAttributeDialog : public AddAttributeDialogBase
public:
AddAttributeDialog( CppSupportPart* cppSupport, ClassDom klass,
TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~AddAttributeDialog();
virtual void addAttribute();

@ -32,7 +32,7 @@ class AddMethodDialog : public AddMethodDialogBase
public:
AddMethodDialog( CppSupportPart* cppSupport, ClassDom klass,
TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~AddMethodDialog();
virtual void addMethod();

@ -25,7 +25,7 @@ int main()
initscr();
start_color();
cbreak();
keypad(stdscr, TRUE);
keypad(stdscr, true);
noecho();
init_pair(1, COLOR_BLACK, COLOR_CYAN);

@ -16,7 +16,7 @@
bool %{APPNAME}Part::initDoc( InitDocFlags flags, TQWidget* parentWidget )
{
// If nothing is loaded, do initialize here
return TRUE;
return true;
}
KoView* %{APPNAME}Part::createViewInstance( TQWidget* parent, const char* name )

@ -15,7 +15,7 @@ class %{APPNAME}Part : public KoDocument
public:
%{APPNAME}Part( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
virtual bool initDoc( InitDocFlags flags, TQWidget* parentWidget = 0 );

@ -32,7 +32,7 @@ void %{APPNAME}View::paintEvent( TQPaintEvent* ev )
/// @todo Scaling
// Let the document do the drawing
koDocument()->paintEverything( painter, ev->rect(), FALSE, this );
koDocument()->paintEverything( painter, ev->rect(), false, this );
painter.end();
}

@ -185,7 +185,7 @@ void %{APPNAME}::fileOpen()
KURL url =
KFileDialog::getOpenURL( TQString(), TQString(), this );
if (url.isEmpty() == false)
if (!url.isEmpty())
{
// About this function, the style guide (
// http://developer.kde.org/documentation/standards/kde/style/basics/index.html )

@ -82,7 +82,7 @@ bool %{APPNAME}Part::openFile()
{
// m_file is always local so we can use TQFile on it
TQFile file(m_file);
if (file.open(IO_ReadOnly) == false)
if (!file.open(IO_ReadOnly))
return false;
// our example widget is text-based, so we use TQTextStream instead
@ -106,12 +106,12 @@ bool %{APPNAME}Part::openFile()
bool %{APPNAME}Part::saveFile()
{
// if we aren't read-write, return immediately
if (isReadWrite() == false)
if (!isReadWrite())
return false;
// m_file is always local, so we use TQFile
TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
if (!file.open(IO_WriteOnly))
return false;
// use TQTextStream to dump the text to the file
@ -130,7 +130,7 @@ void %{APPNAME}Part::fileOpen()
// button is clicked
TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
if (!file_name.isEmpty())
openURL(file_name);
}
@ -138,7 +138,7 @@ void %{APPNAME}Part::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
if (!file_name.isEmpty())
saveAs(file_name);
}

@ -96,7 +96,7 @@ bool %{APPNAMELC}Part::openFile()
{
// m_file is always local so we can use TQFile on it
TQFile file(m_file);
if (file.open(IO_ReadOnly) == false)
if (!file.open(IO_ReadOnly))
return false;
// our example widget is text-based, so we use TQTextStream instead
@ -120,12 +120,12 @@ bool %{APPNAMELC}Part::openFile()
bool %{APPNAMELC}Part::saveFile()
{
// if we aren't read-write, return immediately
if (isReadWrite() == false)
if (!isReadWrite())
return false;
// m_file is always local, so we use TQFile
TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
if (!file.open(IO_WriteOnly))
return false;
// use TQTextStream to dump the text to the file
@ -144,7 +144,7 @@ void %{APPNAMELC}Part::fileOpen()
// button is clicked
TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
if (!file_name.isEmpty())
openURL(file_name);
}
@ -152,7 +152,7 @@ void %{APPNAMELC}Part::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
if (!file_name.isEmpty())
saveAs(file_name);
}

@ -157,7 +157,7 @@ void %{APPNAME}::load( const TQString &fileName )
TQTextStream ts( &f );
e->setText( ts.read() );
e->setModified( FALSE );
e->setModified( false );
setCaption( fileName );
statusBar()->message( tr("Loaded document %1").arg(fileName), 2000 );
}
@ -182,7 +182,7 @@ void %{APPNAME}::save()
t << text;
f.close();
e->setModified( FALSE );
e->setModified( false );
setCaption( filename );

@ -34,7 +34,7 @@ extern "C"
//-----------------------------------------------------------------------------
//! dialog to setup screen saver parameters
%{APPNAME}Setup::%{APPNAME}Setup( TQWidget *parent, const char *name )
: %{APPNAME}UI( parent, name, TRUE )
: %{APPNAME}UI( parent, name, true )
{
/// @todo
//Connect your signals and slots here to configure the screen saver.

@ -14,9 +14,9 @@ bool
{
%{APPNAME}Frame *frame = new %{APPNAME}Frame( wxT( "Hello World" ), wxPoint(50,50), wxSize(450,340) );
frame->Show(TRUE);
frame->Show(true);
SetTopWindow(frame);
return TRUE;
return true;
}
%{APPNAME}Frame::%{APPNAME}Frame( const wxString& title, const wxPoint& pos, const wxSize& size )
@ -40,7 +40,7 @@ bool
void
%{APPNAME}Frame::OnQuit( wxCommandEvent& WXUNUSED( event ) )
{
Close(TRUE);
Close(true);
}
void

@ -32,7 +32,7 @@ my_unique( const TQValueList<KTextEditor::CompletionEntry>& entryList )
e.postfix + " ";
if ( map.find( key ) == map.end() )
{
map[ key ] = TRUE;
map[ key ] = true;
l << e;
}
}

@ -83,7 +83,7 @@ void ConfigureProblemReporter::accept()
void ConfigureProblemReporter::bgParserCheckbox_toggled( bool b )
{
delaySlider->setEnabled( b );
if ( b == TRUE )
if ( b )
delayLabel->show();
else
delayLabel->hide();

@ -256,7 +256,7 @@ static TQValueList<ItemType> unique( const TQValueList<ItemType>& entryList ) {
e.text + " " +
e.postfix + " " ).simplifyWhiteSpace().stripWhiteSpace();
if ( map.find( key ) == map.end() ) {
map[ key ] = TRUE;
map[ key ] = true;
l << e;
}
}
@ -271,7 +271,7 @@ static TQStringList unique( const TQStringList& entryList ) {
while ( it != entryList.end() ) {
TQString e = *it++;
if ( map.find( e ) == map.end() ) {
map[ e ] = TRUE;
map[ e ] = true;
l << e;
}
}
@ -287,7 +287,7 @@ static TQStringList unique( const TQValueList<TQStringList>& entryList ) {
TQStringList li = ( *it++ );
TQString e = li.join( "\n" );
if ( map.find( e ) == map.end() ) {
map[ e ] = TRUE;
map[ e ] = true;
l += li;
}
}
@ -2419,7 +2419,7 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) {
showArguments = TRUE;
showArguments = true;
}
EvaluationResult type;

@ -24,7 +24,7 @@ class CreatePCSDialog : public CreatePCSDialogBase
public:
CreatePCSDialog( CppSupportPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
CreatePCSDialog( CppSupportPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~CreatePCSDialog();
/*$PUBLIC_FUNCTIONS$*/

@ -150,7 +150,7 @@ STTY::~STTY()
int STTY::findTTY()
{
int ptyfd = -1;
bool needGrantPty = TRUE;
bool needGrantPty = true;
// Find a master pty that we can open ////////////////////////////////
@ -163,7 +163,7 @@ int STTY::findTTY()
strncpy(tty_slave, ptsname(ptyfd), 50);
grantpt(ptyfd);
unlockpt(ptyfd);
needGrantPty = FALSE;
needGrantPty = false;
#endif
// first we try UNIX PTY's
@ -177,7 +177,7 @@ int STTY::findTTY()
struct stat sbuf;
sprintf(tty_slave,"/dev/pts/%d",ptyno);
if (stat(tty_slave,&sbuf) == 0 && S_ISCHR(sbuf.st_mode))
needGrantPty = FALSE;
needGrantPty = false;
else {
close(ptyfd);
ptyfd = -1;
@ -222,7 +222,7 @@ int STTY::findTTY()
}
if (ptyfd >= 0) {
if (needGrantPty && !chownpty(ptyfd, TRUE)) {
if (needGrantPty && !chownpty(ptyfd, true)) {
fprintf(stderr,"tdevelop: chownpty failed for device %s::%s.\n",pty_master,tty_slave);
fprintf(stderr," : This means the session can be eavesdroped.\n");
fprintf(stderr," : Make sure konsole_grantpty is installed and setuid root.\n");

@ -223,7 +223,7 @@ void ProblemReporter::InitListView(TDEListView* listview)
listview->addColumn( i18n("Line") );
listview->addColumn( i18n("Column") );
listview->addColumn( i18n("Problem") );
listview->setAllColumnsShowFocus( TRUE );
listview->setAllColumnsShowFocus( true );
connect( listview, TQ_SIGNAL(executed(TQListViewItem*)),
this, TQ_SLOT(slotSelected(TQListViewItem*)) );

@ -313,7 +313,7 @@ bool SubclassingDlg::replaceKeywords(TQString &buffer,bool canBeModal)
replace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower());
if (canBeModal)
{
replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE");
replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = false");
replace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal");
replace(buffer,"$CAN_BE_MODAL_CPP2$",", modal");
}

@ -43,10 +43,10 @@ class SubclassingDlg : public SubclassingDlgBase
public:
SubclassingDlg( CppSupportPart* cppSupport, const TQString &formFile, TQStringList &newFileNames,
TQWidget* parent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );
bool modal = false, WFlags fl = 0 );
SubclassingDlg( CppSupportPart* cppSupport, const TQString &formFile, const TQString &filename, TQStringList &dummy,
TQWidget* parent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );
bool modal = false, WFlags fl = 0 );
~SubclassingDlg();
private:

@ -48,7 +48,7 @@ public:
{
if( !m_readFromDisk ){
//kdDebug(9013) << "-------> kapp is locked = " << kapp->locked() << endl;
bool needToLock = kapp->locked() == false;
bool needToLock = !kapp->locked();
if( needToLock )
kapp->lock();

@ -37,7 +37,7 @@ void ConfigureProblemReporter::accept()
void ConfigureProblemReporter::bgParserCheckbox_toggled( bool b )
{
delaySlider->setEnabled( b );
if ( b == TRUE )
if ( b )
delayLabel->show();
else
delayLabel->hide();

@ -93,7 +93,7 @@ ProblemReporter::ProblemReporter( JavaSupportPart* part, TQWidget* parent, const
addColumn( i18n("Line") );
addColumn( i18n("Column") );
addColumn( i18n("Problem") );
setAllColumnsShowFocus( TRUE );
setAllColumnsShowFocus( true );
m_timer = new TQTimer( this );
@ -229,7 +229,7 @@ void ProblemReporter::configure()
kdDebug(9013) << "ProblemReporter::configure()" << endl;
TDEConfig* config = kapp->config();
config->setGroup( "General Options" );
m_active = config->readBoolEntry( "EnableJavaBgParser", TRUE );
m_active = config->readBoolEntry( "EnableJavaBgParser", true );
m_delay = config->readNumEntry( "BgParserDelay", 500 );
}

@ -332,7 +332,7 @@ bool SubclassingDlg::replaceKeywords(TQString &buffer,bool canBeModal)
replace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower());
if (canBeModal)
{
replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE");
replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = false");
replace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal");
replace(buffer,"$CAN_BE_MODAL_CPP2$",", modal");
}

@ -43,10 +43,10 @@ class SubclassingDlg : public SubclassingDlgBase
public:
SubclassingDlg(kjsSupportPart* kjsSupport, const TQString &formFile,TQStringList &newFileNames,
TQWidget* parent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );
bool modal = false, WFlags fl = 0 );
/* SubclassingDlg(CppSupportPart* kjsSupport, const TQString &formFile,const TQString &filename,TQStringList &dummy,
TQWidget* parent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );*/
bool modal = false, WFlags fl = 0 );*/
~SubclassingDlg();
private:

@ -82,7 +82,7 @@ ProblemReporter::ProblemReporter( PascalSupportPart* part, TQWidget* parent, con
addColumn( i18n("File") );
addColumn( i18n("Line") );
//addColumn( i18n("Column") );
setAllColumnsShowFocus( TRUE );
setAllColumnsShowFocus( true );
m_timer = new TQTimer( this );
@ -252,7 +252,7 @@ void ProblemReporter::configure()
kdDebug(9007) << "ProblemReporter::configure()" << endl;
TDEConfig* config = kapp->config();
config->setGroup( "General Options" );
m_active = config->readBoolEntry( "EnablePascalBgParser", TRUE );
m_active = config->readBoolEntry( "EnablePascalBgParser", true );
m_delay = config->readNumEntry( "BgParserDelay", 500 );
}

@ -159,7 +159,7 @@ void PHPCodeCompletion::cursorPositionChanged(){
}
if (m_config->getCodeCompletion()) {
if (m_completionBoxShow == true) {
if (m_completionBoxShow) {
return;
}
@ -204,7 +204,7 @@ bool PHPCodeCompletion::showCompletionBox(TQValueList<KTextEditor::CompletionEnt
return false;
}
m_completionBoxShow = true;
m_codeInterface->showCompletionBox(list, max, FALSE);
m_codeInterface->showCompletionBox(list, max, false);
return true;
}
return false;
@ -218,7 +218,7 @@ bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
return false;
TQRegExp Class("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
Class.setCaseSensitive(FALSE);
Class.setCaseSensitive(false);
if (Class.search(line) != -1) {
TQString classname = Class.cap(1);
@ -234,7 +234,7 @@ bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
for (funcIt = funcList.begin(); funcIt != funcList.end(); ++funcIt) {
FunctionDom nFunc = *funcIt;
if ((function.isEmpty() || nFunc->name().startsWith(function, FALSE)) && nFunc->isStatic()) {
if ((function.isEmpty() || nFunc->name().startsWith(function, false)) && nFunc->isStatic()) {
KTextEditor::CompletionEntry e;
e.prefix = nClass->name() + " ::";
e.text = nFunc->name();
@ -267,11 +267,11 @@ bool PHPCodeCompletion::checkForNew(TQString line, int col){
kdDebug(9018) << "checkForNew" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
if (line.find("new ", 0, FALSE) == -1)
if (line.find("new ", 0, false) == -1)
return false;
TQRegExp New("[& \t]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
New.setCaseSensitive(FALSE);
New.setCaseSensitive(false);
if (New.search(line) != -1) {
list = getClasses( New.cap(1) );
@ -297,11 +297,11 @@ bool PHPCodeCompletion::checkForExtends(TQString line, int col){
kdDebug(9018) << "checkForExtends" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
if (line.find("extends", 0, FALSE) == -1)
if (line.find("extends", 0, false) == -1)
return false;
TQRegExp extends("[ \t]*extends[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
extends.setCaseSensitive(FALSE);
extends.setCaseSensitive(false);
if (extends.search(line) != -1) {
list = getClasses(extends.cap(1));
@ -362,7 +362,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(TQString
ClassList::Iterator classIt;
for (classIt = classList.begin(); classIt != classList.end(); ++classIt) {
ClassDom nClass = *classIt;
if (name == NULL || name.isEmpty() || nClass->name().startsWith(name, FALSE)) {
if (name == NULL || name.isEmpty() || nClass->name().startsWith(name, false)) {
KTextEditor::CompletionEntry e;
TQStringList::Iterator it = added.find(nClass->name());
@ -383,7 +383,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
if (classname.isEmpty()) {
TQValueList<FunctionCompletionEntry>::Iterator it;
for( it = m_globalFunctions.begin(); it != m_globalFunctions.end(); ++it ) {
if((*it).text.startsWith(function, FALSE)){
if((*it).text.startsWith(function, false)){
KTextEditor::CompletionEntry e;
e = (*it);
list.append(e);
@ -393,7 +393,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
FunctionList methodList = m_model->globalNamespace()->functionList();
FunctionList::Iterator methodIt;
for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) {
if ((*methodIt)->name().startsWith(function, FALSE)){
if ((*methodIt)->name().startsWith(function, false)){
KTextEditor::CompletionEntry e;
e.text = (*methodIt)->name();
ArgumentDom pArg = (*methodIt)->argumentList().first();
@ -416,7 +416,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
FunctionList::Iterator methodIt;
for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) {
FunctionDom pMethod = *methodIt;
if (function.isEmpty() || pMethod->name().startsWith(function, FALSE)) {
if (function.isEmpty() || pMethod->name().startsWith(function, false)) {
KTextEditor::CompletionEntry e;
ArgumentDom arg = pMethod->argumentList().first();
@ -430,7 +430,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
VariableList::Iterator attrIt;
for (attrIt = attrList.begin(); attrIt != attrList.end(); ++attrIt) {
VariableDom pVar = *attrIt;
if (function.isEmpty() || pVar->name().startsWith(function, FALSE)) {
if (function.isEmpty() || pVar->name().startsWith(function, false)) {
KTextEditor::CompletionEntry e;
e.prefix = nClass->name() + " ::";
e.text = pVar->name();
@ -517,7 +517,7 @@ TQStringList PHPCodeCompletion::getArguments(TQString classname, TQString functi
TQString PHPCodeCompletion::getCurrentClassName() {
kdDebug(9018) << "getCurrentClassName" << endl;
TQRegExp Class("^[ \t]*(abstract|final|)[ \t]*class[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*(extends[ \t]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))?.*$");
Class.setCaseSensitive(FALSE);
Class.setCaseSensitive(false);
for(int i = m_currentLine; i >= 0; i--){
TQString line = m_editInterface->textLine(i);
@ -577,7 +577,7 @@ TQString PHPCodeCompletion::getClassName(TQString varName, TQString classname) {
for(int i = m_currentLine; i >= 0; i--){
TQString line = m_editInterface->textLine(i);
if (!line.isNull() && line.find(varName,0 , FALSE) != -1) {
if (!line.isNull() && line.find(varName,0 , false) != -1) {
if (createmember.search(line) != -1) {
TQString right = createmember.cap(1).stripWhiteSpace();
@ -637,12 +637,12 @@ bool PHPCodeCompletion::checkForArgHint(TQString line, int col) {
TQValueList<KTextEditor::CompletionEntry> list;
TQStringList argsList;
if (m_argWidgetShow == true)
if (m_argWidgetShow)
return false;
if (line.find("::") != -1) {
TQRegExp Static("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
Static.setCaseSensitive(FALSE);
Static.setCaseSensitive(false);
if (Static.search(line) != -1) {
TQString classname = Static.cap(1);

@ -184,7 +184,7 @@ void PHPErrorView::InitListView(TDEListView* listview)
listview->addColumn( i18n("Line") );
listview->addColumn( i18n("Column") );
listview->addColumn( i18n("Problem") );
listview->setAllColumnsShowFocus( TRUE );
listview->setAllColumnsShowFocus( true );
connect( listview, TQ_SIGNAL(executed(TQListViewItem*)),
this, TQ_SLOT(slotSelected(TQListViewItem*)) );

@ -39,8 +39,8 @@ PHPFile::PHPFile(PHPSupportPart *phpSupport, const TQString& fileName)
m_fileinfo = new TQFileInfo(fileName);
m_part = phpSupport;
modified = true;
inClass = FALSE;
inMethod = FALSE;
inClass = false;
inMethod = false;
/*
phpCheckProc = new KShellProcess("/bin/sh");
@ -120,8 +120,8 @@ void PHPFile::Analyse() {
postEvent( new FileParseEvent( Event_StartParse, this->fileName() ) );
inClass = FALSE;
inMethod = FALSE;
inClass = false;
inMethod = false;
/*
m_contents = readFromEditor();
@ -138,36 +138,36 @@ void PHPFile::Analyse() {
}
bool PHPFile::ParseClass(TQString line, int lineNo) {
if (line.find("class ", 0, FALSE) == -1)
return FALSE;
if (line.find("class ", 0, false) == -1)
return false;
TQRegExp Class("^[ \t]*(abstract|final|)[ \t]*class[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*(extends[ \t]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))?.*$");
Class.setCaseSensitive(FALSE);
Class.setCaseSensitive(false);
if (Class.search(line) != -1) {
if (AddClass(Class.cap(2), Class.cap(4), lineNo) == FALSE)
return FALSE;
if (!AddClass(Class.cap(2), Class.cap(4), lineNo))
return false;
/// @fixme Activate when it exists in ClassModel
// if (Class.cap(1).lower() == "abstract")
// SetClass("abstract");
return TRUE;
return true;
}
return FALSE;
return false;
}
bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (line.find("function", 0, FALSE) == -1)
return FALSE;
if (line.find("function", 0, false) == -1)
return false;
TQRegExp function("^[ \t]*(final|abstract|static|)[ \t]*(public|private|protected|)[ \t]*(static|)[ \t]*function[ \t&]*([_a-zA-Z\x7f-\xff][_a-zA-Z0-9\x7f-\xff]*)[ \t]*\\(([_a-zA-Z\x7f-\xff]*[_$, &'\\\"0-9A-Za-z\x7f-\xff\t-=]*)\\).*$");
function.setCaseSensitive(FALSE);
function.setCaseSensitive(false);
if (function.search(line) != -1) {
if (AddFunction(function.cap(4), function.cap(5), lineNo) == FALSE)
return FALSE;
if (!AddFunction(function.cap(4), function.cap(5), lineNo))
return false;
if (function.cap(3).lower() == "static" || function.cap(1).lower() == "static")
SetFunction("static");
@ -175,7 +175,7 @@ bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (function.cap(1).lower() == "abstract") {
SetFunction("abstract");
CloseFunction( lineNo );
return FALSE;
return false;
}
/// @fixme Activate when it exists in FunctionModel
@ -191,22 +191,22 @@ bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (function.cap(2).lower() == "protected")
SetFunction("protected");
return TRUE;
return true;
}
return FALSE;
return false;
}
bool PHPFile::ParseVariable(TQString line, int lineNo) {
if (line.find("var") == -1 && line.find("public") == -1 && line.find("private") == -1 && line.find("protected") == -1)
return FALSE;
return false;
TQRegExp variable("^[ \t]*(var|public|private|protected|static)[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \t;=].*$");
variable.setCaseSensitive(FALSE);
variable.setCaseSensitive(false);
if (variable.search(line) != -1) {
if (AddVariable(variable.cap(2), "", lineNo) == FALSE)
return FALSE;
if (!AddVariable(variable.cap(2), "", lineNo))
return false;
if (variable.cap(1).lower() == "private")
SetVariable( "private" );
@ -220,117 +220,117 @@ bool PHPFile::ParseVariable(TQString line, int lineNo) {
if (variable.cap(1).lower() == "static")
SetVariable( "static" );
return TRUE;
return true;
}
return FALSE;
return false;
}
bool PHPFile::ParseThisMember(TQString line, int lineNo) {
if (line.find("$this->", 0, FALSE) == -1)
return FALSE;
if (line.find("$this->", 0, false) == -1)
return false;
TQRegExp createthis;
createthis.setCaseSensitive(FALSE);
createthis.setCaseSensitive(false);
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), "integer", lineNo, TRUE) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createthis.cap(1), "integer", lineNo, true))
return false;
return true;
}
if (line.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
if (line.find("true", 0, false) != -1 || line.find("false", 0, false) != -1) {
createthis.setPattern("\\$(this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*(true|false)[ \t]*;");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), "boolean", lineNo, TRUE) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createthis.cap(1), "boolean", lineNo, true))
return false;
return true;
}
}
if (line.find("new", 0, FALSE) != -1) {
if (line.find("new", 0, false) != -1) {
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), createthis.cap(2), lineNo, TRUE) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createthis.cap(1), createthis.cap(2), lineNo, true))
return false;
return true;
}
}
if (line.find("array", 0, FALSE) != -1) {
if (line.find("array", 0, false) != -1) {
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*(new|)[ \t&]*(array)[ \t]*[\\(;]+");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), "array", lineNo, TRUE) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createthis.cap(1), "array", lineNo, true))
return false;
return true;
}
}
return FALSE;
return false;
}
bool PHPFile::ParseMember(TQString line, int lineNo) {
if (line.find("$", 0, FALSE) == -1)
return FALSE;
if (line.find("$", 0, false) == -1)
return false;
/// @todo Ajouter plus de test ....
TQRegExp createmember;
createmember.setCaseSensitive(FALSE);
createmember.setCaseSensitive(false);
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "integer", lineNo) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createmember.cap(1), "integer", lineNo))
return false;
return true;
}
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*[\"']+(.*)[\"']+[ \t]*;");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "string", lineNo) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createmember.cap(1), "string", lineNo))
return false;
return true;
}
if (line.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
if (line.find("true", 0, false) != -1 || line.find("false", 0, false) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*(true|false)[ \t]*;");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "boolean", lineNo) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createmember.cap(1), "boolean", lineNo))
return false;
return true;
}
}
if (line.find("new", 0, FALSE) != -1) {
if (line.find("new", 0, false) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), createmember.cap(2), lineNo) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createmember.cap(1), createmember.cap(2), lineNo))
return false;
return true;
}
}
if (line.find("array", 0, FALSE) != -1) {
if (line.find("array", 0, false) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*(new|)[ \t&]*(array)[ \t]*[\\(;]+");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "array", lineNo) == FALSE)
return FALSE;
return TRUE;
if (!AddVariable(createmember.cap(1), "array", lineNo))
return false;
return true;
}
}
return FALSE;
return false;
}
bool PHPFile::ParseReturn(TQString line, int lineNo) {
TQString rettype;
if (line.find("return", 0, FALSE) == -1)
return FALSE;
if (line.find("return", 0, false) == -1)
return false;
TQRegExp typeex;
typeex.setCaseSensitive(FALSE);
typeex.setCaseSensitive(false);
typeex.setPattern("return[ \t]*(\\(|)([a-zA-Z_\x7f-\xff$][a-zA-Z0-9_\x7f-\xff]*)(\\)|)[ \t]*;");
if (typeex.search(line) != -1) {
@ -362,37 +362,37 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
}
SetFunction("result", rettype);
return TRUE;
return true;
}
bool PHPFile::ParseTodo(TQString line, int lineNo) {
if (line.find("todo", 0, FALSE) == -1)
return FALSE;
if (line.find("todo", 0, false) == -1)
return false;
TQRegExp todo("/[/]+[ \t]*[@]*todo([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
todo.setCaseSensitive(FALSE);
todo.setCaseSensitive(false);
if (todo.search(line) != -1) {
AddTodo( todo.cap(2), lineNo );
return TRUE;
return true;
}
return FALSE;
return false;
}
bool PHPFile::ParseFixme(TQString line, int lineNo) {
if (line.find("fixme", 0, FALSE) == -1)
return FALSE;
if (line.find("fixme", 0, false) == -1)
return false;
TQRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
fixme.setCaseSensitive(FALSE);
fixme.setCaseSensitive(false);
if (fixme.search(line) != -1) {
AddFixme( fixme.cap(2), lineNo );
return TRUE;
return true;
}
return FALSE;
return false;
}
void PHPFile::ParseSource() {
@ -405,13 +405,13 @@ void PHPFile::ParseSource() {
TQRegExp includere("^[ \t]*(include|require|include_once|require_once)[ \t]*(\\(|)[ \t]*[\"'](.*)[\"'][ \t]*(\\)|)[ \t]*;$");
includere.setCaseSensitive(FALSE);
includere.setCaseSensitive(false);
for ( TQStringList::Iterator it = m_contents.begin(); it != m_contents.end(); ++it ) {
line = (*it).local8Bit();
if (!line.isNull()) {
if (line.find("include", 0, FALSE) != -1 || line.find("require", 0, FALSE) != -1) {
if (line.find("include", 0, false) != -1 || line.find("require", 0, false) != -1) {
if (includere.search(line) != -1) {
TQStringList include_path;
include_path = include_path.split(":", m_part->getIncludePath());
@ -431,7 +431,7 @@ void PHPFile::ParseSource() {
}
if ( inMethod == TRUE ) {
if ( inMethod ) {
bracketFuncOpen += line.contains("{");
bracketFuncClose += line.contains("}");
if (bracketFuncOpen == bracketFuncClose && bracketFuncOpen != 0 && bracketFuncClose != 0) {
@ -439,31 +439,31 @@ void PHPFile::ParseSource() {
}
}
if ( inMethod == FALSE ) {
if ( !inMethod ) {
bracketOpen += line.contains("{");
bracketClose += line.contains("}");
if (bracketOpen == bracketClose && bracketOpen != 0 && bracketClose != 0 && inClass == TRUE) {
if (bracketOpen == bracketClose && bracketOpen != 0 && bracketClose != 0 && inClass) {
CloseClass( lineNo );
}
}
if ( inClass == FALSE ) {
if (ParseClass(line, lineNo) == TRUE) {
if ( !inClass ) {
if (ParseClass(line, lineNo)) {
bracketOpen = line.contains("{");
bracketClose = line.contains("}");
}
}
if ( inClass == TRUE ) {
if ( inClass ) {
ParseThisMember(line, lineNo);
}
if (ParseFunction(line, lineNo) == TRUE) {
if (ParseFunction(line, lineNo)) {
bracketFuncOpen = line.contains("{");
bracketFuncClose = line.contains("}");
}
if ( inMethod == TRUE )
if ( inMethod )
ParseReturn(line, lineNo);
ParseVariable(line, lineNo);
@ -582,58 +582,58 @@ void PHPFile::postEvent(FileParseEvent *event) {
bool PHPFile::AddClass(TQString name, TQString extends, int start) {
postEvent( new FileParseEvent( Event_AddClass, this->fileName(), name, extends, start ) );
inClass = TRUE;
return TRUE;
inClass = true;
return true;
}
bool PHPFile::SetClass(TQString arguments) {
postEvent( new FileParseEvent( Event_SetClass, this->fileName(), "", arguments ) );
return TRUE;
return true;
}
bool PHPFile::CloseClass(int end) {
postEvent( new FileParseEvent( Event_CloseClass, this->fileName(), end ) );
inClass = FALSE;
return TRUE;
inClass = false;
return true;
}
bool PHPFile::AddFunction(TQString name, TQString arguments, int start) {
postEvent( new FileParseEvent( Event_AddFunction, this->fileName(), name, arguments, start ) );
inMethod = TRUE;
return TRUE;
inMethod = true;
return true;
}
bool PHPFile::SetFunction(TQString name, TQString arguments) {
postEvent( new FileParseEvent( Event_SetFunction, this->fileName(), name, arguments ) );
return TRUE;
return true;
}
bool PHPFile::CloseFunction(int end) {
postEvent( new FileParseEvent( Event_CloseFunction, this->fileName(), end ) );
inMethod = FALSE;
return TRUE;
inMethod = false;
return true;
}
bool PHPFile::AddVariable(TQString name, TQString type, int position, bool classvar) {
postEvent( new FileParseEvent( Event_AddVariable, this->fileName(), name, type, position, classvar ) );
return TRUE;
return true;
}
bool PHPFile::SetVariable(TQString arguments) {
postEvent( new FileParseEvent( Event_SetVariable, this->fileName(), "", arguments ) );
return TRUE;
return true;
}
bool PHPFile::AddTodo(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddTodo, this->fileName(), "", arguments, position ) );
inClass = TRUE;
return TRUE;
inClass = true;
return true;
}
bool PHPFile::AddFixme(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddFixme, this->fileName(), "", arguments, position ) );
inClass = TRUE;
return TRUE;
inClass = true;
return true;
}
#include "phpfile.moc"

@ -98,7 +98,7 @@ private:
bool SetFunction(TQString name, TQString arguments = "");
bool CloseFunction(int end);
bool AddVariable(TQString name, TQString type, int position, bool classvar = FALSE);
bool AddVariable(TQString name, TQString type, int position, bool classvar = false);
bool SetVariable(TQString arguments);
bool AddTodo(TQString arguments, int position);

@ -51,7 +51,7 @@ public:
m_name = "";
m_arguments = "";
m_position = 0;
m_global = FALSE;
m_global = false;
}
FileParseEvent(long event, const TQString& fileName, int position )
@ -59,20 +59,20 @@ public:
{
m_name = "";
m_arguments = "";
m_global = FALSE;
m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments )
: TQCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments )
{
m_position = 0;
m_global = FALSE;
m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments, int position )
: TQCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments ), m_position( position )
{
m_global = FALSE;
m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments, int position, bool global )

@ -443,7 +443,7 @@ bool PHPSupportPart::parseProject()
_jd->dir.setPath( project()->projectDirectory() );
TQTimer::singleShot( 0, this, TQ_SLOT( slotParseFiles() ) );
return TRUE;
return true;
}
void PHPSupportPart::slotParseFiles()
@ -609,7 +609,7 @@ void PHPSupportPart::customEvent( TQCustomEvent* ev )
nClass->setStartPosition( event->posititon(), 0);
m_file->addClass( nClass );
if ( event->arguments().isEmpty() != TRUE )
if ( !event->arguments().isEmpty() )
nClass->addBaseClass( event->arguments() );
ns->addClass( nClass );
@ -690,10 +690,10 @@ void PHPSupportPart::customEvent( TQCustomEvent* ev )
nVariable->setStartPosition( event->posititon(), 0 );
nVariable->setAccess(VariableModel::Public);
if ( event->arguments().isEmpty() != TRUE )
if ( !event->arguments().isEmpty() )
nVariable->setType( event->arguments() );
if ( LastClass != NULL && ( LastMethod == NULL || event->global() == TRUE ) ) {
if ( LastClass != NULL && ( LastMethod == NULL || event->global() ) ) {
// kdDebug(9018) << "AddVariable To Class " << LastClass->name() << " " << nVariable->name() << endl;
LastClass->addVariable(nVariable);
} else {

@ -155,7 +155,7 @@ STTY::~STTY()
int STTY::findTTY()
{
int ptyfd = -1;
bool needGrantPty = TRUE;
bool needGrantPty = true;
// Find a master pty that we can open ////////////////////////////////
@ -168,7 +168,7 @@ int STTY::findTTY()
strncpy(tty_slave, ptsname(ptyfd), 50);
grantpt(ptyfd);
unlockpt(ptyfd);
needGrantPty = FALSE;
needGrantPty = false;
#endif
// first we try UNIX PTY's
@ -182,7 +182,7 @@ int STTY::findTTY()
struct stat sbuf;
sprintf(tty_slave,"/dev/pts/%d",ptyno);
if (stat(tty_slave,&sbuf) == 0 && S_ISCHR(sbuf.st_mode))
needGrantPty = FALSE;
needGrantPty = false;
else {
close(ptyfd);
ptyfd = -1;
@ -227,7 +227,7 @@ int STTY::findTTY()
}
if (ptyfd >= 0) {
if (needGrantPty && !chownpty(ptyfd, TRUE)) {
if (needGrantPty && !chownpty(ptyfd, true)) {
fprintf(stderr,"tdevelop: chownpty failed for device %s::%s.\n",pty_master,tty_slave);
fprintf(stderr," : This means the session can be eavesdroped.\n");
fprintf(stderr," : Make sure konsole_grantpty is installed and setuid root.\n");

@ -518,7 +518,7 @@ void RubySupportPart::parse(const TQString &fileName)
void RubySupportPart::slotRun ()
{
// if we can't save all parts, then the user canceled
if ( partController()->saveAllFiles() == false )
if ( !partController()->saveAllFiles() )
return;
TQFileInfo program(mainProgram());
if (mainProgram().endsWith("script/server")) {
@ -875,7 +875,7 @@ void RubySupportPart::slotSwitchToView()
void RubySupportPart::slotRunTestUnderCursor()
{
// if we can't save all parts, then the user canceled
if ( partController()->saveAllFiles() == false )
if ( !partController()->saveAllFiles() )
return;
KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(partController()->activePart());

@ -27,7 +27,7 @@
class TQCustomSqlCursor: public TQSqlCursor
{
public:
TQCustomSqlCursor( const TQString & query = TQString(), bool autopopulate = TRUE, TQSqlDatabase* db = 0 ) :
TQCustomSqlCursor( const TQString & query = TQString(), bool autopopulate = true, TQSqlDatabase* db = 0 ) :
TQSqlCursor( TQString(), autopopulate, db )
{
exec( query );
@ -42,15 +42,15 @@ public:
TQCustomSqlCursor( const TQCustomSqlCursor & other ): TQSqlCursor( other ) {}
bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ = TQSqlIndex() )
{ return exec( lastQuery() ); }
TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const
TQSqlIndex primaryIndex( bool /*prime*/ = true ) const
{ return TQSqlIndex(); }
int insert( bool /*invalidate*/ = TRUE )
{ return FALSE; }
int update( bool /*invalidate*/ = TRUE )
{ return FALSE; }
int del( bool /*invalidate*/ = TRUE )
{ return FALSE; }
void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
int insert( bool /*invalidate*/ = true )
{ return false; }
int update( bool /*invalidate*/ = true )
{ return false; }
int del( bool /*invalidate*/ = true )
{ return false; }
void setName( const TQString& /*name*/, bool /*autopopulate*/ = true ) {}
};

@ -388,7 +388,7 @@ string ASFormatter::nextLine()
isAppendPostBlockEmptyLineRequested = false;
isInLineComment = true;
// do not indent if in column 1 or 2
if (lineCommentNoIndent == false)
if (!lineCommentNoIndent)
{
if (charNum == 0)
lineCommentNoIndent = true;
@ -396,7 +396,7 @@ string ASFormatter::nextLine()
lineCommentNoIndent = true;
}
// move comment if spaces were added or deleted
if (lineCommentNoIndent == false && spacePadNum != 0)
if (!lineCommentNoIndent && spacePadNum != 0)
adjustComments();
formattedLineCommentNum = formattedLine.length();
appendSequence(AS_OPEN_LINE_COMMENT);

@ -101,7 +101,7 @@ class DefaultSourceProvider: public SourceProvider {
Driver::Driver()
: depresolv( FALSE ), lexer( 0 ), m_lexerCache( this ), m_dependenceDepth( 0 ), m_maxDependenceDepth( 20 ) {
: depresolv( false ), lexer( 0 ), m_lexerCache( this ), m_dependenceDepth( 0 ), m_maxDependenceDepth( 20 ) {
m_sourceProvider = new DefaultSourceProvider();
}

@ -226,7 +226,7 @@ DomPath DomUtil::resolvPathStringExt(const TQString pathstring)
DomPath dompath;
for (i=0; i<pathParts.count(); i++)
{
TQStringList pathElemParts = TQStringList::split('|',pathParts[i],TRUE);
TQStringList pathElemParts = TQStringList::split('|',pathParts[i],true);
DomPathElement dompathelem;
dompathelem.tagName = pathElemParts[0].simplifyWhiteSpace();
if (pathElemParts.count()>1)

@ -101,7 +101,7 @@ void KScriptAction::activate( )
}
}
m_interface->run(parent(), TQVariant());
m_timeout->start(60000,FALSE); // after 1 minute unload
m_timeout->start(60000,false); // after 1 minute unload
m_refs++;
}

@ -38,7 +38,7 @@ class QComboViewData
public:
QComboViewData( QComboView *cb ): current(0), lView( 0 ), combo( cb )
{
duplicatesEnabled = TRUE;
duplicatesEnabled = true;
cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
@ -46,7 +46,7 @@ public:
void updateLinedGeometry();
void setListView( TQListView *l ) { lView = l ;
l->setMouseTracking( TRUE );}
l->setMouseTracking( true );}
TQListViewItem *current;
int maxCount;
@ -130,7 +130,7 @@ static inline bool checkIndex( const char *method, const char * name,
Constructs a combobox with a maximum size and either Motif 2.0 or
Windows look and feel.
The input field can be edited if \a rw is TRUE, otherwise the user
The input field can be edited if \a rw is true, otherwise the user
may only choose one of the items in the combobox.
The \a parent and \a name arguments are passed on to the TQWidget
@ -148,14 +148,14 @@ QComboView::QComboView( bool rw, TQWidget *parent, const char *name )
d->maxCount = INT_MAX;
setSizeLimit(10);
d->p = AtBottom;
d->autoresize = FALSE;
d->poppedUp = FALSE;
d->arrowDown = FALSE;
d->discardNextMousePress = FALSE;
d->shortClick = FALSE;
d->useCompletion = FALSE;
d->autoresize = false;
d->poppedUp = false;
d->arrowDown = false;
d->discardNextMousePress = false;
d->shortClick = false;
d->useCompletion = false;
d->completeAt = 0;
d->completeNow = FALSE;
d->completeNow = false;
d->completionTimer = new TQTimer( this );
setFocusPolicy( TQWidget::StrongFocus );
@ -315,7 +315,7 @@ void QComboView::internalActivate( TQListViewItem * item )
return;
}
popDownListView();
d->poppedUp = FALSE;
d->poppedUp = false;
d->current = item;
@ -361,7 +361,7 @@ void QComboView::internalHighlight( TQListViewItem * item )
*/
void QComboView::internalClickTimeout()
{
d->shortClick = FALSE;
d->shortClick = false;
}
/*!
@ -422,7 +422,7 @@ void QComboView::paintEvent( TQPaintEvent * )
flags |= TQStyle::Style_HasFocus;
if ( width() < 5 || height() < 5 ) {
qDrawShadePanel( &p, rect(), g, FALSE, 2,
qDrawShadePanel( &p, rect(), g, false, 2,
&g.brush( TQColorGroup::Button ) );
return;
}
@ -457,7 +457,7 @@ void QComboView::paintEvent( TQPaintEvent * )
( re.height() - pix->height() ) / 2, *pix );
}
}
p.setClipping( FALSE );
p.setClipping( false );
}
@ -469,7 +469,7 @@ void QComboView::mousePressEvent( TQMouseEvent *e )
if ( e->button() != TQt::LeftButton )
return;
if ( d->discardNextMousePress ) {
d->discardNextMousePress = FALSE;
d->discardNextMousePress = false;
return;
}
TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
@ -481,18 +481,18 @@ void QComboView::mousePressEvent( TQMouseEvent *e )
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( childCount() && ( !editable() || arrowRect.contains( e->pos() ) ) ) {
d->arrowPressed = FALSE;
listView()->blockSignals( TRUE );
d->arrowPressed = false;
listView()->blockSignals( true );
tqApp->sendEvent( listView(), e ); // trigger the listbox's autoscroll
listView()->blockSignals( FALSE );
listView()->blockSignals( false );
popup();
if ( arrowRect.contains( e->pos() ) ) {
d->arrowPressed = TRUE;
d->arrowDown = TRUE;
repaint( FALSE );
d->arrowPressed = true;
d->arrowDown = true;
repaint( false );
}
TQTimer::singleShot( 200, this, TQ_SLOT(internalClickTimeout()));
d->shortClick = TRUE;
d->shortClick = true;
}
}
@ -585,7 +585,7 @@ void QComboView::keyPressEvent( TQKeyEvent *e )
else
return;
}
d->completionTimer->start( 400, TRUE );
d->completionTimer->start( 400, true );
} else {
e->ignore();
return;
@ -613,7 +613,7 @@ TQString QComboView::currentText() const
void QComboView::focusInEvent( TQFocusEvent * e )
{
TQWidget::focusInEvent( e );
d->completeNow = FALSE;
d->completeNow = false;
d->completeAt = 0;
emit focusGranted();
@ -625,7 +625,7 @@ void QComboView::focusInEvent( TQFocusEvent * e )
void QComboView::focusOutEvent( TQFocusEvent * e )
{
TQWidget::focusOutEvent( e );
d->completeNow = FALSE;
d->completeNow = false;
d->completeAt = 0;
emit focusLost();
@ -726,7 +726,7 @@ void QComboView::popup()
lb->triggerUpdate( );
lb->installEventFilter( this );
lb->viewport()->installEventFilter( this );
d->mouseWasInsidePopup = FALSE;
d->mouseWasInsidePopup = false;
// int w = lb->variableWidth() ? lb->sizeHint().width() : width();
int w = width();
int h = listHeight( lb, d->sizeLimit );
@ -758,12 +758,12 @@ void QComboView::popup()
lb->raise();
bool block = lb->signalsBlocked();
lb->blockSignals( TRUE );
lb->blockSignals( true );
TQListViewItem *currentLBItem = d->current ;
lb->setCurrentItem( currentLBItem );
// set the current item to also be the selected item if it isn't already
if ( currentLBItem && currentLBItem->isSelectable() && !currentLBItem->isSelected() )
lb->setSelected( currentLBItem, TRUE );
lb->setSelected( currentLBItem, true );
lb->blockSignals( block );
lb->setVScrollBarMode(TQScrollView::Auto);
@ -776,7 +776,7 @@ void QComboView::popup()
} else*/
//#endif
lb->show();
d->poppedUp = TRUE;
d->poppedUp = true;
}
@ -807,10 +807,10 @@ void QComboView::popDownListView()
d->listView()->hide();
d->listView()->setCurrentItem( d->current );
if ( d->arrowDown ) {
d->arrowDown = FALSE;
repaint( FALSE );
d->arrowDown = false;
repaint( false );
}
d->poppedUp = FALSE;
d->poppedUp = false;
}
@ -849,16 +849,16 @@ void QComboView::currentChanged()
bool QComboView::eventFilter( TQObject *object, TQEvent *event )
{
if ( !event )
return TRUE;
return true;
else if ( object == d->ed ) {
if ( event->type() == TQEvent::KeyPress ) {
bool isAccepted = ( (TQKeyEvent*)event )->isAccepted();
keyPressEvent( (TQKeyEvent *)event );
if ( ((TQKeyEvent *)event)->isAccepted() ) {
d->completeNow = FALSE;
return TRUE;
d->completeNow = false;
return true;
} else if ( ((TQKeyEvent *)event)->key() != Key_End ) {
d->completeNow = TRUE;
d->completeNow = true;
d->completeAt = d->ed->cursorPosition();
}
if ( isAccepted )
@ -866,7 +866,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
else
( (TQKeyEvent*)event )->ignore();
} else if ( event->type() == TQEvent::KeyRelease ) {
d->completeNow = FALSE;
d->completeNow = false;
keyReleaseEvent( (TQKeyEvent *)event );
return ((TQKeyEvent *)event)->isAccepted();
} else if ( event->type() == TQEvent::FocusIn ) {
@ -877,7 +877,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
if ( !d->ed->text().isNull() &&
d->ed->cursorPosition() > d->completeAt &&
d->ed->cursorPosition() == (int)d->ed->text().length() ) {
d->completeNow = FALSE;
d->completeNow = false;
TQString ct( d->ed->text() );
TQListViewItem *i = completionIndex( ct, currentItem() );
if ( i ) {
@ -896,7 +896,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
// tqWarning("!d->mouseWasInsidePopup");
TQPoint pos = e->pos();
if ( d->listView()->rect().contains( pos ) )
d->mouseWasInsidePopup = TRUE;
d->mouseWasInsidePopup = true;
// Check if arrow button should toggle
if ( d->arrowPressed ) {
TQPoint comboPos;
@ -907,20 +907,20 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
arrowRect = TQStyle::visualRect(arrowRect, this);
if ( arrowRect.contains( comboPos ) ) {
if ( !d->arrowDown ) {
d->arrowDown = TRUE;
repaint( FALSE );
d->arrowDown = true;
repaint( false );
}
} else {
if ( d->arrowDown ) {
d->arrowDown = FALSE;
repaint( FALSE );
d->arrowDown = false;
repaint( false );
}
}
}
} else if ((e->state() & ( TQt::RightButton | TQt::LeftButton | TQt::MidButton ) ) == 0 &&
style().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
// tqWarning("event filter:: emu");
TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE );
TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), true );
// if ( mouseW == d->listView()->viewport() ) { //###
if ( mouseW == d->listView()->viewport() ) {
TQListViewItem *sel = d->listView()->itemAt(e->pos());
@ -929,7 +929,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
d->listView()->setCurrentItem(sel);
d->listView()->setSelected(sel, true);
}
return TRUE;
return true;
}
}
@ -940,15 +940,15 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
e->pos(), e->button(), e->state() ) ;
// will hide popup
TQApplication::sendEvent( object, &tmp );
return TRUE;
return true;
} else {
if ( d->mouseWasInsidePopup ) {
popDownListView();
} else {
d->arrowPressed = FALSE;
d->arrowPressed = false;
if ( d->arrowDown ) {
d->arrowDown = FALSE;
repaint( FALSE );
d->arrowDown = false;
repaint( false );
}
}
}
@ -957,12 +957,12 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
case TQEvent::MouseButtonPress:
if ( !d->listView()->rect().contains( e->pos() ) ) {
TQPoint globalPos = d->listView()->mapToGlobal(e->pos());
if ( TQApplication::widgetAt( globalPos, TRUE ) == this ) {
d->discardNextMousePress = TRUE;
if ( TQApplication::widgetAt( globalPos, true ) == this ) {
d->discardNextMousePress = true;
// avoid popping up again
}
popDownListView();
return TRUE;
return true;
}
break;
case TQEvent::KeyPress:
@ -975,13 +975,13 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
case Key_Escape:
if ( d->poppedUp ) {
popDownListView();
return TRUE;
return true;
}
break;
case Key_Enter:
case Key_Return:
// work around TQDialog's enter handling
return FALSE;
return false;
default:
break;
}
@ -1083,11 +1083,11 @@ void QComboView::returnPressed()
return;
TQListViewItem *c = 0;
bool doInsert = TRUE;
bool doInsert = true;
if ( !d->duplicatesEnabled ) {
c = listView()->findItem(s, 0);
if ( c )
doInsert = FALSE;
doInsert = false;
}
if ( doInsert ) {
@ -1211,7 +1211,7 @@ void QComboView::setListView( TQListView * newListView )
delete d->listView();
newListView->reparent( this, WType_Popup, TQPoint(0,0), FALSE );
newListView->reparent( this, WType_Popup, TQPoint(0,0), false );
d->setListView( newListView );
d->listView()->setFont( font() );
d->listView()->setPalette( palette() );
@ -1320,7 +1320,7 @@ void QComboView::setEditText( const TQString &newText )
void QComboView::setAutoCompletion( bool enable )
{
d->useCompletion = enable;
d->completeNow = FALSE;
d->completeNow = false;
}
@ -1431,7 +1431,7 @@ void QComboView::setLineEdit( TQLineEdit *edit )
d->ed = edit;
if ( edit->parent() != this ) {
edit->reparent( this, TQPoint(0,0), FALSE );
edit->reparent( this, TQPoint(0,0), false );
edit->setFont( font() );
}
@ -1439,7 +1439,7 @@ void QComboView::setLineEdit( TQLineEdit *edit )
this, TQ_SIGNAL( textChanged( const TQString& ) ) );
connect( edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(returnPressed()) );
edit->setFrame( FALSE );
edit->setFrame( false );
d->updateLinedGeometry();
edit->installEventFilter( this );
setFocusProxy( edit );

@ -302,7 +302,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin
KTextEditor::CompletionEntry e;
e.text = word;
entries << e;
map[ word ] = TRUE;
map[ word ] = true;
}
idx = pos + len + 1;
}
@ -317,7 +317,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin
KTextEditor::CompletionEntry e;
e.text = word;
entries << e;
map[ word ] = TRUE;
map[ word ] = true;
}
idx = pos + len + 1;
}

@ -409,7 +409,7 @@ void ImportDialog::scanAutomakeProject(const TQString &dirName)
// AC_DEFINE(VERSION, "5.6")
TQRegExp ac_define("^AC_DEFINE\\s*\\(\\s*[^,]+,([^\\)]+)");
TQRegExp version("(\\bversion\\b)");
version.setCaseSensitive(FALSE);
version.setCaseSensitive(false);
TQTextStream cstream;
// try for configure.in.in, configure.in, then configure.ac

@ -22,7 +22,7 @@ TQ_OBJECT
public:
CreateTagFile(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
CreateTagFile(TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~CreateTagFile();
TQString name();
TQString tagsfilePath();

@ -19,7 +19,7 @@ class SelectTagFile : public SelectTagFileBase {
public:
SelectTagFile( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
SelectTagFile( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~SelectTagFile();
TQString name();
TQString tagsfilePath();

@ -31,7 +31,7 @@ class AddCatalogDlg: public AddCatalogDlgBase
TQ_OBJECT
public:
AddCatalogDlg( TQValueList<DocumentationPlugin*> const & plugins, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
AddCatalogDlg( TQValueList<DocumentationPlugin*> const & plugins, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0);
~AddCatalogDlg();
TQString title() const;

@ -76,7 +76,7 @@ DocGlobalConfigWidget::DocGlobalConfigWidget(DocumentationPart *part,
htdigbinEdit->setURL(config->readPathEntry("htdigbin", kapp->dirs()->findExe("htdig")));
htmergebinEdit->setURL(config->readPathEntry("htmergebin", kapp->dirs()->findExe("htmerge")));
htsearchbinEdit->setURL(config->readPathEntry("htsearchbin", kapp->dirs()->findExe("htsearch")));
if (config->readBoolEntry("IsSetup", false) == false)
if (!config->readBoolEntry("IsSetup", false))
{
TQFileInfo fi(htsearchbinEdit->url());
if (!fi.exists())

@ -30,7 +30,7 @@ class EditCatalogDlg : public EditCatalogBase
public:
EditCatalogDlg(DocumentationPlugin *plugin,
TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0);
~EditCatalogDlg();
/*$PUBLIC_FUNCTIONS$*/

@ -31,7 +31,7 @@ class FindDocumentationOptions : public FindDocumentationOptionsBase
TQ_OBJECT
public:
FindDocumentationOptions(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE);
FindDocumentationOptions(TQWidget* parent = 0, const char* name = 0, bool modal = false);
~FindDocumentationOptions();
/*$PUBLIC_FUNCTIONS$*/
virtual bool isContents( TQCheckListItem * item );

@ -143,7 +143,7 @@ void SearchView::search()
{
TDEConfig *config = m_part->config();
config->setGroup("htdig");
if (config->readBoolEntry("IsSetup", false) == false)
if (!config->readBoolEntry("IsSetup", false))
{
KMessageBox::information(this, i18n("Full text search has to be set up before usage."));
if (!m_part->configure(1))

File diff suppressed because it is too large Load Diff

@ -505,7 +505,7 @@ class Config
/*! @} */
/*! Writes a template configuration to stream \a t. If \a shortIndex
* is \c TRUE the description of each configuration option will
* is \c true the description of each configuration option will
* be omitted.
*/
void writeTemplate(TQTextStream &t,bool shortIndex,bool updateOnly);
@ -533,13 +533,13 @@ class Config
void init();
/*! Parse a configuration data in string \a str.
* \returns TRUE if successful, or FALSE if the string could not be
* \returns true if successful, or false if the string could not be
* parsed.
*/
bool parseString(const char *fn,const char *str);
/*! Parse a configuration file with name \a fn.
* \returns TRUE if successful, FALSE if the file could not be
* \returns true if successful, false if the file could not be
* opened or read.
*/
bool parse(const char *fn);
@ -556,9 +556,9 @@ class Config
m_options = new TQPtrList<ConfigOption>;
m_obsolete = new TQPtrList<ConfigOption>;
m_dict = new TQDict<ConfigOption>(257);
m_options->setAutoDelete(TRUE);
m_obsolete->setAutoDelete(TRUE);
m_initialized = FALSE;
m_options->setAutoDelete(true);
m_obsolete->setAutoDelete(true);
m_initialized = false;
create();
}
~Config()

@ -249,10 +249,10 @@ void DoxygenPart::slotDoxygen()
{
// get input files
outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if ( outputDirectory.isEmpty() == false )
if ( !outputDirectory.isEmpty() )
outputDirectory += "/";
htmlDirectory = Config_getString("HTML_OUTPUT");
if ( htmlDirectory.isEmpty() == true )
if ( htmlDirectory.isEmpty() )
htmlDirectory = "html";
htmlDirectory.prepend(outputDirectory);
}

@ -25,7 +25,7 @@
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
AddGlobalDlg::AddGlobalDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )
@ -33,24 +33,24 @@ AddGlobalDlg::AddGlobalDlg( TQWidget* parent, const char* name, bool modal, WFla
{
if ( !name )
setName( "AddGlobalDlg" );
setSizeGripEnabled( TRUE );
setSizeGripEnabled( true );
AddGlobalDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "AddGlobalDlgLayout");
Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
buttonHelp = new KPushButton( this, "buttonHelp" );
buttonHelp->setAutoDefault( TRUE );
buttonHelp->setAutoDefault( true );
Layout1->addWidget( buttonHelp );
TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout1->addItem( spacer );
buttonOk = new KPushButton( this, "buttonOk" );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
buttonOk->setAutoDefault( true );
buttonOk->setDefault( true );
Layout1->addWidget( buttonOk );
buttonCancel = new KPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE );
buttonCancel->setAutoDefault( true );
Layout1->addWidget( buttonCancel );
AddGlobalDlgLayout->addLayout( Layout1, 1, 0 );
@ -62,8 +62,8 @@ AddGlobalDlg::AddGlobalDlg( TQWidget* parent, const char* name, bool modal, WFla
fcglobal_view->addColumn( i18n( "Icon" ) );
fcglobal_view->addColumn( i18n( "Description" ) );
fcglobal_view->setResizePolicy( TQListView::AutoOne );
fcglobal_view->setAllColumnsShowFocus( TRUE );
fcglobal_view->setRootIsDecorated( TRUE );
fcglobal_view->setAllColumnsShowFocus( true );
fcglobal_view->setRootIsDecorated( true );
fcglobal_view->setResizeMode( TQListView::AllColumns );
AddGlobalDlgLayout->addWidget( fcglobal_view, 0, 0 );

@ -26,7 +26,7 @@ class AddGlobalDlg : public TQDialog
public:
AddGlobalDlg( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
AddGlobalDlg( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~AddGlobalDlg();
TQPushButton* buttonHelp;

@ -42,8 +42,8 @@
FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name):
FCConfigWidgetBase(parent, name), m_part(part), m_global(global)
{
fc_view->setSorting(-1, FALSE);
fcglobal_view->setSorting(-1, FALSE);
fc_view->setSorting(-1, false);
fcglobal_view->setSorting(-1, false);
if (m_global)
{

@ -32,7 +32,7 @@ class QuickOpenClassDialog : public QuickOpenDialog
TQ_OBJECT
public:
QuickOpenClassDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
QuickOpenClassDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 );
virtual ~QuickOpenClassDialog();
public slots:

@ -37,7 +37,7 @@ class QuickOpenDialog : public QuickOpenDialogBase
public:
QuickOpenDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
QuickOpenDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 );
virtual ~QuickOpenDialog();
virtual bool eventFilter(TQObject *watched, TQEvent *e);

@ -34,8 +34,8 @@ class QuickOpenFileDialog : public QuickOpenDialog
TQ_OBJECT
public:
QuickOpenFileDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
QuickOpenFileDialog(QuickOpenPart* part, const KURL::List &, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
QuickOpenFileDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 );
QuickOpenFileDialog(QuickOpenPart* part, const KURL::List &, TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 );
virtual ~QuickOpenFileDialog();
public slots:

@ -31,7 +31,7 @@ class QuickOpenFunctionChooseForm : public QuickOpenFunctionChooseFormBase
public:
QuickOpenFunctionChooseForm(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
QuickOpenFunctionChooseForm(TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~QuickOpenFunctionChooseForm();
void setRelativePath(int id, const TQString &path) { m_relPaths[id] = path; }

@ -35,7 +35,7 @@ class QuickOpenFunctionDialog : public QuickOpenDialog
public:
QuickOpenFunctionDialog( QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
QuickOpenFunctionDialog( QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~QuickOpenFunctionDialog();
void gotoFile( TQString name );

@ -12,7 +12,7 @@ class ReplaceDlgImpl : public ReplaceDlg
public:
ReplaceDlgImpl(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
ReplaceDlgImpl(TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~ReplaceDlgImpl();
TQRegExp expressionPattern();

@ -51,7 +51,7 @@ SnippetWidget::SnippetWidget(SnippetPart *part)
m_part( part )
{
// init the TQPtrList
_list.setAutoDelete(TRUE);
_list.setAutoDelete(true);
// init the TDEListView
setSorting( -1 );
@ -226,7 +226,7 @@ void SnippetWidget::slotEdit()
pSnippet->resetParent();
}
setSelected(item, TRUE);
setSelected(item, true);
}
}
@ -248,7 +248,7 @@ void SnippetWidget::slotEditGroup()
dlg.snippetName->setText(pGroup->getName());
dlg.snippetText->setText(pGroup->getText());
dlg.btnAdd->setText(i18n("&Apply"));
dlg.snippetText->setEnabled(FALSE);
dlg.snippetText->setEnabled(false);
dlg.setCaption(i18n("Edit Group"));
dlg.cbGroup->insertItem(i18n("All"));
dlg.cbGroup->insertStringList(m_part->getAllLanguages());
@ -261,7 +261,7 @@ void SnippetWidget::slotEditGroup()
pGroup->setName( dlg.snippetName->text() );
pGroup->setLanguage(dlg.cbGroup->currentText());
setSelected(item, TRUE);
setSelected(item, true);
}
}
@ -452,9 +452,9 @@ void SnippetWidget::initConfig()
kdDebug(9035) << "Created group " << group->getName() << " " << group->getId() << endl;
_list.append(group);
if (group->getLanguage() == i18n("All"))
group->setOpen(TRUE);
group->setOpen(true);
else
group->setOpen(FALSE); //groups assigned to certain languages get handled later
group->setOpen(false); //groups assigned to certain languages get handled later
}
}
@ -694,7 +694,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ
continue;
cb = new TQCheckBox( &dlg, "cbVar" );
cb->setChecked( FALSE );
cb->setChecked( false );
cb->setText(it.key());
layoutVar->addWidget( cb, i ,0, TQt::AlignTop );
@ -702,7 +702,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ
layoutVar->addWidget( te, i, 1, TQt::AlignTop );
if ((*mapSave)[it.key()].length() > 0) {
cb->setChecked( TRUE );
cb->setChecked( true );
te->setText((*mapSave)[it.key()]);
}
@ -726,7 +726,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ
KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" );
btn2->setText(i18n("&Apply"));
btn2->setDefault( TRUE );
btn2->setDefault( true );
btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0,
btn2->sizePolicy().hasHeightForWidth() ) );
layoutBtn->addWidget( btn2, 0, 1 );
@ -816,14 +816,14 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri
cb = new TQCheckBox( &dlg, "cbVar" );
cb->setChecked( FALSE );
cb->setChecked( false );
cb->setText(i18n( "Make value &default" ));
te = new KTextEdit( &dlg, "teVar" );
layoutVar->addWidget( te, 0, 1, TQt::AlignTop);
layoutVar->addWidget( cb, 1, 1, TQt::AlignTop);
if ((*mapSave)[var].length() > 0) {
cb->setChecked( TRUE );
cb->setChecked( true );
te->setText((*mapSave)[var]);
}
@ -840,7 +840,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri
KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" );
btn2->setText(i18n("&Apply"));
btn2->setDefault( TRUE );
btn2->setDefault( true );
layoutBtn->addWidget( btn2, 0, 1 );
layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 );
@ -896,12 +896,12 @@ bool SnippetWidget::acceptDrag (TQDropEvent *event) const
if (item &&
TQString(event->format()).startsWith("text/plain") &&
static_cast<SnippetWidget *>(event->source()) != this) {
kdDebug(9035) << "returning TRUE " << endl;
return TRUE;
kdDebug(9035) << "returning true " << endl;
return true;
} else {
kdDebug(9035) << "returning FALSE" << endl;
event->acceptAction(FALSE);
return FALSE;
kdDebug(9035) << "returning false" << endl;
event->acceptAction(false);
return false;
}
}
@ -959,9 +959,9 @@ void SnippetWidget::languageChanged()
SnippetGroup * group = dynamic_cast<SnippetGroup*>(it);
if (group) {
if (group->getLanguage() == i18n("All") || langs.contains(group->getLanguage())) {
group->setOpen(TRUE);
group->setOpen(true);
} else {
group->setOpen(FALSE);
group->setOpen(false);
}
}
}

@ -117,7 +117,7 @@ void GeneralInfoWidget::configureinUpdateVersion( TQString configureinpath, TQSt
// AC_DEFINE(VERSION, "5.6")
TQRegExp ac_define("^AC_DEFINE\\s*\\(");
TQRegExp version("(\\bversion\\b)");
version.setCaseSensitive(FALSE);
version.setCaseSensitive(false);
while ( !stream.eof() ) {
TQString line = stream.readLine();

@ -23,7 +23,7 @@ class PluginSelectDialog : public PluginSelectDialogBase
public:
PluginSelectDialog( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
PluginSelectDialog( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~PluginSelectDialog();
TQStringList unselectedPluginNames();

@ -32,7 +32,7 @@ class KDevStatusBar : public KStatusBar
public:
KDevStatusBar( TQWidget *parent=0, const char *name=0 );
~KDevStatusBar();
void addWidget ( TQWidget *widget, int stretch = 0, bool permanent = FALSE );
void addWidget ( TQWidget *widget, int stretch = 0, bool permanent = false );
private slots:
void cursorPositionChanged();

@ -125,7 +125,7 @@ void ClearcasePart::slotCheckin()
dir = fi.dirPath();
name = fi.fileName();
CcaseCommentDlg dlg(FALSE);
CcaseCommentDlg dlg(false);
if (dlg.exec() == TQDialog::Rejected)
return;
@ -156,7 +156,7 @@ void ClearcasePart::slotCheckout()
dir = fi.dirPath();
name = fi.fileName();
CcaseCommentDlg dlg(TRUE);
CcaseCommentDlg dlg(true);
if (dlg.exec() == TQDialog::Rejected)
return;

@ -21,9 +21,9 @@ class CcaseCommentDlg : public TQDialog
TQ_OBJECT
public:
CcaseCommentDlg(bool = FALSE);
CcaseCommentDlg(bool = false);
TQString logMessage() { return _edit->text(); };
bool isReserved() { return (_check) ? _check->isChecked() : FALSE; };
bool isReserved() { return (_check) ? _check->isChecked() : false; };
private:
TQMultiLineEdit *_edit;

@ -25,7 +25,7 @@
#include <cvsservice_stub.h>
EditorsDialog::EditorsDialog(CvsService_stub *cvsService, TQWidget *parent, const char *name)
: DCOPObject( "CvsEditorsDCOPIface"), EditorsDialogBase(parent, name, TRUE, TQt::WDestructiveClose),
: DCOPObject( "CvsEditorsDCOPIface"), EditorsDialogBase(parent, name, true, TQt::WDestructiveClose),
m_cvsService(cvsService), m_cvsJob(0)
{
}

@ -34,7 +34,7 @@ subversionWidget::subversionWidget( subversionPart *part, TQWidget *parent, cons
{
m_part = part;
m_edit = new KTextEdit( this );
m_edit->setReadOnly( TRUE );
m_edit->setReadOnly( true );
tab()->addTab( m_edit, i18n("Notification") );
m_closeButton = new TQPushButton( tab() );
m_closeButton->setText( i18n("Close") );

@ -31,7 +31,7 @@ SvnBlameWidget::SvnBlameWidget( TQWidget *parent, const char* name, bool modal,
m_layout->setMargin(1);
m_listView = new TQListView( this );
outView()->setAllColumnsShowFocus( TRUE );
outView()->setAllColumnsShowFocus( true );
outView()->addColumn( i18n("Line") );
outView()->addColumn( i18n("Rev") );
outView()->addColumn( i18n("Date") );

@ -42,7 +42,7 @@ class SvnBlameWidget : public TQWidget {
TQ_OBJECT
public:
SvnBlameWidget( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 );
SvnBlameWidget( TQWidget * parent = 0, const char * name = 0, bool modal = false, WFlags f = 0 );
virtual ~SvnBlameWidget();
void copyBlameData( TQValueList<SvnBlameHolder> *blamelist );
void show();

@ -60,7 +60,7 @@ SVNFileSelectDlgCommit::SVNFileSelectDlgCommit( KURL::List &urls, subversionPart
if (fileInfo.isFile()){
KURL base_url( part->project()->projectDirectory()+"/" );
TQString dirPath = KURL::relativeURL( base_url, fileInfo.dirPath(TRUE) );
TQString dirPath = KURL::relativeURL( base_url, fileInfo.dirPath(true) );
vcsMap = ((SVNFileInfoProvider*)part->fileInfoProvider()) ->
statusExt(dirPath, false/*repository access*/, true/*recurse*/, false/*getall*/, true/*noIgnore*/);
vcsInfo = (*vcsMap)[fileInfo.fileName()];

@ -56,8 +56,8 @@ SvnLogViewWidget::SvnLogViewWidget(subversionPart *part, TQWidget *parent)
TQFont listView1_font( listView1->font() );
listView1_font.setPointSize( 9 );
listView1->setFont( listView1_font );
listView1->setAllColumnsShowFocus( TRUE );
listView1->setShowSortIndicator( TRUE );
listView1->setAllColumnsShowFocus( true );
listView1->setShowSortIndicator( true );
textEdit1 = new KTextEdit( splitter1, "textEdit1" );
textEdit1->resize( TQSize(1, 1).expandedTo(minimumSizeHint()) );
@ -65,7 +65,7 @@ SvnLogViewWidget::SvnLogViewWidget(subversionPart *part, TQWidget *parent)
textEdit1_font.setPointSize( 9 );
textEdit1->setFont( textEdit1_font );
textEdit1->setFocusPolicy( TQWidget::WheelFocus );
textEdit1->setReadOnly( TRUE );
textEdit1->setReadOnly( true );
m_layout->addWidget( splitter1, 0, 0 );
m_layout->setMargin(1);

@ -76,7 +76,7 @@ class SvnLogViewOptionDlg : public SvnLogViewOptionDlgBase {
TQ_OBJECT
public:
SvnLogViewOptionDlg(TQWidget *parent=0, const char* name=0, bool modal=TRUE, WFlags f=0);
SvnLogViewOptionDlg(TQWidget *parent=0, const char* name=0, bool modal=true, WFlags f=0);
~SvnLogViewOptionDlg();
int revstart();
TQString revKindStart();

@ -100,7 +100,7 @@ open_tmp_file (apr_file_t **fp,
/* Open a unique file; use APR_DELONCLOSE. */
SVN_ERR (svn_io_open_unique_file (fp, &ignored_filename,
truepath, ".tmp", TRUE, pool));
truepath, ".tmp", true, pool));
return SVN_NO_ERROR;
}
@ -135,7 +135,7 @@ apr_array_header_t* svn_sort__hash(apr_hash_t *ht,
ary = apr_array_make(pool, apr_hash_count(ht), sizeof(svn_sort_item_type));
/* loop over hash table and push all keys into the array */
sorted = TRUE;
sorted = true;
prev_item = NULL;
for (hi = apr_hash_first(pool, ht); hi; hi = apr_hash_next(hi))
{
@ -251,13 +251,13 @@ void tdeio_svnProtocol::initNotifier(bool is_checkout, bool is_export, bool supp
ctx->notify_func = tdeio_svnProtocol::notify;
struct notify_baton *nb = ( struct notify_baton* )apr_palloc(spool, sizeof( struct notify_baton ) );
nb->master = this;
nb->received_some_change = FALSE;
nb->sent_first_txdelta = FALSE;
nb->received_some_change = false;
nb->sent_first_txdelta = false;
nb->is_checkout = is_checkout;
nb->is_export = is_export;
nb->suppress_final_line = suppress_final_line;
nb->in_external = FALSE;
nb->had_print_error = FALSE;
nb->in_external = false;
nb->had_print_error = false;
nb->pool = svn_pool_create (spool);
ctx->notify_baton = nb;
@ -1185,7 +1185,7 @@ void tdeio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, i
<< endl ;
apr_pool_t *subpool = svn_pool_create (pool);
apr_array_header_t *options = svn_cstring_split( "", "\t\r\n", TRUE, subpool );
apr_array_header_t *options = svn_cstring_split( "", "\t\r\n", true, subpool );
// KURL nurl1 = url1;
// KURL nurl2 = url2;
@ -1959,7 +1959,7 @@ void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_acti
userstring = i18n( "Copied %1 " ).arg( path );
break;
case svn_wc_notify_delete: //delete
nb->received_some_change = TRUE;
nb->received_some_change = true;
userstring = i18n( "D %1" ).arg( path );
break;
case svn_wc_notify_restore : //restore
@ -1981,11 +1981,11 @@ void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_acti
userstring=i18n("Skipped %1.").arg( path );
break;
case svn_wc_notify_update_delete: //update_delete
nb->received_some_change = TRUE;
nb->received_some_change = true;
userstring=i18n( "D %1" ).arg( path );
break;
case svn_wc_notify_update_add: //update_add
nb->received_some_change = TRUE;
nb->received_some_change = true;
userstring=i18n( "A %1" ).arg( path );
break;
case svn_wc_notify_update_update: //update_update
@ -1997,7 +1997,7 @@ void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_acti
&& ((prop_state == svn_wc_notify_state_inapplicable)
|| (prop_state == svn_wc_notify_state_unknown)
|| (prop_state == svn_wc_notify_state_unchanged)))) {
nb->received_some_change = TRUE;
nb->received_some_change = true;
if (kind == svn_node_file) {
if (content_state == svn_wc_notify_state_conflicted)
@ -2073,10 +2073,10 @@ void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_acti
}
}
if (nb->in_external)
nb->in_external = FALSE;
nb->in_external = false;
break;
case svn_wc_notify_update_external: //update_external
nb->in_external = TRUE;
nb->in_external = true;
userstring = i18n("Fetching external item into %1." ).arg( path );
break;
case svn_wc_notify_status_completed: //status_completed
@ -2104,7 +2104,7 @@ void tdeio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_acti
break;
case svn_wc_notify_commit_postfix_txdelta: //commit_postfix_txdelta
if (! nb->sent_first_txdelta) {
nb->sent_first_txdelta = TRUE;
nb->sent_first_txdelta = true;
userstring=i18n("Transmitting file data ");
} else {
userstring=".";

Loading…
Cancel
Save