summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/customwidgeteditorimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/customwidgeteditorimpl.cpp')
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp208
1 files changed, 104 insertions, 104 deletions
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
index dc0ed1a8..99fa00fd 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.cpp
+++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp
@@ -36,32 +36,32 @@
#include <kfiledialog.h>
#include <klineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qtextcodec.h>
-#include <qcheckbox.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqfiledialog.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqlistview.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqtextcodec.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
+CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
: CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw )
{
- connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
- checkTimer = new QTimer( this );
- connect( checkTimer, SIGNAL( timeout() ),
- this, SLOT( checkWidgetName() ) );
+ connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ checkTimer = new TQTimer( this );
+ connect( checkTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( checkWidgetName() ) );
editClass->setEnabled( FALSE );
editHeader->setEnabled( FALSE );
@@ -73,7 +73,7 @@ CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
sizeVer->setEnabled( FALSE );
checkContainer->setEnabled( FALSE );
localGlobalCombo->setEnabled( FALSE );
- editClass->setValidator( new AsciiValidator( QString(":"), editClass ) );
+ editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) );
editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) );
editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) );
editProperty->setValidator( new AsciiValidator( editSignal ) );
@@ -88,13 +88,13 @@ CustomWidgetEditor::CustomWidgetEditor( QWidget *parent, MainWindow *mw )
void CustomWidgetEditor::setupDefinition()
{
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- QListBoxItem *i;
+ TQListBoxItem *i;
if ( w->pixmap )
- i = new QListBoxPixmap( boxWidgets, *w->pixmap, w->className );
+ i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className );
else
- i = new QListBoxText( boxWidgets, w->className );
+ i = new TQListBoxText( boxWidgets, w->className );
customWidgets.insert( i, w );
}
@@ -113,8 +113,8 @@ void CustomWidgetEditor::setupSignals()
if ( !w )
return;
listSignals->clear();
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
- listSignals->insertItem( QString( *it ) );
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ listSignals->insertItem( TQString( *it ) );
if ( listSignals->firstItem() ) {
listSignals->setCurrentItem( listSignals->firstItem() );
listSignals->setSelected( listSignals->firstItem(), TRUE );
@@ -131,8 +131,8 @@ void CustomWidgetEditor::setupSlots()
if ( !w )
return;
listSlots->clear();
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
- (void)new QListViewItem( listSlots, (*it).function, (*it).access );
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ (void)new TQListViewItem( listSlots, (*it).function, (*it).access );
if ( listSlots->firstChild() ) {
listSlots->setCurrentItem( listSlots->firstChild() );
@@ -150,8 +150,8 @@ void CustomWidgetEditor::setupProperties()
if ( !w )
return;
listProperties->clear();
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
- (void)new QListViewItem( listProperties, (*it).property, (*it).type );
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ (void)new TQListViewItem( listProperties, (*it).property, (*it).type );
if ( listProperties->firstChild() ) {
listProperties->setCurrentItem( listProperties->firstChild() );
@@ -159,7 +159,7 @@ void CustomWidgetEditor::setupProperties()
}
}
-void CustomWidgetEditor::currentWidgetChanged( QListBoxItem *i )
+void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
{
checkTimer->stop();
checkWidgetName();
@@ -217,25 +217,25 @@ void CustomWidgetEditor::addWidgetClicked()
checkWidgetName();
MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget;
- QString s = w->className;
+ TQString s = w->className;
if ( !MetaDataBase::addCustomWidget( w ) ) {
- QMessageBox::information( this, i18n( "Adding Custom Widget" ),
+ 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 ) );
return;
}
- QListBoxPixmap *i = new QListBoxPixmap( boxWidgets, *w->pixmap, w->className );
+ TQListBoxPixmap *i = new TQListBoxPixmap( boxWidgets, *w->pixmap, w->className );
customWidgets.insert( i, w );
boxWidgets->setCurrentItem( i );
boxWidgets->setSelected( i, TRUE );
}
-void CustomWidgetEditor::classNameChanged( const QString &s )
+void CustomWidgetEditor::classNameChanged( const TQString &s )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -246,7 +246,7 @@ void CustomWidgetEditor::classNameChanged( const QString &s )
boxWidgets->blockSignals( TRUE );
oldName = w->className;
w->className = s;
- QListBoxItem *old = i;
+ TQListBoxItem *old = i;
if ( w->pixmap )
boxWidgets->changeItem( *w->pixmap, s, boxWidgets->currentItem() );
else
@@ -265,11 +265,11 @@ void CustomWidgetEditor::deleteWidgetClicked()
checkTimer->stop();
checkWidgetName();
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( mainWindow->isCustomWidgetUsed( w ) ) {
- QMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ),
+ TQMessageBox::information( mainWindow, i18n( "Removing Custom Widget" ),
i18n( "The custom widget '%1' is in use, so it cannot be removed." ).
arg( w->className ) );
return;
@@ -293,9 +293,9 @@ void CustomWidgetEditor::deleteWidgetClicked()
}
}
-void CustomWidgetEditor::headerFileChanged( const QString &s )
+void CustomWidgetEditor::headerFileChanged( const TQString &s )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -305,7 +305,7 @@ void CustomWidgetEditor::headerFileChanged( const QString &s )
void CustomWidgetEditor::heightChanged( int h )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -316,7 +316,7 @@ void CustomWidgetEditor::heightChanged( int h )
void CustomWidgetEditor::includePolicyChanged( int p )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -326,19 +326,19 @@ void CustomWidgetEditor::includePolicyChanged( int p )
void CustomWidgetEditor::pixmapChoosen()
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QPixmap pix = qChoosePixmap( this );
+ TQPixmap pix = qChoosePixmap( this );
if ( pix.isNull() )
return;
delete w->pixmap;
- w->pixmap = new QPixmap( pix );
+ w->pixmap = new TQPixmap( pix );
boxWidgets->blockSignals( TRUE );
- QListBoxItem *old = i;
+ TQListBoxItem *old = i;
boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() );
i = boxWidgets->item( boxWidgets->currentItem() );
customWidgets.insert( i, w );
@@ -349,7 +349,7 @@ void CustomWidgetEditor::pixmapChoosen()
void CustomWidgetEditor::widthChanged( int wid )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
@@ -358,12 +358,12 @@ void CustomWidgetEditor::widthChanged( int wid )
updateCustomWidgetSizes();
}
-MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( QListBoxItem *i )
+MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i )
{
if ( !i )
return 0;
- QMap<QListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
+ TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
if ( it == customWidgets.end() )
return 0;
return *it;
@@ -371,12 +371,12 @@ MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( QListBoxItem *i )
void CustomWidgetEditor::chooseHeader()
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QString h = KFileDialog::getOpenFileName( QString::null, i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
+ TQString h = KFileDialog::getOpenFileName( TQString::null, i18n( "*.h *.h++ *.hxx *.hh|Header Files" ), this );
if ( h.isEmpty() )
return;
editHeader->setText( h );
@@ -385,16 +385,16 @@ void CustomWidgetEditor::chooseHeader()
void CustomWidgetEditor::checkWidgetName()
{
- QListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
oldItem = 0;
if ( !i || !w )
return;
if ( MetaDataBase::isWidgetNameUsed( w ) ) {
- QString s = w->className;
+ TQString s = w->className;
w->className = oldName;
- QMessageBox::information( this, i18n( "Renaming Custom Widget" ),
+ 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 ) );
@@ -415,7 +415,7 @@ void CustomWidgetEditor::closeClicked()
accept();
}
-void CustomWidgetEditor::currentSignalChanged( QListBoxItem *i )
+void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i )
{
editSignal->blockSignals( TRUE );
editSignal->setText( "" );
@@ -436,7 +436,7 @@ void CustomWidgetEditor::currentSignalChanged( QListBoxItem *i )
void CustomWidgetEditor::addSignal()
{
- QListBoxItem *i = new QListBoxText( listSignals, "signal()" );
+ TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" );
listSignals->setCurrentItem( i );
listSignals->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -446,7 +446,7 @@ void CustomWidgetEditor::addSignal()
void CustomWidgetEditor::removeSignal()
{
- QString s = listSignals->currentText();
+ TQString s = listSignals->currentText();
delete listSignals->item( listSignals->currentItem() );
if ( listSignals->currentItem() != -1 )
listSignals->setSelected( listSignals->currentItem(), TRUE );
@@ -455,13 +455,13 @@ void CustomWidgetEditor::removeSignal()
w->lstSignals.remove( s.latin1() );
}
-void CustomWidgetEditor::signalNameChanged( const QString &s )
+void CustomWidgetEditor::signalNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || listSignals->currentItem() == -1 )
return;
- QValueList<QCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
+ TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
if ( it != w->lstSignals.end() )
w->lstSignals.remove( it );
listSignals->blockSignals( TRUE );
@@ -470,7 +470,7 @@ void CustomWidgetEditor::signalNameChanged( const QString &s )
w->lstSignals.append( s.latin1() );
}
-void CustomWidgetEditor::slotAccessChanged( const QString &s )
+void CustomWidgetEditor::slotAccessChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listSlots->currentItem() )
@@ -479,7 +479,7 @@ void CustomWidgetEditor::slotAccessChanged( const QString &s )
MetaDataBase::Function slot;
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
- QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 1, s );
@@ -488,7 +488,7 @@ void CustomWidgetEditor::slotAccessChanged( const QString &s )
w->lstSlots.append( slot );
}
-void CustomWidgetEditor::slotNameChanged( const QString &s )
+void CustomWidgetEditor::slotNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listSlots->currentItem() )
@@ -498,7 +498,7 @@ void CustomWidgetEditor::slotNameChanged( const QString &s )
slot.function = listSlots->currentItem()->text( 0 );
slot.access = listSlots->currentItem()->text( 1 );
slot.type = "slot";
- QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
+ TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.find( slot );
if ( it != w->lstSlots.end() )
w->lstSlots.remove( it );
listSlots->currentItem()->setText( 0, s );
@@ -509,7 +509,7 @@ void CustomWidgetEditor::slotNameChanged( const QString &s )
void CustomWidgetEditor::addSlot()
{
- QListViewItem *i = new QListViewItem( listSlots, "slot()", "public" );
+ TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" );
listSlots->setCurrentItem( i );
listSlots->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -538,7 +538,7 @@ void CustomWidgetEditor::removeSlot()
w->lstSlots.remove( slot );
}
-void CustomWidgetEditor::currentSlotChanged( QListViewItem *i )
+void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i )
{
editSlot->blockSignals( TRUE );
editSlot->setText( "" );
@@ -565,7 +565,7 @@ void CustomWidgetEditor::currentSlotChanged( QListViewItem *i )
comboAccess->blockSignals( FALSE );
}
-void CustomWidgetEditor::propertyTypeChanged( const QString &s )
+void CustomWidgetEditor::propertyTypeChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listProperties->currentItem() )
@@ -574,7 +574,7 @@ void CustomWidgetEditor::propertyTypeChanged( const QString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 1, s );
@@ -583,7 +583,7 @@ void CustomWidgetEditor::propertyTypeChanged( const QString &s )
w->lstProperties.append( property );
}
-void CustomWidgetEditor::propertyNameChanged( const QString &s )
+void CustomWidgetEditor::propertyNameChanged( const TQString &s )
{
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w || !listProperties->currentItem() )
@@ -592,7 +592,7 @@ void CustomWidgetEditor::propertyNameChanged( const QString &s )
MetaDataBase::Property property;
property.property = listProperties->currentItem()->text( 0 );
property.type = listProperties->currentItem()->text( 1 );
- QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
+ TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.find( property );
if ( it != w->lstProperties.end() )
w->lstProperties.remove( it );
listProperties->currentItem()->setText( 0, s );
@@ -603,7 +603,7 @@ void CustomWidgetEditor::propertyNameChanged( const QString &s )
void CustomWidgetEditor::addProperty()
{
- QListViewItem *i = new QListViewItem( listProperties, "property", "String" );
+ TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" );
listProperties->setCurrentItem( i );
listProperties->setSelected( i, TRUE );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
@@ -631,7 +631,7 @@ void CustomWidgetEditor::removeProperty()
w->lstProperties.remove( property );
}
-void CustomWidgetEditor::currentPropertyChanged( QListViewItem *i )
+void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
{
editProperty->blockSignals( TRUE );
editProperty->setText( "" );
@@ -661,16 +661,16 @@ void CustomWidgetEditor::currentPropertyChanged( QListViewItem *i )
comboType->blockSignals( FALSE );
}
-static QString makeIndent2( int indent )
+static TQString makeIndent2( int indent )
{
- QString s;
+ TQString s;
s.fill( ' ', indent * 4 );
return s;
}
-static QString entitize2( const QString &s )
+static TQString entitize2( const TQString &s )
{
- QString s2 = s;
+ TQString s2 = s;
s2 = s2.replace( "\"", "&quot;" );
s2 = s2.replace( "&", "&amp;" );
s2 = s2.replace( ">", "&gt;" );
@@ -681,18 +681,18 @@ static QString entitize2( const QString &s )
void CustomWidgetEditor::saveDescription()
{
- QString fn = KFileDialog::getSaveFileName( QString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getSaveFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
- if ( QFileInfo( fn ).extension() != "cw" )
+ if ( TQFileInfo( fn ).extension() != "cw" )
fn += ".cw";
- QFile f( fn );
+ TQFile f( fn );
if ( !f.open( IO_WriteOnly ) )
return;
- QTextStream ts( &f );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( &f );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
int indent = 0;
ts << "<!DOCTYPE CW><CW>" << endl;
@@ -700,7 +700,7 @@ void CustomWidgetEditor::saveDescription()
ts << makeIndent2( indent ) << "<customwidgets>" << endl;
indent++;
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
ts << makeIndent2( indent ) << "<customwidget>" << endl;
indent++;
@@ -727,15 +727,15 @@ void CustomWidgetEditor::saveDescription()
indent--;
ts << makeIndent2( indent ) << "</pixmap>" << endl;
if ( !w->lstSignals.isEmpty() ) {
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
ts << makeIndent2( indent ) << "<signal>" << entitize2( *it ) << "</signal>" << endl;
}
if ( !w->lstSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent2( indent ) << "<slot access=\"" << (*it).access << "\">" << entitize2( (*it).function ) << "</slot>" << endl;
}
if ( !w->lstProperties.isEmpty() ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
ts << makeIndent2( indent ) << "<property type=\"" << (*it).type << "\">" << entitize2( (*it).property ) << "</property>" << endl;
}
indent--;
@@ -749,23 +749,23 @@ void CustomWidgetEditor::saveDescription()
void CustomWidgetEditor::loadDescription()
{
- QString fn = KFileDialog::getOpenFileName( QString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
+ TQString fn = KFileDialog::getOpenFileName( TQString::null, i18n( "*.cw|Custom-Widget Description\n*|All Files" ), this );
if ( fn.isEmpty() )
return;
- QFile f( fn );
+ TQFile f( fn );
if ( !f.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &f, &errMsg, &errLine ) ) {
- qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine );
+ qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
return;
}
- QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement();
while ( firstWidget.tagName() != "customwidgets" )
firstWidget = firstWidget.nextSibling().toElement();
@@ -782,23 +782,23 @@ void CustomWidgetEditor::updateCustomWidgetSizes()
{
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() )
- ( (QWidget*)o )->updateGeometry();
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() )
+ ( (TQWidget*)o )->updateGeometry();
}
void CustomWidgetEditor::horDataChanged( int a )
{
- QSizePolicy::SizeType st = int_to_size_type( a );
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQSizePolicy::SizeType st = int_to_size_type( a );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QSizePolicy osp = w->sizePolicy;
+ TQSizePolicy osp = w->sizePolicy;
w->sizePolicy.setHorData( st );
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() ) {
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) {
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
@@ -809,17 +809,17 @@ void CustomWidgetEditor::horDataChanged( int a )
void CustomWidgetEditor::verDataChanged( int a )
{
- QSizePolicy::SizeType st = int_to_size_type( a );
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQSizePolicy::SizeType st = int_to_size_type( a );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;
- QSizePolicy osp = w->sizePolicy;
+ TQSizePolicy osp = w->sizePolicy;
w->sizePolicy.setVerData( st );
if ( cwLst.isEmpty() )
cwLst = *mainWindow->queryList( "CustomWidget" );
- for ( QObject *o = cwLst.first(); o; o = cwLst.next() ) {
+ for ( TQObject *o = cwLst.first(); o; o = cwLst.next() ) {
CustomWidget *cw = (CustomWidget*)o;
if ( cw->realClassName() == boxWidgets->currentText() ) {
if ( cw->sizePolicy() == osp )
@@ -830,7 +830,7 @@ void CustomWidgetEditor::verDataChanged( int a )
void CustomWidgetEditor::widgetIsContainer( bool b )
{
- QListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
+ TQListBoxItem *i = boxWidgets->item( boxWidgets->currentItem() );
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w )
return;