From a2bae01d006ea8053e85bc16d09a8cf40a4b0b75 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 03:03:11 +0000 Subject: [PATCH] Fix kdewebdev FTBFS under Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kimagemapeditor/kimagemapeditor.cpp | 4 +- kimagemapeditor/qextfileinfo.cpp | 58 ++--- kimagemapeditor/qextfileinfo.h | 6 +- kommander/editor/actiondnd.cpp | 236 +++++++++--------- kommander/editor/actiondnd.h | 48 ++-- kommander/editor/actionlistview.cpp | 8 +- kommander/editor/actionlistview.h | 16 +- kommander/editor/command.cpp | 90 +++---- kommander/editor/command.h | 40 +-- kommander/editor/formwindow.cpp | 10 +- kommander/editor/hierarchyview.cpp | 14 +- kommander/editor/hierarchyview.h | 2 +- kommander/editor/layout.cpp | 6 +- kommander/editor/layout.h | 6 +- kommander/editor/mainwindow.cpp | 30 +-- kommander/editor/metadatabase.cpp | 2 +- kommander/editor/propertyeditor.cpp | 8 +- kommander/editor/resource.cpp | 46 ++-- kommander/editor/resource.h | 4 +- kommander/editor/widgetdatabase.cpp | 8 +- kommander/editor/widgetdatabase.h | 2 +- kommander/editor/widgetfactory.cpp | 132 +++++----- kommander/editor/widgetfactory.h | 36 +-- kommander/editor/widgetinterface.h | 2 +- kommander/factory/kommanderfactory.cpp | 14 +- kxsldbg/kxsldbgpart/kxsldbg_part.cpp | 20 +- kxsldbg/kxsldbgpart/kxsldbg_part.h | 6 +- kxsldbg/kxsldbgpart/qxsldbgdoc.cpp | 28 +-- kxsldbg/kxsldbgpart/qxsldbgdoc.h | 6 +- kxsldbg/kxsldbgpart/xsldbgdocmap.h | 2 +- lib/qextfileinfo.cpp | 84 +++---- lib/qextfileinfo.h | 8 +- quanta/components/csseditor/tlpeditors.cpp | 6 +- .../components/debugger/debuggermanager.cpp | 2 +- quanta/components/debugger/pathmapper.cpp | 6 +- .../components/debugger/pathmapperdialog.cpp | 2 +- .../framewizard/visualframeeditor.cpp | 4 +- quanta/dialogs/copyto.cpp | 8 +- quanta/dialogs/dirtydlg.cpp | 2 +- quanta/dialogs/filecombo.cpp | 2 +- quanta/dialogs/tagdialogs/tagimgdlg.cpp | 4 +- quanta/messages/annotationoutput.cpp | 4 +- quanta/parsers/dtd/dtd.cpp | 2 +- quanta/parsers/dtd/dtdparser.cpp | 2 +- quanta/parsers/sagroupparser.cpp | 4 +- quanta/parts/kafka/htmldocumentproperties.cpp | 4 +- quanta/parts/kafka/htmlenhancer.cpp | 4 +- quanta/project/eventconfigurationdlg.cpp | 6 +- quanta/project/eventeditordlg.cpp | 32 +-- quanta/project/project.cpp | 38 +-- quanta/project/projectlist.cpp | 2 +- quanta/project/projectlist.h | 2 +- quanta/project/projectnewgeneral.cpp | 6 +- quanta/project/projectnewlocal.cpp | 18 +- quanta/project/projectnewweb.cpp | 2 +- quanta/project/projectprivate.cpp | 46 ++-- quanta/project/projectupload.cpp | 12 +- quanta/project/rescanprj.cpp | 4 +- quanta/src/document.cpp | 4 +- quanta/src/dtds.cpp | 2 +- quanta/src/kqapp.cpp | 26 +- quanta/src/kqapp.h | 18 +- quanta/src/main.cpp | 4 +- quanta/src/quanta.cpp | 46 ++-- quanta/src/quanta.h | 20 +- quanta/src/quanta_init.cpp | 18 +- quanta/src/quantadoc.cpp | 2 +- quanta/src/quantaview.cpp | 4 +- quanta/src/viewmanager.cpp | 2 +- quanta/treeviews/basetreeview.cpp | 6 +- quanta/treeviews/filestreeview.cpp | 6 +- quanta/treeviews/projecttreeview.cpp | 8 +- quanta/treeviews/servertreeview.cpp | 4 +- quanta/treeviews/structtreeview.cpp | 6 +- quanta/treeviews/tagattributeitems.cpp | 4 +- quanta/treeviews/templatestreeview.cpp | 8 +- quanta/utility/newstuff.cpp | 18 +- quanta/utility/newstuff.h | 30 +-- quanta/utility/qpevents.cpp | 22 +- quanta/utility/qpevents.h | 12 +- quanta/utility/quantacommon.cpp | 6 +- quanta/utility/quantanetaccess.cpp | 4 +- quanta/utility/tagaction.cpp | 2 +- 83 files changed, 744 insertions(+), 744 deletions(-) diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index ba5183e0..cfb5ee8c 100644 --- a/kimagemapeditor/kimagemapeditor.cpp +++ b/kimagemapeditor/kimagemapeditor.cpp @@ -2295,7 +2295,7 @@ void KImageMapEditor::saveImageMap(const KURL & url) << "\n" << " " << getHTMLImageMap() << "\n" - << " picture().width() << "\"" << " height=\"" << drawZone->picture().height() << "\">\n" @@ -2671,7 +2671,7 @@ void KImageMapEditor::addImage(const KURL & imgUrl) { if (imgUrl.isEmpty()) return; - TQString relativePath ( TQExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() ); + TQString relativePath ( QExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() ); TQString imgHtml = TQString(""); ImageTag *imgTag = new ImageTag(); diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp index 19c638cf..072a854e 100644 --- a/kimagemapeditor/qextfileinfo.cpp +++ b/kimagemapeditor/qextfileinfo.cpp @@ -32,10 +32,10 @@ //app includes #include "qextfileinfo.h" -TQString TQExtFileInfo::lastErrorMsg = ""; +TQString QExtFileInfo::lastErrorMsg = ""; /** create a relative short url based in baseURL*/ -KURL TQExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) +KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) { KURL resultURL = urlToConvert; if (urlToConvert.protocol() == baseURL.protocol()) @@ -79,7 +79,7 @@ KURL TQExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) return resultURL; } /** convert relative filename to absolute */ -KURL TQExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL) +KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL) { KURL resultURL = urlToConvert; if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/")) @@ -105,27 +105,27 @@ KURL TQExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL) This is needed for empty directory adding/handling. (Andras) Currently works only for local directories */ -KURL::List TQExtFileInfo::allFiles( const KURL& path, const TQString& tqmask) +KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& tqmask) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.allFilesInternal(path, tqmask); } -KURL::List TQExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask) +KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; KURL::List r = internalFileInfo.allFilesInternal( path, tqmask); KURL::List::Iterator it; for ( it = r.begin(); it != r.end(); ++it ) { - *it = TQExtFileInfo::toRelative( *it, path ); + *it = QExtFileInfo::toRelative( *it, path ); } return r; } -bool TQExtFileInfo::createDir( const KURL& path ) +bool QExtFileInfo::createDir( const KURL& path ) { int i=0; bool result; @@ -150,7 +150,7 @@ bool TQExtFileInfo::createDir( const KURL& path ) return result; } -KURL TQExtFileInfo::cdUp(const KURL &url) +KURL QExtFileInfo::cdUp(const KURL &url) { KURL u = url; TQString dir = u.path(-1); @@ -162,17 +162,17 @@ KURL TQExtFileInfo::cdUp(const KURL &url) return u; } -TQString TQExtFileInfo::shortName(const TQString &fname) +TQString QExtFileInfo::shortName(const TQString &fname) { return fname.section("/",-1); } -KURL TQExtFileInfo::path( const KURL &url ) +KURL QExtFileInfo::path( const KURL &url ) { return KURL( url.directory(false,false) ); } -KURL TQExtFileInfo::home() +KURL QExtFileInfo::home() { KURL url; url.setPath(TQDir::currentDirPath()+"/"); @@ -180,7 +180,7 @@ KURL TQExtFileInfo::home() } -bool TQExtFileInfo::exists(const KURL& a_url) +bool QExtFileInfo::exists(const KURL& a_url) { // Andras: Don't use it now, as it brings up an extra dialog and need manual // intervention when usign fish @@ -192,21 +192,21 @@ bool TQExtFileInfo::exists(const KURL& a_url) return TQFile::exists( a_url.path() ); } else { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.internalExists(a_url); } } /* Synchronouse copy, like NetAccess::file_copy in KDE 3.2 */ -bool TQExtFileInfo::copy( const KURL& src, const KURL& target, int permissions, +bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions, bool overwrite, bool resume, TQWidget* window ) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window ); } /** No descriptions */ -KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask) +KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask) { dirListItems.clear(); if (internalExists(startURL)) @@ -240,10 +240,10 @@ KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& //Some hackery from KIO::NetAccess as they do not do exactly what we want /* return true if the url exists*/ -bool TQExtFileInfo::internalExists(const KURL& url) +bool QExtFileInfo::internalExists(const KURL& url) { bJobOK = true; - // kdDebug(24000)<<"TQExtFileInfo::internalExists"<setDetails(0); job->setSide(false); //check the url for writing @@ -252,13 +252,13 @@ bool TQExtFileInfo::internalExists(const KURL& url) //To avoid lock-ups, start a timer. TQTimer::singleShot(10*1000, this,TQT_SLOT(slotTimeout())); -// kdDebug(24000)<<"TQExtFileInfo::internalExists:before enter_loop"<enter_loop()"<enter_loop()"<enter_loop(); -// kdDebug(24000)<<"TQExtFileInfo::enter_loop:after tqApp->enter_loop()"<enter_loop()"<error(); if ( !bJobOK ) @@ -301,7 +301,7 @@ void TQExtFileInfo::slotResult( KIO::Job * job ) tqApp->exit_loop(); } -void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) +void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) { KURL url = static_cast(job)->url(); url.adjustPath(-1); @@ -339,7 +339,7 @@ void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLi } /** Timeout occured while waiting for some network function to return. */ -void TQExtFileInfo::slotTimeout() +void QExtFileInfo::slotTimeout() { bJobOK = false; tqApp->exit_loop(); diff --git a/kimagemapeditor/qextfileinfo.h b/kimagemapeditor/qextfileinfo.h index 7842e338..00643915 100644 --- a/kimagemapeditor/qextfileinfo.h +++ b/kimagemapeditor/qextfileinfo.h @@ -21,13 +21,13 @@ #include #include -class TQExtFileInfo:public TQObject +class QExtFileInfo:public TQObject { Q_OBJECT TQ_OBJECT public: - TQExtFileInfo() {}; - ~TQExtFileInfo() {}; + QExtFileInfo() {}; + ~QExtFileInfo() {}; /** create to ralative short name */ static KURL toRelative(const KURL& urlToConvert,const KURL& baseURL); diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 119f481b..58cdb4a3 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -42,7 +42,7 @@ #include -bool TQDesignerAction::addTo( TQWidget *w ) +bool QDesignerAction::addTo( TQWidget *w ) { if ( !widgetToInsert ) return TQAction::addTo( w ); @@ -55,7 +55,7 @@ bool TQDesignerAction::addTo( TQWidget *w ) return true; } -bool TQDesignerAction::removeFrom( TQWidget *w ) +bool QDesignerAction::removeFrom( TQWidget *w ) { if ( !widgetToInsert ) return TQAction::removeFrom( w ); @@ -64,7 +64,7 @@ bool TQDesignerAction::removeFrom( TQWidget *w ) return true; } -void TQDesignerAction::remove() +void QDesignerAction::remove() { if ( !widgetToInsert ) return; @@ -72,7 +72,7 @@ void TQDesignerAction::remove() widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); } -TQDesignerToolBarSeparator::TQDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *tqparent, +QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *tqparent, const char* name ) : TQWidget( tqparent, name ) { @@ -84,17 +84,17 @@ TQDesignerToolBarSeparator::TQDesignerToolBarSeparator(Qt::Orientation o , TQToo tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); } -void TQDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) +void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) { orient = o; } -void TQDesignerToolBarSeparator::styleChange( TQStyle& ) +void QDesignerToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -TQSize TQDesignerToolBarSeparator::tqsizeHint() const +TQSize QDesignerToolBarSeparator::tqsizeHint() const { int extent = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); @@ -104,7 +104,7 @@ TQSize TQDesignerToolBarSeparator::tqsizeHint() const return TQSize( 0, extent ); } -void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) +void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) { TQPainter p( this ); TQStyle::SFlags flags = TQStyle::Style_Default; @@ -118,16 +118,16 @@ void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) -TQSeparatorAction::TQSeparatorAction( TQObject *tqparent ) +QSeparatorAction::QSeparatorAction( TQObject *tqparent ) : TQAction( tqparent, "qt_designer_separator" ), wid( 0 ) { } -bool TQSeparatorAction::addTo( TQWidget *w ) +bool QSeparatorAction::addTo( TQWidget *w ) { if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) { TQToolBar *tb = (TQToolBar*)w; - wid = new TQDesignerToolBarSeparator( tb->orientation(), tb ); + wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); return true; } else if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) { idx = ( (TQPopupMenu*)w )->count(); @@ -137,7 +137,7 @@ bool TQSeparatorAction::addTo( TQWidget *w ) return false; } -bool TQSeparatorAction::removeFrom( TQWidget *w ) +bool QSeparatorAction::removeFrom( TQWidget *w ) { if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) { delete wid; @@ -149,7 +149,7 @@ bool TQSeparatorAction::removeFrom( TQWidget *w ) return false; } -TQWidget *TQSeparatorAction::widget() const +TQWidget *QSeparatorAction::widget() const { return wid; } @@ -157,7 +157,7 @@ TQWidget *TQSeparatorAction::widget() const -TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; @@ -165,7 +165,7 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) setAcceptDrops( true ); MetaDataBase::addEntry( TQT_TQOBJECT(this) ); lastIndicatorPos = TQPoint( -1, -1 ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); installEventFilter( this ); widgetInserting = false; @@ -173,13 +173,13 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) mw->setDockEnabled( DockTornOff, false ); } -TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; afterAnchor = true; setAcceptDrops( true ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); MetaDataBase::addEntry( TQT_TQOBJECT(this) ); installEventFilter( this ); @@ -188,7 +188,7 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock ) mw->setDockEnabled( DockTornOff, false ); } -void TQDesignerToolBar::findFormWindow() +void QDesignerToolBar::findFormWindow() { TQWidget *w = this; while ( w ) { @@ -198,29 +198,29 @@ void TQDesignerToolBar::findFormWindow() } } -void TQDesignerToolBar::addAction( TQAction *a ) +void QDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); - } else if ( a->inherits( "TQSeparatorAction" ) ) { - ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + } else if ( a->inherits( "QSeparatorAction" ) ) { + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); } else { - ( (TQDesignerAction*)a )->widget()->installEventFilter( this ); - actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); } } static void fixObject( TQObject *&o ) { - while ( o && o->tqparent() && !o->tqparent()->inherits( "TQDesignerToolBar" ) ) + while ( o && o->tqparent() && !o->tqparent()->inherits( "QDesignerToolBar" ) ) o = o->tqparent(); } -bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) +bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) { if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) return TQToolBar::eventFilter( o, e ); @@ -279,7 +279,7 @@ bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) return TQToolBar::eventFilter( o, e ); } -void TQDesignerToolBar::paintEvent( TQPaintEvent *e ) +void QDesignerToolBar::paintEvent( TQPaintEvent *e ) { TQToolBar::paintEvent( e ); if ( e->rect() != rect() ) @@ -287,7 +287,7 @@ void TQDesignerToolBar::paintEvent( TQPaintEvent *e ) lastIndicatorPos = TQPoint( -1, -1 ); } -void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); TQPopupMenu menu( 0 ); @@ -301,7 +301,7 @@ void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) } } -void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e ) +void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { widgetInserting = false; if ( e->button() == Qt::LeftButton && @@ -318,14 +318,14 @@ void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e ) } } -void TQDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); widgetInserting = false; } -void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) +void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); @@ -336,7 +336,7 @@ void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) widgetInserting = false; } -void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) +void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) { e->accept(); TQPopupMenu menu( 0 ); @@ -344,7 +344,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; TQMap::Iterator it = actionMap.tqfind( (TQWidget*)o ); - if ( it != actionMap.end() && (*it)->inherits( "TQSeparatorAction" ) ) + if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n("Delete Item" ), ID_DELETE ); @@ -366,7 +366,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject cmd->execute(); } else if ( res == ID_SEP ) { calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -387,7 +387,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject } } -void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) +void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { widgetInserting = false; @@ -411,7 +411,7 @@ void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) dragStartPos = e->pos(); } -void TQDesignerToolBar::removeWidget( TQWidget *w ) +void QDesignerToolBar::removeWidget( TQWidget *w ) { TQMap::Iterator it = actionMap.tqfind( w ); if ( it == actionMap.end() ) @@ -428,7 +428,7 @@ void TQDesignerToolBar::removeWidget( TQWidget *w ) adjustSize(); } -void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) +void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) { if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) return; @@ -451,14 +451,14 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) adjustSize(); TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) : - a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new TQStoredDrag( type, this ); TQString s = TQString::number( (long)a ); // #### huha, that is evil drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); - if ( a->inherits( "TQDesignerAction" ) ) { - if ( formWindow->widgets()->tqfind( ( (TQDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( TQT_TQOBJECT(( (TQDesignerAction*)a )->widget()), false ); + if ( a->inherits( "QDesignerAction" ) ) { + if ( formWindow->widgets()->tqfind( ( (QDesignerAction*)a )->widget() ) ) + formWindow->selectWidget( TQT_TQOBJECT(( (QDesignerAction*)a )->widget()), false ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ). @@ -473,7 +473,7 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) { widgetInserting = false; lastIndicatorPos = TQPoint( -1, -1 ); @@ -483,7 +483,7 @@ void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) e->accept(); } -void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -494,14 +494,14 @@ void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void TQDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) { indicator->hide(); insertAnchor = 0; afterAnchor = true; } -void TQDesignerToolBar::dropEvent( TQDropEvent *e ) +void QDesignerToolBar::dropEvent( TQDropEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -527,11 +527,11 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e ) if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-separator" ) ) { if ( e->provides( "application/x-designer-actions" ) ) - a = (TQDesignerAction*)s.toLong(); + a = (QDesignerAction*)s.toLong(); else - a = (TQSeparatorAction*)s.toLong(); + a = (QSeparatorAction*)s.toLong(); } else { - a = (TQDesignerActionGroup*)s.toLong(); + a = (QDesignerActionGroup*)s.toLong(); } if ( actionList.tqfindRef( a ) != -1 ) { @@ -553,7 +553,7 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e ) #endif -void TQDesignerToolBar::reInsert() +void QDesignerToolBar::reInsert() { TQAction *a = 0; actionMap.clear(); @@ -561,27 +561,27 @@ void TQDesignerToolBar::reInsert() for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) { - actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); - if ( ( (TQDesignerActionGroup*)a )->widget() ) - ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( a->inherits( "TQDesignerAction" ) ) { - actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); - ( (TQDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( a->inherits( "TQSeparatorAction" ) ) { - actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); - ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); + actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); + if ( ( (QDesignerActionGroup*)a )->widget() ) + ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); + } else if ( a->inherits( "QDesignerAction" ) ) { + actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); + ( (QDesignerAction*)a )->widget()->installEventFilter( this ); + } else if ( a->inherits( "QSeparatorAction" ) ) { + actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); + ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); } } TQApplication::sendPostedEvents(); adjustSize(); } -void TQDesignerToolBar::actionRemoved() +void QDesignerToolBar::actionRemoved() { actionList.removeRef( (TQAction*)sender() ); } -TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) { if ( orientation() ==Qt::Horizontal ) { TQPoint pnt( width() - 2, 0 ); @@ -632,7 +632,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) } } -void TQDesignerToolBar::drawIndicator( const TQPoint &pos ) +void QDesignerToolBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -656,7 +656,7 @@ void TQDesignerToolBar::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) +void QDesignerToolBar::doInsertWidget( const TQPoint &p ) { if ( formWindow != MainWindow::self->formWindow() ) return; @@ -664,7 +664,7 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, true ); - TQDesignerAction *a = new TQDesignerAction( w, tqparent() ); + QDesignerAction *a = new QDesignerAction( w, tqparent() ); int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -678,16 +678,16 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) MainWindow::self->resetTool(); } -void TQDesignerToolBar::clear() +void QDesignerToolBar::clear() { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQDesignerAction" ) ) - ( (TQDesignerAction*)a )->remove(); + if ( a->inherits( "QDesignerAction" ) ) + ( (QDesignerAction*)a )->remove(); } TQToolBar::clear(); } -void TQDesignerToolBar::installEventFilters( TQWidget *w ) +void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; @@ -699,7 +699,7 @@ void TQDesignerToolBar::installEventFilters( TQWidget *w ) -TQDesignerMenuBar::TQDesignerMenuBar( TQWidget *mw ) +QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw ) : TQMenuBar( mw, 0 ) { show(); @@ -709,12 +709,12 @@ TQDesignerMenuBar::TQDesignerMenuBar( TQWidget *mw ) mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); findFormWindow(); } -void TQDesignerMenuBar::findFormWindow() +void QDesignerMenuBar::findFormWindow() { TQWidget *w = this; while ( w ) { @@ -724,7 +724,7 @@ void TQDesignerMenuBar::findFormWindow() } } -void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); int itm = itemAtPos( e->pos() ); @@ -742,7 +742,7 @@ void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ), formWindow, (TQMainWindow*)tqparentWidget(), this, - (TQDesignerPopupMenu*)item->popup(), + (QDesignerPopupMenu*)item->popup(), idAt( itm ), itm, item->text() ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); @@ -764,7 +764,7 @@ void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) } } -void TQDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) { lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; @@ -776,7 +776,7 @@ void TQDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) TQMenuBar::mousePressEvent( e ); } -void TQDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == Qt::NoButton ) { TQMenuBar::mouseMoveEvent( e ); @@ -814,7 +814,7 @@ void TQDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) mousePressed = false; } -void TQDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) { TQMenuBar::mouseReleaseEvent( e ); mousePressed = false; @@ -822,7 +822,7 @@ void TQDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -834,7 +834,7 @@ void TQDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) insertAt = -1; } -void TQDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-menuitem" ) || @@ -860,14 +860,14 @@ void TQDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) } } -void TQDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; } -void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) +void QDesignerMenuBar::dropEvent( TQDropEvent *e ) { mousePressed = false; if ( !e->provides( "application/x-designer-menuitem" ) ) @@ -881,7 +881,7 @@ void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) insertItem( txt, popup, -1, insertAt ); MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).tqarg( txt ), formWindow, - this, (TQDesignerPopupMenu*)popup, oldPos, insertAt, txt ); + this, (QDesignerPopupMenu*)popup, oldPos, insertAt, txt ); // do not execute, we did the work already formWindow->commandHistory()->addCommand( cmd ); @@ -890,7 +890,7 @@ void TQDesignerMenuBar::dropEvent( TQDropEvent *e ) #endif -TQPoint TQDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) { int w = frameWidth(); insertAt = count(); @@ -906,7 +906,7 @@ TQPoint TQDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) return TQPoint( w, 0 ); } -void TQDesignerMenuBar::drawIndicator( const TQPoint &pos ) +void QDesignerMenuBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -920,38 +920,38 @@ void TQDesignerMenuBar::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -void TQDesignerMenuBar::setItemNumber( int num ) +void QDesignerMenuBar::setItemNumber( int num ) { itemNum = num; } -int TQDesignerMenuBar::itemNumber() const +int QDesignerMenuBar::itemNumber() const { return itemNum; } -void TQDesignerMenuBar::setItemText( const TQString &s ) +void QDesignerMenuBar::setItemText( const TQString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; changeItem( idAt( itemNum ), s ); } -TQString TQDesignerMenuBar::itemText() const +TQString QDesignerMenuBar::itemText() const { if ( itemNum < 0 || (int)itemNum >= (int)count() ) return TQString(); return text( idAt( itemNum ) ); } -void TQDesignerMenuBar::setItemName( const TQCString &s ) +void QDesignerMenuBar::setItemName( const TQCString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; tqfindItem( idAt( itemNum ) )->popup()->setName( s ); } -TQCString TQDesignerMenuBar::itemName() const +TQCString QDesignerMenuBar::itemName() const { if ( itemNum < 0 || itemNum >= (int)count() ) return ""; @@ -960,7 +960,7 @@ TQCString TQDesignerMenuBar::itemName() const -TQDesignerPopupMenu::TQDesignerPopupMenu( TQWidget *w ) +QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w ) : TQPopupMenu( w, 0 ), popupMenu( 0 ) { @@ -969,11 +969,11 @@ TQDesignerPopupMenu::TQDesignerPopupMenu( TQWidget *w ) insertAt = -1; mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); - indicator = new TQDesignerIndicatorWidget( this ); + indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); } -void TQDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) +void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) { #if defined( TQ_WS_MAC ) //the mac needs us to use context menu rather than right click e->accept(); @@ -984,7 +984,7 @@ void TQDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e ) #endif } -void TQDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == Qt::MidButton ) return; @@ -1006,7 +1006,7 @@ void TQDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) TQPopupMenu::mousePressEvent( e ); } -void TQDesignerPopupMenu::createPopupMenu() +void QDesignerPopupMenu::createPopupMenu() { // actually creates our popup for the popupmenu. TQPopupMenu menu( 0 ); @@ -1018,7 +1018,7 @@ void TQDesignerPopupMenu::createPopupMenu() if ( itm == -1 ) return; TQAction *a = actionList.at( itm ); - if ( a && a->inherits( "TQSeparatorAction" ) ) + if ( a && a->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n("Delete Item" ), ID_DELETE ); @@ -1037,22 +1037,22 @@ void TQDesignerPopupMenu::createPopupMenu() } else if ( res == ID_SEP ) { TQPoint p( pos() ); calcIndicatorPos( mapFromGlobal( popupPos ) ); - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Separator to Popup Menu '%1'" ). arg( name() ), formWindow, a, this, insertAt ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); popup( p ); } // set this back to zero so we know a popup (will soon) not exist. popupMenu = 0; } -void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == Qt::NoButton ) { TQPopupMenu::mouseMoveEvent( e ); @@ -1075,7 +1075,7 @@ void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) cmd->execute(); TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) : - a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new TQStoredDrag( type, this ); TQString s = TQString::number( (long)a ); // #### huha, that is evil drag->setEncodedData( TQCString( s.latin1() ) ); @@ -1092,7 +1092,7 @@ void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) mousePressed = false; } -void TQDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) +void QDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) { mousePressed = false; TQPopupMenu::mouseReleaseEvent( e ); @@ -1100,7 +1100,7 @@ void TQDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) #ifndef TQT_NO_DRAGANDDROP -void TQDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) +void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) { mousePressed = false; lastIndicatorPos = TQPoint( -1, -1 ); @@ -1110,7 +1110,7 @@ void TQDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) e->accept(); } -void TQDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) +void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1122,14 +1122,14 @@ void TQDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void TQDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * ) +void QDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; indicator->hide(); insertAt = -1; } -void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) +void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1143,15 +1143,15 @@ void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) TQAction *a = 0; if ( e->provides( "application/x-designer-actiongroup" ) ) { TQString s( e->tqencodedData( "application/x-designer-actiongroup" ) ); - a = (TQDesignerActionGroup*)s.toLong(); + a = (QDesignerActionGroup*)s.toLong(); } else { TQString s; if ( e->provides( "application/x-designer-separator" ) ) { s = TQString( e->tqencodedData( "application/x-designer-separator" ) ); - a = (TQSeparatorAction*)s.toLong(); + a = (QSeparatorAction*)s.toLong(); } else { s = TQString( e->tqencodedData( "application/x-designer-actions" ) ); - a = (TQDesignerAction*)s.toLong(); + a = (QDesignerAction*)s.toLong(); } } @@ -1169,22 +1169,22 @@ void TQDesignerPopupMenu::dropEvent( TQDropEvent *e ) formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); - ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 ); indicator->hide(); popup( p ); } #endif -void TQDesignerPopupMenu::reInsert() +void QDesignerPopupMenu::reInsert() { clear(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) a->addTo( this ); } -void TQDesignerPopupMenu::drawIndicator( const TQPoint &pos ) +void QDesignerPopupMenu::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -1198,7 +1198,7 @@ void TQDesignerPopupMenu::drawIndicator( const TQPoint &pos ) TQApplication::sendPostedEvents(); } -TQPoint TQDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) +TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) { int h = frameWidth(); insertAt = count(); @@ -1214,18 +1214,18 @@ TQPoint TQDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) return TQPoint( 0, h ); } -void TQDesignerPopupMenu::addAction( TQAction *a ) +void QDesignerPopupMenu::addAction( TQAction *a ) { actionList.append( a ); connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); } -void TQDesignerPopupMenu::actionRemoved() +void QDesignerPopupMenu::actionRemoved() { actionList.removeRef( (TQAction*)sender() ); } -void TQDesignerPopupMenu::paintEvent( TQPaintEvent *e ) +void QDesignerPopupMenu::paintEvent( TQPaintEvent *e ) { TQPopupMenu::paintEvent( e ); if ( e->rect() != rect() ) @@ -1233,7 +1233,7 @@ void TQDesignerPopupMenu::paintEvent( TQPaintEvent *e ) lastIndicatorPos = TQPoint( -1, -1 ); } -void TQDesignerPopupMenu::findFormWindow() +void QDesignerPopupMenu::findFormWindow() { TQWidget *w = this; while ( w ) { diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h index 5d1c314d..66a87c5b 100644 --- a/kommander/editor/actiondnd.h +++ b/kommander/editor/actiondnd.h @@ -30,17 +30,17 @@ #include #include -class TQDesignerPopupMenu; -class TQDesignerIndicatorWidget; +class QDesignerPopupMenu; +class QDesignerIndicatorWidget; class FormWindow; -class TQDesignerActionGroup : public TQActionGroup +class QDesignerActionGroup : public TQActionGroup { Q_OBJECT TQ_OBJECT public: - TQDesignerActionGroup( TQObject *tqparent ) + QDesignerActionGroup( TQObject *tqparent ) : TQActionGroup( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ) {} TQWidget *widget() const { return wid; } @@ -65,15 +65,15 @@ private: }; -class TQDesignerAction : public TQAction +class QDesignerAction : public TQAction { Q_OBJECT TQ_OBJECT public: - TQDesignerAction( TQObject *tqparent ) + QDesignerAction( TQObject *tqparent ) : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {} - TQDesignerAction( TQWidget *w, TQObject *tqparent ) + QDesignerAction( TQWidget *w, TQObject *tqparent ) : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {} TQWidget *widget() const { return wid; } @@ -100,13 +100,13 @@ private: }; -class TQDesignerToolBarSeparator : public TQWidget +class QDesignerToolBarSeparator : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerToolBarSeparator( Qt::Orientation, TQToolBar *tqparent, const char* name=0 ); + QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *tqparent, const char* name=0 ); TQSize tqsizeHint() const; Qt::Orientation orientation() const { return orient; } @@ -120,13 +120,13 @@ private: }; -class TQSeparatorAction : public TQAction +class QSeparatorAction : public TQAction { Q_OBJECT TQ_OBJECT public: - TQSeparatorAction( TQObject *tqparent ); + QSeparatorAction( TQObject *tqparent ); bool addTo( TQWidget *w ); bool removeFrom( TQWidget *w ); @@ -139,14 +139,14 @@ private: }; -class TQDesignerToolBar : public TQToolBar +class QDesignerToolBar : public TQToolBar { Q_OBJECT TQ_OBJECT public: - TQDesignerToolBar( TQMainWindow *mw ); - TQDesignerToolBar( TQMainWindow *mw, Dock dock ); + QDesignerToolBar( TQMainWindow *mw ); + QDesignerToolBar( TQMainWindow *mw, Dock dock ); TQPtrList insertedActions() const { return actionList; } void addAction( TQAction *a ); @@ -192,24 +192,24 @@ private: TQPtrList actionList; TQMap actionMap; TQPoint dragStartPos; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; bool widgetInserting; FormWindow *formWindow; }; -class TQDesignerMenuBar : public TQMenuBar +class QDesignerMenuBar : public TQMenuBar { Q_OBJECT TQ_OBJECT - friend class TQDesignerPopupMenu; + friend class QDesignerPopupMenu; TQ_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber ) TQ_PROPERTY( TQString itemText WRITE setItemText READ itemText ) TQ_PROPERTY( TQCString itemName WRITE setItemName READ itemName ) public: - TQDesignerMenuBar( TQWidget *mw ); + QDesignerMenuBar( TQWidget *mw ); void setItemNumber( int num ); int itemNumber() const; @@ -241,19 +241,19 @@ private: bool mousePressed; TQPoint lastIndicatorPos; int insertAt; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; FormWindow *formWindow; int oldPos; }; -class TQDesignerPopupMenu : public TQPopupMenu +class QDesignerPopupMenu : public TQPopupMenu { Q_OBJECT TQ_OBJECT public: - TQDesignerPopupMenu( TQWidget *w ); + QDesignerPopupMenu( TQWidget *w ); TQPtrList insertedActions() const { return actionList; } void addAction( TQAction *a ); void reInsert(); @@ -288,7 +288,7 @@ private: TQPtrList actionList; TQPoint dragStartPos; bool mousePressed; - TQDesignerIndicatorWidget *indicator; + QDesignerIndicatorWidget *indicator; FormWindow *formWindow; TQGuardedPtr popupMenu; TQPoint popupPos; @@ -296,13 +296,13 @@ private: }; -class TQDesignerIndicatorWidget : public TQWidget +class QDesignerIndicatorWidget : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerIndicatorWidget( TQWidget *p ) + QDesignerIndicatorWidget( TQWidget *p ) : TQWidget( p, "qt_dockwidget_internal" ) { setBackgroundColor( red ); } diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp index 20a0ee4e..70b9edbe 100644 --- a/kommander/editor/actionlistview.cpp +++ b/kommander/editor/actionlistview.cpp @@ -38,9 +38,9 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac ) : TQListViewItem( lv ), a( 0 ), g( 0 ) { if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) - g = (TQDesignerActionGroup*)ac; + g = (QDesignerActionGroup*)ac; else - a = (TQDesignerAction*)ac; + a = (QDesignerAction*)ac; setDragEnabled( true ); } @@ -48,9 +48,9 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) : TQListViewItem( i ), a( 0 ), g( 0 ) { if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) - g = (TQDesignerActionGroup*)ac; + g = (QDesignerActionGroup*)ac; else - a = (TQDesignerAction*)ac; + a = (QDesignerAction*)ac; setDragEnabled( true ); moveToEnd(); } diff --git a/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h index 53a5fda6..3b9deca7 100644 --- a/kommander/editor/actionlistview.h +++ b/kommander/editor/actionlistview.h @@ -29,24 +29,24 @@ class ActionItem : public TQListViewItem public: ActionItem( TQListView *lv, bool group ) : TQListViewItem( lv ), - a( group ? 0 : new TQDesignerAction( 0 ) ), - g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } + a( group ? 0 : new QDesignerAction( 0 ) ), + g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } ActionItem( TQListView *lv, TQAction *ac ); ActionItem( TQListViewItem *i, TQAction *ac ); ActionItem( ActionItem *tqparent, bool group = FALSE ) : TQListViewItem( tqparent ), - a( group ? 0 : new TQDesignerAction( tqparent->actionGroup() ) ), - g( group ? new TQDesignerActionGroup( tqparent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } + a( group ? 0 : new QDesignerAction( tqparent->actionGroup() ) ), + g( group ? new QDesignerActionGroup( tqparent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } - TQDesignerAction *action() const { return a; } - TQDesignerActionGroup *actionGroup() const { return g; } + QDesignerAction *action() const { return a; } + QDesignerActionGroup *actionGroup() const { return g; } private: void moveToEnd(); private: - TQDesignerAction *a; - TQDesignerActionGroup *g; + QDesignerAction *a; + QDesignerActionGroup *g; }; diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index a549c915..e20ba086 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -806,7 +806,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, const TQString &label ) : Command( n, fw ), tabWidget( tw ), tabLabel( label ) { - tabPage = new TQDesignerWidget( formWindow(), tabWidget, "tab" ); + tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" ); tabPage->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); @@ -815,7 +815,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, void AddTabPageCommand::execute() { if ( index == -1 ) - index = ( (TQDesignerTabWidget*)tabWidget )->count(); + index = ( (QDesignerTabWidget*)tabWidget )->count(); tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); @@ -837,7 +837,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, TQToolBox *tw, const TQString &_label ) : Command( n, fw ), toolBox( tw ), label( _label ) { - page = new TQDesignerWidget( formWindow(), toolBox, "tab" ); + page = new QDesignerWidget( formWindow(), toolBox, "tab" ); page->hide(); index = -1; MetaDataBase::addEntry( TQT_TQOBJECT(page) ); @@ -873,18 +873,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, void MoveTabPageCommand::execute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } void MoveTabPageCommand::unexecute() { - ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); - ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -895,8 +895,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, TQTabWidget *tw, TQWidget *page ) : Command( n, fw ), tabWidget( tw ), tabPage( page ) { - tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle(); - index = ( (TQDesignerTabWidget*)tabWidget )->currentPage(); + tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); + index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); } void DeleteTabPageCommand::execute() @@ -947,7 +947,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, const TQString &label, int i, bool s ) : Command( n, fw ), wizard( w ), pageLabel( label ) { - page = new TQDesignerWidget( formWindow(), wizard, "page" ); + page = new QDesignerWidget( formWindow(), wizard, "page" ); page->hide(); index = i; show = s; @@ -960,7 +960,7 @@ void AddWizardPageCommand::execute() index = wizard->pageCount(); wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -996,7 +996,7 @@ void DeleteWizardPageCommand::unexecute() { wizard->insertPage( page, pageLabel, index ); if ( show ) - ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) ); + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1576,7 +1576,7 @@ void PopulateTableCommand::unexecute() // ------------------------------------------------------------ AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ) + TQAction *a, QDesignerToolBar *tb, int idx ) : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) { } @@ -1585,25 +1585,25 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( action->inherits( "TQDesignerAction" ) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( action->inherits( "QDesignerAction" ) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } } - if ( action->inherits( "TQDesignerAction" ) ) { - toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); - ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( action->inherits( "TQDesignerActionGroup" ) ) { - if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { - toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); - ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); + if ( action->inherits( "QDesignerAction" ) ) { + toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); + ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( action->inherits( "QDesignerActionGroup" ) ) { + if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { + toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); + ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } - } else if ( action->inherits( "TQSeparatorAction" ) ) { - toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action ); - ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( action->inherits( "QSeparatorAction" ) ) { + toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); + ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) @@ -1623,8 +1623,8 @@ void AddActionToToolBarCommand::execute() if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; // ### fix it for nested actiongroups - if ( o->inherits( "TQDesignerAction" ) ) { - TQDesignerAction *ac = (TQDesignerAction*)o; + if ( o->inherits( "QDesignerAction" ) ) { + QDesignerAction *ac = (QDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); if ( index == -1 ) @@ -1641,10 +1641,10 @@ void AddActionToToolBarCommand::execute() void AddActionToToolBarCommand::unexecute() { - if ( action->inherits( "TQDesignerAction" ) ) { - TQString s = ( (TQDesignerAction*)action )->widget()->name(); + if ( action->inherits( "QDesignerAction" ) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); - ( (TQDesignerAction*)action )->widget()->setName( s ); + ( (QDesignerAction*)action )->widget()->setName( s ); } toolBar->removeAction( action ); @@ -1661,7 +1661,7 @@ void AddActionToToolBarCommand::unexecute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - if ( o->inherits( "TQDesignerAction" ) ) { + if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } @@ -1673,7 +1673,7 @@ void AddActionToToolBarCommand::unexecute() // ------------------------------------------------------------ AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ) + TQAction *a, QDesignerPopupMenu *p, int idx ) : Command( n, fw ), action( a ), popup( p ), index( idx ) { } @@ -1695,7 +1695,7 @@ void AddActionToPopupCommand::execute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - TQDesignerAction *ac = (TQDesignerAction*)o; + QDesignerAction *ac = (QDesignerAction*)o; popup->insertAction( index + (i++), ac ); } } @@ -1703,7 +1703,7 @@ void AddActionToPopupCommand::execute() popup->reInsert(); TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) ); } else { - if ( !action->inherits( "TQDesignerAction" ) || ( (TQDesignerAction*)action )->supportsMenu() ) { + if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) { action->addTo( popup ); popup->insertAction( index, action ); popup->reInsert(); @@ -1728,7 +1728,7 @@ void AddActionToPopupCommand::unexecute() ++it; if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) ) continue; - if ( o->inherits( "TQDesignerAction" ) ) { + if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( popup ); popup->removeAction( (TQAction*)o ); } @@ -1748,15 +1748,15 @@ void AddMenuCommand::execute() { if ( !popup ) { TQString n = "PopupMenu"; - popup = new TQDesignerPopupMenu( mainWindow ); + popup = new QDesignerPopupMenu( mainWindow ); formWindow()->unify( TQT_TQOBJECT(popup), n, true ); popup->setName( n ); } if ( !mainWindow->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) ) { - menuBar = new TQDesignerMenuBar( (TQWidget*)mainWindow ); + menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow ); menuBar->setName( "menubar" ); } else { - menuBar = (TQDesignerMenuBar*)mainWindow->menuBar(); + menuBar = (QDesignerMenuBar*)mainWindow->menuBar(); } if ( id == -1 ) id = mainWindow->menuBar()->insertItem( name, popup ); @@ -1775,7 +1775,7 @@ void AddMenuCommand::unexecute() // ------------------------------------------------------------ -RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, +RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, int i, const TQString &on, const TQString &nn ) : Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn ) { @@ -1795,8 +1795,8 @@ void RenameMenuCommand::unexecute() // ------------------------------------------------------------ -MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, - TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ) +MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ) : Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt ) { } @@ -1825,7 +1825,7 @@ AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainW void AddToolBarCommand::execute() { if ( !toolBar ) { - toolBar = new TQDesignerToolBar( mainWindow ); + toolBar = new QDesignerToolBar( mainWindow ); TQString n = "Toolbar"; formWindow()->unify( TQT_TQOBJECT(toolBar), n, true ); toolBar->setName( n ); diff --git a/kommander/editor/command.h b/kommander/editor/command.h index 3fd83e1c..f56e21a6 100644 --- a/kommander/editor/command.h +++ b/kommander/editor/command.h @@ -44,10 +44,10 @@ class TQIconView; class TQMultiLineEdit; class TQTable; class TQAction; -class TQDesignerToolBar; +class QDesignerToolBar; class TQMainWindow; -class TQDesignerPopupMenu; -class TQDesignerMenuBar; +class QDesignerPopupMenu; +class QDesignerMenuBar; class TQToolBox; class Command : public TQt @@ -779,7 +779,7 @@ class AddActionToToolBarCommand : public Command { public: AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ); + TQAction *a, QDesignerToolBar *tb, int idx ); void execute(); void unexecute(); @@ -787,7 +787,7 @@ public: private: TQAction *action; - TQDesignerToolBar *toolBar; + QDesignerToolBar *toolBar; int index; }; @@ -796,7 +796,7 @@ class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand { public: RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerToolBar *tb, int idx ) + TQAction *a, QDesignerToolBar *tb, int idx ) : AddActionToToolBarCommand( n, fw, a, tb, idx ) {} void execute() { AddActionToToolBarCommand::unexecute(); } @@ -809,7 +809,7 @@ class AddActionToPopupCommand : public Command { public: AddActionToPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ); + TQAction *a, QDesignerPopupMenu *p, int idx ); void execute(); void unexecute(); @@ -817,7 +817,7 @@ public: private: TQAction *action; - TQDesignerPopupMenu *popup; + QDesignerPopupMenu *popup; int index; }; @@ -826,7 +826,7 @@ class RemoveActionFromPopupCommand : public AddActionToPopupCommand { public: RemoveActionFromPopupCommand( const TQString &n, FormWindow *fw, - TQAction *a, TQDesignerPopupMenu *p, int idx ) + TQAction *a, QDesignerPopupMenu *p, int idx ) : AddActionToPopupCommand( n, fw, a, p, idx ) {} void execute() { AddActionToPopupCommand::unexecute(); } @@ -845,8 +845,8 @@ public: Type type() const { return AddMenu; } protected: - TQDesignerMenuBar *menuBar; - TQDesignerPopupMenu *popup; + QDesignerMenuBar *menuBar; + QDesignerPopupMenu *popup; TQMainWindow *mainWindow; int id; int index; @@ -858,7 +858,7 @@ class RemoveMenuCommand : public AddMenuCommand { public: RemoveMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, - TQDesignerMenuBar *mb, TQDesignerPopupMenu *p, int i, int idx, const TQString &mn ) + QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const TQString &mn ) : AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; } void execute() { AddMenuCommand::unexecute(); } @@ -870,7 +870,7 @@ public: class RenameMenuCommand : public Command { public: - RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, + RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, int i, const TQString &on, const TQString &nn ); void execute(); @@ -878,7 +878,7 @@ public: Type type() const { return RenameMenu; } private: - TQDesignerMenuBar *menuBar; + QDesignerMenuBar *menuBar; int id; TQString oldName, newName; @@ -887,16 +887,16 @@ private: class MoveMenuCommand : public Command { public: - MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb, - TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ); + MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ); void execute(); void unexecute(); Type type() const { return MoveMenu; } private: - TQDesignerMenuBar *menuBar; - TQDesignerPopupMenu *popup; + QDesignerMenuBar *menuBar; + QDesignerPopupMenu *popup; int fromIdx, toIdx; TQString text; @@ -912,7 +912,7 @@ public: Type type() const { return AddToolBar; } protected: - TQDesignerToolBar *toolBar; + QDesignerToolBar *toolBar; TQMainWindow *mainWindow; }; @@ -920,7 +920,7 @@ protected: class RemoveToolBarCommand : public AddToolBarCommand { public: - RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, TQDesignerToolBar *tb ) + RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb ) : AddToolBarCommand( n, fw, mw ) { toolBar = tb; } void execute() { AddToolBarCommand::unexecute(); } diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 2218a977..f3228b6f 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -1107,7 +1107,7 @@ void FormWindow::selectWidget(TQObject * o, bool select) return; } - if (o->inherits("TQDesignerToolBar") || o->inherits("TQDesignerMenuBar")) + if (o->inherits("QDesignerToolBar") || o->inherits("QDesignerMenuBar")) return; if (select) @@ -1414,7 +1414,7 @@ void FormWindow::deleteWidgets() if (!(tb = mainWindow()->isAToolBarChild(TQT_TQOBJECT(it.current()->widget())))) widgets.append(it.current()->widget()); else - ((TQDesignerToolBar *) tb)->removeWidget(it.current()->widget()); + ((QDesignerToolBar *) tb)->removeWidget(it.current()->widget()); } if (widgets.isEmpty()) @@ -2328,7 +2328,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt) } if (!found) { - TQObjectList *l = mainContainer()->queryList("TQDesignerPopupMenu", 0, true); + TQObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true); for (TQObject *o = l->first(); o; o = l->next()) if (o != w && !qstrcmp(o->name(), s.latin1())) { @@ -2376,8 +2376,8 @@ bool FormWindow::isDatabaseWidgetUsed() const bool FormWindow::isDatabaseAware() const { #ifndef TQT_NO_SQL - if (TQString(mContainer->className()) == "TQDesignerDataBrowser" || - TQString(mContainer->className()) == "TQDesignerDataView") + if (TQString(mContainer->className()) == "QDesignerDataBrowser" || + TQString(mContainer->className()) == "QDesignerDataView") return true; return isDatabaseWidgetUsed(); #else diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index 5907b348..03c6385e 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -262,7 +262,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) if ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) ( (TQTabWidget*)w->tqparent()->tqparent() )->showPage( w ); else - ( (TQDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (TQDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) ); + ( (QDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (QDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) ); w = (TQWidget*)w->tqparent()->tqparent(); formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); } else { @@ -434,12 +434,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { TQObject *obj = it.current(); TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false ); - TQDesignerTabWidget *tw = 0; - TQDesignerWizard *dw = 0; + QDesignerTabWidget *tw = 0; + QDesignerWizard *dw = 0; if ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) - tw = (TQDesignerTabWidget*)it.current()->tqparent(); + tw = (QDesignerTabWidget*)it.current()->tqparent(); if ( it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) - dw = (TQDesignerWizard*)it.current()->tqparent(); + dw = (QDesignerWizard*)it.current()->tqparent(); TQWidgetStack *stack = (TQWidgetStack*)obj; for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 || @@ -537,7 +537,7 @@ void HierarchyList::removeTabPage() if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { - TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ). tqarg( dtw->pageTitle() ).tqarg( tw->name() ), formWindow, tw, tw->currentPage() ); @@ -547,7 +547,7 @@ void HierarchyList::removeTabPage() } else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ). tqarg( dw->pageTitle() ).tqarg( wiz->name() ), formWindow, wiz, diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h index f3f1fc91..68215bda 100644 --- a/kommander/editor/hierarchyview.h +++ b/kommander/editor/hierarchyview.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include class FormWindow; class TQCloseEvent; diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index 998b4fce..1b55de9c 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -733,7 +733,7 @@ void GridLayout::doLayout() if ( !prepareLayout( needMove, needRetqparent ) ) return; - TQDesignerGridLayout *tqlayout = (TQDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid ); + QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid ); if ( !grid ) buildGrid(); @@ -941,13 +941,13 @@ void Spacer::setOrientation( Qt::Orientation o ) } -void TQDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) +void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) { items.insert( w, Item(row, col, 1, 1) ); TQGridLayout::addWidget( w, row, col, align_ ); } -void TQDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, +void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow, int fromCol, int toCol, int align_ ) { items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) ); diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h index 107a4083..831ce507 100644 --- a/kommander/editor/layout.h +++ b/kommander/editor/layout.h @@ -154,13 +154,13 @@ protected: TQSize sh; }; -class TQDesignerGridLayout : public TQGridLayout +class QDesignerGridLayout : public TQGridLayout { Q_OBJECT TQ_OBJECT public: - TQDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){}; - TQDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){}; + QDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){}; + QDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){}; void addWidget( TQWidget *, int row, int col, int align = 0 ); void addMultiCellWidget( TQWidget *, int fromRow, int toRow, diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index f87b7c2c..7a47b852 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -626,27 +626,27 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) return true; } case TQEvent::ContextMenu: - if (o->inherits("TQDesignerPopupMenu")) + if (o->inherits("QDesignerPopupMenu")) break; - if (o && currentTool() == POINTER_TOOL && (o->inherits("TQDesignerMenuBar") || - o->inherits("TQDesignerToolBar") || - (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("TQDesignerToolBarSeparator")) && - o->tqparent() && o->tqparent()->inherits("TQDesignerToolBar"))) { + if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") || + o->inherits("QDesignerToolBar") || + (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) && + o->tqparent() && o->tqparent()->inherits("QDesignerToolBar"))) { TQWidget *w = (TQWidget*)o; - if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("TQDesignerToolBarSeparator")) + if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator")) w = w->tqparentWidget(); TQWidget *pw = w->tqparentWidget(); while (pw) { if (pw->inherits("FormWindow")) { ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w)); - if (!o->inherits("TQDesignerToolBar")) + if (!o->inherits("QDesignerToolBar")) return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) && - !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("TQDesignerToolBarSeparator"); + !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator"); } pw = pw->tqparentWidget(); } } - if (o && (o->inherits("TQDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) + if (o && (o->inherits("QDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) && e->type() == TQEvent::ContextMenu) break; if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) @@ -745,7 +745,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) break; case TQEvent::Enter: case TQEvent::Leave: - if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("TQDesignerMenuBar")) + if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar")) break; return true; case TQEvent::Resize: @@ -821,7 +821,7 @@ TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const TQWidget *MainWindow::isAToolBarChild(TQObject *o) const { while (o) { - if (o->inherits("TQDesignerToolBar")) + if (o->inherits("QDesignerToolBar")) return (TQWidget*)o; if (o->inherits("FormWindow")) return 0; @@ -1071,7 +1071,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMapinherits(TQTABWIDGET_OBJECT_NAME_STRING)) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); - if (((TQDesignerTabWidget*)w)->count() > 1) { + if (((QDesignerTabWidget*)w)->count() > 1) { ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0)); commands.insert("remove", id); } @@ -1220,7 +1220,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (tw->currentPage()) { - TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2"). tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentPage()); @@ -1273,7 +1273,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (wiz->currentPage()) { - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2"). tqarg(dw->pageTitle()).tqarg(wiz->name()), formWindow(), wiz, wiz->indexOf(wiz->currentPage())); @@ -1287,7 +1287,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands } else if (id == commands[ "rename" ]) { bool ok = false; - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); if (ok) { TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name())); diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index d8cdb32c..2e0064f0 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index b0c71147..18558be1 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -2505,7 +2505,7 @@ static bool tqparent_is_data_aware( TQObject *o ) TQWidget *w = (TQWidget*)o; TQWidget *p = w->tqparentWidget(); while ( p && !p->isTopLevel() ) { - if ( p->inherits( "TQDesignerDataBrowser" ) || p->inherits( "TQDesignerDataView" ) ) + if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) ) return true; p = p->tqparentWidget(); } @@ -2539,7 +2539,7 @@ void PropertyList::setupProperties() continue; if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) ) continue; - if ( editor->widget()->inherits( "TQDesignerToolBar" ) || editor->widget()->inherits( "TQDesignerMenuBar" ) ) { + if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -2702,7 +2702,7 @@ void PropertyList::setupProperties() } } - if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) && + if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) && w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyIntItem( this, item, 0, "tqlayoutSpacing", true ); setPropertyValue( item ); @@ -2714,7 +2714,7 @@ void PropertyList::setupProperties() if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) && - !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) ) { + !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) { item = new PropertyTextItem( this, item, 0, "toolTip", true, false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 02cd1eec..09768081 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -571,7 +571,7 @@ void Resource::paste( const TQString &cb, TQWidget *tqparent ) formwindow->commandHistory()->addCommand( cmd ); } -void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ) +void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) { if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) ) return; @@ -585,7 +585,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre TQString attributes; if ( grid ) { - TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; + QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; if ( item.rowspan * item.colspan != 1 ) { @@ -619,7 +619,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre TQTabWidget* tw = (TQTabWidget*) obj; TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); - TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar(); + TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { TQTab *t = tb->tabAt( i ); if ( !t ) @@ -936,7 +936,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) TQString closeTag; // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer TQLayout *tqlayout = 0; - TQDesignerGridLayout* grid = 0; + QDesignerGridLayout* grid = 0; if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && @@ -957,7 +957,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) closeTag = makeIndent( indent ) + ""; ts << makeIndent( indent ) << "" << endl; ++indent; - grid = (TQDesignerGridLayout*) tqlayout; + grid = (QDesignerGridLayout*) tqlayout; break; default: break; @@ -1020,7 +1020,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 && ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) continue; - if ( w->inherits( "TQDesignerMenuBar" ) && + if ( w->inherits( "QDesignerMenuBar" ) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || qstrcmp( p->name(), "itemText" ) == 0 ) ) continue; @@ -1355,7 +1355,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL ( (TQVBoxLayout*)tqlayout )->addWidget( w ); break; case WidgetFactory::Grid: - ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -1633,7 +1633,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() ); else - ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, spacer->tqalignment() ); } return spacer; @@ -2434,7 +2434,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e ) TQDomElement n = e; TQAction *a = 0; if ( n.tagName() == "action" ) { - a = new TQDesignerAction( tqparent ); + a = new QDesignerAction( tqparent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2453,7 +2453,7 @@ void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e ) if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { - a = new TQDesignerActionGroup( tqparent ); + a = new QDesignerActionGroup( tqparent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2506,13 +2506,13 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; indent++; saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); - TQPtrList actionList = ( (TQDesignerToolBar*)tb )->insertedActions(); + TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQSeparatorAction" ) ) { + if ( a->inherits( "QSeparatorAction" ) ) { ts << makeIndent( indent ) << "" << endl; } else { - if ( a->inherits( "TQDesignerAction" ) && !( (TQDesignerAction*)a )->supportsMenu() ) { - TQWidget *w = ( (TQDesignerAction*)a )->widget(); + if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) { + TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "" << endl; indent++; @@ -2552,9 +2552,9 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) TQMenuItem *m = mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) ); if ( !m ) continue; - TQPtrList actionList = ( (TQDesignerPopupMenu*)m->popup() )->insertedActions(); + TQPtrList actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( a->inherits( "TQSeparatorAction" ) ) + if ( a->inherits( "QSeparatorAction" ) ) ts << makeIndent( indent ) << "" << endl; else ts << makeIndent( indent ) << "name() << "\"/>" << endl; @@ -2570,11 +2570,11 @@ void Resource::loadToolBars( const TQDomElement &e ) { TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - TQDesignerToolBar *tb = 0; + QDesignerToolBar *tb = 0; while ( !n.isNull() ) { if ( n.tagName() == "toolbar" ) { TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); - tb = new TQDesignerToolBar( mw, dock ); + tb = new QDesignerToolBar( mw, dock ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { @@ -2584,12 +2584,12 @@ void Resource::loadToolBars( const TQDomElement &e ) tb->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( tb ); tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( n2, tb ); - TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) ); + QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); a->addTo( tb ); tb->addAction( a ); tb->installEventFilters( w ); @@ -2607,10 +2607,10 @@ void Resource::loadMenuBar( const TQDomElement &e ) { TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - TQDesignerMenuBar *mb = new TQDesignerMenuBar( mw ); + QDesignerMenuBar *mb = new QDesignerMenuBar( mw ); while ( !n.isNull() ) { if ( n.tagName() == "item" ) { - TQDesignerPopupMenu *popup = new TQDesignerPopupMenu( mw ); + QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw ); popup->setName( n.attribute( "name" ) ); TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { @@ -2621,7 +2621,7 @@ void Resource::loadMenuBar( const TQDomElement &e ) popup->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - TQAction *a = new TQSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( popup ); popup->addAction( a ); } diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h index 1684df20..75dd6387 100644 --- a/kommander/editor/resource.h +++ b/kommander/editor/resource.h @@ -38,7 +38,7 @@ class TQPalette; class FormWindow; class MainWindow; class TQDomElement; -class TQDesignerGridLayout; +class QDesignerGridLayout; class TQListViewItem; class TQMainWindow; #ifndef KOMMANDER @@ -77,7 +77,7 @@ public: static void loadCustomWidgets( const TQDomElement &e, Resource *r ); private: - void saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent ); + void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ); void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp index 73349c3b..cb12834e 100644 --- a/kommander/editor/widgetdatabase.cpp +++ b/kommander/editor/widgetdatabase.cpp @@ -377,7 +377,7 @@ void WidgetDatabase::setupDataBase( int id ) append(r); r = new WidgetDatabaseRecord; - r->name = "TQDesignerWizard"; + r->name = "QDesignerWizard"; r->group = widgetGroup("Forms"); r->isContainer = true; append(r); @@ -398,21 +398,21 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerTabWidget"; + r->name = "QDesignerTabWidget"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerWidget"; + r->name = "QDesignerWidget"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "TQDesignerDialog"; + r->name = "QDesignerDialog"; r->group = widgetGroup("Temp"); r->isContainer = true; append(r); diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h index 24b14530..9d6f97c1 100644 --- a/kommander/editor/widgetdatabase.h +++ b/kommander/editor/widgetdatabase.h @@ -25,7 +25,7 @@ #include #ifndef KOMMANDER #include "widgetinterface.h" // up here for GCC 2.7.* compatibility -#include +#include extern TQPluginManager *widgetManager(); diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 920a3605..b908f8e9 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -137,52 +137,52 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* ) } -TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *tqparent, const char *name ) +QDesignerTabWidget::QDesignerTabWidget( TQWidget *tqparent, const char *name ) : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) { tabBar()->setAcceptDrops( true ); tabBar()->installEventFilter( this ); } -int TQDesignerTabWidget::currentPage() const +int QDesignerTabWidget::currentPage() const { return tabBar()->currentTab(); } -void TQDesignerTabWidget::setCurrentPage( int i ) +void QDesignerTabWidget::setCurrentPage( int i ) { tabBar()->setCurrentTab( i ); } -TQString TQDesignerTabWidget::pageTitle() const +TQString QDesignerTabWidget::pageTitle() const { return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); } -void TQDesignerTabWidget::setPageTitle( const TQString& title ) +void QDesignerTabWidget::setPageTitle( const TQString& title ) { changeTab( TQTabWidget::currentPage(), title ); } -void TQDesignerTabWidget::setPageName( const TQCString& name ) +void QDesignerTabWidget::setPageName( const TQCString& name ) { if ( TQTabWidget::currentPage() ) TQTabWidget::currentPage()->setName( name ); } -TQCString TQDesignerTabWidget::pageName() const +TQCString QDesignerTabWidget::pageName() const { if ( !TQTabWidget::currentPage() ) return 0; return TQTabWidget::currentPage()->name(); } -int TQDesignerTabWidget::count() const +int QDesignerTabWidget::count() const { return tabBar()->count(); } -bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false; @@ -303,7 +303,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) return false; } -int TQDesignerWizard::currentPageNum() const +int QDesignerWizard::currentPageNum() const { for ( int i = 0; i < pageCount(); ++i ) { if ( page( i ) == currentPage() ) @@ -312,7 +312,7 @@ int TQDesignerWizard::currentPageNum() const return 0; } -void TQDesignerWizard::setCurrentPage( int i ) +void QDesignerWizard::setCurrentPage( int i ) { if ( i < currentPageNum() ) { while ( i < currentPageNum() ) { @@ -330,30 +330,30 @@ void TQDesignerWizard::setCurrentPage( int i ) } } -TQString TQDesignerWizard::pageTitle() const +TQString QDesignerWizard::pageTitle() const { return title( currentPage() ); } -void TQDesignerWizard::setPageTitle( const TQString& title ) +void QDesignerWizard::setPageTitle( const TQString& title ) { setTitle( currentPage(), title ); } -void TQDesignerWizard::setPageName( const TQCString& name ) +void QDesignerWizard::setPageName( const TQCString& name ) { if ( TQWizard::currentPage() ) TQWizard::currentPage()->setName( name ); } -TQCString TQDesignerWizard::pageName() const +TQCString QDesignerWizard::pageName() const { if ( !TQWizard::currentPage() ) return 0; return TQWizard::currentPage()->name(); } -int TQDesignerWizard::pageNum( TQWidget *p ) +int QDesignerWizard::pageNum( TQWidget *p ) { for ( int i = 0; i < pageCount(); ++i ) { if ( page( i ) == p ) @@ -362,20 +362,20 @@ int TQDesignerWizard::pageNum( TQWidget *p ) return -1; } -void TQDesignerWizard::addPage( TQWidget *p, const TQString &t ) +void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) { TQWizard::addPage( p, t ); if ( removedPages.tqfind( p ) ) removedPages.remove( p ); } -void TQDesignerWizard::removePage( TQWidget *p ) +void QDesignerWizard::removePage( TQWidget *p ) { TQWizard::removePage( p ); removedPages.insert( p, p ); } -void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) { TQWizard::insertPage( p, t, index ); if ( removedPages.tqfind( p ) ) @@ -721,7 +721,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: - l = new TQDesignerGridLayout( gb->tqlayout() ); + l = new QDesignerGridLayout( gb->tqlayout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); l->tqsetAlignment( AlignTop ); @@ -749,7 +749,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: { - l = new TQDesignerGridLayout( tqlayout ); + l = new QDesignerGridLayout( tqlayout ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); l->setSpacing( spacing ); l->setMargin( margin ); @@ -787,7 +787,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: { - l = new TQDesignerGridLayout( widget ); + l = new QDesignerGridLayout( widget ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); if ( widget ) { MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin ); @@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa TQPushButton *b = 0; if (init) { - b = new TQDesignerPushButton(tqparent, name); + b = new QDesignerPushButton(tqparent, name); b->setText(TQString::tqfromLatin1(name)); } else { - b = new TQDesignerPushButton(tqparent, name); + b = new QDesignerPushButton(tqparent, name); } TQWidget *w = find_formwindow(b); b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING)); @@ -850,29 +850,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { if (init) { - TQDesignerToolButton *tb = new TQDesignerToolButton(tqparent, name); + QDesignerToolButton *tb = new QDesignerToolButton(tqparent, name); tb->setText("..."); return tb; } - return new TQDesignerToolButton(tqparent, name); + return new QDesignerToolButton(tqparent, name); } else if (className == TQCHECKBOX_OBJECT_NAME_STRING) { if (init) { - TQDesignerCheckBox *cb = new TQDesignerCheckBox(tqparent, name); + QDesignerCheckBox *cb = new QDesignerCheckBox(tqparent, name); cb->setText(TQString::tqfromLatin1(name)); return cb; } - return new TQDesignerCheckBox(tqparent, name); + return new QDesignerCheckBox(tqparent, name); } else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING) { if (init) { - TQDesignerRadioButton *rb = new TQDesignerRadioButton(tqparent, name); + QDesignerRadioButton *rb = new QDesignerRadioButton(tqparent, name); rb->setText(TQString::tqfromLatin1(name)); return rb; } - return new TQDesignerRadioButton(tqparent, name); + return new QDesignerRadioButton(tqparent, name); } else if (className == TQGROUPBOX_OBJECT_NAME_STRING) { if (init) @@ -947,7 +947,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return new TQTextEdit(tqparent, name); else if (className == TQLABEL_OBJECT_NAME_STRING) { - TQDesignerLabel *l = new TQDesignerLabel(tqparent, name); + QDesignerLabel *l = new QDesignerLabel(tqparent, name); if (init) { l->setText(TQString::tqfromLatin1(name)); @@ -959,14 +959,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return new TQLayoutWidget(tqparent, name); else if (className == TQTABWIDGET_OBJECT_NAME_STRING) { - TQTabWidget *tw = new TQDesignerTabWidget(tqparent, name); + TQTabWidget *tw = new QDesignerTabWidget(tqparent, name); if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -984,7 +984,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa FormWindow *fw = find_formwindow(tqparent); if (fw) { - TQDesignerWidget *dw = new TQDesignerWidget(fw, tqparent, name); + QDesignerWidget *dw = new QDesignerWidget(fw, tqparent, name); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); return dw; } @@ -994,7 +994,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { TQDialog *dia = 0; if (tqparent && tqparent->inherits("FormWindow")) - dia = new TQDesignerDialog((FormWindow *) tqparent, tqparent, name); + dia = new QDesignerDialog((FormWindow *) tqparent, tqparent, name); else dia = new TQDialog(tqparent, name); if (tqparent && !tqparent->inherits("MainWindow")) @@ -1002,14 +1002,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return dia; } else if (className == TQWIZARD_OBJECT_NAME_STRING) { - TQWizard *wiz = new TQDesignerWizard(tqparent, name); + TQWizard *wiz = new QDesignerWizard(tqparent, name); if (tqparent && !tqparent->inherits("MainWindow")) { wiz->reparent(tqparent, TQPoint(0, 0), true); } if (init && tqparent && tqparent->inherits("FormWindow")) { - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page"); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); wiz->addPage(dw, i18n("Page")); TQTimer::singleShot(0, wiz, TQT_SLOT(next())); @@ -1089,7 +1089,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa { TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0); mw->setDockEnabled(TQt::DockMinimized, false); - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, mw, "central widget"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, mw, "central widget"); mw->setDockMenuEnabled(false); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); mw->setCentralWidget(dw); @@ -1100,13 +1100,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa #ifndef TQT_NO_SQL else if (className == TQDATABROWSER_OBJECT_NAME_STRING) { - TQWidget *w = new TQDesignerDataBrowser(tqparent, name); + TQWidget *w = new QDesignerDataBrowser(tqparent, name); if (tqparent) w->reparent(tqparent, TQPoint(0, 0), true); return w; } else if (className == TQDATAVIEW_OBJECT_NAME_STRING) { - TQWidget *w = new TQDesignerDataView(tqparent, name); + TQWidget *w = new QDesignerDataView(tqparent, name); if (tqparent) w->reparent(tqparent, TQPoint(0, 0), true); return w; @@ -1144,14 +1144,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa //qDebug("Creating Wizard..."); TQWizard *wiz; if (tqparent && tqparent->inherits("FormWindow")) - wiz = new TQDesignerWizard(tqparent, name); + wiz = new QDesignerWizard(tqparent, name); else wiz = new Wizard(tqparent, name); if (tqparent) wiz->reparent(tqparent, TQPoint(0, 0), true); if (init && tqparent && tqparent->inherits("FormWindow")) { - TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page"); + QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page"); MetaDataBase::addEntry(TQT_TQOBJECT(dw)); wiz->addPage(dw, i18n("Page 1")); wiz->addPage(dw, i18n("Page 2")); @@ -1165,10 +1165,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -1180,10 +1180,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa if (init) { FormWindow *fw = find_formwindow(tqparent); - TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 1")); MetaDataBase::addEntry(TQT_TQOBJECT(w)); - w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); + w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 2")); MetaDataBase::addEntry(TQT_TQOBJECT(tw)); MetaDataBase::addEntry(TQT_TQOBJECT(w)); @@ -1415,7 +1415,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) */ const char* WidgetFactory::classNameOf( TQObject* o ) { - if (o->inherits("TQDesignerTabWidget")) + if (o->inherits("QDesignerTabWidget")) return TQTABWIDGET_OBJECT_NAME_STRING; #ifdef KOMMANDER else if (o->inherits("EditorTabWidget")) @@ -1423,34 +1423,34 @@ const char* WidgetFactory::classNameOf( TQObject* o ) else if (o->inherits("EditorToolBox")) return "ToolBox"; #endif - else if (o->inherits("TQDesignerDialog")) + else if (o->inherits("QDesignerDialog")) return TQDIALOG_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerWidget")) + else if (o->inherits("QDesignerWidget")) return TQWIDGET_OBJECT_NAME_STRING; else if (o->inherits("CustomWidget")) return ((CustomWidget *) o)->realClassName().latin1(); - else if (o->inherits("TQDesignerLabel")) + else if (o->inherits("QDesignerLabel")) return TQLABEL_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerWizard")) + else if (o->inherits("QDesignerWizard")) return TQWIZARD_OBJECT_NAME_STRING; else if (o->inherits("EditorWizard")) return "Wizard"; - else if (o->inherits("TQDesignerPushButton")) + else if (o->inherits("QDesignerPushButton")) return TQPUSHBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerToolButton")) + else if (o->inherits("QDesignerToolButton")) return TQTOOLBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerRadioButton")) + else if (o->inherits("QDesignerRadioButton")) return TQRADIOBUTTON_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerCheckBox")) + else if (o->inherits("QDesignerCheckBox")) return TQCHECKBOX_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerMenuBar")) + else if (o->inherits("QDesignerMenuBar")) return TQMENUBAR_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerToolBar")) + else if (o->inherits("QDesignerToolBar")) return TQTOOLBAR_OBJECT_NAME_STRING; #ifndef TQT_NO_SQL - else if (o->inherits("TQDesignerDataBrowser")) + else if (o->inherits("QDesignerDataBrowser")) return TQDATABROWSER_OBJECT_NAME_STRING; - else if (o->inherits("TQDesignerDataView")) + else if (o->inherits("QDesignerDataView")) return TQDATAVIEW_OBJECT_NAME_STRING; #endif else if (o->inherits("EditorDialog")) @@ -1466,7 +1466,7 @@ const char* WidgetFactory::classNameOf( TQObject* o ) void WidgetFactory::initChangedProperties( TQObject *o ) { MetaDataBase::setPropertyChanged( o, "name", true ); - if ( !o->inherits( "TQDesignerToolBar" ) && !o->inherits( "TQDesignerMenuBar" ) ) + if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) ) MetaDataBase::setPropertyChanged( o, "geometry", true ); if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) ) @@ -1503,9 +1503,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true ); } else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) { MetaDataBase::setPropertyChanged( o, "orientation", true ); - } else if ( o->inherits( "TQDesignerToolBar" ) ) { + } else if ( o->inherits( "QDesignerToolBar" ) ) { MetaDataBase::setPropertyChanged( o, "label", true ); - } else if ( o->inherits( "TQDesignerMenuBar" ) ) { + } else if ( o->inherits( "QDesignerMenuBar" ) ) { MetaDataBase::setPropertyChanged( o, "itemName", true ); MetaDataBase::setPropertyChanged( o, "itemNumber", true ); MetaDataBase::setPropertyChanged( o, "itemText", true ); @@ -1745,7 +1745,7 @@ TQVariant WidgetFactory::property( TQObject *w, const char *name ) return MetaDataBase::fakeProperty( w, name ); } -void TQDesignerLabel::updateBuddy() +void QDesignerLabel::updateBuddy() { if ( myBuddy.isEmpty() ) @@ -1761,12 +1761,12 @@ void TQDesignerLabel::updateBuddy() delete l; } -void TQDesignerWidget::paintEvent( TQPaintEvent *e ) +void QDesignerWidget::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } -void TQDesignerDialog::paintEvent( TQPaintEvent *e ) +void QDesignerDialog::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index bfde50ec..ab73cd5c 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -108,7 +108,7 @@ private: }; -class TQDesignerTabWidget : public TQTabWidget +class QDesignerTabWidget : public TQTabWidget { Q_OBJECT TQ_OBJECT @@ -116,7 +116,7 @@ class TQDesignerTabWidget : public TQTabWidget TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - TQDesignerTabWidget( TQWidget *tqparent, const char *name ); + QDesignerTabWidget( TQWidget *tqparent, const char *name ); int currentPage() const; void setCurrentPage( int i ); @@ -188,7 +188,7 @@ public: int count() const; }; -class TQDesignerWizard : public TQWizard +class QDesignerWizard : public TQWizard { Q_OBJECT TQ_OBJECT @@ -196,7 +196,7 @@ class TQDesignerWizard : public TQWizard TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - TQDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {} + QDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {} int currentPageNum() const; void setCurrentPage( int i ); @@ -303,7 +303,7 @@ public: } }; -class TQDesignerLabel : public TQLabel +class QDesignerLabel : public TQLabel { Q_OBJECT TQ_OBJECT @@ -311,7 +311,7 @@ class TQDesignerLabel : public TQLabel TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) public: - TQDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 ) + QDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 ) : TQLabel( tqparent, name ) { myBuddy = 0; } void setBuddyWidget( const TQCString &b ) { @@ -336,13 +336,13 @@ private: }; -class TQDesignerWidget : public TQWidget +class QDesignerWidget : public TQWidget { Q_OBJECT TQ_OBJECT public: - TQDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name ) + QDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name, WResizeNoErase ), formwindow( fw ) {} protected: @@ -353,13 +353,13 @@ private: }; -class TQDesignerDialog : public TQDialog +class QDesignerDialog : public TQDialog { Q_OBJECT TQ_OBJECT public: - TQDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name ) + QDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name ) : TQDialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) {} protected: @@ -370,14 +370,14 @@ private: }; -class TQDesignerToolButton : public TQToolButton +class QDesignerToolButton : public TQToolButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerToolButton( TQWidget *tqparent, const char *name ) + QDesignerToolButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -394,14 +394,14 @@ public: } }; -class TQDesignerRadioButton : public TQRadioButton +class QDesignerRadioButton : public TQRadioButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerRadioButton( TQWidget *tqparent, const char *name ) + QDesignerRadioButton( TQWidget *tqparent, const char *name ) : TQRadioButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -419,14 +419,14 @@ public: }; -class TQDesignerPushButton : public TQPushButton +class QDesignerPushButton : public TQPushButton { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerPushButton( TQWidget *tqparent, const char *name ) + QDesignerPushButton( TQWidget *tqparent, const char *name ) : TQPushButton( tqparent, name ) {} bool isInButtonGroup() const { @@ -444,14 +444,14 @@ public: }; -class TQDesignerCheckBox : public TQCheckBox +class QDesignerCheckBox : public TQCheckBox { Q_OBJECT TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - TQDesignerCheckBox( TQWidget *tqparent, const char *name ) + QDesignerCheckBox( TQWidget *tqparent, const char *name ) : TQCheckBox( tqparent, name ) {} bool isInButtonGroup() const { diff --git a/kommander/editor/widgetinterface.h b/kommander/editor/widgetinterface.h index 364e9871..3eed33d7 100644 --- a/kommander/editor/widgetinterface.h +++ b/kommander/editor/widgetinterface.h @@ -21,7 +21,7 @@ #ifndef WIDGETINTERFACE_H #define WIDGETINTERFACE_H -#include +#include #define WidgetInterface TQWidgetFactoryInterface #define IID_Widget IID_TQWidgetFactory diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp index d5713bd0..11ac1cf3 100644 --- a/kommander/factory/kommanderfactory.cpp +++ b/kommander/factory/kommanderfactory.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -259,10 +259,10 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; - if ( cit.key()->inherits( "TQDesignerDataBrowser2" ) ) - ( (TQDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); - else if ( cit.key()->inherits( "TQDesignerDataView2" ) ) - ( (TQDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); + if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) + ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); + else if ( cit.key()->inherits( "QDesignerDataView2" ) ) + ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); } for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { @@ -423,9 +423,9 @@ TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWi else if (className == TQDATATABLE_OBJECT_NAME_STRING) return new TQDataTable(tqparent, name); else if (className == TQDATABROWSER_OBJECT_NAME_STRING) - return new TQDesignerDataBrowser2(tqparent, name); + return new QDesignerDataBrowser2(tqparent, name); else if (className == TQDATAVIEW_OBJECT_NAME_STRING) - return new TQDesignerDataView2(tqparent, name); + return new QDesignerDataView2(tqparent, name); #endif // try to create it using the loaded kommander widget plugins diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp index 7ee2e26c..735653c5 100644 --- a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp @@ -284,7 +284,7 @@ bool KXsldbgPart::openURL(const KURL &url) { bool result = fetchURL(url); if (result){ - TQXsldbgDoc *docPtr = docDictionary[url.prettyURL()]; + QXsldbgDoc *docPtr = docDictionary[url.prettyURL()]; if (docPtr && docPtr->kateView()){ if (docPtr != currentDoc){ currentDoc = docPtr; @@ -305,9 +305,9 @@ bool KXsldbgPart::openURL(const KURL &url) bool KXsldbgPart::fetchURL(const KURL &url) { TQString docID = url.prettyURL(); - TQXsldbgDoc *docPtr = docDictionary[docID]; + QXsldbgDoc *docPtr = docDictionary[docID]; if (!docPtr){ - docPtr = new TQXsldbgDoc(mainView, url); + docPtr = new QXsldbgDoc(mainView, url); docDictionary.insert(docID, docPtr); if (docPtr->kateView()){ mainView->addWidget(docPtr->kateView()); @@ -582,8 +582,8 @@ void KXsldbgPart::refreshCmd_activated() { if ( !currentFileName.isEmpty() ){ - TQDictIterator it(docDictionary); - TQXsldbgDoc *docPtr; + TQDictIterator it(docDictionary); + QXsldbgDoc *docPtr; while (it.current()){ docPtr = it.current(); docPtr->refresh(); @@ -650,8 +650,8 @@ KXsldbgPart::lineNoChanged(TQString fileName, int lineNumber, bool breakpoint) openURL(fileName); - TQXsldbgDoc *docPtr; - TQDictIterator it(docDictionary); + QXsldbgDoc *docPtr; + TQDictIterator it(docDictionary); while (it.current()){ docPtr = it.current(); // cause all Execution and BreakpointReached marks to be cleared @@ -812,8 +812,8 @@ void KXsldbgPart::breakpointItem(TQString fileName, int lineNumber , if (fileName == 0L){ /* Go through all documents and remove all breakpoints */ - TQDictIterator it(docDictionary); - TQXsldbgDoc *docPtr; + TQDictIterator it(docDictionary); + QXsldbgDoc *docPtr; while (it.current()){ docPtr = it.current(); docPtr->clearMarks(true); @@ -834,7 +834,7 @@ void KXsldbgPart::breakpointItem(TQString fileName, int lineNumber , KURL temp(fileName); fileName = temp.prettyURL(); fetchURL(fileName); - TQXsldbgDoc *docPtr = docDictionary[fileName] ; + QXsldbgDoc *docPtr = docDictionary[fileName] ; if (docPtr){ docPtr->addBreakPoint(lineNumber - 1, enabled); }else { diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.h b/kxsldbg/kxsldbgpart/kxsldbg_part.h index f33ae05f..d742fb59 100644 --- a/kxsldbg/kxsldbgpart/kxsldbg_part.h +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.h @@ -25,7 +25,7 @@ class TQDockWindow; class TQWidgetStack; class XsldbgBrkStatusView; -class TQXsldbgDoc; +class QXsldbgDoc; class XsldbgOutputView; class XsldbgConfigImpl; @@ -35,7 +35,7 @@ class KURL; class TQMultiLineEdit; class KAboutData; -typedef TQDict XsldbgDocDict; +typedef TQDict XsldbgDocDict; /** * This is a "Part". It that does all the real work in a KPart @@ -151,7 +151,7 @@ protected slots: void fileOpen(); private: - TQXsldbgDoc *currentDoc; + QXsldbgDoc *currentDoc; TQWidgetStack *mainView; TQPushButton *xPathBtn, *searchBtn, *evaluateBtn; diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp index c57dd521..690847e8 100644 --- a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp +++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp @@ -14,14 +14,14 @@ #include -TQXsldbgDoc::TQXsldbgDoc(TQWidget *tqparent, KURL url) - : TQObject(0L, "TQXsldbgDoc"), kDoc(0L),kView(0L), locked(false) +QXsldbgDoc::QXsldbgDoc(TQWidget *tqparent, KURL url) + : TQObject(0L, "QXsldbgDoc"), kDoc(0L),kView(0L), locked(false) { kDoc = KTextEditor::createDocument("libkatepart", 0L,"KTextEditor::Document"); connect(kDoc, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(lockDoc())); connect(kDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(unlockDoc())); if (kDoc){ - kView = kDoc->createView(tqparent, "TQXsldbgDocView"); + kView = kDoc->createView(tqparent, "QXsldbgDocView"); KURL cleanUrl; // convert paths relative to PWD into a absolute path TQString relUrl = url.prettyURL(); @@ -37,7 +37,7 @@ TQXsldbgDoc::TQXsldbgDoc(TQWidget *tqparent, KURL url) } -TQXsldbgDoc::~TQXsldbgDoc() +QXsldbgDoc::~QXsldbgDoc() { if (kDoc){ if (kDoc->views().count() == 1){ @@ -47,7 +47,7 @@ TQXsldbgDoc::~TQXsldbgDoc() } } -void TQXsldbgDoc::slotResult( KIO::Job *job ) +void QXsldbgDoc::slotResult( KIO::Job *job ) { if ( job->error() != 0 ){ }else{ @@ -55,7 +55,7 @@ void TQXsldbgDoc::slotResult( KIO::Job *job ) emit docChanged(); } -KURL TQXsldbgDoc::url() const +KURL QXsldbgDoc::url() const { if (kDoc) return kDoc->url(); @@ -63,7 +63,7 @@ KURL TQXsldbgDoc::url() const return KURL(); } -void TQXsldbgDoc::refresh() +void QXsldbgDoc::refresh() { if (kDoc){ KURL lastUrl = kDoc->url(); @@ -73,7 +73,7 @@ void TQXsldbgDoc::refresh() } -void TQXsldbgDoc::enableBreakPoint(uint lineNumber, bool state) +void QXsldbgDoc::enableBreakPoint(uint lineNumber, bool state) { if (locked) return; @@ -88,7 +88,7 @@ void TQXsldbgDoc::enableBreakPoint(uint lineNumber, bool state) } } -void TQXsldbgDoc::addBreakPoint(uint lineNumber, bool enabled) +void QXsldbgDoc::addBreakPoint(uint lineNumber, bool enabled) { if (locked) return; @@ -102,7 +102,7 @@ void TQXsldbgDoc::addBreakPoint(uint lineNumber, bool enabled) } } -void TQXsldbgDoc::deleteBreakPoint(uint lineNumber) +void QXsldbgDoc::deleteBreakPoint(uint lineNumber) { if (locked) return; @@ -113,7 +113,7 @@ void TQXsldbgDoc::deleteBreakPoint(uint lineNumber) } -void TQXsldbgDoc::clearMarks(bool allMarkTypes) +void QXsldbgDoc::clearMarks(bool allMarkTypes) { if (locked) return; @@ -134,7 +134,7 @@ void TQXsldbgDoc::clearMarks(bool allMarkTypes) } -void TQXsldbgDoc::selectBreakPoint(uint lineNumber, bool reachedBreakPoint) +void QXsldbgDoc::selectBreakPoint(uint lineNumber, bool reachedBreakPoint) { if (locked) return; @@ -150,12 +150,12 @@ void TQXsldbgDoc::selectBreakPoint(uint lineNumber, bool reachedBreakPoint) } } -void TQXsldbgDoc::lockDoc() +void QXsldbgDoc::lockDoc() { locked = true; } -void TQXsldbgDoc::unlockDoc() +void QXsldbgDoc::unlockDoc() { locked = false; } diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.h b/kxsldbg/kxsldbgpart/qxsldbgdoc.h index 0f19da1b..07f5e4fc 100644 --- a/kxsldbg/kxsldbgpart/qxsldbgdoc.h +++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.h @@ -16,14 +16,14 @@ #include #include -class TQXsldbgDoc : public TQObject { +class QXsldbgDoc : public TQObject { Q_OBJECT TQ_OBJECT public: - TQXsldbgDoc(TQWidget *tqparent=0, KURL url=TQString()); - ~TQXsldbgDoc(); + QXsldbgDoc(TQWidget *tqparent=0, KURL url=TQString()); + ~QXsldbgDoc(); void enableBreakPoint(uint lineNumber, bool state); void addBreakPoint(uint lineNumber, bool enabled); diff --git a/kxsldbg/kxsldbgpart/xsldbgdocmap.h b/kxsldbg/kxsldbgpart/xsldbgdocmap.h index 6310b711..22edd94e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdocmap.h +++ b/kxsldbg/kxsldbgpart/xsldbgdocmap.h @@ -2,4 +2,4 @@ #include #include "tqxsldbgdoc.h" -typedef TQMap XsldbgDocMap; +typedef TQMap XsldbgDocMap; diff --git a/lib/qextfileinfo.cpp b/lib/qextfileinfo.cpp index 28f5a8e1..767e28b9 100644 --- a/lib/qextfileinfo.cpp +++ b/lib/qextfileinfo.cpp @@ -32,9 +32,9 @@ //app includes #include "qextfileinfo.h" -TQString TQExtFileInfo::lastErrorMsg = ""; +TQString QExtFileInfo::lastErrorMsg = ""; -TQString TQExtFileInfo::canonicalPath(const TQString& path) +TQString QExtFileInfo::canonicalPath(const TQString& path) { if (!path.startsWith("/") || path == "/") return path; @@ -52,18 +52,18 @@ TQString TQExtFileInfo::canonicalPath(const TQString& path) TQString s = u.path(-1) + "/"; if (s == "//") s = "/"; TQString s2 = path.mid(s.length()); - s2 = TQExtFileInfo::canonicalPath(s) + s2; + s2 = QExtFileInfo::canonicalPath(s) + s2; return s2; } } -TQString TQExtFileInfo::homeDirPath() +TQString QExtFileInfo::homeDirPath() { return TQDir(TQDir::homeDirPath()).canonicalPath(); } /** create a relative short url based in baseURL*/ -KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bool resolveSymlinks) +KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bool resolveSymlinks) { KURL urlToConvert = _urlToConvert; KURL baseURL = _baseURL; @@ -74,13 +74,13 @@ KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, b { TQString path; if (resolveSymlinks) - path = TQExtFileInfo::canonicalPath(urlToConvert.path()); + path = QExtFileInfo::canonicalPath(urlToConvert.path()); else path = urlToConvert.path(); if (!path.isEmpty()) urlToConvert.setPath(path); if (resolveSymlinks) - path = TQExtFileInfo::canonicalPath(baseURL.path()); + path = QExtFileInfo::canonicalPath(baseURL.path()); else path = baseURL.path(); if (!path.isEmpty()) @@ -126,7 +126,7 @@ KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, b return resultURL; } /** convert relative filename to absolute */ -KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) +KURL QExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) { KURL urlToConvert = _urlToConvert; KURL baseURL = _baseURL; @@ -136,7 +136,7 @@ KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) { if (urlToConvert.isLocalFile()) { - TQString path = TQExtFileInfo::canonicalPath(baseURL.path()); + TQString path = QExtFileInfo::canonicalPath(baseURL.path()); if (!path.isEmpty()) baseURL.setPath(path); } @@ -161,34 +161,34 @@ KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) This is needed for empty directory adding/handling. (Andras) Currently works only for local directories */ -KURL::List TQExtFileInfo::allFiles( const KURL& path, const TQString& tqmask, TQWidget *window) +KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& tqmask, TQWidget *window) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.allFilesInternal(path, tqmask, window); } -KURL::List TQExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask, TQWidget *window, bool resolveSymlinks) +KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask, TQWidget *window, bool resolveSymlinks) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; KURL::List r = internalFileInfo.allFilesInternal(path, tqmask, window); KURL::List::Iterator it; for ( it = r.begin(); it != r.end(); ++it ) { - *it = TQExtFileInfo::toRelative( *it, path, resolveSymlinks ); + *it = QExtFileInfo::toRelative( *it, path, resolveSymlinks ); } return r; } -TQDict TQExtFileInfo::allFilesDetailed(const KURL& path, const TQString& tqmask, TQWidget *window) +TQDict QExtFileInfo::allFilesDetailed(const KURL& path, const TQString& tqmask, TQWidget *window) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.allFilesDetailedInternal(path, tqmask, window); } -bool TQExtFileInfo::createDir(const KURL& path, TQWidget *window) +bool QExtFileInfo::createDir(const KURL& path, TQWidget *window) { int i = 0; bool result; @@ -223,7 +223,7 @@ bool TQExtFileInfo::createDir(const KURL& path, TQWidget *window) return result; } -KURL TQExtFileInfo::cdUp(const KURL &url) +KURL QExtFileInfo::cdUp(const KURL &url) { KURL u = url; TQString dir = u.path(-1); @@ -235,19 +235,19 @@ KURL TQExtFileInfo::cdUp(const KURL &url) return u; } -TQString TQExtFileInfo::shortName(const TQString &fname) +TQString QExtFileInfo::shortName(const TQString &fname) { return fname.section("/", -1); } -KURL TQExtFileInfo::path( const KURL &url ) +KURL QExtFileInfo::path( const KURL &url ) { KURL result = url; result.setPath(result.directory(false,false)); return result; } -KURL TQExtFileInfo::home() +KURL QExtFileInfo::home() { KURL url; url.setPath(TQDir::currentDirPath()+"/"); @@ -255,7 +255,7 @@ KURL TQExtFileInfo::home() } -bool TQExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window) +bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window) { // Andras: Don't use it now, as it brings up an extra dialog and need manual // intervention when usign fish @@ -267,21 +267,21 @@ bool TQExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window return TQFile::exists(a_url.path()); } else { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.internalExists(a_url, readingOnly, window); } } /* Synchronous copy, like NetAccess::file_copy in KDE 3.2 */ -bool TQExtFileInfo::copy( const KURL& src, const KURL& target, int permissions, +bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions, bool overwrite, bool resume, TQWidget* window ) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window ); } /** No descriptions */ -KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window) +KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window) { if (startURL.isLocalFile()) return allLocalFiles(startURL.path(-1), tqmask); @@ -320,7 +320,7 @@ KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& } /** No descriptions */ -TQDict TQExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window) +TQDict QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window) { detailedDirListItems.setAutoDelete(true); detailedDirListItems.clear(); @@ -356,7 +356,7 @@ TQDict TQExtFileInfo::allFilesDetailedInternal(const KURL& startURL, return detailedDirListItems; } -KURL::List TQExtFileInfo::allLocalFiles(const TQString& startPath, const TQString& tqmask) +KURL::List QExtFileInfo::allLocalFiles(const TQString& startPath, const TQString& tqmask) { KURL::List list; TQDir d(startPath, tqmask); @@ -387,12 +387,12 @@ KURL::List TQExtFileInfo::allLocalFiles(const TQString& startPath, const TQStrin //Some hackery from KIO::NetAccess as they do not do exactly what we want /* return true if the url exists*/ -bool TQExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *window) +bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *window) { bJobOK = true; KURL url2 = url; url2.adjustPath(-1); - // kdDebug(24000)<<"TQExtFileInfo::internalExists"<setWindow(window); job->setDetails(0); @@ -402,13 +402,13 @@ bool TQExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget * //To avoid lock-ups, start a timer. TQTimer::singleShot(60*1000, this,TQT_SLOT(slotTimeout())); - //kdDebug(24000)<<"TQExtFileInfo::internalExists:before enter_loop"<enter_loop()"<< endl; + //kdDebug(24000)<<"QExtFileInfo::enter_loop:before tqApp->enter_loop()"<< endl; tqApp->enter_loop(); -// kdDebug(24000)<<"TQExtFileInfo::enter_loop:after tqApp->enter_loop()"<enter_loop()"<error(); if ( !bJobOK ) { @@ -469,7 +469,7 @@ void TQExtFileInfo::slotResult(KIO::Job *job) tqApp->exit_loop(); } -void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) +void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) { KURL url = static_cast(job)->url(); url.adjustPath(-1); @@ -543,7 +543,7 @@ void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLi } } -void TQExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) +void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList) { KURL url = static_cast(job)->url(); url.adjustPath(-1); @@ -611,7 +611,7 @@ void TQExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryLis } /** Timeout occurred while waiting for some network function to return. */ -void TQExtFileInfo::slotTimeout() +void QExtFileInfo::slotTimeout() { bJobOK = false; tqApp->exit_loop(); diff --git a/lib/qextfileinfo.h b/lib/qextfileinfo.h index ca51123b..6a9e52c7 100644 --- a/lib/qextfileinfo.h +++ b/lib/qextfileinfo.h @@ -22,13 +22,13 @@ #include #include -class TQExtFileInfo:public TQObject +class QExtFileInfo:public TQObject { Q_OBJECT TQ_OBJECT public: - TQExtFileInfo() {}; - ~TQExtFileInfo() {}; + QExtFileInfo() {}; + ~QExtFileInfo() {}; /** * Works like TQDir::canonicalPath, but it does not return an empty @@ -38,7 +38,7 @@ public: * Example: * /home/user/foo points to /mnt/foo * /home/user/foo/foo2 does not exists - * TQExtFileInfo::canonicalPath("/home/user/foo/foo2/") will return + * QExtFileInfo::canonicalPath("/home/user/foo/foo2/") will return * /mnt/foo/foo2/ . * @param path the path to resolve * @return the canonical path (symlinks resolved) diff --git a/quanta/components/csseditor/tlpeditors.cpp b/quanta/components/csseditor/tlpeditors.cpp index 6b796cf7..a674a209 100644 --- a/quanta/components/csseditor/tlpeditors.cpp +++ b/quanta/components/csseditor/tlpeditors.cpp @@ -92,7 +92,7 @@ void URIEditor::setMode(const mode& m) { void URIEditor::selectedURI(const TQString & s){ KURL u; u.setPath(s); - emit valueChanged("url(\'" + TQExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); + emit valueChanged("url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } void URIEditor::selectedURIs(const TQStringList& s){ @@ -101,7 +101,7 @@ void URIEditor::selectedURIs(const TQStringList& s){ selectedFilesWithURLFormat; for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); - selectedFilesWithURLFormat.append( "url(\'" + TQExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); + selectedFilesWithURLFormat.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } emit valueChanged(selectedFilesWithURLFormat.join(",")); } @@ -143,7 +143,7 @@ void URIEditor::openFileDialog(){ KURL u; for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); - m_sFiles.append( "url(\'" + TQExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); + m_sFiles.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } emit valueChanged(m_sFiles.join(","));*/ } diff --git a/quanta/components/debugger/debuggermanager.cpp b/quanta/components/debugger/debuggermanager.cpp index 60fd68ef..0810cd91 100644 --- a/quanta/components/debugger/debuggermanager.cpp +++ b/quanta/components/debugger/debuggermanager.cpp @@ -601,7 +601,7 @@ bool DebuggerManager::setActiveLine (const TQString& file, int line ) return true; // Find new position in editor - if(ViewManager::ref()->isOpened(filename) || TQExtFileInfo::exists(filename, true, 0L)) + if(ViewManager::ref()->isOpened(filename) || QExtFileInfo::exists(filename, true, 0L)) quantaApp->gotoFileAndLine(filename, line, 0); else { diff --git a/quanta/components/debugger/pathmapper.cpp b/quanta/components/debugger/pathmapper.cpp index e1d74875..41d5053e 100644 --- a/quanta/components/debugger/pathmapper.cpp +++ b/quanta/components/debugger/pathmapper.cpp @@ -110,21 +110,21 @@ TQString PathMapper::mapServerPathToLocal(const TQString &serverpath) newpath = translate(serverpath, m_serverBasedir, m_localBasedir); // Check if this dir is matched by the basedirs - if(TQExtFileInfo::exists(newpath, true, 0L)) + if(QExtFileInfo::exists(newpath, true, 0L)) return newpath; // Check if any previous mappings fit... for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) { newpath = translate(serverpath, m_serverlist[cnt], m_locallist[cnt]); - if(TQExtFileInfo::exists(newpath, true, 0L)) + if(QExtFileInfo::exists(newpath, true, 0L)) return newpath; } // If the basedirs didnt match, check if the file exists, // otherwise scan through the mapping history or show the // mapping dialog - if(!TQExtFileInfo::exists(serverpath, true, 0L)) + if(!QExtFileInfo::exists(serverpath, true, 0L)) { PathMapperDialog pmdlg(serverpath, PathMapperDialog::ServerToLocal); for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) diff --git a/quanta/components/debugger/pathmapperdialog.cpp b/quanta/components/debugger/pathmapperdialog.cpp index 8cc385d5..671bb871 100644 --- a/quanta/components/debugger/pathmapperdialog.cpp +++ b/quanta/components/debugger/pathmapperdialog.cpp @@ -78,7 +78,7 @@ void PathMapperDialog::slotPathsChanged() // Indicate wether local file exists if(m_direction == ServerToLocal) { - if(TQExtFileInfo::exists(translated, true, this)) + if(QExtFileInfo::exists(translated, true, this)) ledTranslationExists->setColor(TQt::green); else ledTranslationExists->setColor(TQt::red); diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index d75074bd..ff32277b 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -209,7 +209,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ KURL pathToConvert, basePath; pathToConvert.setPath(srcPattern.cap(1)); basePath.setPath( Project::ref()->projectBaseURL().path() ); - attributeMap["src"] = TQExtFileInfo::toAbsolute( pathToConvert, basePath ).path(); + attributeMap["src"] = QExtFileInfo::toAbsolute( pathToConvert, basePath ).path(); line.remove(srcPattern);//we don't need to operate on this anymore } @@ -335,7 +335,7 @@ TQString VisualFrameEditor::createFrameTag(areaAttribute *a){ base.setPath( Project::ref()->projectBaseURL().path() ); KURL u; u.setPath(Src); - tagMiddle+= (" src=\"" + TQExtFileInfo::toRelative( u, base).path() + "\""); + tagMiddle+= (" src=\"" + QExtFileInfo::toRelative( u, base).path() + "\""); } if( !Longdesc.isEmpty() ) diff --git a/quanta/dialogs/copyto.cpp b/quanta/dialogs/copyto.cpp index 7a4c596d..9f66cb11 100644 --- a/quanta/dialogs/copyto.cpp +++ b/quanta/dialogs/copyto.cpp @@ -46,9 +46,9 @@ KURL CopyTo::copy(const KURL& urlToCopy, const KURL& destination) targetDirURL.adjustPath(1); bool doCopy = true; - if (!TQExtFileInfo::exists(targetDirURL, false, 0L)) + if (!QExtFileInfo::exists(targetDirURL, false, 0L)) { - doCopy = TQExtFileInfo::createDir(targetDirURL, 0L); + doCopy = QExtFileInfo::createDir(targetDirURL, 0L); } KURL destURL; @@ -93,9 +93,9 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) targetDirURL = destination; } bool doCopy = true; - if (!TQExtFileInfo::exists(targetDirURL, false, 0L)) + if (!QExtFileInfo::exists(targetDirURL, false, 0L)) { - doCopy = TQExtFileInfo::createDir(targetDirURL, 0L); + doCopy = QExtFileInfo::createDir(targetDirURL, 0L); } KIO::UDSEntry entry; diff --git a/quanta/dialogs/dirtydlg.cpp b/quanta/dialogs/dirtydlg.cpp index 18301045..61940d1c 100644 --- a/quanta/dialogs/dirtydlg.cpp +++ b/quanta/dialogs/dirtydlg.cpp @@ -78,7 +78,7 @@ void DirtyDlg::slotCompareDone(KProcess* proc) { KURL backupURL = m_src; backupURL.setPath(backupURL.path()+".backup"); - TQExtFileInfo::copy(m_src, backupURL, -1, true, false, this); + QExtFileInfo::copy(m_src, backupURL, -1, true, false, this); } KIO::UDSEntry entry; diff --git a/quanta/dialogs/filecombo.cpp b/quanta/dialogs/filecombo.cpp index 818df7ac..b0eae65c 100644 --- a/quanta/dialogs/filecombo.cpp +++ b/quanta/dialogs/filecombo.cpp @@ -97,7 +97,7 @@ void FileCombo::slotFileSelect() delete dlg; if ( !url.isEmpty() ) { - if (!m_absolutePath) url = TQExtFileInfo::toRelative(url, baseURL); + if (!m_absolutePath) url = QExtFileInfo::toRelative(url, baseURL); combo->setEditText( url.path() ); } } diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index b8f08324..b52d3be9 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -108,7 +108,7 @@ void TagImgDlg::slotFileSelect() if ( !url.isEmpty() ) { slotImageSet( url ); - url = TQExtFileInfo::toRelative(url, baseURL); + url = QExtFileInfo::toRelative(url, baseURL); lineImgSource->setText( url.path() ); } } @@ -150,7 +150,7 @@ void TagImgDlg::writeAttributes( TQDict *d ) lineImgSource->setText(*t); KURL url = baseURL; QuantaCommon::setUrl(url, *t); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); slotImageSet( url ); } if ( (t=d->tqfind("alt")) ) diff --git a/quanta/messages/annotationoutput.cpp b/quanta/messages/annotationoutput.cpp index b666f7b6..2b584854 100644 --- a/quanta/messages/annotationoutput.cpp +++ b/quanta/messages/annotationoutput.cpp @@ -147,7 +147,7 @@ void AnnotationOutput::readAnnotations() TQString fileName = el.attribute("url"); KURL u = baseURL; QuantaCommon::setUrl(u, fileName); - u = TQExtFileInfo::toAbsolute(u, baseURL); + u = QExtFileInfo::toAbsolute(u, baseURL); if (Project::ref()->tqcontains(u)) { bool ok; @@ -331,7 +331,7 @@ void AnnotationOutput::updateAnnotationForFile(const KURL& url) f.close(); if (!annotations.isEmpty()) { - KURL u = TQExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); + KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); writeAnnotations(QuantaCommon::qUrl(u), annotations); } } diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index c0942441..2783acca 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -84,7 +84,7 @@ void DTD::writeTagFiles() TQString dirName = m_dtepDir; KURL u; u.setPath(dirName); - if (!TQExtFileInfo::createDir(dirName)) { + if (!QExtFileInfo::createDir(dirName)) { QuantaCommon::dirCreationError(0, u); return; } diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 577d2734..8b4ec503 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -134,7 +134,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) DTD::dirName = targetDir; KURL u; u.setPath(DTD::dirName); - if (!TQExtFileInfo::createDir(u, 0L)) { + if (!QExtFileInfo::createDir(u, 0L)) { QuantaCommon::dirCreationError(0L, u); return false; } diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp index e28abe78..5f45a73a 100644 --- a/quanta/parsers/sagroupparser.cpp +++ b/quanta/parsers/sagroupparser.cpp @@ -117,7 +117,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) StructTreeGroup group; GroupElement *groupElement; GroupElementList* groupElementList; - KURL baseURL = TQExtFileInfo::path(m_write->url()); + KURL baseURL = QExtFileInfo::path(m_write->url()); TQString str = node->tag->cleanStr; TQString tagStr = node->tag->tagStr(); const DTDStruct* dtd = node->tag->dtd(); @@ -294,7 +294,7 @@ void SAGroupParser::parseForScriptGroup(Node *node) s.remove(group.fileNameRx); KURL url; QuantaCommon::setUrl(url, s.stripWhiteSpace()); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); ParserCommon::includedFiles += url.path(); ParserCommon::includedFilesDTD.append(dtd); ParserCommon::includeWatch->addFile(url.path()); diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp index a6fdd8bb..23b2655e 100644 --- a/quanta/parts/kafka/htmldocumentproperties.cpp +++ b/quanta/parts/kafka/htmldocumentproperties.cpp @@ -219,7 +219,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* tqparent, bool forceIn cssStylesheet->setMode(KFile::File | KFile::ExistingOnly ); baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory()); QuantaCommon::setUrl(url, linkNode->tag->attributeValue(index)); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); cssStylesheet->setURL(url.url()); } } @@ -537,7 +537,7 @@ void htmlDocumentProperties::accept() QuantaCommon::setUrl(url, cssStylesheet->url()); baseURL = view->document()->url(); baseURL.setPath(baseURL.directory()); - url = TQExtFileInfo::toRelative(url, baseURL); + url = QExtFileInfo::toRelative(url, baseURL); finalURL = url.url(); if (url.protocol() == view->document()->url().protocol()) finalURL.remove(0, url.protocol().length() + 1); diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp index 3f757a48..e9419799 100644 --- a/quanta/parts/kafka/htmlenhancer.cpp +++ b/quanta/parts/kafka/htmlenhancer.cpp @@ -64,7 +64,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node tqparentDNode, DOM::Node ne { baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory()); QuantaCommon::setUrl(url, domNode.nodeValue().string()); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); domNode.setNodeValue(url.url()); #ifdef HEAVY_DEBUG kdDebug(25001)<< "HTMLTranslator::translateNode() - new src : " << url.url() << endl; @@ -80,7 +80,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node tqparentDNode, DOM::Node ne { baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory()); QuantaCommon::setUrl(url, domNode.nodeValue().string()); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); domNode.setNodeValue(url.url()); #ifdef HEAVY_DEBUG kdDebug(25001)<< "HTMLTranslator::translateNode() - new href : " << url.url() << endl; diff --git a/quanta/project/eventconfigurationdlg.cpp b/quanta/project/eventconfigurationdlg.cpp index 226c4bff..d50eb1e0 100644 --- a/quanta/project/eventconfigurationdlg.cpp +++ b/quanta/project/eventconfigurationdlg.cpp @@ -48,7 +48,7 @@ void EventConfigurationDlg::initEvents(EventActions *events) for (TQValueList::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2) { EventAction ev = *it2; - item = new TQListViewItem(eventsListView, TQPEvents::ref()->fullEventName(it.key()), TQPEvents::ref()->fullActionName(ev.action)); + item = new TQListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action)); int argcount = ev.arguments.count(); if (argcount > 0) item->setText(2, ev.arguments[0]); @@ -78,8 +78,8 @@ void EventConfigurationDlg::saveEvents(TQDomDocument dom) node = dom.createElement("event"); eventsNode.appendChild(node); TQDomElement el = node.toElement(); - el.setAttribute("name", TQPEvents::ref()->eventName(item->text(0))); - el.setAttribute("action", TQPEvents::ref()->actionName(item->text(1))); + el.setAttribute("name", QPEvents::ref()->eventName(item->text(0))); + el.setAttribute("action", QPEvents::ref()->actionName(item->text(1))); if (el.attribute("action") == "script" || el.attribute("action") == "action") el.setAttribute("type", "external"); else diff --git a/quanta/project/eventeditordlg.cpp b/quanta/project/eventeditordlg.cpp index db5c8b93..4c3edd34 100644 --- a/quanta/project/eventeditordlg.cpp +++ b/quanta/project/eventeditordlg.cpp @@ -39,8 +39,8 @@ EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, TQWidget* tq : EventEditorDlgS(tqparent,name,fl) { m_actionCollection = actionCollection; - eventCombo->insertStringList(TQPEvents::ref()->eventNames()); - actionCombo->insertStringList(TQPEvents::ref()->actionNames()); + eventCombo->insertStringList(QPEvents::ref()->eventNames()); + actionCombo->insertStringList(QPEvents::ref()->actionNames()); slotActionChanged(actionCombo->currentText()); } @@ -79,7 +79,7 @@ TQString EventEditorDlg::argument1() { TQString s = argument1Combo->currentText(); TQString actionType = actionCombo->currentText(); - if (actionType == TQPEvents::ref()->fullActionName("email")) + if (actionType == QPEvents::ref()->fullActionName("email")) { if (s == i18n(teamLeaderStr.utf8())) s = "teamleader"; @@ -96,7 +96,7 @@ TQString EventEditorDlg::argument1() } return s; } else - if (actionType == TQPEvents::ref()->fullActionName("script")) + if (actionType == QPEvents::ref()->fullActionName("script")) { TQString s = argument1Combo->currentText(); for (TQMap::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it) @@ -109,7 +109,7 @@ TQString EventEditorDlg::argument1() } return s; } else - if (actionType == TQPEvents::ref()->fullActionName("action")) + if (actionType == QPEvents::ref()->fullActionName("action")) { TQString s = argument1Combo->currentText(); for (TQMap::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it) @@ -134,7 +134,7 @@ TQString EventEditorDlg::argument2() if (argument2Combo->isEnabled()) { TQString actionType = actionCombo->currentText(); - if (actionType == TQPEvents::ref()->fullActionName("log")) + if (actionType == QPEvents::ref()->fullActionName("log")) { int id = argument2Combo->currentItem(); if (id == 0) @@ -142,7 +142,7 @@ TQString EventEditorDlg::argument2() else return "minimal"; } else - if (actionType == TQPEvents::ref()->fullActionName("script")) + if (actionType == QPEvents::ref()->fullActionName("script")) { int id = argument2Combo->currentItem(); if (id == 0) @@ -160,7 +160,7 @@ TQString EventEditorDlg::argument3() if (argument3Combo->isEnabled()) { TQString actionType = actionCombo->currentText(); - if (actionType == TQPEvents::ref()->fullActionName("log")) + if (actionType == QPEvents::ref()->fullActionName("log")) { int id = argument3Combo->currentItem(); if (id == 0) @@ -185,7 +185,7 @@ TQString EventEditorDlg::argument4() void EventEditorDlg::setArguments(const TQStringList& arguments) { TQString actionType = actionCombo->currentText(); - if (actionType == TQPEvents::ref()->fullActionName("email")) + if (actionType == QPEvents::ref()->fullActionName("email")) { TQString s = arguments[0]; if (s == "teamleader") @@ -218,7 +218,7 @@ void EventEditorDlg::setArguments(const TQStringList& arguments) argument1Combo->setCurrentItem(0); } } else - if (actionType == TQPEvents::ref()->fullActionName("script")) + if (actionType == QPEvents::ref()->fullActionName("script")) { TQString s = arguments[0]; if (m_scriptActions.tqcontains(s)) @@ -246,7 +246,7 @@ void EventEditorDlg::setArguments(const TQStringList& arguments) argument2Combo->setCurrentItem(1); return; //setup for script arguments completed } else - if (actionType == TQPEvents::ref()->fullActionName("action")) + if (actionType == QPEvents::ref()->fullActionName("action")) { TQString s = arguments[0]; if (m_otherActions.tqcontains(s)) @@ -268,7 +268,7 @@ void EventEditorDlg::setArguments(const TQStringList& arguments) argument1Combo->setCurrentItem(0); } } else - if (actionType == TQPEvents::ref()->fullActionName("log")) + if (actionType == QPEvents::ref()->fullActionName("log")) { argument1Combo->insertItem(arguments[0], 0); argument1Combo->setCurrentItem(0); @@ -312,7 +312,7 @@ void EventEditorDlg::slotActionChanged(const TQString &name) resetArgumentWidgets(argument2Label, argument2Combo); resetArgumentWidgets(argument3Label, argument3Combo); resetArgumentWidgets(argument4Label, argument4Combo); - if (name == TQPEvents::ref()->fullActionName("email")) + if (name == QPEvents::ref()->fullActionName("email")) { argument1Label->setEnabled(true); argument1Label->setText(i18n("Receiver:")); @@ -331,7 +331,7 @@ void EventEditorDlg::slotActionChanged(const TQString &name) argument1Combo->insertItem(i18n(taskLeaderStr.utf8()) + " - " + tasks[i]); } } else - if (name == TQPEvents::ref()->fullActionName("log")) + if (name == QPEvents::ref()->fullActionName("log")) { argument1Label->setEnabled(true); argument1Label->setText(i18n("Log file:")); @@ -350,7 +350,7 @@ void EventEditorDlg::slotActionChanged(const TQString &name) argument3Combo->insertItem(i18n("Create New Log"), 0); argument3Combo->insertItem(i18n("Append to Existing Log"), 1); } else - if (name == TQPEvents::ref()->fullActionName("script")) + if (name == QPEvents::ref()->fullActionName("script")) { argument1Label->setEnabled(true); argument1Label->setText(i18n("Action name:")); @@ -378,7 +378,7 @@ void EventEditorDlg::slotActionChanged(const TQString &name) argument2Combo->insertItem(i18n("Yes"), 0); argument2Combo->insertItem(i18n("No"), 1); } else - if (name == TQPEvents::ref()->fullActionName("action")) + if (name == QPEvents::ref()->fullActionName("action")) { argument1Label->setEnabled(true); argument1Label->setText(i18n("Action name:")); diff --git a/quanta/project/project.cpp b/quanta/project/project.cpp index d5988c69..aa80e4f3 100644 --- a/quanta/project/project.cpp +++ b/quanta/project/project.cpp @@ -146,7 +146,7 @@ void Project::insertFile(const KURL& nameURL, bool tqrepaint ) if ( !d->m_projectFiles.tqcontains(url) ) { el = d->dom.createElement("item"); - el.setAttribute("url", QuantaCommon::qUrl( TQExtFileInfo::toRelative(url, d->baseURL) )); + el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(url, d->baseURL) )); d->dom.firstChild().firstChild().appendChild( el ); KURL u = url.upURL(); ProjectURL *tqparentURL = d->m_projectFiles.tqfind(u); @@ -258,7 +258,7 @@ void Project::slotOpenProject(const KURL &url) kdDebug(24000) << "Open recent project: " << url <m_mainWindow) ) + if ( !QExtFileInfo::exists(url, true, d->m_mainWindow) ) { emit hideSplash(); if (KMessageBox::questionYesNo(d->m_mainWindow, @@ -424,7 +424,7 @@ void Project::slotRemove(const KURL& urlToRemove) emit reloadTree( &(d->m_projectFiles), false, TQStringList() ); emit newtqStatus(); - TQString urlPath = TQExtFileInfo::toRelative(urlToRemove, d->baseURL).path(); + TQString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path(); TQString nice = urlPath; nice = KStringHandler::lsqueeze(nice, 60); if (KMessageBox::warningContinueCancel(d->m_mainWindow, i18n("Do you want to remove
%1
from the server(s) as well?
").tqarg(nice), i18n("Remove From Server"), KStdGuiItem::remove(), "RemoveFromServer") == KMessageBox::Continue ) @@ -468,9 +468,9 @@ void Project::slotOptions() topLayout->addWidget(&optionsPage); optionsPage.linePrjName->setText( d->projectName ); - url = TQExtFileInfo::toRelative(d->templateURL, d->baseURL); + url = QExtFileInfo::toRelative(d->templateURL, d->baseURL); optionsPage.linePrjTmpl->setText(QuantaCommon::qUrl(url)); - url = TQExtFileInfo::toRelative(d->toolbarURL, d->baseURL); + url = QExtFileInfo::toRelative(d->toolbarURL, d->baseURL); optionsPage.linePrjToolbar->setText( QuantaCommon::qUrl(url) ); optionsPage.lineAuthor->setText( d->author ); @@ -627,16 +627,16 @@ void Project::slotOptions() QuantaCommon::setUrl(d->templateURL, optionsPage.linePrjTmpl->text()); d->templateURL.adjustPath(1); - d->templateURL = TQExtFileInfo::toAbsolute(d->templateURL, d->baseURL); - if (!TQExtFileInfo::createDir(d->templateURL, d->m_mainWindow)) + d->templateURL = QExtFileInfo::toAbsolute(d->templateURL, d->baseURL); + if (!QExtFileInfo::createDir(d->templateURL, d->m_mainWindow)) { QuantaCommon::dirCreationError(d->m_mainWindow, d->templateURL); } QuantaCommon::setUrl(d->toolbarURL, optionsPage.linePrjToolbar->text()); d->toolbarURL.adjustPath(1); - d->toolbarURL = TQExtFileInfo::toAbsolute(d->toolbarURL, d->baseURL); - if (!TQExtFileInfo::createDir(d->toolbarURL, d->m_mainWindow)) + d->toolbarURL = QExtFileInfo::toAbsolute(d->toolbarURL, d->baseURL); + if (!QExtFileInfo::createDir(d->toolbarURL, d->m_mainWindow)) { QuantaCommon::dirCreationError(d->m_mainWindow, d->toolbarURL); } @@ -706,7 +706,7 @@ void Project::slotOptions() } el = projectNode.namedItem("templates").toElement(); - url = TQExtFileInfo::toRelative(d->templateURL, d->baseURL); + url = QExtFileInfo::toRelative(d->templateURL, d->baseURL); if(el.isNull()) { el =d->dom.createElement("templates"); @@ -718,7 +718,7 @@ void Project::slotOptions() el.firstChild().setNodeValue(QuantaCommon::qUrl(url)); } - url = TQExtFileInfo::toRelative(d->toolbarURL, d->baseURL); + url = QExtFileInfo::toRelative(d->toolbarURL, d->baseURL); el = projectNode.namedItem("toolbars").toElement(); if(el.isNull()) { @@ -874,7 +874,7 @@ void Project::slotUploadURL(const KURL& urlToUpload, const TQString& profileName if (!ViewManager::ref()->saveAll()) return; - KURL url = TQExtFileInfo::toRelative( urlToUpload, d->baseURL); + KURL url = QExtFileInfo::toRelative( urlToUpload, d->baseURL); if (!d->m_uploadDialog) { d->m_uploadDialog = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items...").ascii()); @@ -909,7 +909,7 @@ KURL Project::urlWithPrefix(const KURL& url) if (d->usePreviewPrefix) { - KURL tempUrl = TQExtFileInfo::toRelative(url, d->baseURL ); + KURL tempUrl = QExtFileInfo::toRelative(url, d->baseURL ); if ( !tempUrl.path().startsWith("/") ) { returnUrl = d->previewPrefix; @@ -985,10 +985,10 @@ KURL Project::projectBaseURL() Document *w = ViewManager::ref()->activeDocument(); if ( !w || w->isUntitled() ) { - result = TQExtFileInfo::home(); + result = QExtFileInfo::home(); } else { - result = TQExtFileInfo::path(w->url()); + result = QExtFileInfo::path(w->url()); } } return result; @@ -1317,7 +1317,7 @@ void Project::loadBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf) return; TQDomNodeList nl = d->dom.elementsByTagName("item"); TQDomElement el; - KURL u = TQExtFileInfo::toRelative(url, d->baseURL); + KURL u = QExtFileInfo::toRelative(url, d->baseURL); for ( uint i = 0; i < nl.count(); i++ ) { el = nl.item(i).toElement(); @@ -1349,7 +1349,7 @@ void Project::saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf) } TQDomNodeList nl = d->dom.elementsByTagName("item"); TQDomElement el; - KURL u = TQExtFileInfo::toRelative(url, d->baseURL); + KURL u = QExtFileInfo::toRelative(url, d->baseURL); for ( uint i = 0; i < nl.count(); i++ ) { el = nl.item(i).toElement(); @@ -1367,7 +1367,7 @@ void Project::loadCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa return; TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item"); TQDomElement el; - KURL u = TQExtFileInfo::toRelative(url, d->baseURL); + KURL u = QExtFileInfo::toRelative(url, d->baseURL); for ( uint i = 0; i < nl.count(); i++ ) { el = nl.item(i).toElement(); @@ -1400,7 +1400,7 @@ void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa return; TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item"); TQDomElement el; - KURL u = TQExtFileInfo::toRelative(url, d->baseURL); + KURL u = QExtFileInfo::toRelative(url, d->baseURL); uint line, col; viewCursorIf->cursorPosition(&line, &col); bool found = false; diff --git a/quanta/project/projectlist.cpp b/quanta/project/projectlist.cpp index db162ce2..82b4d86e 100644 --- a/quanta/project/projectlist.cpp +++ b/quanta/project/projectlist.cpp @@ -69,7 +69,7 @@ bool ProjectList::readFromXML(TQDomDocument &dom, const KURL &baseURL, } } path = url.path(); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); if ( el.nodeName() == "item" ) { if (excludeRx.exactMatch(path) || tqfind(url.url(-1))) diff --git a/quanta/project/projectlist.h b/quanta/project/projectlist.h index baec78ec..361c119c 100644 --- a/quanta/project/projectlist.h +++ b/quanta/project/projectlist.h @@ -56,7 +56,7 @@ public: */ KURL toRelative(const KURL &url) const { - return TQExtFileInfo::toRelative(url, m_baseURL, false); + return QExtFileInfo::toRelative(url, m_baseURL, false); } /** diff --git a/quanta/project/projectnewgeneral.cpp b/quanta/project/projectnewgeneral.cpp index 76a98a79..81c53728 100644 --- a/quanta/project/projectnewgeneral.cpp +++ b/quanta/project/projectnewgeneral.cpp @@ -137,7 +137,7 @@ void ProjectNewGeneral::slotLinePrjFile( const TQString & ) baseUrl = url; if (baseUrl.isLocalFile()) { - s = TQExtFileInfo::canonicalPath(baseUrl.path()); + s = QExtFileInfo::canonicalPath(baseUrl.path()); if (!s.isEmpty()) baseUrl.setPath(s); } @@ -222,7 +222,7 @@ bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e ) { KURL url = baseUrl; QuantaCommon::setUrl(url, linePrjTmpl->text()); - url = TQExtFileInfo::toAbsolute(url, baseUrl); + url = QExtFileInfo::toAbsolute(url, baseUrl); if (!baseUrl.isParentOf(url)) { KMessageBox::sorry(this,i18n("The project templates must be stored under the main project folder:

%1
").tqarg(baseUrl.prettyURL(0, KURL::StripFileProtocol))); @@ -235,7 +235,7 @@ bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e ) { KURL url = baseUrl; QuantaCommon::setUrl(url, linePrjToolbar->text()); - url = TQExtFileInfo::toAbsolute(url, baseUrl); + url = QExtFileInfo::toAbsolute(url, baseUrl); if (!baseUrl.isParentOf(url)) { KMessageBox::sorry(0,i18n("The project toolbars must be stored under the main project folder:

%1
") diff --git a/quanta/project/projectnewlocal.cpp b/quanta/project/projectnewlocal.cpp index 1de12e9e..5a47a3db 100644 --- a/quanta/project/projectnewlocal.cpp +++ b/quanta/project/projectnewlocal.cpp @@ -112,7 +112,7 @@ KURL::List ProjectNewLocal::projectFiles() { KURL::List list; - if (!TQExtFileInfo::exists(baseURL, false, this) || + if (!QExtFileInfo::exists(baseURL, false, this) || !baseURL.path().endsWith("/") || !checkInsert->isChecked() ) return list; @@ -142,7 +142,7 @@ KURL::List ProjectNewLocal::projectFiles() ftqmask = tqmask->text(); } - list = TQExtFileInfo::allFilesRelative(baseURL, ftqmask, this, false); + list = QExtFileInfo::allFilesRelative(baseURL, ftqmask, this, false); return list; } @@ -180,7 +180,7 @@ void ProjectNewLocal::resizeEvent ( TQResizeEvent *t ) /** No descriptions */ void ProjectNewLocal::slotAddFiles() { - TQExtFileInfo::createDir(baseURL, this); + QExtFileInfo::createDir(baseURL, this); KURL::List list = KFileDialog::getOpenURLs( baseURL.url(), i18n("*"), this, i18n("Insert Files in Project")); @@ -188,7 +188,7 @@ void ProjectNewLocal::slotAddFiles() { KURL u = list.first(); - u = TQExtFileInfo::toRelative( u, baseURL, false ); + u = QExtFileInfo::toRelative( u, baseURL, false ); if ( u.path().startsWith("..") || u.path().startsWith("/")) { @@ -218,7 +218,7 @@ void ProjectNewLocal::slotAddFiles() progressBar->setTextEnabled(true); for (uint i = 0; i < list.count(); i++) { - list[i] = TQExtFileInfo::toRelative(list[i], baseURL, false); + list[i] = QExtFileInfo::toRelative(list[i], baseURL, false); if (!fileList.tqcontains(list[i])) { fileList.append(list[i]); @@ -238,7 +238,7 @@ void ProjectNewLocal::slotAddFolder() { //TODO/FIXME: This returns null if the selected directory is not on the local disk. //I think this is a KDE bug - TQExtFileInfo::createDir(baseURL, this); + QExtFileInfo::createDir(baseURL, this); KURL dirURL ; dirURL = KFileDialog::getExistingURL( baseURL.url(), this, i18n("Insert Folder in Project")); @@ -248,7 +248,7 @@ void ProjectNewLocal::slotAddFolder() dirURL.adjustPath(1); KURL sdir = dirURL; - sdir = TQExtFileInfo::toRelative( sdir, baseURL, false); + sdir = QExtFileInfo::toRelative( sdir, baseURL, false); if ( sdir.path().startsWith("..") || sdir.path().startsWith("/") ) { @@ -293,7 +293,7 @@ void ProjectNewLocal::slotInsertFolderAfterCopying(const KURL::List& a_urlList) { dirURL = *it; // dirURL.adjustPath(1); - KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*", this, false); + KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this, false); progressBar->setTotalSteps(files.count() - 1); progressBar->setTextEnabled(true); KURL u; @@ -328,7 +328,7 @@ void ProjectNewLocal::slotInsertFilesAfterCopying(const KURL::List& a_urlList) progressBar->setTextEnabled(true); for (it = a_urlList.begin(); it != a_urlList.end(); ++it) { - u = TQExtFileInfo::toRelative(*it, baseURL, false); + u = QExtFileInfo::toRelative(*it, baseURL, false); if ( !fileList.tqcontains(u)) { fileList.append(u); diff --git a/quanta/project/projectnewweb.cpp b/quanta/project/projectnewweb.cpp index 08391dbe..ef4ee2b7 100644 --- a/quanta/project/projectnewweb.cpp +++ b/quanta/project/projectnewweb.cpp @@ -99,7 +99,7 @@ void ProjectNewWeb::slotStart() { emit enableMessagesWidget(); - if (TQExtFileInfo::createDir(baseURL, this)) + if (QExtFileInfo::createDir(baseURL, this)) { if (baseURL.protocol() == "file") { diff --git a/quanta/project/projectprivate.cpp b/quanta/project/projectprivate.cpp index 871ae7bc..e5a9e8e5 100644 --- a/quanta/project/projectprivate.cpp +++ b/quanta/project/projectprivate.cpp @@ -254,11 +254,11 @@ void ProjectPrivate::openCurrentView() TQDomElement el2 = itemNodes.item(j).cloneNode().toElement(); KURL url = baseURL; QuantaCommon::setUrl(url,el2.attribute("url")); - url = TQExtFileInfo::toAbsolute(url, baseURL); + url = QExtFileInfo::toAbsolute(url, baseURL); if (el2.nodeName() == "viewitem") { urlsInView.append(url); - if (!ViewManager::ref()->isOpened(url) && TQExtFileInfo::exists(url, true, m_mainWindow)) + if (!ViewManager::ref()->isOpened(url) && QExtFileInfo::exists(url, true, m_mainWindow)) urlsToOpen.append(url); } else { if (el2.nodeName() == "viewtoolbar") @@ -325,7 +325,7 @@ void ProjectPrivate::insertFiles( KURL::List files ) if (!m_projectFiles.tqcontains(url)) { el = dom.createElement("item"); - el.setAttribute("url", QuantaCommon::qUrl(TQExtFileInfo::toRelative(url, baseURL, false))); + el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false))); dom.firstChild().firstChild().appendChild(el); m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) ); emit eventHappened("after_project_add", url.url(), TQString()); @@ -337,7 +337,7 @@ void ProjectPrivate::insertFiles( KURL::List files ) url = *it; if (!excludeRx.exactMatch(url.path())) { - el.setAttribute("url", QuantaCommon::qUrl(TQExtFileInfo::toRelative(url, baseURL, false))); + el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false))); dom.firstChild().firstChild().appendChild(el); m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) ); emit eventHappened("after_project_add", url.url(), TQString()); @@ -362,7 +362,7 @@ void ProjectPrivate::insertFiles(const KURL& pathURL, const TQString& tqmask ) KURL::List list; list.append(pathURL); - list += TQExtFileInfo::allFiles(pathURL, tqmask, m_mainWindow); + list += QExtFileInfo::allFiles(pathURL, tqmask, m_mainWindow); insertFiles(list); } @@ -464,7 +464,7 @@ void ProjectPrivate::loadProjectXML() if (tmpString != QuantaCommon::qUrl(templateURL) ) { el = no.toElement(); - url = TQExtFileInfo::toRelative(templateURL, baseURL); + url = QExtFileInfo::toRelative(templateURL, baseURL); if(el.isNull()) { el = dom.createElement("templates"); @@ -476,7 +476,7 @@ void ProjectPrivate::loadProjectXML() el.firstChild().setNodeValue(QuantaCommon::qUrl(url)); } } - templateURL = TQExtFileInfo::toAbsolute(templateURL, baseURL); + templateURL = QExtFileInfo::toAbsolute(templateURL, baseURL); no = projectNode.namedItem("toolbars"); toolbarURL = baseURL; @@ -492,7 +492,7 @@ void ProjectPrivate::loadProjectXML() if (tmpString != QuantaCommon::qUrl(toolbarURL)) { el = no.toElement(); - url = TQExtFileInfo::toRelative(toolbarURL, baseURL); + url = QExtFileInfo::toRelative(toolbarURL, baseURL); if(el.isNull()) { el = dom.createElement("toolbars"); @@ -504,7 +504,7 @@ void ProjectPrivate::loadProjectXML() el.firstChild().setNodeValue(QuantaCommon::qUrl(url)); } } - toolbarURL = TQExtFileInfo::toAbsolute(toolbarURL, baseURL); + toolbarURL = QExtFileInfo::toAbsolute(toolbarURL, baseURL); no = projectNode.namedItem("exclude"); m_excludeCvsignore = (no.toElement().attribute("cvsignore", "false") == "true"); @@ -739,7 +739,7 @@ void ProjectPrivate::slotAcceptCreateProject() if (baseURL.protocol() == i18n("Local")) baseURL.setProtocol("file"); baseURL.adjustPath(1); if (!baseURL.path().startsWith("/")) baseURL.setPath("/"+ baseURL.path()); - if (!TQExtFileInfo::createDir(baseURL, m_mainWindow)) + if (!QExtFileInfo::createDir(baseURL, m_mainWindow)) { QuantaCommon::dirCreationError(m_mainWindow, baseURL); baseURL = oldBaseURL; @@ -789,7 +789,7 @@ void ProjectPrivate::slotAcceptCreateProject() for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it ) { - url = *it;//TQExtFileInfo::toRelative(*it, baseURL ); + url = *it;//QExtFileInfo::toRelative(*it, baseURL ); el = dom.createElement("item"); el.setAttribute("url",QuantaCommon::qUrl(url)); dom.firstChild().firstChild().appendChild( el ); @@ -823,28 +823,28 @@ void ProjectPrivate::slotAcceptCreateProject() { QuantaCommon::setUrl(templateURL, png->linePrjTmpl->text()); templateURL.adjustPath(1); - templateURL = TQExtFileInfo::toAbsolute(templateURL, baseURL); - if (!TQExtFileInfo::createDir(templateURL, m_mainWindow)) + templateURL = QExtFileInfo::toAbsolute(templateURL, baseURL); + if (!QExtFileInfo::createDir(templateURL, m_mainWindow)) { QuantaCommon::dirCreationError(m_mainWindow, templateURL); } } //the nodes are already created in loadProjectXML() called from createEmptyDom() el = dom.firstChild().firstChild().namedItem("templates").toElement(); - url = TQExtFileInfo::toRelative(templateURL, baseURL); + url = QExtFileInfo::toRelative(templateURL, baseURL); el.firstChild().setNodeValue(QuantaCommon::qUrl(url)); //setup the toolbars directory toolbarURL = baseURL; QuantaCommon::setUrl(toolbarURL,png->linePrjToolbar->text()); toolbarURL.adjustPath(1); - toolbarURL = TQExtFileInfo::toAbsolute(toolbarURL, baseURL); - if (!TQExtFileInfo::createDir(toolbarURL, m_mainWindow)) + toolbarURL = QExtFileInfo::toAbsolute(toolbarURL, baseURL); + if (!QExtFileInfo::createDir(toolbarURL, m_mainWindow)) { QuantaCommon::dirCreationError(m_mainWindow, toolbarURL); } el = dom.firstChild().firstChild().namedItem("toolbars").toElement(); - url = TQExtFileInfo::toRelative(toolbarURL, baseURL); + url = QExtFileInfo::toRelative(toolbarURL, baseURL); el.firstChild().setNodeValue(QuantaCommon::qUrl(url)); #if KDE_IS_VERSION(3,4,89) @@ -939,7 +939,7 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName) if (m_projectFiles.tqcontains(url)) { item = dom.createElement("viewitem"); - item.setAttribute("url", QuantaCommon::qUrl(TQExtFileInfo::toRelative(url, baseURL)) ); + item.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL)) ); el.appendChild(item); } } @@ -950,7 +950,7 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName) { item = dom.createElement("viewtoolbar"); KURL url = toolbarList[i]; - url = TQExtFileInfo::toRelative(url, baseURL); + url = QExtFileInfo::toRelative(url, baseURL); item.setAttribute("url", QuantaCommon::qUrl(url) ); el.appendChild(item); } @@ -1008,7 +1008,7 @@ bool ProjectPrivate::createEmptyDom() tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8); *(tempFile->textStream()) << str; tempFile->close(); - result = TQExtFileInfo::createDir(baseURL, m_mainWindow); + result = QExtFileInfo::createDir(baseURL, m_mainWindow); if (result) result = KIO::NetAccess::upload(tempFile->name(), projectURL, m_mainWindow); if (result) @@ -1100,7 +1100,7 @@ void ProjectPrivate::getStatusFromTree() } TQStringList folderList; tqparent->getTreetqStatus( &folderList ); - // toplevel folder is always open in a project and TQExtFileInfo::toRelative + // toplevel folder is always open in a project and QExtFileInfo::toRelative // creates strange output -> we remove the toplevel folder if (folderList.count() > 0) folderList.remove(folderList.begin()); @@ -1110,7 +1110,7 @@ void ProjectPrivate::getStatusFromTree() m_sessionDom.firstChild().firstChild().appendChild(root); for (TQStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) { el = m_sessionDom.createElement("openfolder"); - el.setAttribute("url", QuantaCommon::qUrl( TQExtFileInfo::toRelative(KURL(*it), baseURL) ) ); + el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(KURL(*it), baseURL) ) ); root.appendChild( el ); } } @@ -1432,7 +1432,7 @@ void ProjectPrivate::slotAddFiles() if ( !list.isEmpty() ) { KURL firstURL = list.first(); - firstURL = TQExtFileInfo::toRelative( firstURL, baseURL ); + firstURL = QExtFileInfo::toRelative( firstURL, baseURL ); if ( firstURL.path().startsWith("/") || firstURL.path().startsWith(".")) { diff --git a/quanta/project/projectupload.cpp b/quanta/project/projectupload.cpp index 52f52908..dd88ab5c 100644 --- a/quanta/project/projectupload.cpp +++ b/quanta/project/projectupload.cpp @@ -172,13 +172,13 @@ void ProjectUpload::slotBuildTree() KURL u = m_project->projectBaseURL(); if (!startUrl.isEmpty()) { - u = TQExtFileInfo::toAbsolute(startUrl, u); + u = QExtFileInfo::toAbsolute(startUrl, u); } TQDict projectDirFiles; if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder { - projectDirFiles = TQExtFileInfo::allFilesDetailed(u, "*", this); + projectDirFiles = QExtFileInfo::allFilesDetailed(u, "*", this); } else { projectDirFiles.insert(u.url(), new KFileItem(KFileItem::Unknown, KFileItem::Unknown, u, true)); @@ -197,7 +197,7 @@ void ProjectUpload::slotBuildTree() { QuantaCommon::setUrl(u, s); absUrl.setPath(m_project->projectBaseURL().path(1)+u.path(-1)); -/* if (!TQExtFileInfo::exists(absUrl)) +/* if (!QExtFileInfo::exists(absUrl)) continue; */ KFileItem *p_item = projectDirFiles.tqfind(absUrl.url()); if (!p_item) @@ -375,7 +375,7 @@ void ProjectUpload::startUpload() buttonUpload->setEnabled(false); KURL u = *baseUrl; u.setPath(u.protocol() == "file" ? "/" : ""); - if (TQExtFileInfo::exists(u, false, this) || (u.protocol() == "webdav" && TQExtFileInfo::exists(*baseUrl, false, this))) + if (QExtFileInfo::exists(u, false, this) || (u.protocol() == "webdav" && QExtFileInfo::exists(*baseUrl, false, this))) { upload(); return; @@ -425,7 +425,7 @@ void ProjectUpload::upload() } - KURL from = TQExtFileInfo::toAbsolute(currentURL, m_project->projectBaseURL()); + KURL from = QExtFileInfo::toAbsolute(currentURL, m_project->projectBaseURL()); to = *baseUrl; to.addPath( currentURL.path() ); if (to.fileName(false).isEmpty()) @@ -440,7 +440,7 @@ void ProjectUpload::upload() if ( !madeDirs.tqcontains(dir) ) { madeDirs.append( dir ); - if (!TQExtFileInfo::createDir(dir, this)) + if (!QExtFileInfo::createDir(dir, this)) { QuantaCommon::dirCreationError(this, KURL( dir.prettyURL(0, KURL::StripFileProtocol) )); buttonUpload->setEnabled(true); diff --git a/quanta/project/rescanprj.cpp b/quanta/project/rescanprj.cpp index b24b123f..1c97da09 100644 --- a/quanta/project/rescanprj.cpp +++ b/quanta/project/rescanprj.cpp @@ -115,7 +115,7 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list) else u.setPath(linkDest); u.adjustPath(+1); - KURL u2 = TQExtFileInfo::toRelative(u, baseURL); + KURL u2 = QExtFileInfo::toRelative(u, baseURL); bool found = false; for (uint i = 0; i < urlList.count(); i++) if (urlList[i].url == u2) @@ -214,7 +214,7 @@ KURL::List RescanPrj::files() } if (!u.isEmpty()) - r.append( TQExtFileInfo::toAbsolute(u, baseURL) ); + r.append( QExtFileInfo::toAbsolute(u, baseURL) ); } } return r; diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp index 70fce267..7c2ff3f1 100644 --- a/quanta/src/document.cpp +++ b/quanta/src/document.cpp @@ -2546,7 +2546,7 @@ TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQStri for (uint i = 0; i < values->count(); i++) { u = (*values)[i]; - u = TQExtFileInfo::toRelative(u, base); + u = QExtFileInfo::toRelative(u, base); (*values)[i] = u.path(); } values->remove(values->at(0)); @@ -2878,7 +2878,7 @@ void Document::open(const KURL &url, const TQString &encoding) slotOpeningFailed(TQString()); if (!url.isLocalFile()) { - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; internalFileInfo.enter_loop(); } } diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp index e1c5a742..5061abd4 100644 --- a/quanta/src/dtds.cpp +++ b/quanta/src/dtds.cpp @@ -274,7 +274,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) readTagFile(dirName + "common.tag", dtd, 0L); //bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false); emit enableIdleTimer(false); - KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L); + KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L); //quantaApp->slotEnableIdleTimer(idleTimertqStatus); emit enableIdleTimer(true); TQString tmpStr; diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp index 1f1f0401..0323d2c0 100644 --- a/quanta/src/kqapp.cpp +++ b/quanta/src/kqapp.cpp @@ -1,5 +1,5 @@ /* - KTQApplication.cpp + KQApplication.cpp KNode, the KDE newsreader Copyright (c) 1999-2001 the KNode authors. @@ -59,7 +59,7 @@ KSplash::~KSplash() } -KTQApplication::KTQApplication() +KQApplication::KQApplication() : KApplication() { args = KCmdLineArgs::parsedArgs(); @@ -101,16 +101,16 @@ KTQApplication::KTQApplication() } } -void KTQApplication::slotInit() +void KQApplication::slotInit() { - KTQApplicationPrivate::init(); + KQApplicationPrivate::init(); } -KTQApplication::~KTQApplication() +KQApplication::~KQApplication() { } -void KTQApplication::slotSplashTimeout() +void KQApplication::slotSplashTimeout() { delete splash; delete sp; @@ -118,19 +118,19 @@ void KTQApplication::slotSplashTimeout() sp = 0L; } -KTQUniqueApplication::KTQUniqueApplication() +KQUniqueApplication::KQUniqueApplication() : KUniqueApplication() { KGlobal::dirs()->addPrefix(PREFIX); dcopClient()->registerAs("quanta", false); } -KTQUniqueApplication::~KTQUniqueApplication() +KQUniqueApplication::~KQUniqueApplication() { } -int KTQUniqueApplication::newInstance() +int KQUniqueApplication::newInstance() { args = KCmdLineArgs::parsedArgs(); if (mainWidget()) @@ -174,12 +174,12 @@ int KTQUniqueApplication::newInstance() return 0; } -void KTQUniqueApplication::slotInit() +void KQUniqueApplication::slotInit() { - KTQApplicationPrivate::init(); + KQApplicationPrivate::init(); } -void KTQUniqueApplication::slotSplashTimeout() +void KQUniqueApplication::slotSplashTimeout() { delete splash; delete sp; @@ -188,7 +188,7 @@ void KTQUniqueApplication::slotSplashTimeout() } -void KTQApplicationPrivate::init() +void KQApplicationPrivate::init() { if (quantaApp->quantaStarted) { diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h index ea4b9b7d..728a3f63 100644 --- a/quanta/src/kqapp.h +++ b/quanta/src/kqapp.h @@ -35,11 +35,11 @@ class KSplash : public TQFrame ~KSplash(); }; -class KTQApplicationPrivate +class KQApplicationPrivate { public: - KTQApplicationPrivate():splash(0L), sp(0L) {}; - ~KTQApplicationPrivate() {}; + KQApplicationPrivate():splash(0L), sp(0L) {}; + ~KQApplicationPrivate() {}; protected: void init(); @@ -49,27 +49,27 @@ class KTQApplicationPrivate KSplashScreen *sp; }; -class KTQApplication : public KApplication, KTQApplicationPrivate +class KQApplication : public KApplication, KQApplicationPrivate { Q_OBJECT TQ_OBJECT public: - KTQApplication(); - ~KTQApplication(); + KQApplication(); + ~KQApplication(); public slots: void slotInit(); void slotSplashTimeout(); }; -class KTQUniqueApplication : public KUniqueApplication, KTQApplicationPrivate +class KQUniqueApplication : public KUniqueApplication, KQApplicationPrivate { Q_OBJECT TQ_OBJECT public: - KTQUniqueApplication(); - ~KTQUniqueApplication(); + KQUniqueApplication(); + ~KQUniqueApplication(); /** Create new instance of Quanta. Make the existing main window active if Quanta is already running */ diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp index 7c2fe22a..fda7d0dc 100644 --- a/quanta/src/main.cpp +++ b/quanta/src/main.cpp @@ -208,9 +208,9 @@ int main(int argc, char *argv[]) DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()"); exit(0); } - app = new KTQUniqueApplication; + app = new KQUniqueApplication; } else { - app = new KTQApplication; + app = new KQApplication; } return app->exec(); diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp index ada60632..1ca3aa96 100644 --- a/quanta/src/quanta.cpp +++ b/quanta/src/quanta.cpp @@ -373,7 +373,7 @@ void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding) m_parserEnabled = false; for (KURL::List::ConstIterator i = urls.begin(); i != urls.end(); ++i) { - if (!TQExtFileInfo::exists(*i, true, this)) + if (!QExtFileInfo::exists(*i, true, this)) { KMessageBox::error(this, i18n("The file %1 does not exist or is not a recognized mime type.").tqarg((*i).prettyURL(0, KURL::StripFileProtocol))); @@ -409,7 +409,7 @@ void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool rea void QuantaApp::slotFileOpenRecent(const KURL &url) { - if (!TQExtFileInfo::exists(url, true, this)) + if (!QExtFileInfo::exists(url, true, this)) { if (KMessageBox::questionYesNo(this, i18n("The file %1 does not exist.\n Do you want to remove it from the list?").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::del(), i18n("Keep")) @@ -602,7 +602,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) stream << content; tempFile->file()->flush(); tempFile->close(); - if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this)) + if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this)) KMessageBox::error(this, i18n("There was an error while creating the template file.
Check that you have write access to %1.
").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); delete tempFile; } else @@ -809,7 +809,7 @@ void QuantaApp::slotRepaintPreview() tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding.ascii())); *(tmpFile->textStream()) << w->editIf->text(); tmpFile->close(); - if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) { + if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) { m_htmlPart->setPreviewedURL(KURL()); // copy failed, force the preview of the original }; delete tmpFile; @@ -864,7 +864,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo) baseURL = w->url(); baseURL.setFileName(""); } - KURL relURL = TQExtFileInfo::toRelative(url, baseURL); + KURL relURL = QExtFileInfo::toRelative(url, baseURL); TQString urlStr = relURL.url(); if (relURL.protocol() == baseURL.protocol()) urlStr = relURL.path(); @@ -1964,10 +1964,10 @@ void QuantaApp::slotContextMenuAboutToShow() { if (!name.isEmpty()) { - KURL baseUrl = TQExtFileInfo::path(w->url()); + KURL baseUrl = QExtFileInfo::path(w->url()); urlUnderCursor = baseUrl; QuantaCommon::setUrl(urlUnderCursor, name.stripWhiteSpace()); - urlUnderCursor = TQExtFileInfo::toAbsolute(urlUnderCursor, baseUrl); + urlUnderCursor = QExtFileInfo::toAbsolute(urlUnderCursor, baseUrl); action->setText(i18n("Open File: %1").tqarg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80))); action->setEnabled(true); } else @@ -2074,7 +2074,7 @@ void QuantaApp::slotContextMenuAboutToShow() void QuantaApp::slotOpenFileUnderCursor() { - if (TQExtFileInfo::exists(urlUnderCursor, true, this)) + if (QExtFileInfo::exists(urlUnderCursor, true, this)) { if (QuantaCommon::checkMimeGroup(urlUnderCursor, "text" )) { @@ -2458,7 +2458,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data())) return KURL(); tar.close(); - if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this)) + if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this)) { KMessageBox::error(this, i18n("An error happened while saving the %1 toolbar.
" "Check that you have write permissions for
%2.

This might happen if you tried save to save a global toolbar as a simple user. Use Save As or Toolbars->Save Toolbars->Save as Local Toolbar in this case.
").tqarg(p_toolbar->name).tqarg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error")); @@ -2767,7 +2767,7 @@ void QuantaApp::slotSendToolbar() void QuantaApp::slotDownloadToolbar() { if (!m_newToolbarStuff) - m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this); + m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this); m_newToolbarStuff->downloadResource(); } @@ -2777,7 +2777,7 @@ void QuantaApp::slotUploadToolbar() if (tempFileName.isNull()) return; if (!m_newToolbarStuff) - m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this); + m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this); // tempDirList.append(m_newToolbarStuff->uploadResource(tempFileName)); m_newToolbarStuff->uploadResource(tempFileName); } @@ -3200,7 +3200,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) //first load the local version if it exists fileName = locateLocal("data", resourceDir + "toolbars/"+newDtd->toolbars[i]); QuantaCommon::setUrl(url, fileName); - if (TQExtFileInfo::exists(url, true, this)) + if (QExtFileInfo::exists(url, true, this)) { //showToolbarFile(url); newToolbars += url; @@ -3208,7 +3208,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) { fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+newDtd->toolbars[i]; QuantaCommon::setUrl(url, fileName); - if (TQExtFileInfo::exists(url, true, this)) + if (QExtFileInfo::exists(url, true, this)) { newToolbars += url;// showToolbarFile(url); } @@ -3461,7 +3461,7 @@ void QuantaApp::slotBuildPrjToolbarsMenu() if (Project::ref()->hasProject()) { buildInProgress = true; - toolbarList = TQExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this); + toolbarList = QExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this); buildInProgress = false; projectToolbarFiles->setMaxItems(toolbarList.count()); for (uint i = 0; i < toolbarList.count(); i++) @@ -3580,7 +3580,7 @@ TQString QuantaApp::createDTEPTarball() dirURL.setPath(DTDs::ref()->tqfind(dtdName)->fileName); dirURL.setPath(dirURL.directory(false)); - KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*", this); + KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this); for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f ) { TQString name = (*it_f).fileName(); @@ -3643,7 +3643,7 @@ void QuantaApp::slotEmailDTEP() void QuantaApp::slotDownloadDTEP() { if (!m_newDTEPStuff) - m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this); + m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this); m_newDTEPStuff->downloadResource(); } @@ -3653,7 +3653,7 @@ void QuantaApp::slotUploadDTEP() if (tempFileName.isNull()) return; if (!m_newDTEPStuff) - m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this); + m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this); // tempDirList.append(m_newDTEPStuff->uploadResource(tempFileName)); m_newDTEPStuff->uploadResource(tempFileName); } @@ -3677,14 +3677,14 @@ void QuantaApp::slotSmartTagInsertion() void QuantaApp::slotDownloadTemplate() { if (!m_newTemplateStuff) - m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this); + m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this); m_newTemplateStuff->downloadResource(); } void QuantaApp::slotUploadTemplate(const TQString &fileName) { if (!m_newTemplateStuff) - m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this); + m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this); // tempDirList.append(m_newTemplateStuff->uploadResource(fileName)); m_newTemplateStuff->uploadResource(fileName); } @@ -3692,14 +3692,14 @@ void QuantaApp::slotUploadTemplate(const TQString &fileName) void QuantaApp::slotDownloadScript() { if (!m_newScriptStuff) - m_newScriptStuff = new TQNewScriptStuff("quanta/script", this); + m_newScriptStuff = new QNewScriptStuff("quanta/script", this); m_newScriptStuff->downloadResource(); } void QuantaApp::slotUploadScript(const TQString &fileName) { if (!m_newScriptStuff) - m_newScriptStuff = new TQNewScriptStuff("quanta/script", this); + m_newScriptStuff = new QNewScriptStuff("quanta/script", this); // tempDirList.append(m_newScriptStuff->uploadResource(fileName)); m_newScriptStuff->uploadResource(fileName); } @@ -3708,7 +3708,7 @@ void QuantaApp::slotDownloadDoc() { if (!m_newDocStuff) { - m_newDocStuff = new TQNewDocStuff("quanta/documentation", this); + m_newDocStuff = new QNewDocStuff("quanta/documentation", this); connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree())); } m_newDocStuff->downloadResource(); @@ -5122,7 +5122,7 @@ void QuantaApp::slotFileClosed(Document *w) KURL url = w->url(); if (Project::ref()->hasProject() && Project::ref()->tqcontains(url)) { - KURL u = TQExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); + KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); m_annotationOutput->writeAnnotations(QuantaCommon::qUrl(u), w->annotations()); } } diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h index b10d6480..404a9329 100644 --- a/quanta/src/quanta.h +++ b/quanta/src/quanta.h @@ -56,11 +56,11 @@ class QuantaPluginInterface; class QuantaDoc; class QuantaView; -class TQNewDTEPStuff; -class TQNewToolbarStuff; -class TQNewTemplateStuff; -class TQNewScriptStuff; -class TQNewDocStuff; +class QNewDTEPStuff; +class QNewToolbarStuff; +class QNewTemplateStuff; +class QNewScriptStuff; +class QNewDocStuff; class TQTabWidget; class TQWidgetStack; @@ -644,11 +644,11 @@ protected: // Protected attributes DCOPQuanta *dcopQuanta; KParts::PartManager *m_partManager; ///< the pointer to the part manager TQGuardedPtr m_oldKTextEditor; ///< remembers the last activated GUI - TQNewDTEPStuff *m_newDTEPStuff; - TQNewToolbarStuff *m_newToolbarStuff; - TQNewTemplateStuff *m_newTemplateStuff; - TQNewScriptStuff *m_newScriptStuff; - TQNewDocStuff *m_newDocStuff; + QNewDTEPStuff *m_newDTEPStuff; + QNewToolbarStuff *m_newToolbarStuff; + QNewTemplateStuff *m_newTemplateStuff; + QNewScriptStuff *m_newScriptStuff; + QNewDocStuff *m_newDocStuff; TQDict m_toolbarList; public: //TODO: check if it's worth to make a read method for them diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp index 2fcdda6b..d1e2054c 100644 --- a/quanta/src/quanta_init.cpp +++ b/quanta/src/quanta_init.cpp @@ -309,7 +309,7 @@ void QuantaInit::initQuanta() TQString infoCss = tmpDir; infoCss.tqreplace(TQRegExp("/quanta$"),""); infoCss += "/info.css"; - TQExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss)); + QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss)); checkRuntimeDependencies(); ViewManager::ref()->activeDocument()->view()->setFocus(); @@ -379,7 +379,7 @@ void QuantaInit::initProject() connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)), pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &))); connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll())); - connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)), m_project, TQT_SLOT(slotAddDirectory(const KURL&))); @@ -1081,9 +1081,9 @@ void QuantaInit::initActions() connect( char_action, TQT_SIGNAL(activated()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotInsertChar()) ); - connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); - connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); - connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(TQT_TQOBJECT(m_quanta))); m_bookmarks->createActions(ac); @@ -1199,9 +1199,9 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) //backup the current version and restore it from the autosaved backup KURL backupURL = originalVersion; backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup"); - TQExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta); - TQExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta); - //we save a list of autosaved file names so "KTQApplicationPrivate::init()" + QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta); + QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta); + //we save a list of autosaved file names so "KQApplicationPrivate::init()" //can open them. If autosavedVersion.path().right(1) == "U" then we are recovering //an untitled document if(isUntitledDocument) @@ -1302,7 +1302,7 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) connect(timer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotProcessTimeout())); timer->start(180*1000, true); - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; m_quanta->m_loopStarted = true; internalFileInfo.enter_loop(); delete timer; diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp index 51729fb6..1ea690dc 100644 --- a/quanta/src/quantadoc.cpp +++ b/quanta/src/quantadoc.cpp @@ -171,7 +171,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, } if (!url.isEmpty()) { - if (TQExtFileInfo::exists(url, true, quantaApp)) + if (QExtFileInfo::exists(url, true, quantaApp)) { if (encoding.isEmpty()) encoding = quantaApp->defaultEncoding(); diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp index e0c761e9..988bf338 100644 --- a/quanta/src/quantaview.cpp +++ b/quanta/src/quantaview.cpp @@ -290,7 +290,7 @@ void QuantaView::updateTab() TQIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small)); if (mimeIcon.isNull()) mimeIcon = TQIconSet(SmallIcon("document")); - TQString urlStr = TQExtFileInfo::shortName(m_document->url().path()); + TQString urlStr = QExtFileInfo::shortName(m_document->url().path()); if (m_document->isModified()) { if (qConfig.showCloseButtons == "ShowAlways") @@ -1140,7 +1140,7 @@ bool QuantaView::saveDocument(const KURL& url) if (m_saveResult) { //start an event loop and wait until the saving finished - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; m_eventLoopStarted = true; internalFileInfo.enter_loop(); } diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp index 152063c8..bc91a218 100644 --- a/quanta/src/viewmanager.cpp +++ b/quanta/src/viewmanager.cpp @@ -99,7 +99,7 @@ QuantaView* ViewManager::createView(const TQString &caption) disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 ); connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*))); connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&))); - connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); return view; } diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp index efe8bb69..ba35ab61 100644 --- a/quanta/treeviews/basetreeview.cpp +++ b/quanta/treeviews/basetreeview.cpp @@ -1036,7 +1036,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const TQString & newName) if ( oldURL != newURL ) { bool proceed = true; - if (TQExtFileInfo::exists(newURL, false, this)) + if (QExtFileInfo::exists(newURL, false, this)) { proceed = KMessageBox::warningContinueCancel(this, i18n("The file %1 already exists.
Do you want to overwrite it?
").tqarg(newURL.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; } @@ -1159,7 +1159,7 @@ void BaseTreeView::slotCreateSiteTemplate() bool error = false; if (tar.open(IO_WriteOnly)) { - KURL::List fileList = TQExtFileInfo::allFiles(url, "*", this); + KURL::List fileList = QExtFileInfo::allFiles(url, "*", this); for (KURL::List::Iterator it = fileList.begin(); it != fileList.end(); ++it) { if (!(*it).path().endsWith("/")) @@ -1214,7 +1214,7 @@ void BaseTreeView::slotCreateFile() url.setPath(url.path() + "/" + fileName); else url.setPath(url.directory() + "/" + fileName); - if (TQExtFileInfo::exists(url, false, this)) + if (QExtFileInfo::exists(url, false, this)) { KMessageBox::error(this, i18n("Cannot create file, because a file named %1 already exists.").tqarg(fileName), i18n("Error Creating File")); return; diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp index 7d7146e2..6aaca415 100644 --- a/quanta/treeviews/filestreeview.cpp +++ b/quanta/treeviews/filestreeview.cpp @@ -77,7 +77,7 @@ FilesTreeView::FilesTreeView(KConfig *config, TQWidget *tqparent, const char *na if (!topURLList.tqcontains(url)) topURLList.append(url); url = KURL(); - url.setPath(TQExtFileInfo::homeDirPath() + "/"); + url.setPath(QExtFileInfo::homeDirPath() + "/"); if (!topURLList.tqcontains(url)) topURLList.append(url); } @@ -153,7 +153,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url) newBrnch = new BaseTreeBranch(this, url, i18n("Root Folder"), SmallIcon(fileItem.iconName()), true); } else { - if (url.isLocalFile() && url.equals(KURL(TQExtFileInfo::homeDirPath() + "/"), true)) + if (url.isLocalFile() && url.equals(KURL(QExtFileInfo::homeDirPath() + "/"), true)) { newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true); } else @@ -218,7 +218,7 @@ void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQ m_folderMenu->setItemVisible(m_menuFolderRename, false); m_config->setGroup("General Options"); - if ((url == KURL("file:/") || url == KURL("file:" + TQExtFileInfo::homeDirPath() + "/")) && + if ((url == KURL("file:/") || url == KURL("file:" + QExtFileInfo::homeDirPath() + "/")) && m_config->readBoolEntry("Home-Root Folder On", true) ) m_folderMenu ->setItemVisible(m_menuTop, false); m_folderMenu ->setItemVisible(m_reloadMenuId, true); diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp index 3068fb55..21c3f345 100644 --- a/quanta/treeviews/projecttreeview.cpp +++ b/quanta/treeviews/projecttreeview.cpp @@ -380,7 +380,7 @@ void ProjectTreeView::slotCreateFolder() url.setPath(url.path() + "/" + folderName + "/"); else url.setPath(url.directory() + "/" + folderName +"/"); - if (TQExtFileInfo::createDir(url, this)) + if (QExtFileInfo::createDir(url, this)) { emit insertToProject(url); } @@ -398,7 +398,7 @@ void ProjectTreeView::slotCreateFile() url.setPath(url.path() + "/" + fileName); else url.setPath(url.directory() + "/" + fileName); - if (TQExtFileInfo::exists(url, false, this)) + if (QExtFileInfo::exists(url, false, this)) { KMessageBox::error(this, i18n("Cannot create file, because a file named %1 already exists.").tqarg(fileName), i18n("Error Creating File")); return; @@ -406,7 +406,7 @@ void ProjectTreeView::slotCreateFile() KTempFile *tempFile = new KTempFile(tmpDir); tempFile->setAutoDelete(true); tempFile->close(); - if (TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url)) + if (QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url)) { emit insertToProject(url); emit openFile(url); @@ -422,7 +422,7 @@ void ProjectTreeView::slotRemoveFromProject(int askForRemove) if (item) { KURL url = currentURL(); - TQString nice = TQExtFileInfo::toRelative(url, m_projectBaseURL).path(); + TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path(); nice = KStringHandler::lsqueeze(nice, 60); if ( !askForRemove || KMessageBox::warningContinueCancel(this,i18n("Do you really want to remove
%1
from the project?
").tqarg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue ) diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp index 3d410c03..1543c37d 100644 --- a/quanta/treeviews/servertreeview.cpp +++ b/quanta/treeviews/servertreeview.cpp @@ -47,8 +47,8 @@ void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, TQColorGroup _cg( cg ); KURL baseURL = Project::ref()->projectBaseURL(); KURL relURL = baseURL; - relURL.setPath(TQExtFileInfo::toRelative(url(), branch()->url()).path()); - KURL url = TQExtFileInfo::toAbsolute(relURL, baseURL); + relURL.setPath(QExtFileInfo::toRelative(url(), branch()->url()).path()); + KURL url = QExtFileInfo::toAbsolute(relURL, baseURL); if ( !Project::ref()->tqcontains(url) ) { TQFont f = p->font(); diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp index 00c78845..8519f72b 100644 --- a/quanta/treeviews/structtreeview.cpp +++ b/quanta/treeviews/structtreeview.cpp @@ -990,11 +990,11 @@ void StructTreeView::slotOpenFile() { TQString text = item->groupTag->name; text.remove(item->fileNameRx); - KURL baseUrl = TQExtFileInfo::path(write->url()); + KURL baseUrl = QExtFileInfo::path(write->url()); KURL url = baseUrl; QuantaCommon::setUrl(url, text.stripWhiteSpace()); - url = TQExtFileInfo::toAbsolute(url, baseUrl); - if (TQExtFileInfo::exists(url, true, this)) + url = QExtFileInfo::toAbsolute(url, baseUrl); + if (QExtFileInfo::exists(url, true, this)) { if (QuantaCommon::checkMimeGroup(url, "text" )) { diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp index aa6c5215..0d80311a 100644 --- a/quanta/treeviews/tagattributeitems.cpp +++ b/quanta/treeviews/tagattributeitems.cpp @@ -345,7 +345,7 @@ TQString AttributeUrlItem::editorText(int) QuantaCommon::setUrl(url, urlRequester->url()); baseURL = (static_cast(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); - url = TQExtFileInfo::toRelative(url, baseURL); + url = QExtFileInfo::toRelative(url, baseURL); TQString s = url.url(); if (url.protocol() == (static_cast(m_listView))->node()->tag->write()->url().protocol()) s.remove(0, url.protocol().length() + 3); @@ -360,7 +360,7 @@ void AttributeUrlItem::showEditor(int) baseURL = (static_cast(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); QuantaCommon::setUrl(url, text(1)); - url= TQExtFileInfo::toAbsolute(url, baseURL); + url= QExtFileInfo::toAbsolute(url, baseURL); urlRequester->setURL(url.url()); urlRequester->setFocus(); } diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp index 75218842..5efd8b05 100644 --- a/quanta/treeviews/templatestreeview.cpp +++ b/quanta/treeviews/templatestreeview.cpp @@ -465,7 +465,7 @@ void TemplatesTreeView::contentsDropEvent(TQDropEvent *e) *(tempFile->textStream()) << content; tempFile->close(); bool proceed = true; - if (TQExtFileInfo::exists(url, false, this)) + if (QExtFileInfo::exists(url, false, this)) { proceed = KMessageBox::warningContinueCancel(this, i18n("The file %1 already exists.
Do you want to overwrite it?
").tqarg(url.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue; } @@ -953,14 +953,14 @@ TQString TemplatesTreeView::createTemplateTarball() if ( ! currentKFileTreeViewItem()->isDir() ) files.append(url); else { - files = TQExtFileInfo::allFiles(dirURL, "*", this) ; + files = QExtFileInfo::allFiles(dirURL, "*", this) ; dirURL = dirURL.upURL(); } for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f ) { if (!(*it_f).fileName(false).isEmpty()) { - url = TQExtFileInfo::toRelative( (*it_f), dirURL) ; + url = QExtFileInfo::toRelative( (*it_f), dirURL) ; TQFile file((*it_f).path()); file.open(IO_ReadOnly); @@ -1062,7 +1062,7 @@ void TemplatesTreeView::slotExtractSiteTemplate() } else error = true; KIO::NetAccess::removeTempFile(tempFile); - if (!m_projectBaseURL.isEmpty() && !TQExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith(".")) + if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith(".")) { if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), TQString(), i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes) { diff --git a/quanta/utility/newstuff.cpp b/quanta/utility/newstuff.cpp index 12eb12c9..adf4e5d0 100644 --- a/quanta/utility/newstuff.cpp +++ b/quanta/utility/newstuff.cpp @@ -29,7 +29,7 @@ #include "quantacommon.h" #include "qextfileinfo.h" -void TQNewDTEPStuff::installResource() +void QNewDTEPStuff::installResource() { bool ok = true; KTar tar(m_tarName, "application/x-gzip"); @@ -53,20 +53,20 @@ void TQNewDTEPStuff::installResource() KMessageBox::error(tqparentWidget(), i18n("There was an error with the downloaded DTEP tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("DTEP Installation Error")); } -TQNewToolbarStuff::TQNewToolbarStuff(const TQString &type, TQWidget *tqparentWidget) +QNewToolbarStuff::QNewToolbarStuff(const TQString &type, TQWidget *tqparentWidget) :KNewStuffSecure(type, tqparentWidget) { connect(this, TQT_SIGNAL(loadToolbarFile(const KURL&)), tqparentWidget, TQT_SLOT(slotLoadToolbarFile(const KURL&))); } -void TQNewToolbarStuff::installResource() +void QNewToolbarStuff::installResource() { KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + TQFileInfo(m_tarName).fileName()); bool ok = true; if (QuantaCommon::checkOverwrite(destURL, tqparentWidget())) { - if (!TQExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, tqparentWidget())) + if (!QExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, tqparentWidget())) ok = false; else { @@ -80,20 +80,20 @@ void TQNewToolbarStuff::installResource() } } -TQNewTemplateStuff::TQNewTemplateStuff(const TQString &type, TQWidget *tqparentWidget) +QNewTemplateStuff::QNewTemplateStuff(const TQString &type, TQWidget *tqparentWidget) :KNewStuffSecure(type, tqparentWidget) { connect(this, TQT_SIGNAL(openFile(const KURL&)), tqparentWidget, TQT_SLOT(slotFileOpen(const KURL&))); } -void TQNewTemplateStuff::installResource() +void QNewTemplateStuff::installResource() { KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + TQFileInfo(m_tarName).fileName()); bool ok = true; if (QuantaCommon::checkOverwrite(destURL, tqparentWidget())) { - if (!TQExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, tqparentWidget())) + if (!QExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, tqparentWidget())) ok = false; else { @@ -107,7 +107,7 @@ void TQNewTemplateStuff::installResource() } } -void TQNewScriptStuff::installResource() +void QNewScriptStuff::installResource() { bool ok = true; KTar tar(m_tarName, "application/x-gzip"); @@ -124,7 +124,7 @@ void TQNewScriptStuff::installResource() KMessageBox::error(tqparentWidget(), i18n("There was an error with the downloaded script tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Script Installation Error")); } -void TQNewDocStuff::installResource() +void QNewDocStuff::installResource() { bool ok = true; KTar tar(m_tarName, "application/x-gzip"); diff --git a/quanta/utility/newstuff.h b/quanta/utility/newstuff.h index e25639a0..3be6857d 100644 --- a/quanta/utility/newstuff.h +++ b/quanta/utility/newstuff.h @@ -29,15 +29,15 @@ Makes possible downloading and installing a DTEP resource files from a server. class KURL; -class TQNewDTEPStuff: public KNewStuffSecure +class QNewDTEPStuff: public KNewStuffSecure { Q_OBJECT TQ_OBJECT public: - TQNewDTEPStuff(const TQString &type, TQWidget *tqparentWidget=0) + QNewDTEPStuff(const TQString &type, TQWidget *tqparentWidget=0) :KNewStuffSecure(type, tqparentWidget){}; - ~TQNewDTEPStuff() {}; + ~QNewDTEPStuff() {}; private: virtual void installResource(); @@ -48,14 +48,14 @@ Makes possible downloading and installing a Toolbar resource files from a server @author Andras Mantia */ -class TQNewToolbarStuff: public KNewStuffSecure +class QNewToolbarStuff: public KNewStuffSecure { Q_OBJECT TQ_OBJECT public: - TQNewToolbarStuff(const TQString &type, TQWidget *tqparentWidget=0); - ~TQNewToolbarStuff() {}; + QNewToolbarStuff(const TQString &type, TQWidget *tqparentWidget=0); + ~QNewToolbarStuff() {}; signals: void loadToolbarFile(const KURL&); @@ -69,14 +69,14 @@ Makes possible downloading and installing a template resource files from a serve @author Andras Mantia */ -class TQNewTemplateStuff: public KNewStuffSecure +class QNewTemplateStuff: public KNewStuffSecure { Q_OBJECT TQ_OBJECT public: - TQNewTemplateStuff(const TQString &type, TQWidget *tqparentWidget=0); - ~TQNewTemplateStuff() {}; + QNewTemplateStuff(const TQString &type, TQWidget *tqparentWidget=0); + ~QNewTemplateStuff() {}; signals: void openFile(const KURL&); @@ -90,15 +90,15 @@ Makes possible downloading and installing a script resource files from a server. @author Andras Mantia */ -class TQNewScriptStuff: public KNewStuffSecure +class QNewScriptStuff: public KNewStuffSecure { Q_OBJECT TQ_OBJECT public: - TQNewScriptStuff(const TQString &type, TQWidget *tqparentWidget=0) + QNewScriptStuff(const TQString &type, TQWidget *tqparentWidget=0) :KNewStuffSecure(type, tqparentWidget){}; - ~TQNewScriptStuff() {}; + ~QNewScriptStuff() {}; private: virtual void installResource(); @@ -109,15 +109,15 @@ Makes possible downloading and installing a documentation resource files from a @author Andras Mantia */ -class TQNewDocStuff: public KNewStuffSecure +class QNewDocStuff: public KNewStuffSecure { Q_OBJECT TQ_OBJECT public: - TQNewDocStuff(const TQString &type, TQWidget *tqparentWidget=0) + QNewDocStuff(const TQString &type, TQWidget *tqparentWidget=0) :KNewStuffSecure(type, tqparentWidget){}; - ~TQNewDocStuff() {}; + ~QNewDocStuff() {}; private: virtual void installResource(); diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp index 7be8fc66..52be21ba 100644 --- a/quanta/utility/qpevents.cpp +++ b/quanta/utility/qpevents.cpp @@ -36,7 +36,7 @@ #include "tagaction.h" //TODO: Better create a class for each internal event action -TQPEvents::TQPEvents(TQObject *tqparent, const char *name) +QPEvents::QPEvents(TQObject *tqparent, const char *name) : TQObject(tqparent, name) { m_eventNames["before_save"] = i18n("Before Document Save"); @@ -66,11 +66,11 @@ TQPEvents::TQPEvents(TQObject *tqparent, const char *name) } -TQPEvents::~TQPEvents() +QPEvents::~QPEvents() { } -void TQPEvents::slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2) +void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2) { if (!quantaApp || !Project::ref()->eventsEnabled()) return; @@ -131,7 +131,7 @@ void TQPEvents::slotEventHappened(const TQString& name, const TQString& argument } } else { - TQString relativePath = TQExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path(); + TQString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path(); if (inProject && name == "after_save") { ev.arguments << i18n("Document saved"); @@ -224,7 +224,7 @@ void TQPEvents::slotEventHappened(const TQString& name, const TQString& argument KMessageBox::sorry(0L, i18n("Unsupported event %1.").tqarg(name), i18n("Event Handling Error")); } -bool TQPEvents::handleEvent(const EventAction& ev) +bool QPEvents::handleEvent(const EventAction& ev) { if (ev.type == EventAction::Internal) { @@ -344,7 +344,7 @@ bool TQPEvents::handleEvent(const EventAction& ev) return false; } -TQString TQPEvents::fullEventName(const TQString &name) +TQString QPEvents::fullEventName(const TQString &name) { if (m_eventNames.tqcontains(name)) return m_eventNames[name]; @@ -352,7 +352,7 @@ TQString TQPEvents::fullEventName(const TQString &name) return name; } -TQString TQPEvents::fullActionName(const TQString& name) +TQString QPEvents::fullActionName(const TQString& name) { if (m_actionNames.tqcontains(name)) return m_actionNames[name]; @@ -360,7 +360,7 @@ TQString TQPEvents::fullActionName(const TQString& name) return name; } -TQString TQPEvents::eventName(const TQString &fullName) +TQString QPEvents::eventName(const TQString &fullName) { for (TQMap::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it) { @@ -370,7 +370,7 @@ TQString TQPEvents::eventName(const TQString &fullName) return fullName; } -TQString TQPEvents::actionName(const TQString &fullName) +TQString QPEvents::actionName(const TQString &fullName) { for (TQMap::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it) { @@ -380,7 +380,7 @@ TQString TQPEvents::actionName(const TQString &fullName) return fullName; } -TQStringList TQPEvents::eventNames() +TQStringList QPEvents::eventNames() { TQStringList names; for (TQMap::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it) @@ -390,7 +390,7 @@ TQStringList TQPEvents::eventNames() return names; } -TQStringList TQPEvents::actionNames() +TQStringList QPEvents::actionNames() { TQStringList names; for (TQMap::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it) diff --git a/quanta/utility/qpevents.h b/quanta/utility/qpevents.h index 31c05235..b46770ef 100644 --- a/quanta/utility/qpevents.h +++ b/quanta/utility/qpevents.h @@ -50,18 +50,18 @@ after_project_remove, after_commit */ typedef TQMap > EventActions; -class TQPEvents : public TQObject +class QPEvents : public TQObject { Q_OBJECT TQ_OBJECT public: - static TQPEvents* const ref(TQObject *tqparent = 0L) + static QPEvents* const ref(TQObject *tqparent = 0L) { - static TQPEvents *m_ref; - if (!m_ref) m_ref = new TQPEvents(tqparent); + static QPEvents *m_ref; + if (!m_ref) m_ref = new QPEvents(tqparent); return m_ref; } - ~TQPEvents(); + ~QPEvents(); TQString fullEventName(const TQString &name); TQString fullActionName(const TQString &name); TQString eventName(const TQString &fullName); @@ -74,7 +74,7 @@ public slots: void slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2); private: - TQPEvents(TQObject *tqparent = 0, const char *name = 0); + QPEvents(TQObject *tqparent = 0, const char *name = 0); /** Calls the action associated with an event. Returns true if the call succeeded, false otherwise. The call might fail if: - the action type is unknown diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp index 6b709ca3..7846fa15 100644 --- a/quanta/utility/quantacommon.cpp +++ b/quanta/utility/quantacommon.cpp @@ -704,7 +704,7 @@ bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window) { bool result = true; - if (TQExtFileInfo::exists(url, false, window)) + if (QExtFileInfo::exists(url, false, window)) { if (KMessageBox::warningContinueCancel(window, i18n( "The file %1 already exists.
Do you want to overwrite it?
" ).tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), i18n("Overwrite")) == KMessageBox::Cancel) @@ -723,7 +723,7 @@ TQStringList QuantaCommon::readPathListEntry(KConfig *config, const TQString &pK KURL u = KURL::fromPathOrURL(*it); if (u.isValid() && u.isLocalFile()) { - u.setPath(TQExtFileInfo::canonicalPath(u.path())); + u.setPath(QExtFileInfo::canonicalPath(u.path())); *it = u.url(); } } @@ -736,7 +736,7 @@ TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey) KURL u = KURL::fromPathOrURL(path); if (u.isValid() && u.isLocalFile()) { - u.setPath(TQExtFileInfo::canonicalPath(u.path())); + u.setPath(QExtFileInfo::canonicalPath(u.path())); path = u.url(); } return path; diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp index 93c664e3..ec110499 100644 --- a/quanta/utility/quantanetaccess.cpp +++ b/quanta/utility/quantanetaccess.cpp @@ -180,7 +180,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, b { if (confirm) { - TQString nice = TQExtFileInfo::toRelative(saveUrl, baseURL).path(); + TQString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path(); nice = KStringHandler::lsqueeze(nice, 60); if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("Do you want to add
%1
to the project?
").tqarg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") ) { @@ -205,7 +205,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool { if (confirm) { - TQString nice = TQExtFileInfo::toRelative(url, baseURL).path(); + TQString nice = QExtFileInfo::toRelative(url, baseURL).path(); nice = KStringHandler::lsqueeze(nice, 60); if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("Do you really want to remove
%1
from the project?
").tqarg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") ) { diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp index 33bf5313..f354dc5c 100644 --- a/quanta/utility/tagaction.cpp +++ b/quanta/utility/tagaction.cpp @@ -993,7 +993,7 @@ void TagAction::execute(bool blocking) timer = new TQTimer(this); connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); timer->start(180*1000, true); - TQExtFileInfo internalFileInfo; + QExtFileInfo internalFileInfo; loopStarted = true; m_killCount = 0; internalFileInfo.enter_loop();