summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/designerappiface.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/designerappiface.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/designerappiface.cpp')
-rw-r--r--kdevdesigner/designer/designerappiface.cpp152
1 files changed, 76 insertions, 76 deletions
diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp
index dca4bbd8..5c7fa739 100644
--- a/kdevdesigner/designer/designerappiface.cpp
+++ b/kdevdesigner/designer/designerappiface.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.
@@ -51,21 +51,21 @@ DesignerInterfaceImpl::DesignerInterfaceImpl( MainWindow *mw )
{
}
-QRESULT DesignerInterfaceImpl::queryInterface( const QUuid &uuid, QUnknownInterface** iface )
+TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface )
{
*iface = 0;
- if ( uuid == IID_QUnknown )
- *iface = (QUnknownInterface*)this;
- else if ( uuid == IID_QComponentInformation )
- *iface = (QComponentInformationInterface*)this;
+ if ( uuid == IID_TQUnknown )
+ *iface = (TQUnknownInterface*)this;
+ else if ( uuid == IID_TQComponentInformation )
+ *iface = (TQComponentInformationInterface*)this;
else if ( uuid == IID_Designer )
*iface = (DesignerInterface*)this;
else
- return QE_NOINTERFACE;
+ return TQE_NOINTERFACE;
(*iface)->addRef();
- return QS_OK;
+ return TQS_OK;
}
@@ -146,7 +146,7 @@ bool DesignerInterfaceImpl::singleProjectMode() const
void DesignerInterfaceImpl::showError( TQWidget *widget,
int line, const TQString &message )
{
- mainWindow->showErrorMessage( widget, line, message );
+ mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message );
}
void DesignerInterfaceImpl::runFinished()
@@ -156,12 +156,12 @@ void DesignerInterfaceImpl::runFinished()
void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line )
{
- mainWindow->showStackFrame( w, line );
+ mainWindow->showStackFrame( TQT_TQOBJECT(w), line );
}
void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line )
{
- mainWindow->showDebugStep( w, line );
+ mainWindow->showDebugStep( TQT_TQOBJECT(w), line );
}
void DesignerInterfaceImpl::runProjectPrecondition()
@@ -190,7 +190,7 @@ TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
while ( it.current() ) {
TQObject *obj = it.current();
++it;
- TQWidget *par = ::qt_cast<FormWindow*>(obj->parent());
+ TQWidget *par = ::tqqt_cast<FormWindow*>(obj->tqparent());
if ( !obj->isWidgetType() || !par )
continue;
@@ -208,7 +208,7 @@ TQString DesignerProjectImpl::formFileName( const TQString &form ) const
if ( TQString( forms.current()->formName() ) == form )
return forms.current()->fileName();
}
- return TQString::null;
+ return TQString();
}
TQStringList DesignerProjectImpl::formNames() const
@@ -252,7 +252,7 @@ void DesignerProjectImpl::setProjectName( const TQString & )
TQString DesignerProjectImpl::databaseFile() const
{
- return TQString::null;
+ return TQString();
}
void DesignerProjectImpl::setDatabaseFile( const TQString & )
@@ -267,7 +267,7 @@ void DesignerProjectImpl::setupDatabases() const
TQPtrList<DesignerDatabase> DesignerProjectImpl::databaseConnections() const
{
TQPtrList<DesignerDatabase> lst;
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQPtrList<DatabaseConnection> conns = project->databaseConnections();
for ( DatabaseConnection *d = conns.first(); d; d = conns.next() )
lst.append( d->iFace() );
@@ -304,9 +304,9 @@ void DesignerProjectImpl::setCustomSetting( const TQString &key, const TQString
TQString DesignerProjectImpl::customSetting( const TQString &key ) const
{
- if ( key == "QTSCRIPT_PACKAGES" ) {
- TQString s = getenv( "QTSCRIPT_PACKAGES" );
- TQString s2 = project->customSetting( "QUICK_PACKAGES" );
+ if ( key == "TQTSCRIPT_PACKAGES" ) {
+ TQString s = getenv( "TQTSCRIPT_PACKAGES" );
+ TQString s2 = project->customSetting( "TQUICK_PACKAGES" );
if ( !s.isEmpty() && !s2.isEmpty() )
#if defined(Q_OS_WIN32)
s += ";";
@@ -335,7 +335,7 @@ void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps
for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
- bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) );
+ bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) );
}
}
@@ -360,7 +360,7 @@ void DesignerProjectImpl::clearAllBreakpoints() const
for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
- MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty );
+ MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty );
MainWindow::self->resetBreakPoints();
}
}
@@ -426,7 +426,7 @@ bool DesignerProjectImpl::isGenericObject( TQObject *o ) const
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
DesignerDatabaseImpl::DesignerDatabaseImpl( DatabaseConnection *d )
: db( d )
{
@@ -535,7 +535,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString
pixCollection->addPixmap( pix, force );
FormWindow *fw = MainWindow::self->formWindow();
if ( fw )
- MetaDataBase::setPixmapKey( fw, p.serialNumber(), name );
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name );
}
TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const
@@ -582,11 +582,11 @@ void DesignerFormWindowImpl::insertWidget( TQWidget * )
{
}
-TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name )
+TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *tqparent, const char *name )
{
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), tqparent, name );
formWindow->insertWidget( w, TRUE );
- formWindow->killAccels( formWindow->mainContainer() );
+ formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) );
return w;
}
@@ -631,41 +631,41 @@ void DesignerFormWindowImpl::checkAccels()
{
}
-void DesignerFormWindowImpl::layoutH()
+void DesignerFormWindowImpl::tqlayoutH()
{
- formWindow->layoutHorizontal();
+ formWindow->tqlayoutHorizontal();
}
-void DesignerFormWindowImpl::layoutV()
+void DesignerFormWindowImpl::tqlayoutV()
{
}
-void DesignerFormWindowImpl::layoutHSplit()
+void DesignerFormWindowImpl::tqlayoutHSplit()
{
}
-void DesignerFormWindowImpl::layoutVSplit()
+void DesignerFormWindowImpl::tqlayoutVSplit()
{
}
-void DesignerFormWindowImpl::layoutG()
+void DesignerFormWindowImpl::tqlayoutG()
{
- formWindow->layoutGrid();
+ formWindow->tqlayoutGrid();
}
-void DesignerFormWindowImpl::layoutHContainer( TQWidget* w )
+void DesignerFormWindowImpl::tqlayoutHContainer( TQWidget* w )
{
- formWindow->layoutHorizontalContainer( w );
+ formWindow->tqlayoutHorizontalContainer( w );
}
-void DesignerFormWindowImpl::layoutVContainer( TQWidget* w )
+void DesignerFormWindowImpl::tqlayoutVContainer( TQWidget* w )
{
- formWindow->layoutVerticalContainer( w );
+ formWindow->tqlayoutVerticalContainer( w );
}
-void DesignerFormWindowImpl::layoutGContainer( TQWidget* w )
+void DesignerFormWindowImpl::tqlayoutGContainer( TQWidget* w )
{
- formWindow->layoutGridContainer( w );
+ formWindow->tqlayoutGridContainer( w );
}
void DesignerFormWindowImpl::breakLayout()
@@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout()
void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{
- formWindow->selectWidget( w, TRUE );
+ formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
}
void DesignerFormWindowImpl::selectAll()
@@ -717,9 +717,9 @@ TQPtrList<TQAction> DesignerFormWindowImpl::actionList() const
}
TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
- TQObject* parent, const char* name, bool toggle )
+ TQObject* tqparent, const char* name, bool toggle )
{
- QDesignerAction *a = new QDesignerAction( parent );
+ TQDesignerAction *a = new TQDesignerAction( tqparent );
a->setName( name );
a->setText( text );
if ( !icon.isNull() && !icon.pixmap().isNull() )
@@ -732,7 +732,7 @@ TQAction *DesignerFormWindowImpl::createAction( const TQString& text, const TQIc
void DesignerFormWindowImpl::addAction( TQAction *a )
{
- if ( formWindow->actionList().findRef( a ) != -1 )
+ if ( formWindow->actionList().tqfindRef( a ) != -1 )
return;
formWindow->actionList().append( a );
MetaDataBase::addEntry( a );
@@ -755,14 +755,14 @@ void DesignerFormWindowImpl::preview() const
void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot )
{
- MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot );
+ MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot );
}
void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier,
const TQString &access, const TQString &type,
const TQString &language, const TQString &returnType )
{
- MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType );
+ MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType );
formWindow->mainWindow()->functionsChanged();
}
@@ -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->tqmetaObject()->tqfindProperty( property, TRUE );
+ const TQMetaProperty* p = o->tqmetaObject()->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->tqmetaObject()->tqfindProperty( prop, TRUE );
+ const TQMetaProperty* p = o->tqmetaObject()->property( id, TRUE );
if ( p && p->isValid() )
return o->property( prop );
return MetaDataBase::fakeProperty( o, prop );
@@ -804,7 +804,7 @@ void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString,
TQStringList DesignerFormWindowImpl::implementationIncludes() const
{
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -825,7 +825,7 @@ TQStringList DesignerFormWindowImpl::implementationIncludes() const
TQStringList DesignerFormWindowImpl::declarationIncludes() const
{
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -846,7 +846,7 @@ TQStringList DesignerFormWindowImpl::declarationIncludes() const
void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst )
{
- TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -882,13 +882,13 @@ void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst
includes << inc;
}
}
- MetaDataBase::setIncludes( formWindow, includes );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
{
- TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -924,29 +924,29 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
includes << inc;
}
}
- MetaDataBase::setIncludes( formWindow, includes );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
TQStringList DesignerFormWindowImpl::forwardDeclarations() const
{
- return MetaDataBase::forwards( formWindow );
+ return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) );
}
void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst )
{
- MetaDataBase::setForwards( formWindow, lst );
+ MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
TQStringList DesignerFormWindowImpl::signalList() const
{
- return MetaDataBase::signalList( formWindow );
+ return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) );
}
void DesignerFormWindowImpl::setSignalList( const TQStringList &lst )
{
- MetaDataBase::setSignalList( formWindow, lst );
+ MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
@@ -957,27 +957,27 @@ void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const cha
void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
TQString n = name;
- formWindow->unify( popup, n, TRUE );
+ formWindow->unify( TQT_TQOBJECT(popup), n, TRUE );
popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb ) {
mb = new MenuBarEditor( formWindow, mw );
mb->setName( "MenuBar" );
- MetaDataBase::addEntry( mb );
+ MetaDataBase::addEntry( TQT_TQOBJECT(mb) );
}
mb->insertItem( text, popup );
- MetaDataBase::addEntry( popup );
+ MetaDataBase::addEntry( TQT_TQOBJECT(popup) );
}
void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
@@ -990,7 +990,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
@@ -998,28 +998,28 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
if ( !popup )
return;
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
popup->insert( a );
}
void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
- TQToolBar *tb = new QDesignerToolBar( mw );
+ TQToolBar *tb = new TQDesignerToolBar( mw );
TQString n = name;
- formWindow->unify( tb, n, TRUE );
+ formWindow->unify( TQT_TQOBJECT(tb), n, TRUE );
tb->setName( n );
mw->addToolBar( tb, text );
}
void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
- QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
+ TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" );
if ( !tb )
return;
a->addTo( tb );
@@ -1028,13 +1028,13 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a
void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
{
- if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
- QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
+ TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" );
if ( !tb )
return;
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
}