summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/customwidgeteditorimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /kdevdesigner/designer/customwidgeteditorimpl.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/customwidgeteditorimpl.cpp')
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
index 99fa00fd..3a1437ab 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.cpp
+++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
@@ -55,8 +55,8 @@
#include <klocale.h>
-CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
- : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw )
+CustomWidgetEditor::CustomWidgetEditor( TQWidget *tqparent, MainWindow *mw )
+ : CustomWidgetEditorBase( tqparent, 0, TRUE ), mainWindow( mw )
{
connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
checkTimer = new TQTimer( this );
@@ -73,10 +73,10 @@ CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
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 ) );
- editProperty->setValidator( new AsciiValidator( editSignal ) );
+ editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) );
+ editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) );
+ editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) );
+ editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) );
editSignal->setEnabled( FALSE );
buttonRemoveSignal->setEnabled( FALSE );
@@ -199,8 +199,8 @@ void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
previewPixmap->setPixmap( *w->pixmap );
else
previewPixmap->setText( "" );
- spinWidth->setValue( w->sizeHint.width() );
- spinHeight->setValue( w->sizeHint.height() );
+ spinWidth->setValue( w->tqsizeHint.width() );
+ spinHeight->setValue( w->tqsizeHint.height() );
sizeHor->setCurrentItem( size_type_to_int( w->sizePolicy.horData() ) );
sizeVer->setCurrentItem( size_type_to_int( w->sizePolicy.verData() ) );
checkContainer->setChecked( w->isContainer );
@@ -222,7 +222,7 @@ void CustomWidgetEditor::addWidgetClicked()
TQMessageBox::information( this, i18n( "Adding Custom Widget" ),
i18n( "Custom widget names must be unique.\n"
"A custom widget called '%1' already exists, so it is not possible "
- "to add another widget with this name." ).arg( s ) );
+ "to add another widget with this name." ).tqarg( s ) );
return;
}
@@ -310,7 +310,7 @@ void CustomWidgetEditor::heightChanged( int h )
if ( !i || !w )
return;
- w->sizeHint.setHeight( h );
+ w->tqsizeHint.setHeight( h );
updateCustomWidgetSizes();
}
@@ -354,7 +354,7 @@ void CustomWidgetEditor::widthChanged( int wid )
if ( !i || !w )
return;
- w->sizeHint.setWidth( wid );
+ w->tqsizeHint.setWidth( wid );
updateCustomWidgetSizes();
}
@@ -363,7 +363,7 @@ MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i )
if ( !i )
return 0;
- TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
+ TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.tqfind( i );
if ( it == customWidgets.end() )
return 0;
return *it;
@@ -376,7 +376,7 @@ void CustomWidgetEditor::chooseHeader()
if ( !i || !w )
return;
- TQString h = KFileDialog::getOpenFileName( TQString::null, i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
+ TQString h = KFileDialog::getOpenFileName( TQString(), i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
if ( h.isEmpty() )
return;
editHeader->setText( h );
@@ -397,10 +397,10 @@ void CustomWidgetEditor::checkWidgetName()
TQMessageBox::information( this, i18n( "Renaming Custom Widget" ),
i18n( "Custom widget names must be unique.\n"
"A custom widget called '%1' already exists, so it is not possible "
- "to rename this widget with this name." ).arg( s ) );
+ "to rename this widget with this name." ).tqarg( s ) );
if ( i != boxWidgets->item( boxWidgets->currentItem() ) ) {
boxWidgets->setCurrentItem( i );
- qApp->processEvents();
+ tqApp->processEvents();
}
editClass->setText( w->className );
classNameChanged( w->className );
@@ -461,7 +461,7 @@ void CustomWidgetEditor::signalNameChanged( const TQString &s )
if ( !w || listSignals->currentItem() == -1 )
return;
- TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
+ TQValueList<TQCString>::Iterator it = w->lstSignals.tqfind( listSignals->currentText().latin1() );
if ( it != w->lstSignals.end() )
w->lstSignals.remove( it );
listSignals->blockSignals( TRUE );
@@ -479,7 +479,7 @@ void CustomWidgetEditor::slotAccessChanged( const TQString &s )
MetaDataBase::Function slot;
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
- TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.tqfind( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 1, s );
@@ -498,7 +498,7 @@ void CustomWidgetEditor::slotNameChanged( const TQString &s )
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
slot.type = "slot";
- TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.tqfind( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 0, s );
@@ -574,7 +574,7 @@ void CustomWidgetEditor::propertyTypeChanged( const TQString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.tqfind( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 1, s );
@@ -592,7 +592,7 @@ void CustomWidgetEditor::propertyNameChanged( const TQString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.tqfind( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 0, s );
@@ -671,17 +671,17 @@ static TQString makeIndent2( int indent )
static TQString entitize2( const TQString &s )
{
TQString s2 = s;
- s2 = s2.replace( "\"", "&quot;" );
- s2 = s2.replace( "&", "&amp;" );
- s2 = s2.replace( ">", "&gt;" );
- s2 = s2.replace( "<", "&lt;" );
- s2 = s2.replace( "'", "&apos;" );
+ s2 = s2.tqreplace( "\"", "&quot;" );
+ s2 = s2.tqreplace( "&", "&amp;" );
+ s2 = s2.tqreplace( ">", "&gt;" );
+ s2 = s2.tqreplace( "<", "&lt;" );
+ s2 = s2.tqreplace( "'", "&apos;" );
return s2;
}
void CustomWidgetEditor::saveDescription()
{
- TQString fn = KFileDialog::getSaveFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getSaveFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
@@ -710,8 +710,8 @@ void CustomWidgetEditor::saveDescription()
<< "\">" << w->includeFile << "</header>" << endl;
ts << makeIndent2( indent ) << "<sizehint>" << endl;
indent++;
- ts << makeIndent2( indent ) << "<width>" << w->sizeHint.width() << "</width>" << endl;
- ts << makeIndent2( indent ) << "<height>" << w->sizeHint.height() << "</height>" << endl;
+ ts << makeIndent2( indent ) << "<width>" << w->tqsizeHint.width() << "</width>" << endl;
+ ts << makeIndent2( indent ) << "<height>" << w->tqsizeHint.height() << "</height>" << endl;
indent--;
ts << makeIndent2( indent ) << "</sizehint>" << endl;
ts << makeIndent2( indent ) << "<container>" << (int)w->isContainer << "</container>" << endl;
@@ -749,7 +749,7 @@ void CustomWidgetEditor::saveDescription()
void CustomWidgetEditor::loadDescription()
{
- TQString fn = KFileDialog::getOpenFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getOpenFileName( TQString(), i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
@@ -802,7 +802,7 @@ void CustomWidgetEditor::horDataChanged( int a )
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
- cw->setSizePolicy( w->sizePolicy );
+ cw->tqsetSizePolicy( w->sizePolicy );
}
}
}
@@ -823,7 +823,7 @@ void CustomWidgetEditor::verDataChanged( int a )
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
- cw->setSizePolicy( w->sizePolicy );
+ cw->tqsetSizePolicy( w->sizePolicy );
}
}
}