diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 12:35:35 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 14:10:15 +0100 |
commit | 38dca4b75c471ddf950e2f9f03801c550d7d26fd (patch) | |
tree | f5923ce5d84971f1f394baf7411146f078c02fab | |
parent | e28665ce3b2e9ec6f09b4c021db7443cac3c4128 (diff) | |
download | kxmleditor-38dca4b75c471ddf950e2f9f03801c550d7d26fd.tar.gz kxmleditor-38dca4b75c471ddf950e2f9f03801c550d7d26fd.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
81 files changed, 1385 insertions, 1385 deletions
diff --git a/kxmleditor/dcopiface_shell.cpp b/kxmleditor/dcopiface_shell.cpp index a03d149..09ac715 100644 --- a/kxmleditor/dcopiface_shell.cpp +++ b/kxmleditor/dcopiface_shell.cpp @@ -18,7 +18,7 @@ #include "dcopiface_shell.h" #include "kxmleditorshell.h" -QString +TQString KXMLEditorShellIface::Quit() { // m_pKXEShell->close(); diff --git a/kxmleditor/dcopiface_shell.h b/kxmleditor/dcopiface_shell.h index 63a0f8c..8353dd3 100644 --- a/kxmleditor/dcopiface_shell.h +++ b/kxmleditor/dcopiface_shell.h @@ -54,7 +54,7 @@ k_dcop: * * @returns Error description or empty string if program closed. **/ - QString Quit(); + TQString Quit(); /** diff --git a/kxmleditor/kxeshellmanager.cpp b/kxmleditor/kxeshellmanager.cpp index b20b1af..c5d2832 100644 --- a/kxmleditor/kxeshellmanager.cpp +++ b/kxmleditor/kxeshellmanager.cpp @@ -12,7 +12,7 @@ #include "kxeshellmanager.h" #include "kxmleditorshell.h" -#include <qptrlist.h> +#include <tqptrlist.h> KXEShellManager::KXEShellManager() { @@ -49,7 +49,7 @@ void KXEShellManager::removeShell(KXMLEditorShell* pShell) /*! \fn KXEShellManager::shells() */ -QPtrList<KXMLEditorShell>* KXEShellManager::shells() +TQPtrList<KXMLEditorShell>* KXEShellManager::shells() { return &m_shells; } diff --git a/kxmleditor/kxeshellmanager.h b/kxmleditor/kxeshellmanager.h index 0eeff8e..ac93cac 100644 --- a/kxmleditor/kxeshellmanager.h +++ b/kxmleditor/kxeshellmanager.h @@ -15,7 +15,7 @@ @file */ -#include <qptrlist.h> +#include <tqptrlist.h> class KXMLEditorShell; @@ -55,11 +55,11 @@ public: void removeShell(KXMLEditorShell* pShell); /** @short Returns list of currently opened shells. */ - QPtrList<KXMLEditorShell> *shells(); + TQPtrList<KXMLEditorShell> *shells(); private: /** @short Internally stores list of available shells. */ - QPtrList<KXMLEditorShell> m_shells; + TQPtrList<KXMLEditorShell> m_shells; }; #endif diff --git a/kxmleditor/kxmleditorshell.cpp b/kxmleditor/kxmleditorshell.cpp index e3715cc..8299bc3 100644 --- a/kxmleditor/kxmleditorshell.cpp +++ b/kxmleditor/kxmleditorshell.cpp @@ -38,7 +38,7 @@ #include <kpopupmenu.h> -#include <qevent.h> +#include <tqevent.h> #include "dcopiface_shell.h" @@ -116,7 +116,7 @@ void KXMLEditorShell::slotFileOpen() { statusBar()->message( i18n("Opening file...") ); - KURL url = KFileDialog::getOpenURL( QString::null, + KURL url = KFileDialog::getOpenURL( TQString::null, i18n(FILE_DIALOG_FILTER), this ); openURL(url); @@ -261,7 +261,7 @@ void KXMLEditorShell::readProperties( KConfig * pConfig ) KParts::MainWindow::readProperties(pConfig); /// @todo Check if ths is a deadcode -// QString strURL = pConfig->readEntry( "CurrentURL", "" ); +// TQString strURL = pConfig->readEntry( "CurrentURL", "" ); // if ( strURL.isEmpty()) // part()->openURL( strURL ); } @@ -277,7 +277,7 @@ void KXMLEditorShell::slotEnableBrowserExtActions( const char * pszName, bool bE // Set main window caption (by using the base class functionality), // Enables/disables Save button (corresponding to the parts modified status) -void KXMLEditorShell::setCaption( const QString & strCaption ) +void KXMLEditorShell::setCaption( const TQString & strCaption ) { if (part()) { @@ -335,14 +335,14 @@ void KXMLEditorShell::mail() if (!part()->url().isEmpty()) { - QStringList urls(part()->url().url()); // we can prepare then list of attachments (1 element in the list) - QString theSubject(part()->url().fileName(false)); // and set the mail subject - kapp->invokeMailer(QString::null, // finally we can compose e-mail (addressed to no-one) out of that - QString::null, - QString::null, + TQStringList urls(part()->url().url()); // we can prepare then list of attachments (1 element in the list) + TQString theSubject(part()->url().fileName(false)); // and set the mail subject + kapp->invokeMailer(TQString::null, // finally we can compose e-mail (addressed to no-one) out of that + TQString::null, + TQString::null, theSubject, // subject - QString::null, // body - QString::null, + TQString::null, // body + TQString::null, urls); // attachments } } @@ -398,12 +398,12 @@ void KXMLEditorShell::setPart(KParts::ReadWritePart* pPart) connect(m_windowMenu,SIGNAL(aboutToShow()),this,SLOT(slotBeforeWindowMenuShown())); } -KParts::ReadWritePart* KXMLEditorShell::createXMLPart(QObject *parent) +KParts::ReadWritePart* KXMLEditorShell::createXMLPart(TQObject *parent) { return createPart(parent,"libkxmleditorpart", "KParts::ReadWritePart"); } -KParts::ReadWritePart* KXMLEditorShell::createPart(QObject *parent, const QString& libName, const QString& className) +KParts::ReadWritePart* KXMLEditorShell::createPart(TQObject *parent, const TQString& libName, const TQString& className) { KParts::ReadWritePart* newPart = 0L; KLibFactory * pFactory = KLibLoader::self()->factory(libName); @@ -432,7 +432,7 @@ void KXMLEditorShell::close() void KXMLEditorShell::slotActWindowCloseAllOthers() { - QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); for (it.toFirst();it.current();++it) { if (it.current()!=this) @@ -473,7 +473,7 @@ void KXMLEditorShell::slotBeforeWindowMenuShown() // and then we can add entries for all shells // that are registered in Shell Manager... - QPtrListIterator<KXMLEditorShell> it (*(manager()->shells())); + TQPtrListIterator<KXMLEditorShell> it (*(manager()->shells())); for (it.toFirst(); it.current();++it) { int id = m_windowMenu->insertItem(it.current()->caption(),it.current(),SLOT(slotActivate())); diff --git a/kxmleditor/kxmleditorshell.h b/kxmleditor/kxmleditorshell.h index 848e47a..1f0f0a1 100644 --- a/kxmleditor/kxmleditorshell.h +++ b/kxmleditor/kxmleditorshell.h @@ -64,9 +64,9 @@ class KXMLEditorShell : public KParts::MainWindow /** @short Creates new part which can be shown in the shell. @param parent parent object for the part*/ - static KParts::ReadWritePart* createXMLPart(QObject *parent) ; + static KParts::ReadWritePart* createXMLPart(TQObject *parent) ; - static KParts::ReadWritePart* createPart(QObject *parent, const QString& libName, const QString& className); + static KParts::ReadWritePart* createPart(TQObject *parent, const TQString& libName, const TQString& className); /** @short Changes currenly shown part. */ void setPart(KParts::ReadWritePart* pPart); @@ -96,7 +96,7 @@ class KXMLEditorShell : public KParts::MainWindow void slotConfigureToolbars(); /** @short Changes shell caption.*/ - virtual void setCaption( const QString & strCaption ); + virtual void setCaption( const TQString & strCaption ); /** @short Sends currently opened XML file over e-mail. diff --git a/kxmleditor/main.cpp b/kxmleditor/main.cpp index 23b1f8a..0bbfc79 100644 --- a/kxmleditor/main.cpp +++ b/kxmleditor/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if(args->count()) - { QString strPath; + { TQString strPath; if(args->count() > 1) { strPath = args->arg(1); diff --git a/part/actions.cpp b/part/actions.cpp index 13f1260..7076e09 100644 --- a/part/actions.cpp +++ b/part/actions.cpp @@ -19,10 +19,10 @@ // include files for QT -#include <qwhatsthis.h> -#include <qdragobject.h> -#include <qcombobox.h> -#include <qapplication.h> +#include <tqwhatsthis.h> +#include <tqdragobject.h> +#include <tqcombobox.h> +#include <tqapplication.h> // include files for KDE #include <ktoolbar.h> @@ -36,11 +36,11 @@ // //------------------------------------------------------------------- -KXmlEditorComboAction::KXmlEditorComboAction(const QString& text, +KXmlEditorComboAction::KXmlEditorComboAction(const TQString& text, int accel, - const QObject *receiver, + const TQObject *receiver, const char *member, - QObject* parent, + TQObject* parent, const char* name) : KAction(text, accel, parent, name), m_pCombo(0) @@ -54,12 +54,12 @@ KXmlEditorComboAction::~KXmlEditorComboAction() //delete m_pCombo; // L.V. this cause crash !!! } -QComboBox* KXmlEditorComboAction::comboBox() +TQComboBox* KXmlEditorComboAction::comboBox() { return m_pCombo; } -int KXmlEditorComboAction::plug(QWidget *w, int index) +int KXmlEditorComboAction::plug(TQWidget *w, int index) { // if ( !w->inherits( "KToolBar" ) ); // return -1; @@ -69,11 +69,11 @@ int KXmlEditorComboAction::plug(QWidget *w, int index) int id = KAction::getToolButtonID(); //kdDebug() << "KXmlEditorComboAction::plug id=" << id << endl; - m_pCombo = new QComboBox( toolBar, "Path Combo" ); + m_pCombo = new TQComboBox( toolBar, "Path Combo" ); m_pCombo->setEditable(true); - m_pCombo->setInsertionPolicy(QComboBox::NoInsertion); + m_pCombo->setInsertionPolicy(TQComboBox::NoInsertion); toolBar->insertWidget( id, 70, m_pCombo, index ); - connect( m_pCombo, SIGNAL(activated(const QString&)), m_receiver, m_member ); + connect( m_pCombo, SIGNAL(activated(const TQString&)), m_receiver, m_member ); addContainer( toolBar, id ); @@ -81,12 +81,12 @@ int KXmlEditorComboAction::plug(QWidget *w, int index) toolBar->setItemAutoSized(id, true); - QWhatsThis::add( m_pCombo, whatsThis() ); + TQWhatsThis::add( m_pCombo, whatsThis() ); return containerCount() - 1; } -void KXmlEditorComboAction::unplug(QWidget *w) +void KXmlEditorComboAction::unplug(TQWidget *w) { // if ( !w->inherits( "KToolBar" ) ) // return; @@ -135,18 +135,18 @@ void KXmlEditorComboAction::slotFocusEdit() m_pCombo->setFocus(); } -QString KXmlEditorComboAction::currentText() const +TQString KXmlEditorComboAction::currentText() const { if ( containerCount() == 0 ) { kdWarning() << "[KXmlEditorComboAction::currentText] action not plugged" << endl; - return QString::null; + return TQString::null; } return m_pCombo->currentText(); } -const QPixmap * KXmlEditorComboAction::currentPixmap() const +const TQPixmap * KXmlEditorComboAction::currentPixmap() const { if ( containerCount() == 0 ) { @@ -157,7 +157,7 @@ const QPixmap * KXmlEditorComboAction::currentPixmap() const return m_pCombo->pixmap( m_pCombo->currentItem() ); } -void KXmlEditorComboAction::insertItem( const QPixmap & pixmap, const QString & text ) +void KXmlEditorComboAction::insertItem( const TQPixmap & pixmap, const TQString & text ) { if ( containerCount() == 0 ) { @@ -179,7 +179,7 @@ void KXmlEditorComboAction::insertItem( const QPixmap & pixmap, const QString & m_pCombo->removeItem(15); } -void KXmlEditorComboAction::removeItem( const QString & text ) +void KXmlEditorComboAction::removeItem( const TQString & text ) { if ( containerCount() == 0 ) { @@ -197,7 +197,7 @@ void KXmlEditorComboAction::removeItem( const QString & text ) m_pCombo->removeItem(nIndex); } -int KXmlEditorComboAction::findItem( const QString & text ) +int KXmlEditorComboAction::findItem( const TQString & text ) { if ( containerCount() == 0 ) { @@ -217,13 +217,13 @@ int KXmlEditorComboAction::findItem( const QString & text ) return nIndex; } -ToolbarLabel::ToolbarLabel( const QString& text ) - : QLabel( text, 0L, "kde toolbar widget" ) // Use this name for it to be styled! +ToolbarLabel::ToolbarLabel( const TQString& text ) + : TQLabel( text, 0L, "kde toolbar widget" ) // Use this name for it to be styled! // , m_mw(mw) { - setBackgroundMode( Qt::PaletteButton ); - setAlignment( (QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft) | - Qt::AlignVCenter | Qt::ShowPrefix ); + setBackgroundMode( TQt::PaletteButton ); + setAlignment( (TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft) | + TQt::AlignVCenter | TQt::ShowPrefix ); adjustSize(); } diff --git a/part/actions.h b/part/actions.h index 43d0967..3956c74 100644 --- a/part/actions.h +++ b/part/actions.h @@ -19,8 +19,8 @@ #define ACTIONS_H #include <kaction.h> -#include <qlabel.h> -class QComboBox; +#include <tqlabel.h> +class TQComboBox; /** *@author Lumir Vanek @@ -30,33 +30,33 @@ class KXmlEditorComboAction : public KAction { Q_OBJECT public: - KXmlEditorComboAction(const QString& text, int accel, const QObject *receiver, const char *member, QObject* parent, const char* name); + KXmlEditorComboAction(const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name); ~KXmlEditorComboAction(); - virtual int plug(QWidget *w, int index = -1); + virtual int plug(TQWidget *w, int index = -1); - virtual void unplug(QWidget *w); + virtual void unplug(TQWidget *w); - /** Returns the text from the combobox' editline (@ref QComboBox::currentText). */ - QString currentText() const; + /** Returns the text from the combobox' editline (@ref TQComboBox::currentText). */ + TQString currentText() const; - /** Returns the current pixmap or 0, if there isn't any (see @ref QComboBox::pixmap). */ - const QPixmap * currentPixmap() const; + /** Returns the current pixmap or 0, if there isn't any (see @ref TQComboBox::pixmap). */ + const TQPixmap * currentPixmap() const; /** * Inserts the given item as the first. * Deletes the old entry, if the item was already in the list. */ - void insertItem( const QPixmap & pixmap, const QString & text ); + void insertItem( const TQPixmap & pixmap, const TQString & text ); /** Tries to remove the item with the given text. */ - void removeItem( const QString & text ); + void removeItem( const TQString & text ); /** returns combo box */ - QComboBox *comboBox(); + TQComboBox *comboBox(); public slots: - /** Clears the whole combobox using @ref QComboBox::clear. */ + /** Clears the whole combobox using @ref TQComboBox::clear. */ void slotClear(); /** Clears the combobox' editline. */ void slotClearEdit(); @@ -68,20 +68,20 @@ protected: * Tries to find an item with the given text. If it finds it, * the items id is returned, otherwise -1. */ - virtual int findItem( const QString & text ); + virtual int findItem( const TQString & text ); private: - const QObject *m_receiver; + const TQObject *m_receiver; const char *m_member; - QComboBox * m_pCombo; + TQComboBox * m_pCombo; }; -class ToolbarLabel : public QLabel +class ToolbarLabel : public TQLabel { Q_OBJECT public: - ToolbarLabel( const QString & text ); + ToolbarLabel( const TQString & text ); }; diff --git a/part/commands_edit.cpp b/part/commands_edit.cpp index ba298b0..d899479 100644 --- a/part/commands_edit.cpp +++ b/part/commands_edit.cpp @@ -22,7 +22,7 @@ /////////// Cutting element to clipboard ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXECutCommand::KXECutCommand(KXEDocument *pDocument, QDomNode &domNode) +KXECutCommand::KXECutCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXEDeleteNodeCommand(pDocument, domNode) { } @@ -37,8 +37,8 @@ KXECutCommand::~KXECutCommand() KXEPasteToDocumentCommand::KXEPasteToDocumentCommand( KXEDocument *pDocument, - QDomDocument *pDomTargetDoc, - QDomElement &domSourceElement + TQDomDocument *pDomTargetDoc, + TQDomElement &domSourceElement ) : KXECommand(pDocument) { @@ -56,14 +56,14 @@ KXEPasteToDocumentCommand::~KXEPasteToDocumentCommand() void KXEPasteToDocumentCommand::execute() { // Insert root element - QDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true); + TQDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true); m_pDomTargetDoc->appendChild(newNode); m_pDocument->updateNodeCreated(newNode); } void KXEPasteToDocumentCommand::unexecute() { - QDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement()); + TQDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement()); if ( removedNode.isNull() ) kdError() << "KXEPasteToDocumentCommand::unexecute error removing node." << endl; @@ -79,8 +79,8 @@ void KXEPasteToDocumentCommand::unexecute() KXEPasteToElementCommand::KXEPasteToElementCommand( KXEDocument *pDocument, - QDomElement & domTargetElement, - QDomNode &domSourceNode + TQDomElement & domTargetElement, + TQDomNode &domSourceNode ) : KXECommand(pDocument) { @@ -117,8 +117,8 @@ void KXEPasteToElementCommand::unexecute() KXEPasteToProcInstrCommand::KXEPasteToProcInstrCommand( KXEDocument *pDocument, - QDomProcessingInstruction &domTargetProcInstr, - QDomProcessingInstruction &domSourceProcInstr + TQDomProcessingInstruction &domTargetProcInstr, + TQDomProcessingInstruction &domSourceProcInstr ) : KXECommand(pDocument) { @@ -158,8 +158,8 @@ void KXEPasteToProcInstrCommand::unexecute() KXEPasteToCharDataCommand::KXEPasteToCharDataCommand( KXEDocument *pDocument, - QDomCharacterData &domTargetCharData, - QDomCharacterData &domSourceCharData + TQDomCharacterData &domTargetCharData, + TQDomCharacterData &domSourceCharData ) : KXECommand(pDocument) { @@ -197,8 +197,8 @@ void KXEPasteToCharDataCommand::unexecute() KXEDragDropMoveCommand::KXEDragDropMoveCommand( KXEDocument *pDocument, - QDomElement & domTargetElement, - QDomNode &domSourceNode + TQDomElement & domTargetElement, + TQDomNode &domSourceNode ) : KXECommand(pDocument) { @@ -247,7 +247,7 @@ void KXEDragDropMoveCommand::unexecute() /////////// Deleting node ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -288,8 +288,8 @@ void KXEDeleteNodeCommand::unexecute() KXEDeleteAttrCommand::KXEDeleteAttrCommand( KXEDocument *pDocument, - QDomElement &domOwnerElement, - QDomAttr &domAttr + TQDomElement &domOwnerElement, + TQDomAttr &domAttr ) : KXECommand(pDocument) { @@ -319,7 +319,7 @@ void KXEDeleteAttrCommand::unexecute() KXEDeleteAllAttribCommand::KXEDeleteAllAttribCommand( KXEDocument *pDocument, - QDomElement &domOwnerElement + TQDomElement &domOwnerElement ) : KXECommand(pDocument) { @@ -333,7 +333,7 @@ KXEDeleteAllAttribCommand::~KXEDeleteAllAttribCommand() void KXEDeleteAllAttribCommand::execute() { - QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); + TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); uint nAttributes = mapAttributes.count(); if( nAttributes == 0 ) @@ -341,11 +341,11 @@ void KXEDeleteAllAttribCommand::execute() for( uint nRow = nAttributes; nRow > 0; nRow-- ) { - QDomNode node = mapAttributes.item(nRow-1); + TQDomNode node = mapAttributes.item(nRow-1); if ( node.isAttr() ) - { QDomAttr domAttr = node.toAttr(); + { TQDomAttr domAttr = node.toAttr(); - QDomAttr *pNodeCloned = new QDomAttr(domAttr.cloneNode(true).toAttr()); + TQDomAttr *pNodeCloned = new TQDomAttr(domAttr.cloneNode(true).toAttr()); m_listRemovedAttributes.append(pNodeCloned); m_domOwnerElement.removeAttributeNode(node.toAttr()); @@ -359,13 +359,13 @@ void KXEDeleteAllAttribCommand::execute() void KXEDeleteAllAttribCommand::unexecute() { - QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); + TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); uint nAttributes = m_listRemovedAttributes.count(); if ( nAttributes == 0 ) return; - QDomAttr *pDomAttr; + TQDomAttr *pDomAttr; for ( pDomAttr = m_listRemovedAttributes.first(); pDomAttr; pDomAttr = m_listRemovedAttributes.next() ) { if(!pDomAttr->namespaceURI().isEmpty()) @@ -383,7 +383,7 @@ void KXEDeleteAllAttribCommand::unexecute() /////////// Moving node up ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -399,14 +399,14 @@ KXEUpCommand::~KXEUpCommand() void KXEUpCommand::execute() { - QDomNode domPrevSibling = m_domNode.previousSibling(); + TQDomNode domPrevSibling = m_domNode.previousSibling(); if ( domPrevSibling.isNull() ) { kdError() << "KXEUpCommand::execute selected node doesn't seem to have a previous sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEUpCommand::execute can't remove child node." << endl; else @@ -423,14 +423,14 @@ void KXEUpCommand::execute() void KXEUpCommand::unexecute() { - QDomNode domNextSibling = m_domNode.nextSibling(); + TQDomNode domNextSibling = m_domNode.nextSibling(); if ( domNextSibling.isNull() ) { kdError() << "KXEUpCommand::unexecute selected node doesn't seem to have a next sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEUpCommand::unexecute can't remove child node." << endl; else @@ -449,7 +449,7 @@ void KXEUpCommand::unexecute() /////////// Moving node down ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, QDomNode &domNode) +KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, TQDomNode &domNode) : KXECommand(pDocument) { m_domNode = domNode; @@ -465,14 +465,14 @@ KXEDownCommand::~KXEDownCommand() void KXEDownCommand::execute() { - QDomNode domNextSibling = m_domNode.nextSibling(); + TQDomNode domNextSibling = m_domNode.nextSibling(); if ( domNextSibling.isNull() ) { kdError() << "KXEDownCommand::execute selected node doesn't seem to have a next sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEDownCommand::execute can't remove child node." << endl; else @@ -489,14 +489,14 @@ void KXEDownCommand::execute() void KXEDownCommand::unexecute() { - QDomNode domPrevSibling = m_domNode.previousSibling(); + TQDomNode domPrevSibling = m_domNode.previousSibling(); if ( domPrevSibling.isNull() ) { kdError() << "KXEDownCommand::unexecute selected node doesn't seem to have a previous sibling." << endl; return; } - QDomNode domNode = m_domParentNode.removeChild( m_domNode ); + TQDomNode domNode = m_domParentNode.removeChild( m_domNode ); if ( domNode.isNull() ) kdError() << "KXEDownCommand::unexecute can't remove child node." << endl; else @@ -517,8 +517,8 @@ void KXEDownCommand::unexecute() KXEEditCharDataCommand::KXEEditCharDataCommand( KXEDocument *pDocument, - QDomCharacterData &domCharacterData, - const QString strNewContents + TQDomCharacterData &domCharacterData, + const TQString strNewContents ) : KXECommand(pDocument) { @@ -549,8 +549,8 @@ void KXEEditCharDataCommand::unexecute() KXEEditProcInstrCommand::KXEEditProcInstrCommand( KXEDocument *pDocument, - QDomProcessingInstruction &domProcInstr, - const QString strNewData + TQDomProcessingInstruction &domProcInstr, + const TQString strNewData ) : KXECommand(pDocument) { @@ -581,9 +581,9 @@ void KXEEditProcInstrCommand::unexecute() KXEEditElementCommand::KXEEditElementCommand( KXEDocument *pDocument, - QDomElement &domElement, - const QString strNewPrefix, - const QString strNewName + TQDomElement &domElement, + const TQString strNewPrefix, + const TQString strNewName ) : KXECommand(pDocument) { @@ -627,8 +627,8 @@ void KXEEditElementCommand::unexecute() KXEEditAttrValueCommand::KXEEditAttrValueCommand( KXEDocument *pDocument, - const QDomAttr &domAttr, - const QString strNewValue + const TQDomAttr &domAttr, + const TQString strNewValue ) : KXECommand(pDocument) { @@ -662,8 +662,8 @@ void KXEEditAttrValueCommand::unexecute() KXEEditAttrNameCommand::KXEEditAttrNameCommand( KXEDocument *pDocument, - const QDomAttr &domOldAttr, - const QString strNewName + const TQDomAttr &domOldAttr, + const TQString strNewName ) : KXECommand(pDocument) { @@ -722,8 +722,8 @@ void KXEEditAttrNameCommand::unexecute() KXEEditRawXmlCommand::KXEEditRawXmlCommand( KXEDocument *pDocument, - QDomElement &domOldElement, - QDomElement &domNewElement + TQDomElement &domOldElement, + TQDomElement &domNewElement ) : KXECommand(pDocument) { diff --git a/part/commands_edit.h b/part/commands_edit.h index c713861..776ebfc 100644 --- a/part/commands_edit.h +++ b/part/commands_edit.h @@ -21,7 +21,7 @@ #include <klocale.h> -#include <qobjectlist.h> +#include <tqobjectlist.h> /** @file @@ -35,21 +35,21 @@ class KXEDeleteNodeCommand : public KXECommand { public: /** @brief Constructor */ - KXEDeleteNodeCommand(KXEDocument*, QDomNode &); + KXEDeleteNodeCommand(KXEDocument*, TQDomNode &); /** @brief Destructor */ ~KXEDeleteNodeCommand(); /** @brief Performs node removal.*/ virtual void execute(); /** @brief Node removal rollback.*/ virtual void unexecute(); - virtual QString name() const { return i18n("Delete node"); } + virtual TQString name() const { return i18n("Delete node"); } protected: /** @short Stores infromation about parent node of the node to be deleted. */ - QDomNode m_domParentNode; + TQDomNode m_domParentNode; /** @short Stores infromation the node to be deleted. */ - QDomNode m_domNode; + TQDomNode m_domNode; /** @short Stores infromation about sibling node of the node to be deleted. */ - QDomNode m_afterNode; + TQDomNode m_afterNode; }; /** @short Command for removing element attributes. @@ -58,19 +58,19 @@ class KXEDeleteAttrCommand : public KXECommand { public: /** @brief Constructor */ - KXEDeleteAttrCommand(KXEDocument*, QDomElement &, QDomAttr &); + KXEDeleteAttrCommand(KXEDocument*, TQDomElement &, TQDomAttr &); /** @brief Destructor */ ~KXEDeleteAttrCommand(); /** @brief Preforms attributte removal. */ virtual void execute(); /** @brief Attributte removal rollback. */ virtual void unexecute(); - virtual QString name() const { return i18n("Delete attribute"); } + virtual TQString name() const { return i18n("Delete attribute"); } protected: /** @brief Stores attribute owner. */ - QDomElement m_domOwnerElement; + TQDomElement m_domOwnerElement; /** @brief Attribute about to be removed. */ - QDomAttr m_domAttr; + TQDomAttr m_domAttr; }; /** @@ -80,15 +80,15 @@ class KXEDeleteAllAttribCommand : public KXECommand { public: /** @brief Constructor */ - KXEDeleteAllAttribCommand(KXEDocument*, QDomElement &); + KXEDeleteAllAttribCommand(KXEDocument*, TQDomElement &); /** @brief Destructor */ ~KXEDeleteAllAttribCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Delete all attributes"); } + virtual TQString name() const { return i18n("Delete all attributes"); } protected: - QDomElement m_domOwnerElement; - QPtrList<QDomAttr> m_listRemovedAttributes; + TQDomElement m_domOwnerElement; + TQPtrList<TQDomAttr> m_listRemovedAttributes; }; /** @@ -98,10 +98,10 @@ class KXECutCommand : public KXEDeleteNodeCommand { public: /** @brief Constructor */ - KXECutCommand(KXEDocument*, QDomNode &); + KXECutCommand(KXEDocument*, TQDomNode &); /** @brief Destructor */ ~KXECutCommand(); - virtual QString name() const { return i18n("Cut node"); } + virtual TQString name() const { return i18n("Cut node"); } }; /** @@ -111,15 +111,15 @@ class KXEPasteToDocumentCommand : public KXECommand { public: /** @brief Constructor */ - KXEPasteToDocumentCommand(KXEDocument*, QDomDocument *, QDomElement &); + KXEPasteToDocumentCommand(KXEDocument*, TQDomDocument *, TQDomElement &); /** @brief Destructor */ ~KXEPasteToDocumentCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Paste node to document"); } + virtual TQString name() const { return i18n("Paste node to document"); } protected: - QDomDocument * m_pDomTargetDoc; - QDomElement m_domSourceElement; + TQDomDocument * m_pDomTargetDoc; + TQDomElement m_domSourceElement; }; /** @@ -129,47 +129,47 @@ class KXEPasteToElementCommand : public KXECommand { public: /** @brief Constructor */ - KXEPasteToElementCommand(KXEDocument*, QDomElement &, QDomNode &); + KXEPasteToElementCommand(KXEDocument*, TQDomElement &, TQDomNode &); /** @brief Destructor */ ~KXEPasteToElementCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Paste node to element"); } + virtual TQString name() const { return i18n("Paste node to element"); } protected: - QDomElement m_domTargetElement; - QDomNode m_domSourceNode; + TQDomElement m_domTargetElement; + TQDomNode m_domSourceNode; }; class KXEPasteToProcInstrCommand : public KXECommand { public: /** @brief Constructor */ - KXEPasteToProcInstrCommand(KXEDocument*, QDomProcessingInstruction &, QDomProcessingInstruction &); + KXEPasteToProcInstrCommand(KXEDocument*, TQDomProcessingInstruction &, TQDomProcessingInstruction &); /** @brief Destructor */ ~KXEPasteToProcInstrCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Paste node to proc. instruction"); } + virtual TQString name() const { return i18n("Paste node to proc. instruction"); } protected: - QDomProcessingInstruction m_domTargetProcInstr; - QString m_strNewData; - QString m_strOldData; + TQDomProcessingInstruction m_domTargetProcInstr; + TQString m_strNewData; + TQString m_strOldData; }; class KXEPasteToCharDataCommand : public KXECommand { public: /** @brief Constructor */ - KXEPasteToCharDataCommand(KXEDocument*, QDomCharacterData &, QDomCharacterData &); + KXEPasteToCharDataCommand(KXEDocument*, TQDomCharacterData &, TQDomCharacterData &); /** @brief Destructor */ ~KXEPasteToCharDataCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Paste node to char. data"); } + virtual TQString name() const { return i18n("Paste node to char. data"); } protected: - QDomCharacterData m_domTargetCharData; - QString m_strNewData; - QString m_strOldData; + TQDomCharacterData m_domTargetCharData; + TQString m_strNewData; + TQString m_strOldData; }; /** @@ -179,16 +179,16 @@ class KXEDragDropMoveCommand : public KXECommand { public: /** @brief Constructor */ - KXEDragDropMoveCommand(KXEDocument*, QDomElement &, QDomNode &); + KXEDragDropMoveCommand(KXEDocument*, TQDomElement &, TQDomNode &); /** @brief Destructor */ ~KXEDragDropMoveCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Drag&&drop node"); } + virtual TQString name() const { return i18n("Drag&&drop node"); } protected: - QDomElement m_domTargetElement; - QDomNode m_domSourceNode; - QDomNode m_domPreviousParentNode; + TQDomElement m_domTargetElement; + TQDomNode m_domSourceNode; + TQDomNode m_domPreviousParentNode; }; /** @@ -198,15 +198,15 @@ class KXEUpCommand : public KXECommand { public: /** @brief Constructor */ - KXEUpCommand(KXEDocument*, QDomNode &); + KXEUpCommand(KXEDocument*, TQDomNode &); /** @brief Destructor */ ~KXEUpCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Move node up"); } + virtual TQString name() const { return i18n("Move node up"); } protected: - QDomNode m_domParentNode; - QDomNode m_domNode; + TQDomNode m_domParentNode; + TQDomNode m_domNode; }; /** @@ -216,31 +216,31 @@ class KXEDownCommand : public KXECommand { public: /** @brief Constructor */ - KXEDownCommand(KXEDocument*, QDomNode &); + KXEDownCommand(KXEDocument*, TQDomNode &); /** @brief Destructor */ ~KXEDownCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Move node down"); } + virtual TQString name() const { return i18n("Move node down"); } protected: - QDomNode m_domParentNode; - QDomNode m_domNode; + TQDomNode m_domParentNode; + TQDomNode m_domNode; }; class KXEEditCharDataCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditCharDataCommand(KXEDocument*, QDomCharacterData &, const QString); + KXEEditCharDataCommand(KXEDocument*, TQDomCharacterData &, const TQString); /** @brief Destructor */ ~KXEEditCharDataCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Editing character data"); } + virtual TQString name() const { return i18n("Editing character data"); } protected: - QDomCharacterData m_domCharacterData; - QString m_strNewContents; - QString m_strOldContents; + TQDomCharacterData m_domCharacterData; + TQString m_strNewContents; + TQString m_strOldContents; }; /** @@ -250,16 +250,16 @@ class KXEEditProcInstrCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditProcInstrCommand(KXEDocument*, QDomProcessingInstruction &, const QString); + KXEEditProcInstrCommand(KXEDocument*, TQDomProcessingInstruction &, const TQString); /** @brief Destructor */ ~KXEEditProcInstrCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Editing proc. instruction"); } + virtual TQString name() const { return i18n("Editing proc. instruction"); } protected: - QDomProcessingInstruction m_domProcInstr; - QString m_strNewData; - QString m_strOldData; + TQDomProcessingInstruction m_domProcInstr; + TQString m_strNewData; + TQString m_strOldData; }; /** @@ -269,18 +269,18 @@ class KXEEditElementCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditElementCommand(KXEDocument*, QDomElement &, const QString, const QString); + KXEEditElementCommand(KXEDocument*, TQDomElement &, const TQString, const TQString); /** @brief Destructor */ ~KXEEditElementCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Editing element"); } + virtual TQString name() const { return i18n("Editing element"); } protected: - QDomElement m_domElement; - QString m_strNewPrefix; - QString m_strNewName; - QString m_strOldPrefix; - QString m_strOldName; + TQDomElement m_domElement; + TQString m_strNewPrefix; + TQString m_strNewName; + TQString m_strOldPrefix; + TQString m_strOldName; }; /** @@ -290,16 +290,16 @@ class KXEEditAttrValueCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditAttrValueCommand(KXEDocument*, const QDomAttr &, const QString); + KXEEditAttrValueCommand(KXEDocument*, const TQDomAttr &, const TQString); /** @brief Destructor */ ~KXEEditAttrValueCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Edit attribute value"); } + virtual TQString name() const { return i18n("Edit attribute value"); } protected: - QDomAttr m_domAttr; - QString m_strNewValue; - QString m_strOldValue; + TQDomAttr m_domAttr; + TQString m_strNewValue; + TQString m_strOldValue; }; /** @@ -309,18 +309,18 @@ class KXEEditAttrNameCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditAttrNameCommand(KXEDocument*, const QDomAttr &, const QString); + KXEEditAttrNameCommand(KXEDocument*, const TQDomAttr &, const TQString); /** @brief Destructor */ ~KXEEditAttrNameCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Edit attribute name"); } + virtual TQString name() const { return i18n("Edit attribute name"); } protected: - QDomElement m_domOwnerElement; - QString m_strNewName; - QString m_strOldName; - QString m_strValue; - QString m_strNamespaceURI; + TQDomElement m_domOwnerElement; + TQString m_strNewName; + TQString m_strOldName; + TQString m_strValue; + TQString m_strNamespaceURI; }; /** @@ -330,17 +330,17 @@ class KXEEditRawXmlCommand : public KXECommand { public: /** @brief Constructor */ - KXEEditRawXmlCommand(KXEDocument*, QDomElement &, QDomElement &); + KXEEditRawXmlCommand(KXEDocument*, TQDomElement &, TQDomElement &); /** @brief Destructor */ ~KXEEditRawXmlCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Editing raw XML"); } + virtual TQString name() const { return i18n("Editing raw XML"); } protected: - QDomElement m_domOldElement; - QDomNode m_domParentNode; - QDomElement m_domNewElement; - QDomNode m_afterNode; + TQDomElement m_domOldElement; + TQDomNode m_domParentNode; + TQDomElement m_domNewElement; + TQDomNode m_afterNode; }; #endif diff --git a/part/commands_file.cpp b/part/commands_file.cpp index f30ff2d..b19e15d 100644 --- a/part/commands_file.cpp +++ b/part/commands_file.cpp @@ -15,14 +15,14 @@ * * ***************************************************************************/ #include "commands_file.h" -#include <qstring.h> +#include <tqstring.h> #include <kurl.h> #include <kmessagebox.h> ////////////////////////////////////////////////////////////////////////////////////////// /////////// Setting Version & Encoding ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEVersionEncodingCommand::KXEVersionEncodingCommand(KXEDocument* pDocument, const QString& oldData, const QString &newData) +KXEVersionEncodingCommand::KXEVersionEncodingCommand(KXEDocument* pDocument, const TQString& oldData, const TQString &newData) : KXECommand(pDocument) { m_strOldData = oldData; @@ -47,7 +47,7 @@ void KXEVersionEncodingCommand::unexecute() /////////// Attaching stylesheet ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEStylesheetAttachCommand::KXEStylesheetAttachCommand(KXEDocument* pDocument,const QString& prevStylesheet,const QString& newStylesheet) +KXEStylesheetAttachCommand::KXEStylesheetAttachCommand(KXEDocument* pDocument,const TQString& prevStylesheet,const TQString& newStylesheet) : KXECommand(pDocument) { m_strNewStylesheet = newStylesheet; @@ -75,7 +75,7 @@ void KXEStylesheetAttachCommand::unexecute() /////////// Detaching Stylesheet ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXEStylesheetDetachCommand::KXEStylesheetDetachCommand(KXEDocument* pDocument,const QString& prevStylesheet) +KXEStylesheetDetachCommand::KXEStylesheetDetachCommand(KXEDocument* pDocument,const TQString& prevStylesheet) : KXECommand(pDocument) { m_strPrevStylesheet = prevStylesheet; @@ -100,14 +100,14 @@ void KXEStylesheetDetachCommand::unexecute() /////////// Attaching Schema ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema) +KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema) : KXECommand(pDocument) { m_pDocument = pDocument; m_strNewSchema = newSchema; m_strPrevSchema = ""; } -KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema,const QString& prevSchema) +KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema,const TQString& prevSchema) : KXECommand(pDocument) { m_strNewSchema = newSchema; @@ -135,7 +135,7 @@ void KXESchemaAttachCommand::unexecute() /////////// Detaching schema ////////// ////////////////////////////////////////////////////////////////////////////////////////// -KXESchemaDetachCommand::KXESchemaDetachCommand(KXEDocument* pDocument, const QString& schema) +KXESchemaDetachCommand::KXESchemaDetachCommand(KXEDocument* pDocument, const TQString& schema) : KXECommand(pDocument) { m_schema = schema; diff --git a/part/commands_file.h b/part/commands_file.h index 00dc484..18c695a 100644 --- a/part/commands_file.h +++ b/part/commands_file.h @@ -33,70 +33,70 @@ Command for setting version and encoding to XML file. */ class KXEDocument; -class QString; +class TQString; class KXEVersionEncodingCommand : public KXECommand { public: - KXEVersionEncodingCommand(KXEDocument* pDocument, const QString& oldData, const QString &newData); + KXEVersionEncodingCommand(KXEDocument* pDocument, const TQString& oldData, const TQString &newData); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Changing version and encoding"); } + virtual TQString name() const { return i18n("Changing version and encoding"); } ~KXEVersionEncodingCommand(); protected: - QString m_strOldData; - QString m_strNewData; + TQString m_strOldData; + TQString m_strNewData; }; class KXEStylesheetAttachCommand : public KXECommand { public: - KXEStylesheetAttachCommand(KXEDocument* pDocument,const QString& prevStylesheet,const QString& newStylesheet); + KXEStylesheetAttachCommand(KXEDocument* pDocument,const TQString& prevStylesheet,const TQString& newStylesheet); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Attaching stylesheet ")+m_strNewStylesheet; } + virtual TQString name() const { return i18n("Attaching stylesheet ")+m_strNewStylesheet; } ~KXEStylesheetAttachCommand(); protected: - QString m_strPrevStylesheet; - QString m_strNewStylesheet; + TQString m_strPrevStylesheet; + TQString m_strNewStylesheet; }; class KXEStylesheetDetachCommand : public KXECommand { public: - KXEStylesheetDetachCommand(KXEDocument* pDocument,const QString& prevStylesheet); + KXEStylesheetDetachCommand(KXEDocument* pDocument,const TQString& prevStylesheet); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Detaching stylesheet ")+m_strPrevStylesheet; } + virtual TQString name() const { return i18n("Detaching stylesheet ")+m_strPrevStylesheet; } ~KXEStylesheetDetachCommand(); protected: - QString m_strPrevStylesheet; + TQString m_strPrevStylesheet; }; class KXESchemaAttachCommand : public KXECommand { public: - KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema); - KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema, const QString& prevSchema); + KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema); + KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema, const TQString& prevSchema); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Attaching schema ")+m_strNewSchema; } + virtual TQString name() const { return i18n("Attaching schema ")+m_strNewSchema; } ~KXESchemaAttachCommand(); protected: - QString m_strNewSchema; - QString m_strPrevSchema; + TQString m_strNewSchema; + TQString m_strPrevSchema; }; class KXESchemaDetachCommand : public KXECommand { public: - KXESchemaDetachCommand(KXEDocument* pDocument, const QString& schema); + KXESchemaDetachCommand(KXEDocument* pDocument, const TQString& schema); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Detaching schema ")+m_schema; } + virtual TQString name() const { return i18n("Detaching schema ")+m_schema; } ~KXESchemaDetachCommand(); protected: - QString m_schema; + TQString m_schema; }; #endif diff --git a/part/commands_insert.cpp b/part/commands_insert.cpp index 9f17d51..fb79d63 100644 --- a/part/commands_insert.cpp +++ b/part/commands_insert.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include "commands_insert.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> @@ -26,10 +26,10 @@ KXEElementCommand::KXEElementCommand( KXEDocument *pDocument, - QDomDocument * pDomDoc, - QString strNsURI, - QString strPrefix, - QString strName + TQDomDocument * pDomDoc, + TQString strNsURI, + TQString strPrefix, + TQString strName ) : KXECommand(pDocument) { @@ -46,10 +46,10 @@ KXEElementCommand::KXEElementCommand( KXEElementCommand::KXEElementCommand( KXEDocument *pDocument, - QDomElement & domParentElement, - QString strNsURI, - QString strPrefix, - QString strName, + TQDomElement & domParentElement, + TQString strNsURI, + TQString strPrefix, + TQString strName, bool bAtTop ) : KXECommand(pDocument) @@ -85,7 +85,7 @@ void KXEElementCommand::execute() // Insert child element if ( m_bAtTop ) { // insert as first child - QDomNode domFirstChildNode = m_domParentElement.firstChild(); + TQDomNode domFirstChildNode = m_domParentElement.firstChild(); if ( domFirstChildNode.isNull() ) m_domParentElement.appendChild( m_domElement ); // no childs yet -> simply append else @@ -118,10 +118,10 @@ void KXEElementCommand::unexecute() KXEAttributeCommand::KXEAttributeCommand( KXEDocument *pDocument, - QDomElement &domOwnerElement, - QString strNamespace, - QString strQName, - QString strValue + TQDomElement &domOwnerElement, + TQString strNamespace, + TQString strQName, + TQString strValue ) : KXECommand(pDocument) { @@ -167,10 +167,10 @@ void KXEAttributeCommand::unexecute() KXECharDataCommand::KXECharDataCommand( KXEDocument *pDocument, - QDomElement & domParentElement, + TQDomElement & domParentElement, bool bAtTop, CharDataKind eCharDataKind, - QString strContents + TQString strContents ) : KXECommand(pDocument) { @@ -211,7 +211,7 @@ void KXECharDataCommand::execute() { if ( m_bAtTop ) { // insert as first child - QDomNode domFirstChildNode = m_domParentElement.firstChild(); + TQDomNode domFirstChildNode = m_domParentElement.firstChild(); if ( domFirstChildNode.isNull() ) m_domParentElement.appendChild( m_domCharData ); // no childs yet -> simply append else @@ -239,10 +239,10 @@ void KXECharDataCommand::unexecute() KXEProcInstrCommand::KXEProcInstrCommand( KXEDocument *pDocument, - QDomDocument * pDomDoc, + TQDomDocument * pDomDoc, bool bAtTop, - QString strTarget, - QString strData + TQString strTarget, + TQString strData ) : KXECommand(pDocument) { @@ -260,10 +260,10 @@ KXEProcInstrCommand::KXEProcInstrCommand( KXEProcInstrCommand::KXEProcInstrCommand( KXEDocument *pDocument, - QDomElement & domParentElement, + TQDomElement & domParentElement, bool bAtTop, - QString strTarget, - QString strData + TQString strTarget, + TQString strData ) : KXECommand(pDocument) { @@ -299,7 +299,7 @@ void KXEProcInstrCommand::execute() // Insert child proc. instr if ( m_bAtTop ) { // insert as first child - QDomNode domFirstChildNode = m_domParentElement.firstChild(); + TQDomNode domFirstChildNode = m_domParentElement.firstChild(); if ( domFirstChildNode.isNull() ) m_domParentElement.appendChild( m_domProcInstr ); // no childs yet -> simply append else diff --git a/part/commands_insert.h b/part/commands_insert.h index 4d9da8d..d0f5963 100644 --- a/part/commands_insert.h +++ b/part/commands_insert.h @@ -28,67 +28,67 @@ class KXEElementCommand : public KXECommand { public: - KXEElementCommand(KXEDocument*, QDomDocument *, QString, QString, QString); - KXEElementCommand(KXEDocument*, QDomElement &, QString, QString, QString, bool); + KXEElementCommand(KXEDocument*, TQDomDocument *, TQString, TQString, TQString); + KXEElementCommand(KXEDocument*, TQDomElement &, TQString, TQString, TQString, bool); ~KXEElementCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Insert element"); } + virtual TQString name() const { return i18n("Insert element"); } protected: - QDomDocument * m_pDomDoc; - QDomElement m_domParentElement; + TQDomDocument * m_pDomDoc; + TQDomElement m_domParentElement; bool m_bAtTop; - QDomElement m_domElement; + TQDomElement m_domElement; }; class KXEAttributeCommand : public KXECommand { public: - KXEAttributeCommand(KXEDocument*, QDomElement &, QString, QString, QString); + KXEAttributeCommand(KXEDocument*, TQDomElement &, TQString, TQString, TQString); ~KXEAttributeCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Insert attribute"); } + virtual TQString name() const { return i18n("Insert attribute"); } protected: - QString m_strNamespace; - QString m_strQName; - QString m_strValue; - QDomElement m_domOwnerElement; + TQString m_strNamespace; + TQString m_strQName; + TQString m_strValue; + TQDomElement m_domOwnerElement; }; class KXECharDataCommand : public KXECommand { public: - KXECharDataCommand(KXEDocument*, QDomElement &, bool, CharDataKind, QString); + KXECharDataCommand(KXEDocument*, TQDomElement &, bool, CharDataKind, TQString); ~KXECharDataCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Insert char data"); } + virtual TQString name() const { return i18n("Insert char data"); } protected: bool m_bAtTop; - QDomElement m_domParentElement; - QDomCharacterData m_domCharData; + TQDomElement m_domParentElement; + TQDomCharacterData m_domCharData; }; class KXEProcInstrCommand : public KXECommand { public: - KXEProcInstrCommand(KXEDocument*, QDomDocument *, bool, QString, QString); - KXEProcInstrCommand(KXEDocument*, QDomElement &, bool, QString, QString); + KXEProcInstrCommand(KXEDocument*, TQDomDocument *, bool, TQString, TQString); + KXEProcInstrCommand(KXEDocument*, TQDomElement &, bool, TQString, TQString); ~KXEProcInstrCommand(); virtual void execute(); virtual void unexecute(); - virtual QString name() const { return i18n("Insert proc. instr."); } + virtual TQString name() const { return i18n("Insert proc. instr."); } protected: - QDomDocument * m_pDomDoc; - QDomElement m_domParentElement; + TQDomDocument * m_pDomDoc; + TQDomElement m_domParentElement; bool m_bAtTop; - QDomProcessingInstruction m_domProcInstr; + TQDomProcessingInstruction m_domProcInstr; }; #endif diff --git a/part/dcopiface_part_ro.cpp b/part/dcopiface_part_ro.cpp index c2794d0..c7780a9 100644 --- a/part/dcopiface_part_ro.cpp +++ b/part/dcopiface_part_ro.cpp @@ -19,24 +19,24 @@ //--------------------------------------------------------------------------- // KXMLEditorPartIfaceReadOnly //--------------------------------------------------------------------------- -QString -KXMLEditorPartIfaceReadOnly::saveAsFile(const QString & ) +TQString +KXMLEditorPartIfaceReadOnly::saveAsFile(const TQString & ) { return "Not implemented."; } -QString -KXMLEditorPartIfaceReadOnly::selectNode(const QString & szPathToNode) +TQString +KXMLEditorPartIfaceReadOnly::selectNode(const TQString & szPathToNode) { m_pKXEPart->slotPathSelected(szPathToNode); if ( m_pKXEPart->getSelectedPath() == szPathToNode ) return "Selecting node failed."; - return QString(); + return TQString(); } -QString +TQString KXMLEditorPartIfaceReadOnly::currentNode() const { return m_pKXEPart->getSelectedPath(); @@ -46,20 +46,20 @@ KXMLEditorPartIfaceReadOnly::currentNode() const //--------------------------------------------------------------------------- // KXMLEditorPartIface //--------------------------------------------------------------------------- -QString -KXMLEditorPartIfaceReadWrite::openURL(const QString & szURL) +TQString +KXMLEditorPartIfaceReadWrite::openURL(const TQString & szURL) { KURL url(szURL); if (! url.isValid () ) return "URL is not valid."; if ( m_pKXEPart->openURL(url) ) - return QString(); + return TQString(); else return "Opening URL failed."; } -QString +TQString KXMLEditorPartIfaceReadWrite::close() { return "Not implemented."; diff --git a/part/dcopiface_part_ro.h b/part/dcopiface_part_ro.h index 90f5982..0d73f1d 100644 --- a/part/dcopiface_part_ro.h +++ b/part/dcopiface_part_ro.h @@ -62,18 +62,18 @@ k_dcop: * @returns Error description or empty string if file succesfully saved. **/ - QString saveAsFile(const QString & path_to_file); + TQString saveAsFile(const TQString & path_to_file); /** Tries to change current node * @param pathToNode Path to new node * @returns Empty string if selection OK otherwise error description **/ - QString selectNode(const QString & pathToNode); + TQString selectNode(const TQString & pathToNode); /** Returns path to current node * @returns If error empty string **/ - QString currentNode() const; + TQString currentNode() const; }; @@ -107,7 +107,7 @@ k_dcop: * * @returns Error description or empty string if file succesfully loaded. **/ - QString openURL(const QString & szURL); + TQString openURL(const TQString & szURL); /** * Closes object behind interface. @@ -115,7 +115,7 @@ k_dcop: * * @returns Error description or empty string if program closed. **/ - QString close(); + TQString close(); }; diff --git a/part/kxe_treeview.cpp b/part/kxe_treeview.cpp index 93e3be5..ce89961 100644 --- a/part/kxe_treeview.cpp +++ b/part/kxe_treeview.cpp @@ -32,19 +32,19 @@ #include <kglobalsettings.h> #include <kmessagebox.h> -// include files for Qt +// include files for TQt #include "qdom_add.h" -#include <qheader.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qdom.h> -#include <qcursor.h> -#include <qevent.h> +#include <tqheader.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqdom.h> +#include <tqcursor.h> +#include <tqevent.h> static const int autoOpenTimeout = 750; -KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent, const char * pszName ) +KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, TQWidget * pParent, const char * pszName ) : KListView(pParent,pszName), m_pGUIClient(pGUIClient), m_nBookmarkedItems(0) @@ -53,10 +53,10 @@ KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent, const addColumn(i18n("Qualified name")); - setSelectionMode(QListView::Single); + setSelectionMode(TQListView::Single); connect( this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); - connect( this, SIGNAL(expanded(QListViewItem*)), this, SLOT(slotItemExpanded(QListViewItem*)) ); + connect( this, SIGNAL(expanded(TQListViewItem*)), this, SLOT(slotItemExpanded(TQListViewItem*)) ); setReadWrite(false); @@ -64,7 +64,7 @@ KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent, const m_pCurrentBeforeDropItem = 0; m_pDropItem = 0; - m_autoOpenTimer = new QTimer(this); + m_autoOpenTimer = new TQTimer(this); connect(m_autoOpenTimer, SIGNAL(timeout()), this, SLOT(slotAutoOpenFolder())); // Apply current configuration @@ -136,7 +136,7 @@ void KXE_TreeView::editDeselect() void KXE_TreeView::viewNodeUp() { // get selected item from tree view - QListViewItem * pSelItem = selectedItem(); + TQListViewItem * pSelItem = selectedItem(); if ( ! pSelItem ) { kdDebug() << "KXE_TreeView::slotViewNodeUp no item selected" << endl; @@ -144,7 +144,7 @@ void KXE_TreeView::viewNodeUp() } // get parent item - QListViewItem * pParentItem = pSelItem->parent(); + TQListViewItem * pParentItem = pSelItem->parent(); // select parent item in tree view if (pParentItem) @@ -157,7 +157,7 @@ void KXE_TreeView::viewNodeUp() void KXE_TreeView::viewExpNode( int nLevel ) { // get selected item from tree view (if any) - QListViewItem * pSelItem = selectedItem(); + TQListViewItem * pSelItem = selectedItem(); if ( ! pSelItem ) { kdDebug() << "KXE_TreeView::slotViewExpNode no item selected" << endl; @@ -172,7 +172,7 @@ void KXE_TreeView::viewExpNode( int nLevel ) void KXE_TreeView::viewColNode( int nLevel ) { // get selected item from tree view (if any) - QListViewItem * pSelItem = selectedItem(); + TQListViewItem * pSelItem = selectedItem(); if ( ! pSelItem ) { kdDebug() << "KXE_TreeView::slotViewColNode no item selected" << endl; @@ -213,7 +213,7 @@ void KXE_TreeView::bookmarksPrev() KXE_TreeViewItem * pSelItem = static_cast <KXE_TreeViewItem*> (selectedItem()); if ( ! pSelItem ) // If there is no item selected we take { // the last root items last grand child. - QListViewItem * pTmpItem = firstChild(); // Take first child and + TQListViewItem * pTmpItem = firstChild(); // Take first child and while ( pTmpItem->nextSibling() ) // find last child by pTmpItem = pTmpItem->nextSibling(); // traversing all childs @@ -283,7 +283,7 @@ void KXE_TreeView::selectItem( KXE_TreeViewItem * const pItem ) ensureItemVisible( pItem ); } -bool KXE_TreeView::selectNode( const QDomNode & node ) +bool KXE_TreeView::selectNode( const TQDomNode & node ) { if ( node.isNull() ) { @@ -303,10 +303,10 @@ bool KXE_TreeView::selectNode( const QDomNode & node ) return true; } -QDomNode * KXE_TreeView::getSelectedNode() const +TQDomNode * KXE_TreeView::getSelectedNode() const { // get selected item from tree view - QListViewItem * pSelItem = selectedItem(); + TQListViewItem * pSelItem = selectedItem(); if ( ! pSelItem ) return 0; @@ -314,14 +314,14 @@ QDomNode * KXE_TreeView::getSelectedNode() const return pSelTreeItem->xmlNode(); } -QDomNode * KXE_TreeView::getSpecProcInstrNode(const QString& target) const +TQDomNode * KXE_TreeView::getSpecProcInstrNode(const TQString& target) const { KXE_TreeViewItem * pTreeItem = static_cast<KXE_TreeViewItem*> (firstChild()); while ( pTreeItem ) { if (pTreeItem->xmlNode()->isProcessingInstruction()) { - QDomProcessingInstruction domProcInstr = pTreeItem->xmlNode()->toProcessingInstruction(); + TQDomProcessingInstruction domProcInstr = pTreeItem->xmlNode()->toProcessingInstruction(); if(domProcInstr.target() == target) return pTreeItem->xmlNode(); } @@ -350,40 +350,40 @@ bool KXE_TreeView::hasRootNode() } -QString KXE_TreeView::getSelectedPath() const +TQString KXE_TreeView::getSelectedPath() const { // get selected item from tree view - QListViewItem * pSelItem = selectedItem(); + TQListViewItem * pSelItem = selectedItem(); if ( ! pSelItem ) - return QString(); + return TQString(); KXE_TreeViewItem * pSelTreeItem = static_cast <KXE_TreeViewItem *> (pSelItem); return domTool_getPath( * pSelTreeItem->xmlNode() ); } -void KXE_TreeView::contentsMousePressEvent( QMouseEvent * pEvent ) +void KXE_TreeView::contentsMousePressEvent( TQMouseEvent * pEvent ) { KListView::contentsMousePressEvent(pEvent); if ( pEvent->button() == RightButton ) { - QString szMenuName; + TQString szMenuName; - QListViewItem * pItem = itemAt( contentsToViewport(pEvent->pos()) ); + TQListViewItem * pItem = itemAt( contentsToViewport(pEvent->pos()) ); if (pItem) { KXE_TreeViewItem * pTreeItem = static_cast <KXE_TreeViewItem*> (pItem); switch( pTreeItem->xmlNode()->nodeType() ) { - case QDomNode::ElementNode: + case TQDomNode::ElementNode: szMenuName = "popupXmlElement"; break; - case QDomNode::TextNode: - case QDomNode::CDATASectionNode: - case QDomNode::CommentNode: + case TQDomNode::TextNode: + case TQDomNode::CDATASectionNode: + case TQDomNode::CommentNode: szMenuName = "popupXmlContent"; break; - case QDomNode::ProcessingInstructionNode: + case TQDomNode::ProcessingInstructionNode: szMenuName = "popupXmlProcInstr"; break; default: @@ -394,13 +394,13 @@ void KXE_TreeView::contentsMousePressEvent( QMouseEvent * pEvent ) else szMenuName = "popupXmlTree"; - emit sigContextMenuRequested( szMenuName, QCursor::pos() ); + emit sigContextMenuRequested( szMenuName, TQCursor::pos() ); return; } //--- Drag & Drop ------------------------------------------------------ - QPoint p(contentsToViewport(pEvent->pos())); - QListViewItem *i = itemAt(p); + TQPoint p(contentsToViewport(pEvent->pos())); + TQListViewItem *i = itemAt(p); if(pEvent->button() == LeftButton && i) { // if the user clicked into the root decoration of the item, don't try to start a drag! @@ -422,22 +422,22 @@ void KXE_TreeView::slotSelectionChanged() emit sigSelectionCleared(hasRootNode()); else { - QDomNode selectedNode = * ( pItem->xmlNode() ); // uses QDomNode copy constructor + TQDomNode selectedNode = * ( pItem->xmlNode() ); // uses TQDomNode copy constructor // choose appropriate object kind switch ( selectedNode.nodeType() ) { - case QDomNode::ElementNode: + case TQDomNode::ElementNode: emit sigSelectionChanged( selectedNode.toElement()); break; - case QDomNode::TextNode: - case QDomNode::CDATASectionNode: - case QDomNode::CommentNode: + case TQDomNode::TextNode: + case TQDomNode::CDATASectionNode: + case TQDomNode::CommentNode: emit sigSelectionChanged( selectedNode.toCharacterData()); break; - case QDomNode::ProcessingInstructionNode: + case TQDomNode::ProcessingInstructionNode: emit sigSelectionChanged( selectedNode.toProcessingInstruction()); break; @@ -449,7 +449,7 @@ void KXE_TreeView::slotSelectionChanged() } -void KXE_TreeView::slotItemExpanded( QListViewItem * pItem ) +void KXE_TreeView::slotItemExpanded( TQListViewItem * pItem ) { KXE_TreeViewItem * pTreeViewItem = static_cast<KXE_TreeViewItem*> (pItem); pTreeViewItem->ensureGrandChildItemsCreated(); @@ -460,7 +460,7 @@ void KXE_TreeView::slotItemExpanded( QListViewItem * pItem ) // update slots ////////////////////////////////////////////////////////////// -void KXE_TreeView::updateNodeCreated( const QDomNode & node ) +void KXE_TreeView::updateNodeCreated( const TQDomNode & node ) { if ( node.isNull() ) { @@ -476,7 +476,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node ) if (node.isProcessingInstruction()) // Tree looks much nicer if root processing instructions are ont the top... { - QDomNode *pNode = getSpecProcInstrNode("xml"); + TQDomNode *pNode = getSpecProcInstrNode("xml"); if (pNode) pNewItem = new KXE_TreeViewItem( node, this,findCorrespondingItem(*pNode)); else @@ -499,7 +499,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node ) } // To create the new item, we need (1st) the item corresponding to the parent node of the given one. - QDomNode parentNode = node.parentNode(); + TQDomNode parentNode = node.parentNode(); // Because the currently selected item is very likely (in many cases) the correct one, try it first. KXE_TreeViewItem * pParentItem = static_cast<KXE_TreeViewItem*> (selectedItem()); if ( (!pParentItem) || ( *(pParentItem->xmlNode()) != parentNode ) ) @@ -515,7 +515,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node ) // Now we need (2nd) the item corresponding to the previous sibling of the given one, // because, the new item has to be inserted behind the given one. - QDomNode prevNode = node.previousSibling(); + TQDomNode prevNode = node.previousSibling(); if ( prevNode.isNull() ) { // it seems to be the first child node, so create a first child item pNewItem = new KXE_TreeViewItem( node, pParentItem ); @@ -538,7 +538,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node ) ensureItemVisible( pNewItem ); } -void KXE_TreeView::updateNodeChanged( const QDomNode & node ) +void KXE_TreeView::updateNodeChanged( const TQDomNode & node ) { if ( node.isNull() ) { @@ -564,7 +564,7 @@ void KXE_TreeView::updateNodeChanged( const QDomNode & node ) ensureItemVisible( pItem ); } -void KXE_TreeView::updateNodeDeleted( const QDomNode & node ) +void KXE_TreeView::updateNodeDeleted( const TQDomNode & node ) { if ( node.isNull() ) { @@ -591,7 +591,7 @@ void KXE_TreeView::updateNodeDeleted( const QDomNode & node ) emit sigSelectionCleared(hasRootNode()); } -void KXE_TreeView::updateNodeMoved( const QDomNode & node ) +void KXE_TreeView::updateNodeMoved( const TQDomNode & node ) { if ( node.isNull() ) { @@ -661,7 +661,7 @@ void KXE_TreeView::updateClear() clear(); } -void KXE_TreeView::rename( QListViewItem * pItem, int nColumn ) +void KXE_TreeView::rename( TQListViewItem * pItem, int nColumn ) { if ( nColumn != 0 ) // inplace editing only return; // for the first column @@ -681,7 +681,7 @@ void KXE_TreeView::rename( QListViewItem * pItem, int nColumn ) // misc functions ////////////////////////////////////////////////////////////// -KXE_TreeViewItem * KXE_TreeView::findCorrespondingItem( const QDomNode & node ) +KXE_TreeViewItem * KXE_TreeView::findCorrespondingItem( const TQDomNode & node ) { KXE_TreeViewItem * pItem = static_cast<KXE_TreeViewItem*> (firstChild()); while ( pItem ) @@ -699,7 +699,7 @@ KXE_TreeViewItem * KXE_TreeView::findCorrespondingItem( const QDomNode & node ) ////////////////////////////////////////////////////////////// /** Overrides KListView::contentsMouseMoveEvent */ -void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e) +void KXE_TreeView::contentsMouseMoveEvent(TQMouseEvent *e) { KListView::contentsMouseMoveEvent(e); @@ -712,20 +712,20 @@ void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e) m_bDrag = false; - QListViewItem *item = itemAt(contentsToViewport(m_dragPos)); + TQListViewItem *item = itemAt(contentsToViewport(m_dragPos)); if(!item || !item->isSelectable()) return; // copy item into clipboard KXE_TreeViewItem *pXmlTreeItem = static_cast <KXE_TreeViewItem *> (item); - QTextDrag *pDrag = (dynamic_cast <KXMLEditorPart *> (m_pGUIClient))->copyNode(pXmlTreeItem->xmlNode()); + TQTextDrag *pDrag = (dynamic_cast <KXMLEditorPart *> (m_pGUIClient))->copyNode(pXmlTreeItem->xmlNode()); // Start a drag - const QPixmap *pix = item->pixmap(0); + const TQPixmap *pix = item->pixmap(0); if(pix && pDrag->pixmap().isNull()) - { QPoint hotspot(pix->width() / 2, pix->height() / 2); + { TQPoint hotspot(pix->width() / 2, pix->height() / 2); pDrag->setPixmap(*pix, hotspot); } @@ -733,14 +733,14 @@ void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e) } /** Overrides KListView::contentsMouseReleaseEvent */ -void KXE_TreeView::contentsMouseReleaseEvent(QMouseEvent *e) +void KXE_TreeView::contentsMouseReleaseEvent(TQMouseEvent *e) { KListView::contentsMouseReleaseEvent(e); m_bDrag = false; } -/** Overrides QScrollView::contentsDragEnterEvent */ -void KXE_TreeView::contentsDragEnterEvent(QDragEnterEvent *e) +/** Overrides TQScrollView::contentsDragEnterEvent */ +void KXE_TreeView::contentsDragEnterEvent(TQDragEnterEvent *e) { m_pDropItem = 0; m_pCurrentBeforeDropItem = selectedItem(); @@ -754,10 +754,10 @@ void KXE_TreeView::contentsDragEnterEvent(QDragEnterEvent *e) } } -/** Overrides QScrollView::contentsDragMoveEvent */ -void KXE_TreeView::contentsDragMoveEvent(QDragMoveEvent *e) +/** Overrides TQScrollView::contentsDragMoveEvent */ +void KXE_TreeView::contentsDragMoveEvent(TQDragMoveEvent *e) { - QListViewItem *item = itemAt(contentsToViewport(e->pos())); + TQListViewItem *item = itemAt(contentsToViewport(e->pos())); // Accept drops on the background, if Texts if(!item && (m_lstDropFormats.contains("text/"))) @@ -786,8 +786,8 @@ void KXE_TreeView::contentsDragMoveEvent(QDragMoveEvent *e) } } -/** Overrides QScrollView::contentsDragLeaveEvent */ -void KXE_TreeView::contentsDragLeaveEvent(QDragLeaveEvent *e) +/** Overrides TQScrollView::contentsDragLeaveEvent */ +void KXE_TreeView::contentsDragLeaveEvent(TQDragLeaveEvent *e) { e=e; // Restore the current item to what it was before the dragging (#17070) @@ -801,8 +801,8 @@ void KXE_TreeView::contentsDragLeaveEvent(QDragLeaveEvent *e) m_lstDropFormats.clear(); } -/** Overrides QScrollView::contentsDropEvent */ -void KXE_TreeView::contentsDropEvent(QDropEvent *pDropEvent) +/** Overrides TQScrollView::contentsDropEvent */ +void KXE_TreeView::contentsDropEvent(TQDropEvent *pDropEvent) { m_autoOpenTimer->stop(); @@ -822,16 +822,16 @@ void KXE_TreeView::slotAutoOpenFolder() } /** Drop or paste text into item */ -bool KXE_TreeView::drop(QListViewItem *pItem, QDropEvent *pDropEvent) +bool KXE_TreeView::drop(TQListViewItem *pItem, TQDropEvent *pDropEvent) { KXE_TreeViewItem* pTreeItem = 0; if(pItem) pTreeItem = static_cast <KXE_TreeViewItem *> (pItem); - QDomNode *pTargetNode = pTreeItem->xmlNode(); + TQDomNode *pTargetNode = pTreeItem->xmlNode(); // First, make check, if moved item is not moved to their children - if((pDropEvent->source() == this) && (pDropEvent->action() == QDropEvent::Move)) + if((pDropEvent->source() == this) && (pDropEvent->action() == TQDropEvent::Move)) { // make check, if moved item is not moved to itself if(m_pCurrentBeforeDropItem && pTreeItem && (m_pCurrentBeforeDropItem == pTreeItem)) { return false; @@ -849,10 +849,10 @@ bool KXE_TreeView::drop(QListViewItem *pItem, QDropEvent *pDropEvent) return false; } - QDomNode * pNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); + TQDomNode * pNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); if (pNode->isProcessingInstruction()) { - QDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); + TQDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); if(domProcInstr.target() == "xml") { KMessageBox::sorry(0, i18n("This processing instruction cannot be moved !")); @@ -862,11 +862,11 @@ bool KXE_TreeView::drop(QListViewItem *pItem, QDropEvent *pDropEvent) } //-- If Move from same instance of this widget - if((pDropEvent->source() == this) && (pDropEvent->action() == QDropEvent::Move) && (m_pCurrentBeforeDropItem) && pTargetNode->isElement()) + if((pDropEvent->source() == this) && (pDropEvent->action() == TQDropEvent::Move) && (m_pCurrentBeforeDropItem) && pTargetNode->isElement()) { // remove source item - QDomNode * pSourceNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); - QDomElement domTargetElement = pTargetNode->toElement(); + TQDomNode * pSourceNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); + TQDomElement domTargetElement = pTargetNode->toElement(); if((dynamic_cast <KXMLEditorPart *> (m_pGUIClient))->dropMoveNode(domTargetElement, *pSourceNode)) { @@ -892,7 +892,7 @@ bool KXE_TreeView::drop(QListViewItem *pItem, QDropEvent *pDropEvent) // KXE_TreeViewItem* KXE_TreeView::lastChild() { - QListViewItem* pItem = firstChild(); + TQListViewItem* pItem = firstChild(); if (pItem && pItem->nextSibling()) do pItem = pItem->nextSibling(); @@ -902,7 +902,7 @@ KXE_TreeViewItem* KXE_TreeView::lastChild() return (KXE_TreeViewItem*) pItem; } -void KXE_TreeView::keyPressEvent(QKeyEvent *e) +void KXE_TreeView::keyPressEvent(TQKeyEvent *e) { KListView::keyPressEvent(e); emit sigKeyPressed(e); diff --git a/part/kxe_treeview.h b/part/kxe_treeview.h index 0ba2c86..1b642f5 100644 --- a/part/kxe_treeview.h +++ b/part/kxe_treeview.h @@ -19,19 +19,19 @@ #define KXE_TREEVIEW_H #include <klistview.h> -#include <qstrlist.h> +#include <tqstrlist.h> class KXESearchDialog; -class QDomDocument; -class QDomNode; -class QDomElement; -class QDomCharacterData; -class QDomProcessingInstruction; +class TQDomDocument; +class TQDomNode; +class TQDomElement; +class TQDomCharacterData; +class TQDomProcessingInstruction; -class QMouseEvent; -class QTimer; -class QKeyEvent; +class TQMouseEvent; +class TQTimer; +class TQKeyEvent; class KXMLGUIClient; class KXE_TreeViewItem; @@ -44,7 +44,7 @@ class KXE_TreeView : public KListView Q_OBJECT public: - KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent = 0, const char * pszName = 0 ); + KXE_TreeView( KXMLGUIClient * pGUIClient, TQWidget * pParent = 0, const char * pszName = 0 ); /** Changes the behaviour of this view to readonly or readwrite. */ void setReadWrite( bool fReadWrite ); @@ -54,22 +54,22 @@ public: /** Selects the item corresponding to the given node. * Returns true on success, false otherwise. */ - bool selectNode( const QDomNode & node ); + bool selectNode( const TQDomNode & node ); /** Returns the a pointer to the selected items node or a null pointer (if no item is selected). */ - QDomNode * getSelectedNode() const; + TQDomNode * getSelectedNode() const; /** Returns the a pointer to the special processing instruction or a null pointer for (if no item is exists). */ - QDomNode * getSpecProcInstrNode(const QString& target) const; + TQDomNode * getSpecProcInstrNode(const TQString& target) const; /** Returns the selected items path or an empty string, if no item is selected. */ - QString getSelectedPath() const; + TQString getSelectedPath() const; /** Returns true, if this tree view contains bookmarked tree items and false otherwise. */ bool containsBookmarkedItems() const { return (m_nBookmarkedItems>0); } /** Drop or paste text into item */ - bool drop(QListViewItem *, QDropEvent *); + bool drop(TQListViewItem *, TQDropEvent *); /** toggles bookmark on the selected item */ void bookmarksToggle(); @@ -96,16 +96,16 @@ public: * Creates new item(s) to the given node (and its child nodes) * and inserts it (or them) in the tree. */ - void updateNodeCreated( const QDomNode & node ); + void updateNodeCreated( const TQDomNode & node ); /** Changes the item corresponding to the given node. */ - void updateNodeChanged( const QDomNode & node ); + void updateNodeChanged( const TQDomNode & node ); /** Removes the item corresponding to the given node. */ - void updateNodeDeleted( const QDomNode & node ); + void updateNodeDeleted( const TQDomNode & node ); /** Moves the item corresponding to the given node. */ - void updateNodeMoved( const QDomNode & node ); + void updateNodeMoved( const TQDomNode & node ); /** Clears the whole tree. */ void updateClear(); @@ -117,7 +117,7 @@ public: * class functionality is used and the signal * @ref sigItemRenamedInplace emitted. */ - virtual void rename( QListViewItem * pItem, int nColumn ); + virtual void rename( TQListViewItem * pItem, int nColumn ); /** Returns info, is root element is already created */ bool hasRootNode(); @@ -140,13 +140,13 @@ signals: void sigSelectionCleared(bool); /** emitted, when an XML element item is selected */ - void sigSelectionChanged( const QDomElement & ); + void sigSelectionChanged( const TQDomElement & ); /** emitted, when an XML Content item is selected */ - void sigSelectionChanged( const QDomCharacterData & ); + void sigSelectionChanged( const TQDomCharacterData & ); /** emitted, when an XML proc.instr. item is selected */ - void sigSelectionChanged( const QDomProcessingInstruction & ); + void sigSelectionChanged( const TQDomProcessingInstruction & ); /** * Signals the change of bookmark status. @@ -156,35 +156,35 @@ signals: void sigNewBookmarkStatus( bool fStatus ); /** Emitted, when a context menu is requested */ - void sigContextMenuRequested( const QString & szMenuName, const QPoint & pos ); + void sigContextMenuRequested( const TQString & szMenuName, const TQPoint & pos ); /** Emitted when user presses a key. */ - void sigKeyPressed(QKeyEvent* e); + void sigKeyPressed(TQKeyEvent* e); protected: /** if RMB shows the popupmenu corresponding to the selected item */ - void contentsMousePressEvent( QMouseEvent * ); + void contentsMousePressEvent( TQMouseEvent * ); /** Finds the corresponding treeview item to the given node. */ - KXE_TreeViewItem * findCorrespondingItem( const QDomNode & node ); + KXE_TreeViewItem * findCorrespondingItem( const TQDomNode & node ); /** Overrides KListView::contentsMouseReleaseEvent */ - void contentsMouseReleaseEvent(QMouseEvent *); + void contentsMouseReleaseEvent(TQMouseEvent *); /** Overrides KListView::contentsMouseMoveEvent */ - void contentsMouseMoveEvent(QMouseEvent *); + void contentsMouseMoveEvent(TQMouseEvent *); - /** Overrides QScrollView::contentsDragEnterEvent */ - void contentsDragEnterEvent(QDragEnterEvent *); + /** Overrides TQScrollView::contentsDragEnterEvent */ + void contentsDragEnterEvent(TQDragEnterEvent *); - /** Overrides QScrollView::contentsDragMoveEvent */ - void contentsDragMoveEvent(QDragMoveEvent *); + /** Overrides TQScrollView::contentsDragMoveEvent */ + void contentsDragMoveEvent(TQDragMoveEvent *); - /** Overrides QScrollView::contentsDragLeaveEvent */ - void contentsDragLeaveEvent(QDragLeaveEvent *); + /** Overrides TQScrollView::contentsDragLeaveEvent */ + void contentsDragLeaveEvent(TQDragLeaveEvent *); - /** Overrides QScrollView::contentsDropEvent */ - void contentsDropEvent(QDropEvent *); - virtual void keyPressEvent(QKeyEvent *e); + /** Overrides TQScrollView::contentsDropEvent */ + void contentsDropEvent(TQDropEvent *); + virtual void keyPressEvent(TQKeyEvent *e); protected slots: /** Checks, which type of item was selected an emits the corresponding signal. */ @@ -196,9 +196,9 @@ protected slots: * because KXMLEditor could have been in "create items on demand" mode during * the opening of the document. * - * To be connected to the signal QListView::expanded(QListViewItem*). + * To be connected to the signal TQListView::expanded(TQListViewItem*). */ - void slotItemExpanded( QListViewItem * ); + void slotItemExpanded( TQListViewItem * ); private slots: @@ -217,19 +217,19 @@ protected: bool m_bDrag; /** Contain mouse position of drag operation */ - QPoint m_dragPos; + TQPoint m_dragPos; /** The item that was current before the drag-enter event happened */ - QListViewItem *m_pCurrentBeforeDropItem; + TQListViewItem *m_pCurrentBeforeDropItem; /** The item we are moving the mouse over (during a drag) */ - QListViewItem *m_pDropItem; + TQListViewItem *m_pDropItem; /** List of avalilable drop formats */ - QStrList m_lstDropFormats; + TQStrList m_lstDropFormats; /** Timer for counting time to auto open fselected folder while drag */ - QTimer *m_autoOpenTimer; + TQTimer *m_autoOpenTimer; }; #endif diff --git a/part/kxe_treeviewitem.cpp b/part/kxe_treeviewitem.cpp index 0107bee..c6537b0 100644 --- a/part/kxe_treeviewitem.cpp +++ b/part/kxe_treeviewitem.cpp @@ -23,14 +23,14 @@ #include "qdom_add.h" -#include <qregexp.h> +#include <tqregexp.h> #include <klistview.h> #include <kdebug.h> #include <kiconloader.h> -KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent ) - : QListViewItem(pParent), +KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent ) + : TQListViewItem(pParent), m_xmlNode(xmlNode), m_pPrevSibling(0), m_bBookmarked(false), @@ -41,8 +41,8 @@ KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pP initChilds(); } -KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParent, QListViewItem* pAfter) - : QListViewItem(pParent,pAfter), +KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, KListView * pParent, TQListViewItem* pAfter) + : TQListViewItem(pParent,pAfter), m_xmlNode(xmlNode), m_pPrevSibling(0), m_bBookmarked(false), @@ -53,8 +53,8 @@ KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParen initChilds(); } -KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent, QListViewItem * pAfter ) - : QListViewItem( pParent, pAfter ), +KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent, TQListViewItem * pAfter ) + : TQListViewItem( pParent, pAfter ), m_xmlNode(xmlNode), m_pPrevSibling(0), m_bBookmarked(false), @@ -98,16 +98,16 @@ void KXE_TreeViewItem::setTexts() { switch ( m_xmlNode.nodeType() ) { - case QDomNode::ElementNode: + case TQDomNode::ElementNode: setText( 0, m_xmlNode.toElement().nodeName() ); if ( KXMLEditorFactory::configuration()->treeview()->elemDisplMode() == KXETreeViewSettings::NoAttributes ) - setText( 1, QString() ); + setText( 1, TQString() ); else { // parse all attributes to fill the second column - QString str2ndCol; + TQString str2ndCol; for ( uint i=0; i < m_xmlNode.toElement().attributes().length(); i++ ) { if ( i > 0 ) @@ -120,15 +120,15 @@ void KXE_TreeViewItem::setTexts() } break; - case QDomNode::TextNode: - case QDomNode::CDATASectionNode: - case QDomNode::CommentNode: + case TQDomNode::TextNode: + case TQDomNode::CDATASectionNode: + case TQDomNode::CommentNode: { // set name - QString strText = m_xmlNode.toCharacterData().data(); - strText = strText.replace( QRegExp("\n"), " " ); // replace every newline by a space - strText = strText.replace( QRegExp("\t"), "" ); // removes every tab - strText = strText.replace( QRegExp("\r"), "" ); // removes every return + TQString strText = m_xmlNode.toCharacterData().data(); + strText = strText.replace( TQRegExp("\n"), " " ); // replace every newline by a space + strText = strText.replace( TQRegExp("\t"), "" ); // removes every tab + strText = strText.replace( TQRegExp("\r"), "" ); // removes every return strText = strText.simplifyWhiteSpace(); if( strText.length() > 30 ) // reduce name length, if necessary strText = strText.left(30) + "..."; @@ -137,7 +137,7 @@ void KXE_TreeViewItem::setTexts() break; } - case QDomNode::ProcessingInstructionNode: + case TQDomNode::ProcessingInstructionNode: setText( 0, m_xmlNode.toProcessingInstruction().target() ); break; @@ -169,12 +169,12 @@ bool KXE_TreeViewItem::toggleBookmark() KXE_TreeViewItem * KXE_TreeViewItem::lastChild() const { // take the first child - QListViewItem * pTmpItem = firstChild(); + TQListViewItem * pTmpItem = firstChild(); // if there are no childs return 0 if ( ! pTmpItem ) return 0; - QListViewItem * pTmpItem2; + TQListViewItem * pTmpItem2; while ( (pTmpItem2 = pTmpItem->nextSibling()) != 0 ) // traversing all childs { pTmpItem = pTmpItem2; @@ -200,7 +200,7 @@ KXE_TreeViewItem * KXE_TreeViewItem::prevItem() KXE_TreeViewItem * KXE_TreeViewItem::nextItem() { // checking for a child - QListViewItem * pTmp = firstChild(); + TQListViewItem * pTmp = firstChild(); if (pTmp) return static_cast <KXE_TreeViewItem*> (pTmp); @@ -210,7 +210,7 @@ KXE_TreeViewItem * KXE_TreeViewItem::nextItem() return static_cast <KXE_TreeViewItem*> (pTmp); // there is no next sibling -> checking for parents' next sibling(s) - QListViewItem * pParent = parent(); + TQListViewItem * pParent = parent(); while (pParent) { pTmp = pParent->nextSibling(); @@ -286,7 +286,7 @@ void KXE_TreeViewItem::ensureChildItemsCreated() { if ( ! m_bChildsCreated ) { - QDomNode tmpNode = m_xmlNode.lastChild(); + TQDomNode tmpNode = m_xmlNode.lastChild(); while ( ! tmpNode.isNull() ) { @@ -326,5 +326,5 @@ void KXE_TreeViewItem::startRename( int iCol ) // we can start renaming in-place. // Remember: This function is only reached for items representing XML elements. if ( (reinterpret_cast<KListView*> ( listView() ))->isRenameable( iCol ) ) - QListViewItem::startRename( iCol ); + TQListViewItem::startRename( iCol ); } diff --git a/part/kxe_treeviewitem.h b/part/kxe_treeviewitem.h index c24b99f..20430f8 100644 --- a/part/kxe_treeviewitem.h +++ b/part/kxe_treeviewitem.h @@ -18,24 +18,24 @@ #ifndef KXE_TREEVIEWITEM_H #define KXE_TREEVIEWITEM_H -#include <qlistview.h> -#include <qpixmap.h> -#include <qdom.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqdom.h> class KListView; /** - * This is a tree item, which represents one XML node (see @ref QDomNode and its childclasses). + * This is a tree item, which represents one XML node (see @ref TQDomNode and its childclasses). * @short tree item * @author The KXMLEditor Team */ -class KXE_TreeViewItem : public QListViewItem +class KXE_TreeViewItem : public TQListViewItem { public: - KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParent, QListViewItem* pAfter=NULL); - KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent ); - KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent, QListViewItem * pAfter ); + KXE_TreeViewItem( const TQDomNode & xmlNode, KListView * pParent, TQListViewItem* pAfter=NULL); + KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent ); + KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent, TQListViewItem * pAfter ); ~KXE_TreeViewItem(); /** @@ -47,7 +47,7 @@ class KXE_TreeViewItem : public QListViewItem void setTexts(); /** Returns the corresponding XML node, e.g. the XML node represented by this tree item. */ - QDomNode * xmlNode() { return & m_xmlNode; } + TQDomNode * xmlNode() { return & m_xmlNode; } /** Returns true, if this tree item is bookmarked (false otherwise). */ bool isBookmarked() const { return m_bBookmarked; } @@ -65,7 +65,7 @@ class KXE_TreeViewItem : public QListViewItem KXE_TreeViewItem * prevSibling() const { return m_pPrevSibling; } /** - * Does the same like @ref QListViewItem::itemAbove but the parent items doesn't need to be open. + * Does the same like @ref TQListViewItem::itemAbove but the parent items doesn't need to be open. * Returns this items previous siblings last grand child, if there is one. * Otherwise it returns this items previous sibling or, * if there are no sibling above, it returns this items parent or @@ -74,7 +74,7 @@ class KXE_TreeViewItem : public QListViewItem KXE_TreeViewItem * prevItem(); /** - * Does the same like @ref QListViewItem::itemBelow but the parent items doesn't need to be open. + * Does the same like @ref TQListViewItem::itemBelow but the parent items doesn't need to be open. * Returns a pointer to the next item of this or a null pointer if this is the last item. * This will be it's first child, * if there are no childs, it will be the next sibling @@ -110,7 +110,7 @@ class KXE_TreeViewItem : public QListViewItem protected: - QDomNode m_xmlNode; + TQDomNode m_xmlNode; KXE_TreeViewItem * m_pPrevSibling; bool m_bBookmarked; bool m_bChildsCreated; diff --git a/part/kxe_viewattributes.cpp b/part/kxe_viewattributes.cpp index bfa0609..0a4d3f3 100644 --- a/part/kxe_viewattributes.cpp +++ b/part/kxe_viewattributes.cpp @@ -23,8 +23,8 @@ #include <kdebug.h> #include <klocale.h> -KXE_ViewAttributes::KXE_ViewAttributes( QWidget * pParent, const char * pszName ) - : QTable( 0, 3, pParent, pszName ) +KXE_ViewAttributes::KXE_ViewAttributes( TQWidget * pParent, const char * pszName ) + : TQTable( 0, 3, pParent, pszName ) { horizontalHeader()->setLabel( 0, i18n("Namespace") ); horizontalHeader()->setLabel( 1, i18n("Name") ); @@ -37,17 +37,17 @@ KXE_ViewAttributes::KXE_ViewAttributes( QWidget * pParent, const char * pszName connect( this, SIGNAL(valueChanged(int,int)), this, SLOT(slotItemRenamedInplace(int,int)) ); } -QDomAttr KXE_ViewAttributes::getSelectedAttribute() const +TQDomAttr KXE_ViewAttributes::getSelectedAttribute() const { if ( currentRow() == -1 ) - return QDomAttr(); + return TQDomAttr(); if ( m_domElement.attributes().item(currentRow()).isAttr() ) { return m_domElement.attributes().item(currentRow()).toAttr(); } else - return QDomAttr(); + return TQDomAttr(); } void KXE_ViewAttributes::setReadWrite( bool fReadWrite ) @@ -56,19 +56,19 @@ void KXE_ViewAttributes::setReadWrite( bool fReadWrite ) setColumnReadOnly( 2, ! fReadWrite ); if ( fReadWrite ) - connect( this, SIGNAL(contextMenuRequested(int,int,const QPoint&)), this, SLOT(slotContextMenuRequested(int,int,const QPoint&)) ); + connect( this, SIGNAL(contextMenuRequested(int,int,const TQPoint&)), this, SLOT(slotContextMenuRequested(int,int,const TQPoint&)) ); else - disconnect( this, SIGNAL(contextMenuRequested(int,int,const QPoint&)), this, SLOT(slotContextMenuRequested(int,int,const QPoint&)) ); + disconnect( this, SIGNAL(contextMenuRequested(int,int,const TQPoint&)), this, SLOT(slotContextMenuRequested(int,int,const TQPoint&)) ); } -void KXE_ViewAttributes::slotContextMenuRequested( int nRow, int nCol, const QPoint & pos ) +void KXE_ViewAttributes::slotContextMenuRequested( int nRow, int nCol, const TQPoint & pos ) { nCol = nCol; - QString szMenuName = ( nRow == -1 ) ? "popupXmlAttributes" : "popupXmlAttribute"; + TQString szMenuName = ( nRow == -1 ) ? "popupXmlAttributes" : "popupXmlAttribute"; emit sigContextMenuRequested( szMenuName, pos ); } -void KXE_ViewAttributes::slotChange( const QDomElement & element ) +void KXE_ViewAttributes::slotChange( const TQDomElement & element ) { m_domElement = element; @@ -79,7 +79,7 @@ void KXE_ViewAttributes::slotChange( const QDomElement & element ) { for ( uint iRow = 0; iRow < iLength; iRow++ ) { - QDomNode node = m_domElement.attributes().item(iRow); + TQDomNode node = m_domElement.attributes().item(iRow); if ( node.isAttr() ) { setText( iRow, 0, node.toAttr().namespaceURI() ); @@ -105,12 +105,12 @@ void KXE_ViewAttributes::slotItemRenamedInplace( int nRow, int nCol ) return; } - QDomNode node = m_domElement.attributes().item(nRow); + TQDomNode node = m_domElement.attributes().item(nRow); if ( node.isAttr() ) { if (nCol == 1) { // check if name is OK - QString strMessage = KXEAttributeDialog::checkName(text(nRow,nCol)); + TQString strMessage = KXEAttributeDialog::checkName(text(nRow,nCol)); if(strMessage.length() > 0) { // restore old name @@ -139,7 +139,7 @@ void KXE_ViewAttributes::slotItemRenamedInplace( int nRow, int nCol ) if ( node.toAttr().value() != text(nRow,nCol) ) // only if the value really was changed { // check if value is OK - QString strMessage = KXEAttributeDialog::checkValue(text(nRow,nCol)); + TQString strMessage = KXEAttributeDialog::checkValue(text(nRow,nCol)); if(strMessage.length() > 0) { // restore old value diff --git a/part/kxe_viewattributes.h b/part/kxe_viewattributes.h index c314c56..9b92d60 100644 --- a/part/kxe_viewattributes.h +++ b/part/kxe_viewattributes.h @@ -18,22 +18,22 @@ #ifndef KXE_VIEWATTRIBUTES_H #define KXE_VIEWATTRIBUTES_H -#include <qtable.h> -#include <qdom.h> +#include <tqtable.h> +#include <tqdom.h> /** * @author The KXMLEditor Team */ -class KXE_ViewAttributes : public QTable +class KXE_ViewAttributes : public TQTable { Q_OBJECT public: - KXE_ViewAttributes( QWidget * pParent = 0, const char * pszName = 0 ); + KXE_ViewAttributes( TQWidget * pParent = 0, const char * pszName = 0 ); /** Returns a pointer to the currently selected attribute or a null pointer. */ - QDomAttr getSelectedAttribute() const; + TQDomAttr getSelectedAttribute() const; /** Changes the behaviour of this view to readonly or readwrite. */ void setReadWrite( bool fReadWrite ); @@ -41,17 +41,17 @@ class KXE_ViewAttributes : public QTable public slots: /** Changes/Rebuilds the whole table according to the given element's attributes. */ - void slotChange( const QDomElement & element ); + void slotChange( const TQDomElement & element ); protected: /** the currently selected node */ - QDomElement m_domElement; + TQDomElement m_domElement; protected slots: - /** Called, when a context menu was requested (connected to @ref QTable::contextMenuRequested). */ - void slotContextMenuRequested( int nRow, int nCol, const QPoint & pos ); + /** Called, when a context menu was requested (connected to @ref TQTable::contextMenuRequested). */ + void slotContextMenuRequested( int nRow, int nCol, const TQPoint & pos ); /** Called, when an item was changed via inplace editing. */ void slotItemRenamedInplace( int nRow, int nCol ); @@ -59,13 +59,13 @@ class KXE_ViewAttributes : public QTable signals: /** Emitted, when a context menu is requested */ - void sigContextMenuRequested( const QString & szMenuName, const QPoint & pos ); + void sigContextMenuRequested( const TQString & szMenuName, const TQPoint & pos ); /** Emitted, when an attributes value was renamed via inplace editing. */ - void sigAttributeNameChangedInplace( const QDomAttr &, const QString ); + void sigAttributeNameChangedInplace( const TQDomAttr &, const TQString ); /** Emitted, when an attributes value was renamed via inplace editing. */ - void sigAttributeValueChangedInplace( const QDomAttr &, const QString ); + void sigAttributeValueChangedInplace( const TQDomAttr &, const TQString ); }; #endif diff --git a/part/kxe_viewelement.cpp b/part/kxe_viewelement.cpp index 21c1ee5..39271b9 100644 --- a/part/kxe_viewelement.cpp +++ b/part/kxe_viewelement.cpp @@ -26,37 +26,37 @@ #include <kconfig.h> #include <ktextedit.h> -#include <qdom.h> -#include <qcolor.h> -#include <qpalette.h> +#include <tqdom.h> +#include <tqcolor.h> +#include <tqpalette.h> #include "qdom_add.h" #define CONFIG_SPLITTER_SIZES "View Element splitter sizes" -KXE_ViewElement::KXE_ViewElement( QWidget * pParent, KConfig *pConfig, const char * pszName ) - : QSplitter( Qt::Vertical, pParent, pszName ) +KXE_ViewElement::KXE_ViewElement( TQWidget * pParent, KConfig *pConfig, const char * pszName ) + : TQSplitter( TQt::Vertical, pParent, pszName ) { setOpaqueResize(true); m_pConfig = pConfig; m_pViewAttributes = new KXE_ViewAttributes( this, "table of element attributes"); - connect( m_pViewAttributes, SIGNAL(sigContextMenuRequested(const QString&,const QPoint&)), this, SIGNAL(sigContextMenuRequested(const QString&,const QPoint&)) ); + connect( m_pViewAttributes, SIGNAL(sigContextMenuRequested(const TQString&,const TQPoint&)), this, SIGNAL(sigContextMenuRequested(const TQString&,const TQPoint&)) ); - connect( m_pViewAttributes, SIGNAL(sigAttributeNameChangedInplace(const QDomAttr&, const QString)), this, SIGNAL(sigAttributeNameChangedInplace(const QDomAttr&, const QString)) ); - connect( m_pViewAttributes, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)), this, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)) ); + connect( m_pViewAttributes, SIGNAL(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)), this, SIGNAL(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)) ); + connect( m_pViewAttributes, SIGNAL(sigAttributeValueChangedInplace(const TQDomAttr&, const TQString)), this, SIGNAL(sigAttributeValueChangedInplace(const TQDomAttr&, const TQString)) ); m_pViewPlainXML = new KTextEdit( this, "plain XML" ); m_pViewPlainXML->setReadOnly(true); m_pViewPlainXML->setTextFormat(KTextEdit::PlainText); m_pViewPlainXML->setPaletteBackgroundColor(pParent->palette().active().base()); // Owerwrite read-only background color - m_pViewPlainXML->setWordWrap( QTextEdit::NoWrap ); + m_pViewPlainXML->setWordWrap( TQTextEdit::NoWrap ); m_pSyntaxHighlighter = new KXESyntaxHighlighter(m_pViewPlainXML); // configuring splitter sizes if (m_pConfig) { - QValueList<int> list = m_pConfig->readIntListEntry(CONFIG_SPLITTER_SIZES); + TQValueList<int> list = m_pConfig->readIntListEntry(CONFIG_SPLITTER_SIZES); if (!list.isEmpty()) setSizes(list); } @@ -76,7 +76,7 @@ KXE_ViewElement::~KXE_ViewElement() delete m_pSyntaxHighlighter; } -QDomAttr KXE_ViewElement::getSelectedAttribute() const +TQDomAttr KXE_ViewElement::getSelectedAttribute() const { return m_pViewAttributes->getSelectedAttribute(); } @@ -86,7 +86,7 @@ void KXE_ViewElement::setReadWrite( bool fReadWrite ) m_pViewAttributes->setReadWrite(fReadWrite); } -void KXE_ViewElement::slotChange( const QDomElement & element ) +void KXE_ViewElement::slotChange( const TQDomElement & element ) { // change attribute view m_pViewAttributes->slotChange(element); @@ -113,13 +113,13 @@ void KXE_ViewElement::slotTextViewSettingsChanged() if(KXMLEditorFactory::configuration()->textview()->isWrapOn()) { - m_pViewPlainXML->setHScrollBarMode(QScrollView::AlwaysOff); - m_pViewPlainXML->setWordWrap(QTextEdit::WidgetWidth); + m_pViewPlainXML->setHScrollBarMode(TQScrollView::AlwaysOff); + m_pViewPlainXML->setWordWrap(TQTextEdit::WidgetWidth); } else { - m_pViewPlainXML->setHScrollBarMode(QScrollView::Auto); - m_pViewPlainXML->setWordWrap(QTextEdit::NoWrap); + m_pViewPlainXML->setHScrollBarMode(TQScrollView::Auto); + m_pViewPlainXML->setWordWrap(TQTextEdit::NoWrap); } m_pSyntaxHighlighter->rehighlight(); diff --git a/part/kxe_viewelement.h b/part/kxe_viewelement.h index bac7669..f838079 100644 --- a/part/kxe_viewelement.h +++ b/part/kxe_viewelement.h @@ -18,9 +18,9 @@ #ifndef KXE_VIEWELEMENT_H #define KXE_VIEWELEMENT_H -#include <qsplitter.h> +#include <tqsplitter.h> -#include <qdom.h> +#include <tqdom.h> // forward declarations class KXE_ViewAttributes; @@ -35,17 +35,17 @@ class KXESyntaxHighlighter; * * @short Widget for XML elements. */ -class KXE_ViewElement : public QSplitter +class KXE_ViewElement : public TQSplitter { Q_OBJECT public: - KXE_ViewElement( QWidget * pParent, KConfig *pConfig, const char * pszName = 0 ); + KXE_ViewElement( TQWidget * pParent, KConfig *pConfig, const char * pszName = 0 ); ~KXE_ViewElement(); /** Returns a pointer to the currently selected attribute or a null pointer. */ - QDomAttr getSelectedAttribute() const; + TQDomAttr getSelectedAttribute() const; /** Changes the behaviour of this view to readonly or readwrite. */ void setReadWrite( bool fReadWrite ); @@ -53,7 +53,7 @@ class KXE_ViewElement : public QSplitter public slots: /** Changes/Rebuilds the whole widget according to the given element. */ - void slotChange( const QDomElement & ); + void slotChange( const TQDomElement & ); /** * Changes syntax highlighting colors. @@ -76,19 +76,19 @@ class KXE_ViewElement : public QSplitter signals: /** Emitted, when a context menu is requested (see @ref KXE_ViewAttributes::sigContextMenuRequested) */ - void sigContextMenuRequested( const QString & szMenuName, const QPoint & pos ); + void sigContextMenuRequested( const TQString & szMenuName, const TQPoint & pos ); /** * Emitted, when an attributes name was renamed via inplace editing * (see @ref KXE_ViewAttributes::sigAttributeChangedInplace). */ - void sigAttributeNameChangedInplace( const QDomAttr &, const QString ); + void sigAttributeNameChangedInplace( const TQDomAttr &, const TQString ); /** * Emitted, when an attributes value was renamed via inplace editing * (see @ref KXE_ViewAttributes::sigAttributeChangedInplace). */ - void sigAttributeValueChangedInplace( const QDomAttr &, const QString ); + void sigAttributeValueChangedInplace( const TQDomAttr &, const TQString ); }; #endif diff --git a/part/kxearchiveextssettings.cpp b/part/kxearchiveextssettings.cpp index 3dfde77..9f51882 100644 --- a/part/kxearchiveextssettings.cpp +++ b/part/kxearchiveextssettings.cpp @@ -21,14 +21,14 @@ #include <klocale.h> #include <kconfig.h> -#include <qframe.h> -#include <qlistbox.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqframe.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #define CONF_ENTRY_NAME_EXTS_TARGZ "Extensions" -KXEArchiveExtsSettings::KXEArchiveExtsSettings( QObject * pParent, const char * pszName ) +KXEArchiveExtsSettings::KXEArchiveExtsSettings( TQObject * pParent, const char * pszName ) : KXESettings( "TarGz Extensions", pParent, pszName ), m_pDialogPage(0) { @@ -46,22 +46,22 @@ void KXEArchiveExtsSettings::read( const KConfig * pConfig ) m_lstExtensions = pConfig->readListEntry( CONF_ENTRY_NAME_EXTS_TARGZ ); } -QString KXEArchiveExtsSettings::dialogPageName() const +TQString KXEArchiveExtsSettings::dialogPageName() const { return i18n( "Archive Extensions" ); } -QString KXEArchiveExtsSettings::dialogPageHeader() const +TQString KXEArchiveExtsSettings::dialogPageHeader() const { return i18n( "Specify Archive Extensions" ); } -QString KXEArchiveExtsSettings::dialogPageIcon() const +TQString KXEArchiveExtsSettings::dialogPageIcon() const { return "filetypes"; } -QWidget * KXEArchiveExtsSettings::dialogPage( QFrame * pParent ) +TQWidget * KXEArchiveExtsSettings::dialogPage( TQFrame * pParent ) { if ( ! m_pDialogPage ) { @@ -71,10 +71,10 @@ QWidget * KXEArchiveExtsSettings::dialogPage( QFrame * pParent ) // and fill its widgets with the corresponding values updatePage(); - connect( m_pDialogPage->m_pExtensions, SIGNAL(highlighted(const QString&)), this, SLOT(slotPageEditExtension(const QString&)) ); + connect( m_pDialogPage->m_pExtensions, SIGNAL(highlighted(const TQString&)), this, SLOT(slotPageEditExtension(const TQString&)) ); connect( m_pDialogPage->m_pBtnNew, SIGNAL(clicked()), this, SLOT(slotPageAddExtension()) ); connect( m_pDialogPage->m_pBtnDelete, SIGNAL(clicked()), this, SLOT(slotPageDeleteExtension()) ); - connect( m_pDialogPage->m_pExtension, SIGNAL(textChanged(const QString&)), this, SLOT(slotPageUpdateExtension(const QString&)) ); + connect( m_pDialogPage->m_pExtension, SIGNAL(textChanged(const TQString&)), this, SLOT(slotPageUpdateExtension(const TQString&)) ); connect( m_pDialogPage->m_pBtnNew, SIGNAL(clicked()), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pBtnDelete, SIGNAL(clicked()), this, SIGNAL(sigDialogPageChanged()) ); @@ -89,7 +89,7 @@ void KXEArchiveExtsSettings::setFromPage() if ( m_pDialogPage ) { m_lstExtensions.clear(); - QListBoxItem * pTmpItem = m_pDialogPage->m_pExtensions->firstItem(); + TQListBoxItem * pTmpItem = m_pDialogPage->m_pExtensions->firstItem(); while ( pTmpItem ) { m_lstExtensions << pTmpItem->text(); @@ -113,7 +113,7 @@ void KXEArchiveExtsSettings::updatePage() const // additional slots for the corresponding configuration dialog page // ////////////////////////////////////////////////////////////////////// -void KXEArchiveExtsSettings::slotPageEditExtension( const QString & strText ) +void KXEArchiveExtsSettings::slotPageEditExtension( const TQString & strText ) { m_pDialogPage->m_pExtension->setText( strText ); m_pDialogPage->m_pExtension->setEnabled( true ); @@ -142,7 +142,7 @@ void KXEArchiveExtsSettings::slotPageDeleteExtension() m_pDialogPage->m_pExtensions->setSelected( m_pDialogPage->m_pExtensions->currentItem(), true ); } -void KXEArchiveExtsSettings::slotPageUpdateExtension( const QString & strText ) +void KXEArchiveExtsSettings::slotPageUpdateExtension( const TQString & strText ) { if ( ( m_pDialogPage->m_pExtensions->count() > 0 ) && ( m_pDialogPage->m_pExtensions->currentText() != m_pDialogPage->m_pExtension->text() ) ) diff --git a/part/kxearchiveextssettings.h b/part/kxearchiveextssettings.h index ad2f212..107fc77 100644 --- a/part/kxearchiveextssettings.h +++ b/part/kxearchiveextssettings.h @@ -20,7 +20,7 @@ #include "kxesettings.h" -#include <qstringlist.h> +#include <tqstringlist.h> class KXEArchiveExtsSettingsPage; @@ -36,27 +36,27 @@ class KXEArchiveExtsSettings : public KXESettings public: - KXEArchiveExtsSettings( QObject * pParent = 0, const char * pszName = 0 ); + KXEArchiveExtsSettings( TQObject * pParent = 0, const char * pszName = 0 ); // The following function(s) can be used to access this object's settings. - const QStringList & extensions() const { return m_lstExtensions; } + const TQStringList & extensions() const { return m_lstExtensions; } /** * Derived from @ref KXESettings */ - virtual QString dialogPageName() const; + virtual TQString dialogPageName() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageHeader() const; + virtual TQString dialogPageHeader() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageIcon() const; + virtual TQString dialogPageIcon() const; /** * Derived from @ref KXESettings */ - virtual QWidget * dialogPage( QFrame * pParent ); + virtual TQWidget * dialogPage( TQFrame * pParent ); protected: @@ -78,7 +78,7 @@ class KXEArchiveExtsSettings : public KXESettings virtual void updatePage() const; // the settings itself - QStringList m_lstExtensions; + TQStringList m_lstExtensions; /** * the corresponding configuration dialog page @@ -94,7 +94,7 @@ class KXEArchiveExtsSettings : public KXESettings /** * Copies the selected item's extension to the editline. */ - void slotPageEditExtension( const QString & ); + void slotPageEditExtension( const TQString & ); /** * Creates a new (empty) item/ extension in the listbox and selects it. */ @@ -106,7 +106,7 @@ class KXEArchiveExtsSettings : public KXESettings /** * Copies the lineedit's current text to the currently selected item. */ - void slotPageUpdateExtension( const QString & ); + void slotPageUpdateExtension( const TQString & ); }; diff --git a/part/kxearchiveextssettingspage.ui b/part/kxearchiveextssettingspage.ui index 0936850..b393fe6 100644 --- a/part/kxearchiveextssettingspage.ui +++ b/part/kxearchiveextssettingspage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEArchiveExtsSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KXEArchiveExtsSettingsPage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pLblExtensions</cstring> </property> @@ -36,7 +36,7 @@ This list contains the known extensions for archive files.<br> You can choose one to edit or remove it with the dialog widgets below.</string> </property> </widget> - <widget class="QListBox" row="1" column="0"> + <widget class="TQListBox" row="1" column="0"> <property name="name"> <cstring>m_pExtensions</cstring> </property> @@ -52,7 +52,7 @@ You can choose one to edit or remove it with the dialog widgets below.</string> This list contains the known extensions for archive files.</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> <cstring>layout2</cstring> </property> @@ -60,7 +60,7 @@ This list contains the known extensions for archive files.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pLblExtension</cstring> </property> @@ -76,7 +76,7 @@ This list contains the known extensions for archive files.</string> Change the selected extension here.</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_pExtension</cstring> </property> @@ -103,7 +103,7 @@ Change the selected extension here.</string> </size> </property> </spacer> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> <cstring>layout1</cstring> </property> @@ -111,7 +111,7 @@ Change the selected extension here.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnNew</cstring> </property> @@ -127,7 +127,7 @@ Change the selected extension here.</string> You can create a new item for another known extension in the list above.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnDelete</cstring> </property> @@ -167,7 +167,7 @@ You can delete the selected extension from the list above.</string> </grid> </widget> <slots> - <slot>slotUpdateExtension( const QString & )</slot> + <slot>slotUpdateExtension( const TQString & )</slot> <slot>slotDeleteExtension()</slot> <slot>slotAddExtension()</slot> </slots> diff --git a/part/kxeattachdialogbase.ui b/part/kxeattachdialogbase.ui index 447ac9f..56c3428 100644 --- a/part/kxeattachdialogbase.ui +++ b/part/kxeattachdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEAttachDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXEAttachDialogBase</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>Label</cstring> </property> @@ -35,7 +35,7 @@ <cstring>attachURI</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -49,7 +49,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -80,7 +80,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -97,7 +97,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> diff --git a/part/kxeattributedialog.cpp b/part/kxeattributedialog.cpp index 93bf9a7..80f66ed 100644 --- a/part/kxeattributedialog.cpp +++ b/part/kxeattributedialog.cpp @@ -21,15 +21,15 @@ #include <kdebug.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqlabel.h> -KXEAttributeDialog::KXEAttributeDialog( QWidget * pParent, const char * pszName, bool fModal, WFlags fl ) +KXEAttributeDialog::KXEAttributeDialog( TQWidget * pParent, const char * pszName, bool fModal, WFlags fl ) : KXEAttributeDialogBase( pParent, pszName, fModal, fl ) { - connect( m_pEditNamespace, SIGNAL(textChanged(const QString &)), this, SLOT(slotNamespaceChanged(const QString &)) ); - connect( m_pEditQName, SIGNAL(textChanged(const QString &)), this, SLOT(slotNameChanged(const QString &)) ); - connect( m_pEditValue, SIGNAL(textChanged(const QString &)), this, SLOT(slotValueChanged(const QString &)) ); + connect( m_pEditNamespace, SIGNAL(textChanged(const TQString &)), this, SLOT(slotNamespaceChanged(const TQString &)) ); + connect( m_pEditQName, SIGNAL(textChanged(const TQString &)), this, SLOT(slotNameChanged(const TQString &)) ); + connect( m_pEditValue, SIGNAL(textChanged(const TQString &)), this, SLOT(slotValueChanged(const TQString &)) ); } void KXEAttributeDialog::clearDialog() @@ -59,9 +59,9 @@ int KXEAttributeDialog::exec() return iReturn; } -void KXEAttributeDialog::slotNameChanged(const QString & strNewName) +void KXEAttributeDialog::slotNameChanged(const TQString & strNewName) { - QString strMessage = checkName(strNewName); + TQString strMessage = checkName(strNewName); if(strMessage.isEmpty()) { strMessage = checkNamespace(m_pEditNamespace->text()); @@ -77,9 +77,9 @@ void KXEAttributeDialog::slotNameChanged(const QString & strNewName) m_pBtnOK->setEnabled(true); } -void KXEAttributeDialog::slotValueChanged(const QString & strNewValue) +void KXEAttributeDialog::slotValueChanged(const TQString & strNewValue) { - QString strMessage = checkName(m_pEditQName->text()); + TQString strMessage = checkName(m_pEditQName->text()); if(strMessage.isEmpty()) { strMessage = checkNamespace(m_pEditNamespace->text()); @@ -95,9 +95,9 @@ void KXEAttributeDialog::slotValueChanged(const QString & strNewValue) m_pBtnOK->setEnabled(true); } -void KXEAttributeDialog::slotNamespaceChanged(const QString & strNewNamespace) +void KXEAttributeDialog::slotNamespaceChanged(const TQString & strNewNamespace) { - QString strMessage = checkName(m_pEditQName->text()); + TQString strMessage = checkName(m_pEditQName->text()); if(strMessage.isEmpty()) { strMessage = checkNamespace(strNewNamespace); @@ -114,7 +114,7 @@ void KXEAttributeDialog::slotNamespaceChanged(const QString & strNewNamespace) } // Check, if XML attribute name is OK -QString KXEAttributeDialog::checkNamespace(const QString strAtttributeName) +TQString KXEAttributeDialog::checkNamespace(const TQString strAtttributeName) { if(strAtttributeName.length() == 0) return ""; @@ -124,10 +124,10 @@ QString KXEAttributeDialog::checkNamespace(const QString strAtttributeName) return i18n("Atttribute namespace cannot contain space !"); // Forbidden characters - QString strForbiddenChars("<>\"'"); + TQString strForbiddenChars("<>\"'"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strAtttributeName.find(ch) >= 0) return i18n("Atttribute namespace cannot contain character: %1 !").arg(ch); @@ -137,7 +137,7 @@ QString KXEAttributeDialog::checkNamespace(const QString strAtttributeName) } // Check, if XML attribute name is OK -QString KXEAttributeDialog::checkName(const QString strAtttributeName) +TQString KXEAttributeDialog::checkName(const TQString strAtttributeName) { if(strAtttributeName.length() == 0) return ""; @@ -147,10 +147,10 @@ QString KXEAttributeDialog::checkName(const QString strAtttributeName) return i18n("Atttribute name cannot contain space !"); // Forbidden characters - QString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); + TQString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strAtttributeName.find(ch) >= 0) return i18n("Atttribute name cannot contain character: %1 !").arg(ch); @@ -160,16 +160,16 @@ QString KXEAttributeDialog::checkName(const QString strAtttributeName) } // Check, if XML attribute value is OK -QString KXEAttributeDialog::checkValue(const QString strData) +TQString KXEAttributeDialog::checkValue(const TQString strData) { if(strData.length() == 0) return ""; // Forbidden characters - QString strForbiddenChars("<>\""); + TQString strForbiddenChars("<>\""); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strData.find(ch) >= 0) return i18n("Attribute value cannot contain character: %1 !").arg(ch); diff --git a/part/kxeattributedialog.h b/part/kxeattributedialog.h index e2019b9..25b8879 100644 --- a/part/kxeattributedialog.h +++ b/part/kxeattributedialog.h @@ -20,23 +20,23 @@ #include "kxeattributedialogbase.h" -#include <qdom.h> +#include <tqdom.h> class KXEAttributeDialog : public KXEAttributeDialogBase { Q_OBJECT public: - KXEAttributeDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + KXEAttributeDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); - const QString attributeNamespace() const { return m_strNamespace; } - const QString QName() const { return m_strQName; } - const QString Value() const { return m_strValue; } + const TQString attributeNamespace() const { return m_strNamespace; } + const TQString QName() const { return m_strQName; } + const TQString Value() const { return m_strValue; } /** * To be used for adding an attribute to new XML element. * - * @return see @ref QDialog::exec + * @return see @ref TQDialog::exec */ int exec( ); @@ -46,37 +46,37 @@ class KXEAttributeDialog : public KXEAttributeDialogBase void clearDialog(); // Check, if XML attribute name is OK - static QString checkName(const QString); + static TQString checkName(const TQString); // Check, if XML attribute value is OK - static QString checkValue(const QString); + static TQString checkValue(const TQString); // Check, if XML attribute namespace is OK - static QString checkNamespace(const QString); + static TQString checkNamespace(const TQString); protected slots: /** * Called, when user change attribute name. * Disables the OK button, if user input is wrong or incomplete. */ - void slotNameChanged(const QString &); + void slotNameChanged(const TQString &); /** * Called, when user change attribute value. * Disables the OK button, if user input is wrong or incomplete. */ - void slotValueChanged(const QString &); + void slotValueChanged(const TQString &); /** * Called, when user change attribute namespace. * Disables the OK button, if user input is wrong or incomplete. */ - void slotNamespaceChanged(const QString &); + void slotNamespaceChanged(const TQString &); protected: - QString m_strNamespace; - QString m_strQName; - QString m_strValue; + TQString m_strNamespace; + TQString m_strQName; + TQString m_strValue; }; #endif diff --git a/part/kxeattributedialogbase.ui b/part/kxeattributedialogbase.ui index d03b8eb..29eadc1 100644 --- a/part/kxeattributedialogbase.ui +++ b/part/kxeattributedialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEAttributeDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXEAttributeDialogBase</cstring> </property> @@ -79,7 +79,7 @@ </size> </property> </spacer> - <widget class="QLineEdit" row="1" column="0"> + <widget class="TQLineEdit" row="1" column="0"> <property name="name"> <cstring>m_pEditNamespace</cstring> </property> @@ -89,7 +89,7 @@ Enter the namespace URI for this attribute here.</string> </property> </widget> - <widget class="QLineEdit" row="5" column="0"> + <widget class="TQLineEdit" row="5" column="0"> <property name="name"> <cstring>m_pEditValue</cstring> </property> @@ -99,7 +99,7 @@ Enter the namespace URI for this attribute here.</string> Enter the attribute's value here.</string> </property> </widget> - <widget class="QLineEdit" row="3" column="0"> + <widget class="TQLineEdit" row="3" column="0"> <property name="name"> <cstring>m_pEditQName</cstring> </property> @@ -109,7 +109,7 @@ Enter the attribute's value here.</string> Enter a qualified name for the attribute here.</string> </property> </widget> - <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -140,7 +140,7 @@ Enter a qualified name for the attribute here.</string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnOK</cstring> </property> @@ -157,7 +157,7 @@ Enter a qualified name for the attribute here.</string> <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnCancel</cstring> </property> @@ -173,7 +173,7 @@ Enter a qualified name for the attribute here.</string> </widget> </hbox> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>m_pLblValue</cstring> </property> @@ -189,7 +189,7 @@ Enter a qualified name for the attribute here.</string> Enter the attribute's value here.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_pLblQName</cstring> </property> @@ -205,7 +205,7 @@ Enter the attribute's value here.</string> Enter a qualified name for the attribute here.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pLblNamespace</cstring> </property> @@ -221,7 +221,7 @@ Enter a qualified name for the attribute here.</string> Enter the namespace URI for this attribute here.</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>m_pTextLabelMessage</cstring> </property> diff --git a/part/kxechardatadialog.cpp b/part/kxechardatadialog.cpp index 483ab1c..434c156 100644 --- a/part/kxechardatadialog.cpp +++ b/part/kxechardatadialog.cpp @@ -17,15 +17,15 @@ #include "kxechardatadialog.h" -#include <qlabel.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qtextedit.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> #include <kdebug.h> #include <klocale.h> -KXECharDataDialog::KXECharDataDialog( QWidget * pParent, const char * pszName, bool fModal, WFlags fl ) +KXECharDataDialog::KXECharDataDialog( TQWidget * pParent, const char * pszName, bool fModal, WFlags fl ) : KXECharDataDialogBase( pParent, pszName, fModal, fl ) { connect( m_pEditData, SIGNAL(textChanged()), this, SLOT(slotDataChanged()) ); @@ -82,7 +82,7 @@ int KXECharDataDialog::exec() void KXECharDataDialog::slotDataChanged() { - QString strMessage = checkContents(m_pEditData->text()); + TQString strMessage = checkContents(m_pEditData->text()); m_pTextLabelMessage->setText(strMessage); @@ -93,22 +93,22 @@ void KXECharDataDialog::slotDataChanged() } // Check, if XML chardata contents is OK -QString KXECharDataDialog::checkContents(const QString strData) +TQString KXECharDataDialog::checkContents(const TQString strData) { if(strData.length() == 0) return ""; // Forbidden characters - /*QString strForbiddenChars("<>"); + /*TQString strForbiddenChars("<>"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strData.find(ch) >= 0) return i18n("Contents cannot contain character: %1 !").arg(ch); } - L.V. Removed this check, bacause QDomCharacterData.setData() escapec special + L.V. Removed this check, bacause TQDomCharacterData.setData() escapec special charactesr and data() unescapes it back to original string */ diff --git a/part/kxechardatadialog.h b/part/kxechardatadialog.h index 7e1507b..2e263a8 100644 --- a/part/kxechardatadialog.h +++ b/part/kxechardatadialog.h @@ -32,13 +32,13 @@ class KXECharDataDialog : public KXECharDataDialogBase Q_OBJECT public: - KXECharDataDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + KXECharDataDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); // const CharDataKind charDataKind() const { return m_eCharDataKind; } const bool atTop() const { return m_bAtTop; } - const QString contents() const { return m_strContents; } + const TQString contents() const { return m_strContents; } - void setContents(const QString strContents) { m_strContents = strContents; } + void setContents(const TQString strContents) { m_strContents = strContents; } // void setCharDataKind(const CharDataKind eCharDataKind) { m_eCharDataKind = eCharDataKind; } public: @@ -47,7 +47,7 @@ class KXECharDataDialog : public KXECharDataDialogBase * To be used for inserting the given XML character data as child * of the given parent element. * - * @return see @ref QDialog::exec + * @return see @ref TQDialog::exec */ int exec( bool ); @@ -57,7 +57,7 @@ class KXECharDataDialog : public KXECharDataDialogBase void clearDialog(); // check contents - static QString checkContents(const QString); + static TQString checkContents(const TQString); protected: /** @@ -77,7 +77,7 @@ class KXECharDataDialog : public KXECharDataDialogBase protected: //CharDataKind m_eCharDataKind; bool m_bAtTop; - QString m_strContents; + TQString m_strContents; }; #endif diff --git a/part/kxechardatadialogbase.ui b/part/kxechardatadialogbase.ui index 7f8b874..3d85300 100644 --- a/part/kxechardatadialogbase.ui +++ b/part/kxechardatadialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXECharDataDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXECharDataDialogBase</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -42,7 +42,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblInsert</cstring> </property> @@ -58,7 +58,7 @@ Choose, where to place this XML character data in the XML elements list of childnodes.</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>at bottom</string> @@ -97,7 +97,7 @@ Choose, where to place this XML character data in the XML elements list of child </spacer> </hbox> </widget> - <widget class="QTextEdit" row="1" column="0"> + <widget class="TQTextEdit" row="1" column="0"> <property name="name"> <cstring>m_pEditData</cstring> </property> @@ -111,7 +111,7 @@ Choose, where to place this XML character data in the XML elements list of child <string>You can edit the XML character data in this editor.</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -142,7 +142,7 @@ Choose, where to place this XML character data in the XML elements list of child </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnOK</cstring> </property> @@ -159,7 +159,7 @@ Choose, where to place this XML character data in the XML elements list of child <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnCancel</cstring> </property> @@ -172,7 +172,7 @@ Choose, where to place this XML character data in the XML elements list of child </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_pTextLabelMessage</cstring> </property> diff --git a/part/kxechoosestringdialog.cpp b/part/kxechoosestringdialog.cpp index f46856b..180b865 100644 --- a/part/kxechoosestringdialog.cpp +++ b/part/kxechoosestringdialog.cpp @@ -17,11 +17,11 @@ #include "kxechoosestringdialog.h" -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlabel.h> -KXEChooseStringDialog::KXEChooseStringDialog(QWidget *parent, +KXEChooseStringDialog::KXEChooseStringDialog(TQWidget *parent, const char *name, const char *szCaption, const char *szPrompt) diff --git a/part/kxechoosestringdialog.h b/part/kxechoosestringdialog.h index 2065e3a..13c12cc 100644 --- a/part/kxechoosestringdialog.h +++ b/part/kxechoosestringdialog.h @@ -20,7 +20,7 @@ #include "kxechoosestringdialogbase.h" -#include <qwidget.h> +#include <tqwidget.h> /**Dialog with combobox that allow enter or select any string @@ -31,14 +31,14 @@ class KXEChooseStringDialog : public KXEChooseStringDialogBase { Q_OBJECT public: - KXEChooseStringDialog(QWidget *, const char *, const char *, const char *); + KXEChooseStringDialog(TQWidget *, const char *, const char *, const char *); protected slots: // Protected slots /** Called, when user press OK button */ void slotOk(); public: // Public attributes /** Contain text choosed by user */ - QString m_strChoosedText; + TQString m_strChoosedText; }; #endif diff --git a/part/kxechoosestringdialogbase.ui b/part/kxechoosestringdialogbase.ui index 5fb8079..58e5cb8 100644 --- a/part/kxechoosestringdialogbase.ui +++ b/part/kxechoosestringdialogbase.ui @@ -3,7 +3,7 @@ <comment>Dialog with combobox that allow enter or select any string</comment> <author>Lumir Vanek</author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXEChooseStringDialogBase</cstring> </property> @@ -28,7 +28,7 @@ or select any string</comment> <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pComboBox</cstring> </property> @@ -38,7 +38,7 @@ or select any string</comment> Enter or choose string, that you want.</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout3</cstring> </property> @@ -69,7 +69,7 @@ Enter or choose string, that you want.</string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pPushButtonOk</cstring> </property> @@ -77,7 +77,7 @@ Enter or choose string, that you want.</string> <string>&OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pPushButtonCancel</cstring> </property> @@ -87,7 +87,7 @@ Enter or choose string, that you want.</string> </widget> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pTextLabel</cstring> </property> diff --git a/part/kxeconfiguration.cpp b/part/kxeconfiguration.cpp index 1b933b3..a06e90e 100644 --- a/part/kxeconfiguration.cpp +++ b/part/kxeconfiguration.cpp @@ -27,11 +27,11 @@ #include <kdialogbase.h> #include <kiconloader.h> -#include <qlayout.h> +#include <tqlayout.h> KXEConfiguration::KXEConfiguration() - : QObject( 0, "KXMLEditor's configuration (KXEConfiguration)" ), + : TQObject( 0, "KXMLEditor's configuration (KXEConfiguration)" ), m_pDialog( 0 ) { // initialize all setting group objects @@ -94,15 +94,15 @@ void KXEConfiguration::showDialog() connect( m_pDialog, SIGNAL(okClicked()), this, SLOT(slotDlgApplied()) ); // and add the pages - QFrame * pFrame; - QWidget * pPage; - QVBoxLayout * pLayout; + TQFrame * pFrame; + TQWidget * pPage; + TQVBoxLayout * pLayout; // - tree view properties page pFrame = m_pDialog->addPage( m_pTreeView->dialogPageName(), m_pTreeView->dialogPageHeader(), KGlobal::instance()->iconLoader()->loadIcon( m_pTreeView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); - pLayout = new QVBoxLayout( pFrame ); + pLayout = new TQVBoxLayout( pFrame ); pPage = m_pTreeView->dialogPage( pFrame ); pLayout->addWidget( pPage ); connect( m_pTreeView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); @@ -111,7 +111,7 @@ void KXEConfiguration::showDialog() pFrame = m_pDialog->addPage( m_pTextView->dialogPageName(), m_pTextView->dialogPageHeader(), KGlobal::instance()->iconLoader()->loadIcon( m_pTextView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); - pLayout = new QVBoxLayout( pFrame ); + pLayout = new TQVBoxLayout( pFrame ); pPage = m_pTextView->dialogPage( pFrame ); pLayout->addWidget( pPage ); connect( m_pTextView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); @@ -120,7 +120,7 @@ void KXEConfiguration::showDialog() pFrame = m_pDialog->addPage( m_pNewFile->dialogPageName(), m_pNewFile->dialogPageHeader(), KGlobal::instance()->iconLoader()->loadIcon( m_pNewFile->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); - pLayout = new QVBoxLayout( pFrame ); + pLayout = new TQVBoxLayout( pFrame ); pPage = m_pNewFile->dialogPage( pFrame ); pLayout->addWidget( pPage ); connect( m_pNewFile, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); @@ -129,7 +129,7 @@ void KXEConfiguration::showDialog() pFrame = m_pDialog->addPage( m_pPrint->dialogPageName(), m_pPrint->dialogPageHeader(), KGlobal::instance()->iconLoader()->loadIcon( m_pPrint->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); - pLayout = new QVBoxLayout( pFrame ); + pLayout = new TQVBoxLayout( pFrame ); pPage = m_pPrint->dialogPage( pFrame ); pLayout->addWidget( pPage ); connect( m_pPrint, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); @@ -138,7 +138,7 @@ void KXEConfiguration::showDialog() pFrame = m_pDialog->addPage( m_pArcExts->dialogPageName(), m_pArcExts->dialogPageHeader(), KGlobal::instance()->iconLoader()->loadIcon( m_pArcExts->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); - pLayout = new QVBoxLayout( pFrame ); + pLayout = new TQVBoxLayout( pFrame ); pPage = m_pArcExts->dialogPage( pFrame ); pLayout->addWidget( pPage ); connect( m_pArcExts, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); diff --git a/part/kxeconfiguration.h b/part/kxeconfiguration.h index 3afd8b2..a0569c8 100644 --- a/part/kxeconfiguration.h +++ b/part/kxeconfiguration.h @@ -18,7 +18,7 @@ #ifndef KXECONFIGURATION_H #define KXECONFIGURATION_H -#include <qobject.h> +#include <tqobject.h> class KXETreeViewSettings; class KXETextViewSettings; @@ -39,7 +39,7 @@ class KDialogBase; * @short container for KXMLEditor's configuration data * @author Olaf Hartig */ -class KXEConfiguration : public QObject +class KXEConfiguration : public TQObject { Q_OBJECT diff --git a/part/kxedocument.cpp b/part/kxedocument.cpp index 8f48529..52394fa 100644 --- a/part/kxedocument.cpp +++ b/part/kxedocument.cpp @@ -37,16 +37,16 @@ #include <kurl.h> #include <kurlrequester.h> -#include <qcombobox.h> -#include <qbuffer.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qlabel.h> -#include <qcheckbox.h> - -KXEDocument::KXEDocument(QObject *parent, const char *name) - :QObject (parent,name), - QDomDocument(), +#include <tqcombobox.h> +#include <tqbuffer.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqlabel.h> +#include <tqcheckbox.h> + +KXEDocument::KXEDocument(TQObject *parent, const char *name) + :TQObject (parent,name), + TQDomDocument(), KXMLGUIClient() { m_bDocIsCompressed = false; @@ -63,7 +63,7 @@ KXEDocument::~KXEDocument() } -bool KXEDocument::save(const QString &strFileName) +bool KXEDocument::save(const TQString &strFileName) { if (this->documentElement().isNull() && KMessageBox::warningContinueCancel(0, @@ -73,14 +73,14 @@ bool KXEDocument::save(const QString &strFileName) return false; } - QString strXML; + TQString strXML; - QTextStream streamXML(&strXML, IO_WriteOnly); + TQTextStream streamXML(&strXML, IO_WriteOnly); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps(); - ((QDomDocument*)this)->save(streamXML, iIndent); + ((TQDomDocument*)this)->save(streamXML, iIndent); - QString strEncoding; - QTextCodec *pTextCodec; + TQString strEncoding; + TQTextCodec *pTextCodec; // find encoding info if(strXML.left(5) == "<?xml") @@ -91,9 +91,9 @@ bool KXEDocument::save(const QString &strFileName) iStart += 8; // skip encoding // search " or ' after encoding - if((iStart = strXML.find(QRegExp("[\"']"), iStart)) > 0) + if((iStart = strXML.find(TQRegExp("[\"']"), iStart)) > 0) { - QChar ch = strXML[iStart]; + TQChar ch = strXML[iStart]; iStart++; // skip ch if((iEnd = strXML.find(ch, iStart)) > 0) { @@ -104,23 +104,23 @@ bool KXEDocument::save(const QString &strFileName) } if(strEncoding.length() <= 0) - pTextCodec = QTextCodec::codecForLocale(); // default + pTextCodec = TQTextCodec::codecForLocale(); // default else - pTextCodec = QTextCodec::codecForName(strEncoding); + pTextCodec = TQTextCodec::codecForName(strEncoding); if(pTextCodec == 0) { if(KMessageBox::questionYesNo(0, i18n("Codec for encoding %1 not found ! Continue saving ?").arg(strEncoding)) != KMessageBox::Yes) return false; } - QCString strDecoded; + TQCString strDecoded; if(pTextCodec) { strDecoded = pTextCodec->fromUnicode(strXML); } // save string to file if(!m_bDocIsCompressed) - { QFile file(strFileName); + { TQFile file(strFileName); if(file.open(IO_WriteOnly) == true) { file.writeBlock(strDecoded, strDecoded.length()); file.flush(); @@ -134,7 +134,7 @@ bool KXEDocument::save(const QString &strFileName) } else { // obtain file extension ----------------------------------------- - QString strExtension; + TQString strExtension; int iPos = strFileName.findRev('.'); @@ -167,14 +167,14 @@ bool KXEDocument::save(const QString &strFileName) return true; } -bool KXEDocument::open(const QString &strFileName) +bool KXEDocument::open(const TQString &strFileName) { - QString strCompressedTarEntryName; + TQString strCompressedTarEntryName; kdDebug() << "KXEDocument::open: opening file " << strFileName << endl; // obtain file extension ----------------------------------------- - QString strExtension; + TQString strExtension; int iPos = strFileName.findRev('.'); @@ -182,7 +182,7 @@ bool KXEDocument::open(const QString &strFileName) { strExtension = strFileName.mid(iPos + 1); } - QString strTmpfileName; + TQString strTmpfileName; if ( KXMLEditorFactory::configuration()->archexts()->extensions().contains(strExtension) ) { @@ -196,7 +196,7 @@ bool KXEDocument::open(const QString &strFileName) } tmp.setAutoDelete(false); - QFile &fileTemporary = *(tmp.file()); + TQFile &fileTemporary = *(tmp.file()); if(strExtension == "svgz") @@ -211,12 +211,12 @@ bool KXEDocument::open(const QString &strFileName) { m_strCompressedTarEntryName = m_strCompressedTarEntryName.mid(iPos + 1); } - QIODevice *pIODevice = KFilterDev::deviceForFile(strFileName, "application/x-gzip"); + TQIODevice *pIODevice = KFilterDev::deviceForFile(strFileName, "application/x-gzip"); if(pIODevice->open( IO_ReadOnly )) { - QTextStream stream(pIODevice); - QString line; + TQTextStream stream(pIODevice); + TQString line; //int i = 1; while ( !stream.atEnd() ) { @@ -263,7 +263,7 @@ bool KXEDocument::open(const QString &strFileName) if(entry && entry->isFile()) { const KArchiveFile *pTarFile = static_cast <const KArchiveFile *> (entry); - QBuffer buffer(pTarFile->data()); + TQBuffer buffer(pTarFile->data()); buffer.open(IO_ReadOnly); fileTemporary.writeBlock(buffer.buffer(), buffer.size()); @@ -284,7 +284,7 @@ bool KXEDocument::open(const QString &strFileName) // ( 1.) parse the file and fill our document - QFile file(m_bDocIsCompressed ? strTmpfileName : strFileName); + TQFile file(m_bDocIsCompressed ? strTmpfileName : strFileName); if(! file.open(IO_ReadOnly)) { kdDebug() << "KXEDocument::openFile: Can't open file." << endl; @@ -292,42 +292,42 @@ bool KXEDocument::open(const QString &strFileName) } // auxiliary file for obtaining encoding info - QFile fileAux(m_bDocIsCompressed ? strTmpfileName : strFileName); + TQFile fileAux(m_bDocIsCompressed ? strTmpfileName : strFileName); if(! fileAux.open(IO_ReadOnly)) { kdDebug() << "KXEDocument::openFile: Can't open file." << endl; return false; } - QTextStream txtStreamLocal( & file ); + TQTextStream txtStreamLocal( & file ); // Lookup at XML document encoding ----------------------------------------------- - QTextStream txtStreamAux( & fileAux ); - QString strFirstLine = txtStreamAux.readLine(); + TQTextStream txtStreamAux( & fileAux ); + TQString strFirstLine = txtStreamAux.readLine(); fileAux.close(); int iStart, iEnd; if((iStart = strFirstLine.find("encoding", 0)) > 0) { - QString strEncoding; + TQString strEncoding; // info about encoding found; iStart += 8; // skip encoding // search " or ' after encoding - if((iStart = strFirstLine.find(QRegExp("[\"']"), iStart)) > 0) + if((iStart = strFirstLine.find(TQRegExp("[\"']"), iStart)) > 0) { - QChar ch = strFirstLine[iStart]; + TQChar ch = strFirstLine[iStart]; iStart++; // skip ch if((iEnd = strFirstLine.find(ch, iStart)) > 0) { strEncoding = strFirstLine.mid(iStart, iEnd - iStart); - QTextCodec *pTextCodec = QTextCodec::codecForName(strEncoding); + TQTextCodec *pTextCodec = TQTextCodec::codecForName(strEncoding); if(pTextCodec) txtStreamLocal.setCodec(pTextCodec); else { KMessageBox::sorry(0, i18n("Codec for encoding %1 not found ! Using locale encoding for load.").arg(strEncoding)); - txtStreamLocal.setEncoding(QTextStream::Locale); + txtStreamLocal.setEncoding(TQTextStream::Locale); } } } @@ -335,24 +335,24 @@ bool KXEDocument::open(const QString &strFileName) else { // XML documment dont have info about encoding, set default UTF-8 - txtStreamLocal.setCodec(QTextCodec::codecForName("UTF-8")); + txtStreamLocal.setCodec(TQTextCodec::codecForName("UTF-8")); } //-------------------------------------------------------------------------------- - QString strFileContents = txtStreamLocal.read(); + TQString strFileContents = txtStreamLocal.read(); file.close(); if(m_bDocIsCompressed) { - QDir dir; + TQDir dir; dir.remove(strTmpfileName); } - //-- Set string with XML to QDomDocument ------------------------------------------ - QString strErrorMsg; + //-- Set string with XML to TQDomDocument ------------------------------------------ + TQString strErrorMsg; int iErrorLine, iErrorColumn; - QDomDocument * pNewDoc = new QDomDocument; // first try with a new document + TQDomDocument * pNewDoc = new TQDomDocument; // first try with a new document if( ! pNewDoc->setContent(strFileContents, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) { kdDebug() << "KXEDocument::openFile: Failed parsing the file." << endl; @@ -368,8 +368,8 @@ bool KXEDocument::open(const QString &strFileName) // The following commented code is performance wise buggy, because the string // gets parsed a second time. I replaced it with this code. // copy the content of the parsed document to this one - QDomNode e = pNewDoc->removeChild( pNewDoc->documentElement() ); - QDomDocument::operator=( *pNewDoc ); + TQDomNode e = pNewDoc->removeChild( pNewDoc->documentElement() ); + TQDomDocument::operator=( *pNewDoc ); appendChild( e ); // Here comes the "buggy" code. //this->setContent(pNewDoc->toString(),true,0,0); // and take the new one @@ -397,37 +397,37 @@ void KXEDocument::setURL(KURL url) emit sigURLChanged(url); } -void KXEDocument::updateNodeCreated(const QDomNode & node) +void KXEDocument::updateNodeCreated(const TQDomNode & node) { emit sigNodeCreated(node); setModified(); } -void KXEDocument::updateNodeDeleted(const QDomNode & node) +void KXEDocument::updateNodeDeleted(const TQDomNode & node) { emit sigNodeDeleted(node); setModified(); } -void KXEDocument::updateNodeChanged( const QDomElement & domElement ) +void KXEDocument::updateNodeChanged( const TQDomElement & domElement ) { emit sigNodeChanged(domElement); setModified(); } -void KXEDocument::updateNodeChanged( const QDomCharacterData & node ) +void KXEDocument::updateNodeChanged( const TQDomCharacterData & node ) { emit sigNodeChanged(node); setModified(); } -void KXEDocument::updateNodeChanged( const QDomProcessingInstruction &domProcInstr ) +void KXEDocument::updateNodeChanged( const TQDomProcessingInstruction &domProcInstr ) { emit sigNodeChanged(domProcInstr); setModified(); } -void KXEDocument::updateNodeMoved( const QDomNode & node ) +void KXEDocument::updateNodeMoved( const TQDomNode & node ) { emit sigNodeMoved(node); setModified(); @@ -435,7 +435,7 @@ void KXEDocument::updateNodeMoved( const QDomNode & node ) void KXEDocument::attachStylesheet(const KURL& stylesheet) { - setSpecProcInstr("xml-stylesheet",QString("type = 'text/xsl' href = '")+stylesheet.url()+"' "); + setSpecProcInstr("xml-stylesheet",TQString("type = 'text/xsl' href = '")+stylesheet.url()+"' "); } void KXEDocument::detachStylesheet() @@ -445,7 +445,7 @@ void KXEDocument::detachStylesheet() void KXEDocument::attachSchema(const KURL& schema) { - QDomElement domElement = documentElement(); + TQDomElement domElement = documentElement(); if (!domElement.isNull()) { domElement.setAttributeNS(SCHEMA_NAMESPACE, @@ -459,7 +459,7 @@ void KXEDocument::attachSchema(const KURL& schema) void KXEDocument::detachSchema() { - QDomElement domElement = this->documentElement(); + TQDomElement domElement = this->documentElement(); if (!domElement.isNull()) { domElement.removeAttributeNS(SCHEMA_NAMESPACE,SCHEMA_ATTRIBUTE); @@ -469,16 +469,16 @@ void KXEDocument::detachSchema() } } -void KXEDocument::setSpecProcInstr(const QString& target, const QString& data) +void KXEDocument::setSpecProcInstr(const TQString& target, const TQString& data) { // removing old one removeSpecProcInstr(target); // create new one if (!data.isEmpty()) { - QDomProcessingInstruction domProcInstr = this->createProcessingInstruction(target,data); + TQDomProcessingInstruction domProcInstr = this->createProcessingInstruction(target,data); - QDomNode node = getSpecProcInstr("xml"); + TQDomNode node = getSpecProcInstr("xml"); if (!node.isNull()) // if there is already xml instruction, then put that one below it this->insertAfter(domProcInstr,node); @@ -491,25 +491,25 @@ void KXEDocument::setSpecProcInstr(const QString& target, const QString& data) setModified(); } -void KXEDocument::removeSpecProcInstr(const QString &target) +void KXEDocument::removeSpecProcInstr(const TQString &target) { - QDomNode domNode = getSpecProcInstr(target); + TQDomNode domNode = getSpecProcInstr(target); if (!domNode.isNull()) { updateNodeDeleted(domNode); - ((QDomDocument*)this)->removeChild(domNode); + ((TQDomDocument*)this)->removeChild(domNode); setModified(); } } -QDomNode KXEDocument::getSpecProcInstr(const QString& target) +TQDomNode KXEDocument::getSpecProcInstr(const TQString& target) { - QDomNode result; - QDomNodeList domNodeList = this->childNodes(); + TQDomNode result; + TQDomNodeList domNodeList = this->childNodes(); for (uint i=0;i<domNodeList.count();i++) if (domNodeList.item(i).isProcessingInstruction()) { - QDomProcessingInstruction domProcInstr = domNodeList.item(i).toProcessingInstruction(); + TQDomProcessingInstruction domProcInstr = domNodeList.item(i).toProcessingInstruction(); if (domProcInstr.target()==target) return domNodeList.item(i); } @@ -542,7 +542,7 @@ void KXEDocument::newFile() } case KXENewFileSettings::UseDefaults: - setSpecProcInstr( "xml", QString( "version='%1' encoding='%2'" ).arg(KXMLEditorFactory::configuration()->newfile()->dfltVersion()).arg(KXMLEditorFactory::configuration()->newfile()->dfltEncoding()) ); + setSpecProcInstr( "xml", TQString( "version='%1' encoding='%2'" ).arg(KXMLEditorFactory::configuration()->newfile()->dfltVersion()).arg(KXMLEditorFactory::configuration()->newfile()->dfltEncoding()) ); break; } emit sigOpened(); @@ -553,7 +553,7 @@ void KXEDocument::newFile() KCommand * KXEDocument::actDetachStylesheet() { - QDomNode domNode = getSpecProcInstr("xml-stylesheet"); + TQDomNode domNode = getSpecProcInstr("xml-stylesheet"); if (!domNode.isNull()) { KCommand *pCmd = new KXEStylesheetDetachCommand(this,domNode.toProcessingInstruction().data()); @@ -568,8 +568,8 @@ KCommand * KXEDocument::actAttachStylesheet() dlg.Label->setText(i18n("Stylesheet URL:")); if (dlg.exec()) { - QDomNode domNode = getSpecProcInstr("xml-stylesheet"); - QString data = ""; + TQDomNode domNode = getSpecProcInstr("xml-stylesheet"); + TQString data = ""; if (!domNode.isNull()) data = domNode.toProcessingInstruction().data(); KCommand *pCmd = new KXEStylesheetAttachCommand(this,data,dlg.attachURI->url()); @@ -610,7 +610,7 @@ KCommand * KXEDocument::actAttachSchema() // Instert or edit special processing instruction <?xml ... ?> KCommand * KXEDocument::actVersionEncoding() { - QDomNode node = getSpecProcInstr("xml"); + TQDomNode node = getSpecProcInstr("xml"); KXESpecProcInstrDialog dlg; if(!node.isNull()) @@ -621,7 +621,7 @@ KCommand * KXEDocument::actVersionEncoding() if(dlg.exec()) { - QString strOldData = ""; + TQString strOldData = ""; if (!node.isNull()) strOldData = node.toProcessingInstruction().data(); KCommand *pCmd = new KXEVersionEncodingCommand(this,strOldData,dlg.getData()); diff --git a/part/kxedocument.h b/part/kxedocument.h index 2b78659..7379086 100644 --- a/part/kxedocument.h +++ b/part/kxedocument.h @@ -14,8 +14,8 @@ #include <kurl.h> -#include <qobject.h> -#include <qdom.h> +#include <tqobject.h> +#include <tqdom.h> #include <kparts/part.h> #include <kxmlguiclient.h> @@ -23,7 +23,7 @@ #define SCHEMA_ATTRIBUTE "schemaLocation" #define SCHEMA_ATTRIBUTE_XSI "xsi:schemaLocation" -class QString; +class TQString; class KCommand; @@ -39,21 +39,21 @@ Stores XML document data which can be manipulated by KXMLEditor application. @author Adam Charytoniuk */ -class KXEDocument : public QObject, public QDomDocument, public KXMLGUIClient +class KXEDocument : public TQObject, public TQDomDocument, public KXMLGUIClient { Q_OBJECT public: /** @short Constructor */ - KXEDocument(QObject *parent=0, const char *name=0); + KXEDocument(TQObject *parent=0, const char *name=0); /** @short Destructor */ ~KXEDocument(); /** @short Saves document into given file */ - bool save(const QString &); + bool save(const TQString &); /** @short Loads document from given file */ - bool open(const QString &); + bool open(const TQString &); /** @short Sets modification flag. @@ -76,7 +76,7 @@ public: @param node newly created node */ - void updateNodeCreated(const QDomNode & node); + void updateNodeCreated(const TQDomNode & node); /** @short Notifies views about deleting node @@ -84,14 +84,14 @@ public: This will give a chanse to the views to remove that node visualization. @param node that is going to be deleted */ - void updateNodeDeleted(const QDomNode & node); + void updateNodeDeleted(const TQDomNode & node); /** @short Notifies views about element properties changes Should be called after element name or element attributes are changed. @param domElement element that has changed */ - void updateNodeChanged( const QDomElement & domElement ); + void updateNodeChanged( const TQDomElement & domElement ); /** @short Notifies views after change char. data properties @@ -99,21 +99,21 @@ public: (including texts, comments, .CDATA sections). @param node character data node that has changed */ - void updateNodeChanged( const QDomCharacterData & node ) ; + void updateNodeChanged( const TQDomCharacterData & node ) ; /** @short Notifies views after change proc. instr. properties Should be called after any processing intruction is changed. @param domProcInstr processing instruction that has changed */ - void updateNodeChanged( const QDomProcessingInstruction &domProcInstr ); + void updateNodeChanged( const TQDomProcessingInstruction &domProcInstr ); /** @short Notifies views after moving node Should be called if any node in the document was moved. @param node XML node that has been moved */ - void updateNodeMoved( const QDomNode & node ); + void updateNodeMoved( const TQDomNode & node ); /** @short Removes spec. processing instruction from XML file. @@ -121,24 +121,24 @@ public: @warning Removes processing instruction from DomDocument children node list only (no subnodes are modiified). @sa setSpecProcInstr() */ - void removeSpecProcInstr(const QString &target); + void removeSpecProcInstr(const TQString &target); /** @short Adds or changes (if already exists) processing instruction. - Processing instruction will be added as a child in QDomDocument object. + Processing instruction will be added as a child in TQDomDocument object. @param target processing intruction target @param data processing intruction data @sa removeSpecProcInstr() */ - virtual void setSpecProcInstr(const QString& target, const QString& data); + virtual void setSpecProcInstr(const TQString& target, const TQString& data); - /** @short Returns processing instruction located in QDomDocument. + /** @short Returns processing instruction located in TQDomDocument. If given processing intruction is not found, null node is returned. @param target name of the processing instruction target. @sa setSpecProcInstr() */ - QDomNode getSpecProcInstr(const QString& target); + TQDomNode getSpecProcInstr(const TQString& target); /** @short Attaches stylesheet to current XML file. @@ -192,7 +192,7 @@ public: KCommand * actAttachSchema(); private: - QString m_strCompressedTarEntryName; + TQString m_strCompressedTarEntryName; /** Equals true if document was opened from compressed file */ bool m_bDocIsCompressed; /** @short Stores modification flag */ @@ -218,11 +218,11 @@ signals: void sigURLChanged(KURL url); /** @short Emitted when new node was added to document.*/ - void sigNodeCreated(const QDomNode & node); + void sigNodeCreated(const TQDomNode & node); /** @short Emitted everytime node was deleted from document.*/ - void sigNodeDeleted(const QDomNode & node); + void sigNodeDeleted(const TQDomNode & node); /** @short Emitted everytime document element was changed .*/ - void sigNodeChanged( const QDomElement & domElement ); + void sigNodeChanged( const TQDomElement & domElement ); /** @short Emitted everytime character data node was changed. This is the case for nodes like: @@ -230,11 +230,11 @@ signals: - comments, - CDATA sections, */ - void sigNodeChanged( const QDomCharacterData & node ) ; + void sigNodeChanged( const TQDomCharacterData & node ) ; /** @short Emitted everytime processing instruction in document was changed .*/ - void sigNodeChanged( const QDomProcessingInstruction &domProcInstr ); + void sigNodeChanged( const TQDomProcessingInstruction &domProcInstr ); /** @short Emitted everytime document node was moved was changed .*/ - void sigNodeMoved( const QDomNode & node ); + void sigNodeMoved( const TQDomNode & node ); }; #endif diff --git a/part/kxeelementdialog.cpp b/part/kxeelementdialog.cpp index e2fc14a..ef807c0 100644 --- a/part/kxeelementdialog.cpp +++ b/part/kxeelementdialog.cpp @@ -17,19 +17,19 @@ #include "kxeelementdialog.h" -#include <qlabel.h> -#include <qcombobox.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> #include <klineedit.h> #include <kdebug.h> #include <klocale.h> -KXEElementDialog::KXEElementDialog( QWidget * pParent, const char * pszName, bool fModal, WFlags fl ) +KXEElementDialog::KXEElementDialog( TQWidget * pParent, const char * pszName, bool fModal, WFlags fl ) : KXEElementDialogBase( pParent, pszName, fModal, fl ) { - connect( m_pEditNsURI, SIGNAL(textChanged(const QString&)), this, SLOT(slotNsURIChanged(const QString&)) ); - connect( m_pEditName, SIGNAL(textChanged(const QString&)), this, SLOT(slotNameChanged(const QString&)) ); + connect( m_pEditNsURI, SIGNAL(textChanged(const TQString&)), this, SLOT(slotNsURIChanged(const TQString&)) ); + connect( m_pEditName, SIGNAL(textChanged(const TQString&)), this, SLOT(slotNameChanged(const TQString&)) ); } void KXEElementDialog::clearDialog() @@ -133,7 +133,7 @@ int KXEElementDialog::exec() return KXEElementDialogBase::exec(); } -void KXEElementDialog::slotNsURIChanged( const QString & strNewNsURI ) +void KXEElementDialog::slotNsURIChanged( const TQString & strNewNsURI ) { if ( strNewNsURI.isEmpty() ) m_pEditPrefix->setEnabled(false); @@ -141,9 +141,9 @@ void KXEElementDialog::slotNsURIChanged( const QString & strNewNsURI ) m_pEditPrefix->setEnabled(true); } -void KXEElementDialog::slotNameChanged( const QString & strNewName ) +void KXEElementDialog::slotNameChanged( const TQString & strNewName ) { - QString strMessage = checkName(strNewName); + TQString strMessage = checkName(strNewName); m_pTextLabelMessage->setText(strMessage); @@ -154,7 +154,7 @@ void KXEElementDialog::slotNameChanged( const QString & strNewName ) } // Check, if XML element name is OK -QString KXEElementDialog::checkName(const QString strElementName) +TQString KXEElementDialog::checkName(const TQString strElementName) { if(strElementName.length() == 0) return ""; @@ -168,17 +168,17 @@ QString KXEElementDialog::checkName(const QString strElementName) return i18n("Element name cannot start with 'xml' or 'XML' !"); // check first character - QChar firstChar(strElementName[0]); + TQChar firstChar(strElementName[0]); if((firstChar != '_') && !firstChar.isLetter()) { return i18n("Element name must start with an underscore or a letter !"); } // Forbidden characters - QString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); + TQString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strElementName.find(ch) >= 0) return i18n("Element name cannot contain character: %1 !").arg(ch); diff --git a/part/kxeelementdialog.h b/part/kxeelementdialog.h index 8012525..fec812c 100644 --- a/part/kxeelementdialog.h +++ b/part/kxeelementdialog.h @@ -25,28 +25,28 @@ class KXEElementDialog : public KXEElementDialogBase Q_OBJECT public: - KXEElementDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + KXEElementDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); public: - const QString nsURI() const { return m_strNsURI; } - const QString prefix() const { return m_strPrefix; } - const QString name() const { return m_strName; } + const TQString nsURI() const { return m_strNsURI; } + const TQString prefix() const { return m_strPrefix; } + const TQString name() const { return m_strName; } const bool atTop() const { return m_bAtTop; } - void setNsURI(const QString strNsURI) { m_strNsURI = strNsURI; } - void setPrefix(const QString strPrefix) { m_strPrefix = strPrefix; } - void setName(const QString strName) { m_strName = strName; } + void setNsURI(const TQString strNsURI) { m_strNsURI = strNsURI; } + void setPrefix(const TQString strPrefix) { m_strPrefix = strPrefix; } + void setName(const TQString strName) { m_strName = strName; } /** * To be used for creating a new XML element * - * @return see @ref QDialog::exec + * @return see @ref TQDialog::exec */ int exec( bool, bool, bool ); // check element name - static QString checkName(const QString); + static TQString checkName(const TQString); protected: /** @@ -74,18 +74,18 @@ class KXEElementDialog : public KXEElementDialogBase protected slots: - void slotNsURIChanged( const QString & szNewNsURI ); + void slotNsURIChanged( const TQString & szNewNsURI ); /** * Called, when the name in the edit line @ref DlgXMLElementBase::m_pEditName * is changed. * Disables the OK button, if the given string is empty. */ - void slotNameChanged( const QString & szNewName ); + void slotNameChanged( const TQString & szNewName ); protected: - QString m_strNsURI; - QString m_strPrefix; - QString m_strName; + TQString m_strNsURI; + TQString m_strPrefix; + TQString m_strName; bool m_bAtTop; }; diff --git a/part/kxeelementdialogbase.ui b/part/kxeelementdialogbase.ui index 0cf8cac..f531bbe 100644 --- a/part/kxeelementdialogbase.ui +++ b/part/kxeelementdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEElementDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXEElementDialogBase</cstring> </property> @@ -53,7 +53,7 @@ </size> </property> </spacer> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pLblPrefix</cstring> </property> @@ -103,7 +103,7 @@ You can enter the namespace prefix for this XML element here.</string> </size> </property> </spacer> - <widget class="QLineEdit" row="1" column="0"> + <widget class="TQLineEdit" row="1" column="0"> <property name="name"> <cstring>m_pEditNsURI</cstring> </property> @@ -112,7 +112,7 @@ You can enter the namespace prefix for this XML element here.</string> You can enter the namespace URI of this XML element here.</string> </property> </widget> - <widget class="QLineEdit" row="5" column="0"> + <widget class="TQLineEdit" row="5" column="0"> <property name="name"> <cstring>m_pEditName</cstring> </property> @@ -122,7 +122,7 @@ You can enter the namespace URI of this XML element here.</string> You have to enter this XML elements name here.</string> </property> </widget> - <widget class="QLineEdit" row="3" column="0"> + <widget class="TQLineEdit" row="3" column="0"> <property name="name"> <cstring>m_pEditPrefix</cstring> </property> @@ -132,7 +132,7 @@ You have to enter this XML elements name here.</string> You can enter the namespace prefix for this XML element here.</string> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pLblTagName</cstring> </property> @@ -148,7 +148,7 @@ You can enter the namespace prefix for this XML element here.</string> You have to enter this XML elements name here.</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pLblNsURI</cstring> </property> @@ -163,7 +163,7 @@ You have to enter this XML elements name here.</string> You can enter the namespace URI of this XML element here.</string> </property> </widget> - <widget class="QLayoutWidget" row="8" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="8" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -194,7 +194,7 @@ You can enter the namespace URI of this XML element here.</string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnOK</cstring> </property> @@ -211,7 +211,7 @@ You can enter the namespace URI of this XML element here.</string> <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnCancel</cstring> </property> @@ -227,7 +227,7 @@ You can enter the namespace URI of this XML element here.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -241,7 +241,7 @@ You can enter the namespace URI of this XML element here.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblInsert</cstring> </property> @@ -257,7 +257,7 @@ You can enter the namespace URI of this XML element here.</string> Choose, where to place this XML element in the parent elements list of childelements.</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>at bottom</string> @@ -296,7 +296,7 @@ Choose, where to place this XML element in the parent elements list of childelem </spacer> </hbox> </widget> - <widget class="QLabel" row="6" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="6" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pTextLabelMessage</cstring> </property> diff --git a/part/kxefilenewdialog.cpp b/part/kxefilenewdialog.cpp index 807f477..39eaeb0 100644 --- a/part/kxefilenewdialog.cpp +++ b/part/kxefilenewdialog.cpp @@ -11,10 +11,10 @@ // #include "kxefilenewdialog.h" -#include <qcheckbox.h> -#include <qframe.h> +#include <tqcheckbox.h> +#include <tqframe.h> -KXEFileNewDialog::KXEFileNewDialog(QWidget* parent, const char* name) +KXEFileNewDialog::KXEFileNewDialog(TQWidget* parent, const char* name) : KXESpecProcInstrDialog(parent, name) { m_pDontShowAgain->show(); diff --git a/part/kxefilenewdialog.h b/part/kxefilenewdialog.h index 20b3f1b..ba1c44c 100644 --- a/part/kxefilenewdialog.h +++ b/part/kxefilenewdialog.h @@ -22,7 +22,7 @@ Dialog for File->New assistance. class KXEFileNewDialog : public KXESpecProcInstrDialog { public: - KXEFileNewDialog(QWidget* parent, const char* name=0); + KXEFileNewDialog(TQWidget* parent, const char* name=0); ~KXEFileNewDialog(); diff --git a/part/kxenewfilesettings.cpp b/part/kxenewfilesettings.cpp index fcd4562..cc9a4fc 100644 --- a/part/kxenewfilesettings.cpp +++ b/part/kxenewfilesettings.cpp @@ -22,11 +22,11 @@ #include <kconfig.h> #include <kdebug.h> -#include <qframe.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqframe.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #define CONF_ENTRY_NAME_DFLT_VERSION "Default version" #define DFLT_VALUE_DFLT_VERSION "1.0" @@ -38,7 +38,7 @@ #define DFLT_VALUE_NEWFILE_CREAT_BEHAVIOUR UseDefaults -KXENewFileSettings::KXENewFileSettings( QObject * pParent, const char * pszName ) +KXENewFileSettings::KXENewFileSettings( TQObject * pParent, const char * pszName ) : KXESettings( "New File Settings", pParent, pszName ), m_strDfltVersion( DFLT_VALUE_DFLT_VERSION ), m_strDfltEncoding( DFLT_VALUE_DFLT_ENCODING ), @@ -64,23 +64,23 @@ void KXENewFileSettings::read( const KConfig * pConfig ) } -QString KXENewFileSettings::dialogPageName() const +TQString KXENewFileSettings::dialogPageName() const { return i18n( "New Files" ); } -QString KXENewFileSettings::dialogPageHeader() const +TQString KXENewFileSettings::dialogPageHeader() const { return i18n( "New File Settings" ); } -QString KXENewFileSettings::dialogPageIcon() const +TQString KXENewFileSettings::dialogPageIcon() const { return "files"; } -QWidget * KXENewFileSettings::dialogPage( QFrame * pParent ) +TQWidget * KXENewFileSettings::dialogPage( TQFrame * pParent ) { if ( ! m_pDialogPage ) @@ -92,7 +92,7 @@ QWidget * KXENewFileSettings::dialogPage( QFrame * pParent ) m_pDialogPage->m_pDfltEncoding->insertStringList( encodings() ); updatePage(); - connect( m_pDialogPage->m_pDfltVersion, SIGNAL(textChanged(const QString&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pDfltVersion, SIGNAL(textChanged(const TQString&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pDfltEncoding, SIGNAL(activated(int)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pNewFileCreatBehav1, SIGNAL(toggled(bool)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pNewFileCreatBehav2, SIGNAL(toggled(bool)), this, SIGNAL(sigDialogPageChanged()) ); @@ -142,9 +142,9 @@ void KXENewFileSettings::updatePage() const } } -QStringList KXENewFileSettings::encodings() +TQStringList KXENewFileSettings::encodings() { - static QStringList lstEncs; + static TQStringList lstEncs; if ( lstEncs.empty() ) { lstEncs.append("UTF-8"); diff --git a/part/kxenewfilesettings.h b/part/kxenewfilesettings.h index b1203ec..647f080 100644 --- a/part/kxenewfilesettings.h +++ b/part/kxenewfilesettings.h @@ -39,17 +39,17 @@ class KXENewFileSettings : public KXESettings UseDefaults }; - KXENewFileSettings( QObject * pParent = 0, const char * pszName = 0 ); + KXENewFileSettings( TQObject * pParent = 0, const char * pszName = 0 ); // The following functions can be used to access this object's settings. - QString dfltVersion() const { return m_strDfltVersion; } - QString dfltEncoding() const { return m_strDfltEncoding; } + TQString dfltVersion() const { return m_strDfltVersion; } + TQString dfltEncoding() const { return m_strDfltEncoding; } NewFileCreationBehaviour newFileCreaBehav() const { return m_enmNewFileCreaBehav; } /** * Returns a list of all possible encodings. */ - static QStringList encodings(); + static TQStringList encodings(); /** * Sets this object's new file creation behavior to the given one, @@ -62,19 +62,19 @@ class KXENewFileSettings : public KXESettings /** * Derived from @ref KXESettings */ - virtual QString dialogPageName() const; + virtual TQString dialogPageName() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageHeader() const; + virtual TQString dialogPageHeader() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageIcon() const; + virtual TQString dialogPageIcon() const; /** * Derived from @ref KXESettings */ - virtual QWidget * dialogPage( QFrame * pParent ); + virtual TQWidget * dialogPage( TQFrame * pParent ); protected: @@ -96,8 +96,8 @@ class KXENewFileSettings : public KXESettings virtual void updatePage() const; // the settings itself - QString m_strDfltVersion; - QString m_strDfltEncoding; + TQString m_strDfltVersion; + TQString m_strDfltEncoding; NewFileCreationBehaviour m_enmNewFileCreaBehav; /** diff --git a/part/kxenewfilesettingspage.ui b/part/kxenewfilesettingspage.ui index bf766e8..d5be1b8 100644 --- a/part/kxenewfilesettingspage.ui +++ b/part/kxenewfilesettingspage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXENewFileSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KXENewFileSettingsPage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblDfltVersion</cstring> </property> @@ -44,7 +44,7 @@ You can determine the default XML version for XML documents being created. This Since there's only one XML version yet, you shouldn't change this value.</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pDfltVersion</cstring> </property> @@ -57,7 +57,7 @@ Since there's only one XML version yet, you shouldn't change this value.</string </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -65,7 +65,7 @@ Since there's only one XML version yet, you shouldn't change this value.</string <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblDfltEncoding</cstring> </property> @@ -81,7 +81,7 @@ Since there's only one XML version yet, you shouldn't change this value.</string You can determine the default encoding for XML documents being created. This version is the default setting in wizard dialogs.</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_pDfltEncoding</cstring> </property> @@ -93,7 +93,7 @@ You can determine the default encoding for XML documents being created. This ver </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_pNewFileCreatBehav</cstring> </property> @@ -121,7 +121,7 @@ Creates an XML document with the default XML version and default encoding select <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pNewFileCreatBehav1</cstring> </property> @@ -129,7 +129,7 @@ Creates an XML document with the default XML version and default encoding select <string>Start with new empty file</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pNewFileCreatBehav2</cstring> </property> @@ -140,7 +140,7 @@ Creates an XML document with the default XML version and default encoding select <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pNewFileCreatBehav3</cstring> </property> diff --git a/part/kxeprintsettings.cpp b/part/kxeprintsettings.cpp index 765102b..61451fe 100644 --- a/part/kxeprintsettings.cpp +++ b/part/kxeprintsettings.cpp @@ -22,9 +22,9 @@ #include <kconfig.h> #include <kfontcombo.h> -#include <qframe.h> -#include <qspinbox.h> -#include <qcheckbox.h> +#include <tqframe.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> #define CONF_ENTRY_NAME_FONTFAMILY "Print font family" #define DFLT_VALUE_FONTFAMILY "Courier" @@ -42,7 +42,7 @@ #define DFLT_VALUE_WITH_HEADER true -KXEPrintSettings::KXEPrintSettings( QObject * pParent, const char * pszName ) +KXEPrintSettings::KXEPrintSettings( TQObject * pParent, const char * pszName ) : KXESettings( "Print Settings", pParent, pszName ), m_strFontFamily( DFLT_VALUE_FONTFAMILY ), m_iFontSize( DFLT_VALUE_FONTSIZE ), @@ -73,22 +73,22 @@ void KXEPrintSettings::read( const KConfig * pConfig ) m_bWithFooter = pConfig->readBoolEntry( CONF_ENTRY_NAME_WITH_HEADER, DFLT_VALUE_WITH_HEADER ); } -QString KXEPrintSettings::dialogPageName() const +TQString KXEPrintSettings::dialogPageName() const { return i18n( "Printing" ); } -QString KXEPrintSettings::dialogPageHeader() const +TQString KXEPrintSettings::dialogPageHeader() const { return i18n( "Print Settings" ); } -QString KXEPrintSettings::dialogPageIcon() const +TQString KXEPrintSettings::dialogPageIcon() const { return "printer2"; } -QWidget * KXEPrintSettings::dialogPage( QFrame * pParent ) +TQWidget * KXEPrintSettings::dialogPage( TQFrame * pParent ) { if ( ! m_pDialogPage ) { diff --git a/part/kxeprintsettings.h b/part/kxeprintsettings.h index fb833f6..0b24a0f 100644 --- a/part/kxeprintsettings.h +++ b/part/kxeprintsettings.h @@ -32,10 +32,10 @@ class KXEPrintSettings : public KXESettings { public: - KXEPrintSettings( QObject * pParent = 0, const char * pszName = 0 ); + KXEPrintSettings( TQObject * pParent = 0, const char * pszName = 0 ); // The following functions can be used to access this object's settings. - QString fontFamily() const { return m_strFontFamily; } + TQString fontFamily() const { return m_strFontFamily; } int fontSize() const { return m_iFontSize; } int indentSteps() const { return m_iIndentSteps; } bool hasHeader() const { return m_bWithHeader; } @@ -44,19 +44,19 @@ class KXEPrintSettings : public KXESettings /** * Derived from @ref KXESettings */ - virtual QString dialogPageName() const; + virtual TQString dialogPageName() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageHeader() const; + virtual TQString dialogPageHeader() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageIcon() const; + virtual TQString dialogPageIcon() const; /** * Derived from @ref KXESettings */ - virtual QWidget * dialogPage( QFrame * pParent ); + virtual TQWidget * dialogPage( TQFrame * pParent ); protected: @@ -78,7 +78,7 @@ class KXEPrintSettings : public KXESettings virtual void updatePage() const; // the settings itself - QString m_strFontFamily; + TQString m_strFontFamily; int m_iFontSize; int m_iIndentSteps; bool m_bWithHeader; diff --git a/part/kxeprintsettingspage.ui b/part/kxeprintsettingspage.ui index a857413..69d6eb1 100644 --- a/part/kxeprintsettingspage.ui +++ b/part/kxeprintsettingspage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEPrintSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KXEPrintSettingsPage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblFontFamily</cstring> </property> @@ -51,7 +51,7 @@ Choose the font family you want to be used on printing your XML documents.</stri Choose the font family you want to be used on printing your XML documents.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -59,7 +59,7 @@ Choose the font family you want to be used on printing your XML documents.</stri <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblFontSize</cstring> </property> @@ -75,7 +75,7 @@ Choose the font family you want to be used on printing your XML documents.</stri Choose the font size you want to be used on printing your XML documents.</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pFontSize</cstring> </property> @@ -116,7 +116,7 @@ Choose the font size you want to be used on printing your XML documents.</string </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -124,7 +124,7 @@ Choose the font size you want to be used on printing your XML documents.</string <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblIndentSteps</cstring> </property> @@ -140,7 +140,7 @@ Choose the font size you want to be used on printing your XML documents.</string Choose the number of characters you want to be used for indenting childnodes on printing you XML documents.</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pIndentSteps</cstring> </property> @@ -169,7 +169,7 @@ Choose the number of characters you want to be used for indenting childnodes on </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pWithHeader</cstring> </property> @@ -185,7 +185,7 @@ Choose the number of characters you want to be used for indenting childnodes on You can determine wether you want a header to be printed on every page when printing you XML documents or not.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pWithFooter</cstring> </property> diff --git a/part/kxeprocinstrdialog.cpp b/part/kxeprocinstrdialog.cpp index 00529b8..1210beb 100644 --- a/part/kxeprocinstrdialog.cpp +++ b/part/kxeprocinstrdialog.cpp @@ -17,23 +17,23 @@ #include "kxeprocinstrdialog.h" -#include <qlabel.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qtextedit.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> #include <klineedit.h> #include <kdebug.h> #include <klocale.h> #include <kmessagebox.h> -KXEProcInstrDialog::KXEProcInstrDialog( QWidget * pParent, const char * pszName, bool fModal, WFlags fl ) +KXEProcInstrDialog::KXEProcInstrDialog( TQWidget * pParent, const char * pszName, bool fModal, WFlags fl ) : KXEProcInstrDialogBase( pParent, pszName, fModal, fl ) { // signals and slots connections connect( m_pBtnOK, SIGNAL( clicked() ), this, SLOT( slotAccept() ) ); connect( m_pEditData, SIGNAL(textChanged()), this, SLOT(slotDataChanged()) ); - connect( m_pEditTarget, SIGNAL(textChanged(const QString &)), this, SLOT(slotTargetChanged(const QString &)) ); + connect( m_pEditTarget, SIGNAL(textChanged(const TQString &)), this, SLOT(slotTargetChanged(const TQString &)) ); } @@ -101,7 +101,7 @@ int KXEProcInstrDialog::exec() void KXEProcInstrDialog::slotDataChanged() { - QString strMessage = checkData(m_pEditData->text()); + TQString strMessage = checkData(m_pEditData->text()); if(strMessage.isEmpty()) strMessage = checkTarget(m_pEditTarget->text()); @@ -116,9 +116,9 @@ void KXEProcInstrDialog::slotDataChanged() m_pBtnOK->setEnabled(true); } -void KXEProcInstrDialog::slotTargetChanged(const QString &strNewTarget) +void KXEProcInstrDialog::slotTargetChanged(const TQString &strNewTarget) { - QString strMessage = checkTarget(strNewTarget); + TQString strMessage = checkTarget(strNewTarget); if(strMessage.isEmpty()) strMessage = checkData(m_pEditData->text()); @@ -145,16 +145,16 @@ void KXEProcInstrDialog::slotAccept() } // Check, if XML proc. instr. target is OK -QString KXEProcInstrDialog::checkTarget(const QString strTarget) +TQString KXEProcInstrDialog::checkTarget(const TQString strTarget) { if(strTarget.length() == 0) return ""; // Forbidden characters - QString strForbiddenChars("<>"); + TQString strForbiddenChars("<>"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strTarget.find(ch) >= 0) return i18n("Target cannot contain character: %1 !").arg(ch); @@ -164,16 +164,16 @@ QString KXEProcInstrDialog::checkTarget(const QString strTarget) } // Check, if XML proc. instr. data is OK -QString KXEProcInstrDialog::checkData(const QString strData) +TQString KXEProcInstrDialog::checkData(const TQString strData) { if(strData.length() == 0) return ""; // Forbidden characters - QString strForbiddenChars("<>"); + TQString strForbiddenChars("<>"); for(unsigned int i = 0; i < strForbiddenChars.length(); i++) { - QChar ch = strForbiddenChars[i]; + TQChar ch = strForbiddenChars[i]; if(strData.find(ch) >= 0) return i18n("Contents cannot contain character: %1 !").arg(ch); diff --git a/part/kxeprocinstrdialog.h b/part/kxeprocinstrdialog.h index 5b4de2e..2fac93b 100644 --- a/part/kxeprocinstrdialog.h +++ b/part/kxeprocinstrdialog.h @@ -25,14 +25,14 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase Q_OBJECT public: - KXEProcInstrDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + KXEProcInstrDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); const bool atTop() const { return m_bAtTop; } - const QString target() const { return m_strTarget; } - const QString data() const { return m_strData; } + const TQString target() const { return m_strTarget; } + const TQString data() const { return m_strData; } - void setTarget(const QString strTarget) { m_strTarget = strTarget; } - void setData(const QString strData) { m_strData = strData; } + void setTarget(const TQString strTarget) { m_strTarget = strTarget; } + void setData(const TQString strData) { m_strData = strData; } public: @@ -40,7 +40,7 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase * To be used for inserting a proc.instruction as child * of the given parent node. * - * @return see @ref QDialog::exec + * @return see @ref TQDialog::exec */ int exec( bool, bool ); @@ -50,10 +50,10 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase void clearDialog(); // check target - static QString checkTarget(const QString); + static TQString checkTarget(const TQString); // check data - static QString checkData(const QString); + static TQString checkData(const TQString); protected: /** @@ -73,14 +73,14 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase * Called, when the target edit box is changed. * Disables the OK button, if the editbox is empty. */ - void slotTargetChanged(const QString &); + void slotTargetChanged(const TQString &); /** Called when user press OK button */ void slotAccept(); protected: - QString m_strTarget; - QString m_strData; + TQString m_strTarget; + TQString m_strData; bool m_bAtTop; }; diff --git a/part/kxeprocinstrdialogbase.ui b/part/kxeprocinstrdialogbase.ui index c77d10b..67c1392 100644 --- a/part/kxeprocinstrdialogbase.ui +++ b/part/kxeprocinstrdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXEProcInstrDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXEProcInstrDialogBase</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -36,7 +36,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblTarget</cstring> </property> @@ -51,7 +51,7 @@ Define the target of this processing instruction here.</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_pEditTarget</cstring> </property> @@ -77,7 +77,7 @@ Define the target of this processing instruction here.</string> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblInsert</cstring> </property> @@ -93,7 +93,7 @@ Define the target of this processing instruction here.</string> Choose, where to place this processing instruction in the parent elements list.</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>at bottom</string> @@ -115,7 +115,7 @@ Choose, where to place this processing instruction in the parent elements list.< </widget> </hbox> </widget> - <widget class="QTextEdit" row="1" column="0"> + <widget class="TQTextEdit" row="1" column="0"> <property name="name"> <cstring>m_pEditData</cstring> </property> @@ -126,7 +126,7 @@ Choose, where to place this processing instruction in the parent elements list.< <string>Here you can enter the data (the instructions) of this XML processing instruction.</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -157,7 +157,7 @@ Choose, where to place this processing instruction in the parent elements list.< </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnOK</cstring> </property> @@ -174,7 +174,7 @@ Choose, where to place this processing instruction in the parent elements list.< <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnCancel</cstring> </property> @@ -190,7 +190,7 @@ Choose, where to place this processing instruction in the parent elements list.< </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_pTextLabelMessage</cstring> </property> diff --git a/part/kxesearchdialog.cpp b/part/kxesearchdialog.cpp index 09e3a49..b6cb5cc 100644 --- a/part/kxesearchdialog.cpp +++ b/part/kxesearchdialog.cpp @@ -17,9 +17,9 @@ #include "kxesearchdialog.h" -#include <qpushbutton.h> +#include <tqpushbutton.h> -KXESearchDialog::KXESearchDialog(QWidget *parent, const char *name, bool modal) +KXESearchDialog::KXESearchDialog(TQWidget *parent, const char *name, bool modal) : KXESearchDialogBase(parent, name, modal) { m_pPushButtonFind->setEnabled(false); @@ -27,7 +27,7 @@ KXESearchDialog::KXESearchDialog(QWidget *parent, const char *name, bool modal) m_pPushButtonFind->setDefault(true); } -void KXESearchDialog::slotTextChanged(const QString& string) +void KXESearchDialog::slotTextChanged(const TQString& string) { if ( string.isEmpty() ) m_pPushButtonFind->setEnabled(false); diff --git a/part/kxesearchdialog.h b/part/kxesearchdialog.h index abe7f3d..3ec8630 100644 --- a/part/kxesearchdialog.h +++ b/part/kxesearchdialog.h @@ -20,8 +20,8 @@ #include "kxesearchdialogbase.h" -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> /** * Dialog for input information from user @@ -33,9 +33,9 @@ class KXESearchDialog : public KXESearchDialogBase Q_OBJECT public: - KXESearchDialog( QWidget * pParent, const char * pszName = 0, bool bModal = true ); + KXESearchDialog( TQWidget * pParent, const char * pszName = 0, bool bModal = true ); - QString getSearchString() const { return m_pEditSearchedString->text(); } + TQString getSearchString() const { return m_pEditSearchedString->text(); } bool getMatchCase() const { return m_pCheckBoxMatchCase->isChecked(); } bool getInElementNames() const { return m_pCheckBoxElementNames->isChecked(); } bool getInAttributeNames() const { return m_pCheckBoxAttributeNames->isChecked(); } @@ -48,7 +48,7 @@ class KXESearchDialog : public KXESearchDialogBase protected slots: /** Called when text in edit line is changed */ - virtual void slotTextChanged(const QString & ); + virtual void slotTextChanged(const TQString & ); /** Called on a change of the "find in" checkbuttons. */ virtual void slotFindInChanged(); diff --git a/part/kxesearchdialogbase.ui b/part/kxesearchdialogbase.ui index 23be699..1f017f1 100644 --- a/part/kxesearchdialogbase.ui +++ b/part/kxesearchdialogbase.ui @@ -3,7 +3,7 @@ <comment>Dialog for input information from user about searching in XML document</comment> <author>Lumir Vanek</author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXESearchDialogBase</cstring> </property> @@ -40,7 +40,7 @@ about searching in XML document</comment> <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -54,7 +54,7 @@ about searching in XML document</comment> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pTextLabelSearchedString</cstring> </property> @@ -94,7 +94,7 @@ Here you can enter the string you want to search for in your XML document.</stri </spacer> </hbox> </widget> - <widget class="QLineEdit" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_pEditSearchedString</cstring> </property> @@ -103,7 +103,7 @@ Here you can enter the string you want to search for in your XML document.</stri Here you can enter the string you want to search for in your XML document.</string> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>layout13</cstring> </property> @@ -128,7 +128,7 @@ Here you can enter the string you want to search for in your XML document.</stri </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pPushButtonFind</cstring> </property> @@ -136,7 +136,7 @@ Here you can enter the string you want to search for in your XML document.</stri <string>&Find</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pPushButtonCancel</cstring> </property> @@ -163,7 +163,7 @@ Here you can enter the string you want to search for in your XML document.</stri </size> </property> </spacer> - <widget class="QGroupBox" row="2" column="0" rowspan="2" colspan="1"> + <widget class="TQGroupBox" row="2" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>m_pGroupBoxSearchIn</cstring> </property> @@ -193,7 +193,7 @@ These are <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCheckBoxElementNames</cstring> </property> @@ -201,7 +201,7 @@ These are <string>Element names</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCheckBoxAttributeNames</cstring> </property> @@ -209,7 +209,7 @@ These are <string>Attribute names</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCheckBoxAttributeValues</cstring> </property> @@ -217,7 +217,7 @@ These are <string>Attribute values</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCheckBoxContents</cstring> </property> @@ -227,7 +227,7 @@ These are </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> <cstring>layout23</cstring> </property> @@ -252,7 +252,7 @@ These are </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCheckBoxMatchCase</cstring> </property> @@ -291,9 +291,9 @@ Check this for case sensitive search.</string> <connections> <connection> <sender>m_pEditSearchedString</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>KXESearchDialogBase</receiver> - <slot>slotTextChanged(const QString&)</slot> + <slot>slotTextChanged(const TQString&)</slot> </connection> <connection> <sender>m_pPushButtonCancel</sender> @@ -344,7 +344,7 @@ Check this for case sensitive search.</string> </tabstops> <slots> <slot access="protected">slotFindInChanged()</slot> - <slot access="protected">slotTextChanged(const QString &)</slot> + <slot access="protected">slotTextChanged(const TQString &)</slot> </slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/part/kxesettings.cpp b/part/kxesettings.cpp index 8b5bb6e..59b71f0 100644 --- a/part/kxesettings.cpp +++ b/part/kxesettings.cpp @@ -19,8 +19,8 @@ #include <kconfig.h> -KXESettings::KXESettings( const QString & strConfigGroup, QObject * pParent, const char * pszName ) - : QObject( pParent, pszName ), +KXESettings::KXESettings( const TQString & strConfigGroup, TQObject * pParent, const char * pszName ) + : TQObject( pParent, pszName ), m_bPageChanged( false ), m_strConfigGroup( strConfigGroup ) { diff --git a/part/kxesettings.h b/part/kxesettings.h index 804c63e..b1a98ea 100644 --- a/part/kxesettings.h +++ b/part/kxesettings.h @@ -18,10 +18,10 @@ #ifndef KXESETTINGS_H #define KXESETTINGS_H -#include <qobject.h> +#include <tqobject.h> class KConfig; -class QFrame; +class TQFrame; /** * This is an abstract base class for classes representing a group, that stores @@ -30,7 +30,7 @@ class QFrame; * * @author Olaf Hartig */ -class KXESettings : public QObject +class KXESettings : public TQObject { Q_OBJECT @@ -42,7 +42,7 @@ class KXESettings : public QObject * @param strConfigGroup the name of the corresponding group in the config file, * it is copied to the member @ref m_strConfigGroup */ - KXESettings( const QString & strConfigGroup, QObject * pParent = 0, const char * pszName = 0 ); + KXESettings( const TQString & strConfigGroup, TQObject * pParent = 0, const char * pszName = 0 ); /** * Stores this settings to the given @ref KConfig object, by doing the @@ -80,7 +80,7 @@ class KXESettings : public QObject * pages in the configuration dialog. * This name has to be internationalized. */ - virtual QString dialogPageName() const = 0; + virtual TQString dialogPageName() const = 0; /** * You can override this function and return a header line to * be used for the corresponding configuration dialog page. @@ -88,12 +88,12 @@ class KXESettings : public QObject * @ref dialogPageName) * This string has to be internationalized. */ - virtual QString dialogPageHeader() const { return QString::null; } + virtual TQString dialogPageHeader() const { return TQString::null; } /** * Override this function and return the (file-)name of the icon * to be used in the configuration dialog for the corresponding page. */ - virtual QString dialogPageIcon() const = 0; + virtual TQString dialogPageIcon() const = 0; /** * Override this function to create the corresponding configuration * dialog page with the given parent and return it. @@ -101,7 +101,7 @@ class KXESettings : public QObject * Connect the signal @ref sigDialogPageChanged to the page's * data changed signal(s). */ - virtual QWidget * dialogPage( QFrame * pParent ) = 0; + virtual TQWidget * dialogPage( TQFrame * pParent ) = 0; signals: @@ -168,7 +168,7 @@ class KXESettings : public QObject /** * name of the config group for this group of settings */ - const QString m_strConfigGroup; + const TQString m_strConfigGroup; }; diff --git a/part/kxespecprocinstrdialog.cpp b/part/kxespecprocinstrdialog.cpp index e2a81b5..299b9e7 100644 --- a/part/kxespecprocinstrdialog.cpp +++ b/part/kxespecprocinstrdialog.cpp @@ -21,17 +21,17 @@ #include "kxeconfiguration.h" #include "kxenewfilesettings.h" -#include <qstring.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qframe.h> -#include <qcheckbox.h> +#include <tqstring.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqframe.h> +#include <tqcheckbox.h> #include <kdebug.h> -KXESpecProcInstrDialog::KXESpecProcInstrDialog(QWidget *parent, const char *name ) +KXESpecProcInstrDialog::KXESpecProcInstrDialog(TQWidget *parent, const char *name ) : KXESpecProcInstrDialogBase(parent,name) { m_pComboBoxEncoding->insertStringList( KXMLEditorFactory::configuration()->newfile()->encodings() ); @@ -49,10 +49,10 @@ KXESpecProcInstrDialog::~KXESpecProcInstrDialog() { } -void KXESpecProcInstrDialog::fillDialog( const QString strData ) +void KXESpecProcInstrDialog::fillDialog( const TQString strData ) { - QString strVersion; - QString strEncoding; + TQString strVersion; + TQString strEncoding; int iStart, iEnd; @@ -63,9 +63,9 @@ void KXESpecProcInstrDialog::fillDialog( const QString strData ) iStart += 7; // skip version // search " or ' after encoding - if((iStart = strData.find(QRegExp("[\"']"), iStart)) > 0) + if((iStart = strData.find(TQRegExp("[\"']"), iStart)) > 0) { - QChar ch = strData[iStart]; + TQChar ch = strData[iStart]; iStart++; // skip ch if((iEnd = strData.find(ch, iStart)) > 0) strVersion = strData.mid(iStart, iEnd - iStart); @@ -81,9 +81,9 @@ void KXESpecProcInstrDialog::fillDialog( const QString strData ) iStart += 8; // skip encoding // search " or ' after encoding - if((iStart = strData.find(QRegExp("[\"']"), iStart)) > 0) + if((iStart = strData.find(TQRegExp("[\"']"), iStart)) > 0) { - QChar ch = strData[iStart]; + TQChar ch = strData[iStart]; iStart++; // skip ch if((iEnd = strData.find(ch, iStart)) > 0) strEncoding = strData.mid(iStart, iEnd - iStart); @@ -117,7 +117,7 @@ void KXESpecProcInstrDialog::slotAccept() @param version XML file version @param encoding encoding type for the XML file */ -void KXESpecProcInstrDialog::fillDialog(const QString& version, const QString& encoding) +void KXESpecProcInstrDialog::fillDialog(const TQString& version, const TQString& encoding) { m_pLineEditVersion->setText(version); @@ -128,9 +128,9 @@ void KXESpecProcInstrDialog::fillDialog(const QString& version, const QString& e /*! Returns content of the dialog as an string of format: '"version = '...' encoding = '...' ". */ -QString KXESpecProcInstrDialog::getData() +TQString KXESpecProcInstrDialog::getData() { - return QString("version = '")+m_pLineEditVersion->text()+ + return TQString("version = '")+m_pLineEditVersion->text()+ "' encoding = '"+m_pComboBoxEncoding->currentText()+"' "; } diff --git a/part/kxespecprocinstrdialog.h b/part/kxespecprocinstrdialog.h index c78301f..128dd20 100644 --- a/part/kxespecprocinstrdialog.h +++ b/part/kxespecprocinstrdialog.h @@ -20,7 +20,7 @@ #include "kxespecprocinstrdialogbase.h" -#include <qwidget.h> +#include <tqwidget.h> /** *@author Lumir Vanek @@ -31,16 +31,16 @@ class KXESpecProcInstrDialog : public KXESpecProcInstrDialogBase Q_OBJECT public: - KXESpecProcInstrDialog(QWidget *parent=0, const char *name=0); + KXESpecProcInstrDialog(TQWidget *parent=0, const char *name=0); ~KXESpecProcInstrDialog(); - QString getData(); + TQString getData(); /** Initialize dialog from given target and data string */ - void fillDialog(const QString&, const QString&); + void fillDialog(const TQString&, const TQString&); /** Initialize dialog from given data string */ - void fillDialog(const QString); + void fillDialog(const TQString); int exec(); diff --git a/part/kxespecprocinstrdialogbase.ui b/part/kxespecprocinstrdialogbase.ui index 1bcbb25..efbdcc7 100644 --- a/part/kxespecprocinstrdialogbase.ui +++ b/part/kxespecprocinstrdialogbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXESpecProcInstrDialogBase</class> <author>Lumir Vanek</author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXESpecProcInstrDialogBase</cstring> </property> @@ -34,7 +34,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pTextLabel1</cstring> </property> @@ -49,7 +49,7 @@ You can determine the XML version for XML document.</string> </property> </widget> - <widget class="QLineEdit" row="1" column="0"> + <widget class="TQLineEdit" row="1" column="0"> <property name="name"> <cstring>m_pLineEditVersion</cstring> </property> @@ -58,7 +58,7 @@ You can determine the XML version for XML document.</string> You can determine the XML version for XML document.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_pTextLabel2</cstring> </property> @@ -73,7 +73,7 @@ You can determine the XML version for XML document.</string> You can determine the encoding used while saving this XML document.</string> </property> </widget> - <widget class="QComboBox" row="3" column="0"> + <widget class="TQComboBox" row="3" column="0"> <property name="name"> <cstring>m_pComboBoxEncoding</cstring> </property> @@ -85,7 +85,7 @@ You can determine the encoding used while saving this XML document.</string> You can determine the encoding used while saving this XML document.</string> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -93,7 +93,7 @@ You can determine the encoding used while saving this XML document.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pDontShowAgain</cstring> </property> @@ -110,7 +110,7 @@ If you select this option, your choice will be remembered. Next time you create </widget> </hbox> </widget> - <widget class="QFrame" row="5" column="0"> + <widget class="TQFrame" row="5" column="0"> <property name="name"> <cstring>m_pHLine</cstring> </property> @@ -121,7 +121,7 @@ If you select this option, your choice will be remembered. Next time you create <enum>Raised</enum> </property> </widget> - <widget class="QLayoutWidget" row="6" column="0"> + <widget class="TQLayoutWidget" row="6" column="0"> <property name="name"> <cstring>layout2</cstring> </property> @@ -146,7 +146,7 @@ If you select this option, your choice will be remembered. Next time you create </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnOK</cstring> </property> @@ -157,7 +157,7 @@ If you select this option, your choice will be remembered. Next time you create <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pBtnCancel</cstring> </property> diff --git a/part/kxesyntaxhighlighter.cpp b/part/kxesyntaxhighlighter.cpp index c783077..8397244 100644 --- a/part/kxesyntaxhighlighter.cpp +++ b/part/kxesyntaxhighlighter.cpp @@ -19,18 +19,18 @@ #include <iostream> -#include <qcolor.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqcolor.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <ktextedit.h> // Regular expressions for parsing XML borrowed from: // http://www.cs.sfu.ca/~cameron/REX.html -KXESyntaxHighlighter::KXESyntaxHighlighter(QTextEdit *textEdit) - : QSyntaxHighlighter(textEdit) +KXESyntaxHighlighter::KXESyntaxHighlighter(TQTextEdit *textEdit) + : TQSyntaxHighlighter(textEdit) { m_clrDefaultText.setRgb(0, 0, 0); m_clrElementName.setRgb(128, 0, 0); @@ -46,10 +46,10 @@ KXESyntaxHighlighter::~KXESyntaxHighlighter() } -int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOfLastPara) +int KXESyntaxHighlighter::highlightParagraph(const TQString& text, int endStateOfLastPara) { - //first I format the given line to default so any remaining highlighting is removed (Qt does not do it by itself) - setFormat(0 , text.length(), QColor(0, 0, 0)); + //first I format the given line to default so any remaining highlighting is removed (TQt does not do it by itself) + setFormat(0 , text.length(), TQColor(0, 0, 0)); int iBracketNesting = 0; m_eParserState = parsingNone; @@ -58,7 +58,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf if(endStateOfLastPara == 1) { - QRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment + TQRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment pos=patternComment.search(text, i); if(pos >= 0) // end comment found ? @@ -137,7 +137,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf if(m_eParserState == expectAttributeValue) { - QRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value + TQRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value pos=patternAttribute.search(text, i); if(pos == (int) i) // attribute value found ? @@ -162,7 +162,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf case '!': if(m_eParserState == expectElementNameOrSlash) { - QRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment + TQRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment pos=patternComment.search(text, i-1); if(pos == (int) i-1) // comment found ? @@ -178,7 +178,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf } else { // Try find multiline comment - QRegExp patternCommentStart("<!--"); // search comment start + TQRegExp patternCommentStart("<!--"); // search comment start pos=patternCommentStart.search(text, i-1); if(pos == (int)i-1) // comment found ? @@ -207,7 +207,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf return 0; } -int KXESyntaxHighlighter::processDefaultText(int i, const QString& text) +int KXESyntaxHighlighter::processDefaultText(int i, const TQString& text) { int l = 0; // length of matched text @@ -216,7 +216,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text) case expectElementNameOrSlash: case expectElementName: { - QRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search element name + TQRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search element name int pos=patternName.search(text, i); if(pos == i) // found ? @@ -233,7 +233,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text) case expectAtttributeOrEndOfElement: { - QRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search attribute name + TQRegExp patternName("([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*"); // search attribute name int pos=patternName.search(text, i); if(pos == i) // found ? diff --git a/part/kxesyntaxhighlighter.h b/part/kxesyntaxhighlighter.h index b6d8868..6952201 100644 --- a/part/kxesyntaxhighlighter.h +++ b/part/kxesyntaxhighlighter.h @@ -18,50 +18,50 @@ #ifndef KXESYNTAXHIGHLIGHTER_H #define KXESYNTAXHIGHLIGHTER_H -#include <qsyntaxhighlighter.h> +#include <tqsyntaxhighlighter.h> -class QTextEdit; +class TQTextEdit; /**XML Syntax highlighter *@author Lumir Vanek */ -class KXESyntaxHighlighter : public QSyntaxHighlighter +class KXESyntaxHighlighter : public TQSyntaxHighlighter { public: - KXESyntaxHighlighter(QTextEdit *); + KXESyntaxHighlighter(TQTextEdit *); ~KXESyntaxHighlighter(); - int highlightParagraph(const QString &text, int endStateOfLastPara); + int highlightParagraph(const TQString &text, int endStateOfLastPara); - void setColorDefaultText(const QColor color) { m_clrDefaultText = color; } - void setColorElementNames(const QColor color) { m_clrElementName = color; } - void setColorAttributeNames(const QColor color) { m_clrAttributeName = color; } - void setColorAttributeValues(const QColor color) { m_clrAttributeValue = color; } - void setColorXmlSyntaxChars(const QColor color) { m_clrXmlSyntaxChar = color; } - void setColorComments(const QColor color) { m_clrComment = color; } - void setColorSyntaxError(const QColor color) { m_clrSyntaxError = color; } + void setColorDefaultText(const TQColor color) { m_clrDefaultText = color; } + void setColorElementNames(const TQColor color) { m_clrElementName = color; } + void setColorAttributeNames(const TQColor color) { m_clrAttributeName = color; } + void setColorAttributeValues(const TQColor color) { m_clrAttributeValue = color; } + void setColorXmlSyntaxChars(const TQColor color) { m_clrXmlSyntaxChar = color; } + void setColorComments(const TQColor color) { m_clrComment = color; } + void setColorSyntaxError(const TQColor color) { m_clrSyntaxError = color; } - const QColor colorDefaultText() const { return m_clrDefaultText; } - const QColor colorElementNames() const { return m_clrElementName; } - const QColor colorAttributeNames() const { return m_clrAttributeName; } - const QColor colorAttributeValues() const { return m_clrAttributeValue; } - const QColor colorXmlSyntaxChars() const { return m_clrXmlSyntaxChar; } - const QColor colorComments() const { return m_clrComment; } - const QColor colorSyntaxError() const { return m_clrSyntaxError; } + const TQColor colorDefaultText() const { return m_clrDefaultText; } + const TQColor colorElementNames() const { return m_clrElementName; } + const TQColor colorAttributeNames() const { return m_clrAttributeName; } + const TQColor colorAttributeValues() const { return m_clrAttributeValue; } + const TQColor colorXmlSyntaxChars() const { return m_clrXmlSyntaxChar; } + const TQColor colorComments() const { return m_clrComment; } + const TQColor colorSyntaxError() const { return m_clrSyntaxError; } protected: - int processDefaultText(int, const QString&); + int processDefaultText(int, const TQString&); protected: - QColor m_clrDefaultText; - QColor m_clrElementName; - QColor m_clrAttributeName; - QColor m_clrAttributeValue; - QColor m_clrXmlSyntaxChar; // < > = " - QColor m_clrComment; - QColor m_clrSyntaxError; + TQColor m_clrDefaultText; + TQColor m_clrElementName; + TQColor m_clrAttributeName; + TQColor m_clrAttributeValue; + TQColor m_clrXmlSyntaxChar; // < > = " + TQColor m_clrComment; + TQColor m_clrSyntaxError; // states for parsing XML enum ParserState diff --git a/part/kxetexteditordialog.cpp b/part/kxetexteditordialog.cpp index c7c74fc..6e3fa39 100644 --- a/part/kxetexteditordialog.cpp +++ b/part/kxetexteditordialog.cpp @@ -21,15 +21,15 @@ #include "kxeconfiguration.h" #include "kxetextviewsettings.h" -#include <qdom.h> -#include <qpushbutton.h> +#include <tqdom.h> +#include <tqpushbutton.h> #include <kmessagebox.h> #include <ktextedit.h> #include <klocale.h> #include <kdebug.h> -KXETextEditorDialog::KXETextEditorDialog(QWidget *parent, const char *name) +KXETextEditorDialog::KXETextEditorDialog(TQWidget *parent, const char *name) : KXETextEditorDialogBase(parent,name) { m_pSyntaxHighlighter = new KXESyntaxHighlighter(m_pTextEditor); @@ -68,12 +68,12 @@ void KXETextEditorDialog::accept() bool KXETextEditorDialog::validateXml(bool bInfoIfOK) { - QString strXML = "<root>" + editorText() + "</root>"; + TQString strXML = "<root>" + editorText() + "</root>"; // create XML documemt from text - QString strErrorMsg; + TQString strErrorMsg; int iErrorLine, iErrorColumn; - QDomDocument doc; + TQDomDocument doc; if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) { kdDebug() << "KXETextEditorDialog::validateXml: Failed parsing the file." << endl; @@ -112,8 +112,8 @@ void KXETextEditorDialog::slotTextViewSettingsChanged() if(KXMLEditorFactory::configuration()->textview()->isWrapOn()) { - m_pTextEditor->setHScrollBarMode(QScrollView::AlwaysOff); - m_pTextEditor->setWordWrap(QTextEdit::WidgetWidth); + m_pTextEditor->setHScrollBarMode(TQScrollView::AlwaysOff); + m_pTextEditor->setWordWrap(TQTextEdit::WidgetWidth); } m_pSyntaxHighlighter->rehighlight(); diff --git a/part/kxetexteditordialog.h b/part/kxetexteditordialog.h index 8d17be2..d5e02c9 100644 --- a/part/kxetexteditordialog.h +++ b/part/kxetexteditordialog.h @@ -18,9 +18,9 @@ #ifndef KXETEXTEDITORDIALOG_H #define KXETEXTEDITORDIALOG_H -#include <qwidget.h> -#include <qstring.h> -#include <qsyntaxhighlighter.h> +#include <tqwidget.h> +#include <tqstring.h> +#include <tqsyntaxhighlighter.h> #include <ktextedit.h> @@ -35,11 +35,11 @@ class KXETextEditorDialog : public KXETextEditorDialogBase { Q_OBJECT public: - KXETextEditorDialog(QWidget *parent=0, const char *name=0); + KXETextEditorDialog(TQWidget *parent=0, const char *name=0); ~KXETextEditorDialog(); - QString editorText() const { return m_pTextEditor->text(); } - void setEditorText(const QString strText) { m_pTextEditor->setText(strText); } + TQString editorText() const { return m_pTextEditor->text(); } + void setEditorText(const TQString strText) { m_pTextEditor->setText(strText); } public slots: diff --git a/part/kxetexteditordialogbase.ui b/part/kxetexteditordialogbase.ui index 0f454b9..3a30175 100644 --- a/part/kxetexteditordialogbase.ui +++ b/part/kxetexteditordialogbase.ui @@ -2,7 +2,7 @@ <class>KXETextEditorDialogBase</class> <comment>Dialog for editing XML node as raw text</comment> <author>Lumir Vanek</author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KXETextEditorDialogBase</cstring> </property> @@ -52,7 +52,7 @@ <string>You can edit your XML document as raw text in this editor.</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>m_pButtonOk</cstring> </property> @@ -72,7 +72,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>m_pButtonCancel</cstring> </property> @@ -86,7 +86,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>m_pButtonValidate</cstring> </property> diff --git a/part/kxetextviewsettings.cpp b/part/kxetextviewsettings.cpp index 5fb009f..afcb528 100644 --- a/part/kxetextviewsettings.cpp +++ b/part/kxetextviewsettings.cpp @@ -22,31 +22,31 @@ #include <kconfig.h> #include <kdebug.h> #include <kcolorbutton.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -#include <qframe.h> -#include <qspinbox.h> +#include <tqframe.h> +#include <tqspinbox.h> #define CONF_ENTRY_NAME_COLOR_DEFAULT_TEXT "DefaultText" -#define DFLT_VALUE_COLOR_DEFAULT_TEXT QColor( "#000000" ) +#define DFLT_VALUE_COLOR_DEFAULT_TEXT TQColor( "#000000" ) #define CONF_ENTRY_NAME_COLOR_ELEMENT_NAMES "ElementNames" -#define DFLT_VALUE_COLOR_ELEMENT_NAMES QColor( "#800000" ) +#define DFLT_VALUE_COLOR_ELEMENT_NAMES TQColor( "#800000" ) #define CONF_ENTRY_NAME_COLOR_ATTR_NAMES "AttributeNames" -#define DFLT_VALUE_COLOR_ATTR_NAMES QColor( "#00ffff" ) +#define DFLT_VALUE_COLOR_ATTR_NAMES TQColor( "#00ffff" ) #define CONF_ENTRY_NAME_COLOR_ATTR_VALUES "AttributeValues" -#define DFLT_VALUE_COLOR_ATTR_VALUES QColor( "#00ff00" ) +#define DFLT_VALUE_COLOR_ATTR_VALUES TQColor( "#00ff00" ) #define CONF_ENTRY_NAME_COLOR_SYNTAX_CHARS "SyntaxChars" -#define DFLT_VALUE_COLOR_SYNTAX_CHARS QColor( "#000080" ) +#define DFLT_VALUE_COLOR_SYNTAX_CHARS TQColor( "#000080" ) #define CONF_ENTRY_NAME_COLOR_COMENTS "Comments" -#define DFLT_VALUE_COLOR_COMENTS QColor( "#808080" ) +#define DFLT_VALUE_COLOR_COMENTS TQColor( "#808080" ) #define CONF_ENTRY_NAME_COLOR_ERRORS "SyntaxError" -#define DFLT_VALUE_COLOR_ERRORS QColor( "#ff0000" ) +#define DFLT_VALUE_COLOR_ERRORS TQColor( "#ff0000" ) #define CONF_ENTRY_NAME_INDENT_STEPS "XML indentation" #define DFLT_VALUE_INDENT_STEPS 2 @@ -54,7 +54,7 @@ #define CONF_ENTRY_WRAP_ON "Text Wrap On" #define DFLT_VALUE_WRAP_ON false -KXETextViewSettings::KXETextViewSettings( QObject * pParent, const char * pszName ) +KXETextViewSettings::KXETextViewSettings( TQObject * pParent, const char * pszName ) : KXESettings( "Text editor", pParent, pszName ), m_colorDfltText( DFLT_VALUE_COLOR_DEFAULT_TEXT ), m_colorElemNames( DFLT_VALUE_COLOR_ELEMENT_NAMES ), @@ -106,23 +106,23 @@ void KXETextViewSettings::read( const KConfig * pConfig ) } -QString KXETextViewSettings::dialogPageName() const +TQString KXETextViewSettings::dialogPageName() const { return i18n( "Text view" ); } -QString KXETextViewSettings::dialogPageHeader() const +TQString KXETextViewSettings::dialogPageHeader() const { return i18n( "Text view properties" ); } -QString KXETextViewSettings::dialogPageIcon() const +TQString KXETextViewSettings::dialogPageIcon() const { return "colorize"; } -QWidget * KXETextViewSettings::dialogPage( QFrame * pParent ) +TQWidget * KXETextViewSettings::dialogPage( TQFrame * pParent ) { if ( ! m_pDialogPage ) { @@ -132,13 +132,13 @@ QWidget * KXETextViewSettings::dialogPage( QFrame * pParent ) // and fill its widgets with the corresponding values updatePage(); - connect( m_pDialogPage->m_pColorDfltText, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorElemNames, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorAttrNames, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorAttrValues, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorSyntaxChars, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorComments, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); - connect( m_pDialogPage->m_pColorErrors, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorDfltText, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorElemNames, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorAttrNames, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorAttrValues, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorSyntaxChars, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorComments, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); + connect( m_pDialogPage->m_pColorErrors, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pIndentSteps, SIGNAL(valueChanged(int)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pCheckBoxWrapOn, SIGNAL(toggled(bool)), this, SIGNAL(sigDialogPageChanged()) ); } diff --git a/part/kxetextviewsettings.h b/part/kxetextviewsettings.h index 117282a..8b08d92 100644 --- a/part/kxetextviewsettings.h +++ b/part/kxetextviewsettings.h @@ -20,7 +20,7 @@ #include "kxesettings.h" -#include <qcolor.h> +#include <tqcolor.h> class KXETextViewSettingsPage; @@ -34,35 +34,35 @@ class KXETextViewSettings : public KXESettings { public: - KXETextViewSettings( QObject * pParent = 0, const char * pszName = 0 ); + KXETextViewSettings( TQObject * pParent = 0, const char * pszName = 0 ); // The following functions can be used to access this object's settings. - const QColor & colorDfltText() const { return m_colorDfltText; } - const QColor & colorElemNames() const { return m_colorElemNames; } - const QColor & colorAttrNames() const { return m_colorAttrNames; } - const QColor & colorAttrValues() const { return m_colorAttrValues; } - const QColor & colorSyntaxChars() const { return m_colorSyntaxChars; } - const QColor & colorComments() const { return m_colorComments; } - const QColor & colorErrors() const { return m_colorErrors; } + const TQColor & colorDfltText() const { return m_colorDfltText; } + const TQColor & colorElemNames() const { return m_colorElemNames; } + const TQColor & colorAttrNames() const { return m_colorAttrNames; } + const TQColor & colorAttrValues() const { return m_colorAttrValues; } + const TQColor & colorSyntaxChars() const { return m_colorSyntaxChars; } + const TQColor & colorComments() const { return m_colorComments; } + const TQColor & colorErrors() const { return m_colorErrors; } int indentSteps() const { return m_iIndentSteps; } bool isWrapOn() const { return m_bWrapOn; } /** * Derived from @ref KXESettings */ - virtual QString dialogPageName() const; + virtual TQString dialogPageName() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageHeader() const; + virtual TQString dialogPageHeader() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageIcon() const; + virtual TQString dialogPageIcon() const; /** * Derived from @ref KXESettings */ - virtual QWidget * dialogPage( QFrame * pParent ); + virtual TQWidget * dialogPage( TQFrame * pParent ); protected: @@ -84,13 +84,13 @@ class KXETextViewSettings : public KXESettings virtual void updatePage() const; // the settings itself - QColor m_colorDfltText; - QColor m_colorElemNames; - QColor m_colorAttrNames; - QColor m_colorAttrValues; - QColor m_colorSyntaxChars; - QColor m_colorComments; - QColor m_colorErrors; + TQColor m_colorDfltText; + TQColor m_colorElemNames; + TQColor m_colorAttrNames; + TQColor m_colorAttrValues; + TQColor m_colorSyntaxChars; + TQColor m_colorComments; + TQColor m_colorErrors; int m_iIndentSteps; bool m_bWrapOn; diff --git a/part/kxetextviewsettingspage.ui b/part/kxetextviewsettingspage.ui index f82c830..8c23c9a 100644 --- a/part/kxetextviewsettingspage.ui +++ b/part/kxetextviewsettingspage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXETextViewSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KXETextViewSettingsPage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>m_pBoxSyntaxHL</cstring> </property> @@ -35,7 +35,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pLblColorDfltText</cstring> </property> @@ -54,7 +54,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <string></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_pLblColorElemNames</cstring> </property> @@ -73,7 +73,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <string></string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>m_pLblColorErrors</cstring> </property> @@ -84,7 +84,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <cstring>m_pColorErrors</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>m_pLblColorAttrValues</cstring> </property> @@ -103,7 +103,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <string></string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>m_pLblColorComments</cstring> </property> @@ -114,7 +114,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <cstring>m_pColorComments</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_pLblColorAttrNames</cstring> </property> @@ -141,7 +141,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <string></string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>m_pLblColorSyntaxChars</cstring> </property> @@ -170,7 +170,7 @@ You can define the colors to be used, when showing your XML documents as raw tex </widget> </grid> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>layout2</cstring> </property> @@ -178,7 +178,7 @@ You can define the colors to be used, when showing your XML documents as raw tex <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblIndentSteps</cstring> </property> @@ -194,7 +194,7 @@ You can define the colors to be used, when showing your XML documents as raw tex You can choose the number of characters you want to be used for indenting childnodes, when showing your XML documents as raw text.</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pIndentSteps</cstring> </property> @@ -240,7 +240,7 @@ You can choose the number of characters you want to be used for indenting childn </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_pCheckBoxWrapOn</cstring> </property> diff --git a/part/kxetreeviewsettings.cpp b/part/kxetreeviewsettings.cpp index fc59634..6a3529e 100644 --- a/part/kxetreeviewsettings.cpp +++ b/part/kxetreeviewsettings.cpp @@ -22,11 +22,11 @@ #include <kconfig.h> #include <kdebug.h> -#include <qframe.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqframe.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #define CONF_ENTRY_NAME_ITEMS_ON_DEMAND "Create items on demand" #define DFLT_VALUE_ITEMS_ON_DEMAND true @@ -47,7 +47,7 @@ #define DFLT_VALUE_ELEM_DISPL_MODE NoAttributes -KXETreeViewSettings::KXETreeViewSettings( QObject * pParent, const char * pszName ) +KXETreeViewSettings::KXETreeViewSettings( TQObject * pParent, const char * pszName ) : KXESettings( "Tree View", pParent, pszName ), m_bCreateItemsOnDemand( DFLT_VALUE_ITEMS_ON_DEMAND ), m_iDfltExpLevel( DFLT_VALUE_DFLT_EXP_LEVEL ), @@ -79,23 +79,23 @@ void KXETreeViewSettings::read( const KConfig * pConfig ) m_enmElemDisplMode = static_cast<AttributeVisibility> ( pConfig->readNumEntry( CONF_ENTRY_NAME_ELEM_DISPL_MODE, DFLT_VALUE_ELEM_DISPL_MODE ) ); } -QString KXETreeViewSettings::dialogPageName() const +TQString KXETreeViewSettings::dialogPageName() const { return i18n( "Tree View" ); } -QString KXETreeViewSettings::dialogPageHeader() const +TQString KXETreeViewSettings::dialogPageHeader() const { return i18n( "Tree view properties" ); } -QString KXETreeViewSettings::dialogPageIcon() const +TQString KXETreeViewSettings::dialogPageIcon() const { return "view_tree"; } -QWidget * KXETreeViewSettings::dialogPage( QFrame * pParent ) +TQWidget * KXETreeViewSettings::dialogPage( TQFrame * pParent ) { if ( ! m_pDialogPage ) { diff --git a/part/kxetreeviewsettings.h b/part/kxetreeviewsettings.h index 403a0bb..6839cfc 100644 --- a/part/kxetreeviewsettings.h +++ b/part/kxetreeviewsettings.h @@ -39,7 +39,7 @@ class KXETreeViewSettings : public KXESettings NamesAndValues }; - KXETreeViewSettings( QObject * pParent = 0, const char * pszName = 0 ); + KXETreeViewSettings( TQObject * pParent = 0, const char * pszName = 0 ); // The following functions can be used to access this object's settings. bool createItemsOnDemand() const { return m_bCreateItemsOnDemand; } @@ -52,19 +52,19 @@ class KXETreeViewSettings : public KXESettings /** * Derived from @ref KXESettings */ - virtual QString dialogPageName() const; + virtual TQString dialogPageName() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageHeader() const; + virtual TQString dialogPageHeader() const; /** * Derived from @ref KXESettings */ - virtual QString dialogPageIcon() const; + virtual TQString dialogPageIcon() const; /** * Derived from @ref KXESettings */ - virtual QWidget * dialogPage( QFrame * pParent ); + virtual TQWidget * dialogPage( TQFrame * pParent ); protected: diff --git a/part/kxetreeviewsettingspage.ui b/part/kxetreeviewsettingspage.ui index 8cce39b..1f53880 100644 --- a/part/kxetreeviewsettingspage.ui +++ b/part/kxetreeviewsettingspage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KXETreeViewSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KXETreeViewSettingsPage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCreateItemsOnDemand</cstring> </property> @@ -40,7 +40,7 @@ file. Creating items on demand saves time and memory while opening very big, deep nested XML documents.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pDecorateRoot</cstring> </property> @@ -58,7 +58,7 @@ You can determine wether the tree view item corresponding to the XML document's A decoration is a + or - icon, with which the item can be opened or closed to show or hide its childitems.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout1</cstring> </property> @@ -66,7 +66,7 @@ A decoration is a + or - icon, with which the item can be opened or closed to sh <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_pLblDfltExpLevel</cstring> </property> @@ -82,7 +82,7 @@ A decoration is a + or - icon, with which the item can be opened or closed to sh You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document.</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_pDfltExpLevel</cstring> </property> @@ -97,7 +97,7 @@ You can determine up to which level the tree view items should be opened (showin </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_pBoxDnD</cstring> </property> @@ -108,7 +108,7 @@ You can determine up to which level the tree view items should be opened (showin <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pEnableDrag</cstring> </property> @@ -127,7 +127,7 @@ You can determine up to which level the tree view items should be opened (showin You can determine wether dragging items (and their corresponding XML nodes) from the tree view is enabled or disabled.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pEnableDrop</cstring> </property> @@ -151,7 +151,7 @@ You can determine wether dropping XML nodes to the tree view is enabled or disab </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_pElemDisplMode</cstring> </property> @@ -174,7 +174,7 @@ the attributes' names and the corresponding values are shown</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pElemDisplMode1</cstring> </property> @@ -185,7 +185,7 @@ the attributes' names and the corresponding values are shown</string> <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pElemDisplMode2</cstring> </property> @@ -193,7 +193,7 @@ the attributes' names and the corresponding values are shown</string> <string>Attribute names only</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pElemDisplMode3</cstring> </property> diff --git a/part/kxmleditorfactory.cpp b/part/kxmleditorfactory.cpp index 7295ba1..7479d31 100644 --- a/part/kxmleditorfactory.cpp +++ b/part/kxmleditorfactory.cpp @@ -35,7 +35,7 @@ extern "C" KInstance * KXMLEditorFactory::s_instance = 0L; KXEConfiguration * KXMLEditorFactory::s_pKXEConfig = 0L; -KXMLEditorFactory::KXMLEditorFactory( QObject * pParent, const char * pszName ) +KXMLEditorFactory::KXMLEditorFactory( TQObject * pParent, const char * pszName ) : KParts::Factory(pParent,pszName) { } @@ -53,7 +53,7 @@ KXMLEditorFactory::~KXMLEditorFactory() s_instance = 0L; } -KParts::Part * KXMLEditorFactory::createPartObject( QWidget * pParentWidget, const char * pszWidgetName, QObject * pParent, const char * pszName, const char * pszClassName, const QStringList & ) +KParts::Part * KXMLEditorFactory::createPartObject( TQWidget * pParentWidget, const char * pszWidgetName, TQObject * pParent, const char * pszName, const char * pszClassName, const TQStringList & ) { // eliminating compiler warnings pParent = pParent; @@ -61,14 +61,14 @@ KParts::Part * KXMLEditorFactory::createPartObject( QWidget * pParentWidget, con KParts::Part * pPart=0L; KXEDocument* pDocument=0L; - if ( QCString(pszClassName) == "KParts::ReadOnlyPart" ) + if ( TQCString(pszClassName) == "KParts::ReadOnlyPart" ) { pDocument = new KXEDocument(); pPart = new KXMLEditorPart( false, pDocument, pParentWidget, pszWidgetName ); kdDebug() << "KXMLEditorFactory::createPartObject: read only KXMLEditorPart created" << endl; } - else if ( (QCString(pszClassName) == "KParts::ReadWritePart") || - (QCString(pszClassName) == "KXMLEditorPart") ) + else if ( (TQCString(pszClassName) == "KParts::ReadWritePart") || + (TQCString(pszClassName) == "KXMLEditorPart") ) { pDocument = new KXEDocument(); pPart = new KXMLEditorPart( true, pDocument, pParentWidget, pszWidgetName ); diff --git a/part/kxmleditorfactory.h b/part/kxmleditorfactory.h index b2c5e15..fa33d61 100644 --- a/part/kxmleditorfactory.h +++ b/part/kxmleditorfactory.h @@ -35,12 +35,12 @@ class KXMLEditorFactory : public KParts::Factory public: /** @brief Constructor */ - KXMLEditorFactory( QObject * pParent = 0, const char * pszName = 0 ); + KXMLEditorFactory( TQObject * pParent = 0, const char * pszName = 0 ); /** @brief Destructor */ virtual ~KXMLEditorFactory(); /** @short Creates part object, depending on given part class */ - virtual KParts::Part * createPartObject( QWidget * pParentWidget = 0, const char * pszWidgetName = 0, QObject * pParent = 0, const char * pszName = 0, const char * pszClassName = "KParts::Part", const QStringList & args = QStringList() ); + virtual KParts::Part * createPartObject( TQWidget * pParentWidget = 0, const char * pszWidgetName = 0, TQObject * pParent = 0, const char * pszName = 0, const char * pszClassName = "KParts::Part", const TQStringList & args = TQStringList() ); static KInstance * instance(); static KXEConfiguration * configuration(); diff --git a/part/kxmleditorpart.cpp b/part/kxmleditorpart.cpp index ab60676..33a8e51 100644 --- a/part/kxmleditorpart.cpp +++ b/part/kxmleditorpart.cpp @@ -64,30 +64,30 @@ #include <ktoolbar.h> #include <kfiledialog.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qstringlist.h> -#include <qsplitter.h> -#include <qtabwidget.h> -#include <qtextedit.h> -#include <qcombobox.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qclipboard.h> -#include <qdragobject.h> -#include <qapplication.h> -#include <qbuffer.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> -#include <qevent.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqstringlist.h> +#include <tqsplitter.h> +#include <tqtabwidget.h> +#include <tqtextedit.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqclipboard.h> +#include <tqdragobject.h> +#include <tqapplication.h> +#include <tqbuffer.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqevent.h> #include "dcopiface_part_ro.h" // DCOP Iface #define CONFIG_MAIN_SPLITTER_SIZES "Main splitter sizes" -KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget * pParent, const char * pszName ) +KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidget * pParent, const char * pszName ) : KParts::ReadWritePart(pParent,pszName), m_pDlgSearch(0), m_pDocument(0) @@ -156,10 +156,10 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget // path toolbar m_pActPathCombo = new KXmlEditorComboAction( i18n("Path Bar"), 0, this, - SLOT(slotPathSelected(const QString &)), actionCollection(), "path_combo" ); + SLOT(slotPathSelected(const TQString &)), actionCollection(), "path_combo" ); new KAction( i18n("Clear Path Bar"), BarIcon("locationbar_erase", 16), 0, this, SLOT(slotPathClear()), actionCollection(), "path_clear" ); - QLabel *m_locationLabel = new ToolbarLabel( i18n("Path: ") ); + TQLabel *m_locationLabel = new ToolbarLabel( i18n("Path: ") ); new KWidgetAction( m_locationLabel, i18n("Path: "), 0, this, 0, actionCollection(), "path_label" ); m_locationLabel->setBuddy( m_pActPathCombo->comboBox()); @@ -236,8 +236,8 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget // CREATE WIDGETS ////////////////////////////// - pSplitter = new QSplitter( pParent, "KXMLEditorPart main widget (Splitter)" ); - pSplitter->setFocusPolicy( QWidget::NoFocus ); + pSplitter = new TQSplitter( pParent, "KXMLEditorPart main widget (Splitter)" ); + pSplitter->setFocusPolicy( TQWidget::NoFocus ); pSplitter->setOpaqueResize(true); setWidget( pSplitter ); @@ -245,40 +245,40 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget m_pViewTree = new KXE_TreeView( this, pSplitter, "KXMLEditorPart treeview" ); connect( m_pViewTree, SIGNAL(sigSelectionCleared(bool)), this, SLOT(slotSelectionCleared(bool)) ); - connect( m_pViewTree, SIGNAL(sigSelectionChanged(const QDomElement &)), this, SLOT(slotSelectionChanged(const QDomElement &)) ); - connect( m_pViewTree, SIGNAL(sigSelectionChanged(const QDomCharacterData &)), this, SLOT(slotSelectionChanged(const QDomCharacterData &)) ); - connect( m_pViewTree, SIGNAL(sigSelectionChanged(const QDomProcessingInstruction &)), this, SLOT(slotSelectionChanged(const QDomProcessingInstruction &)) ); - connect( m_pViewTree, SIGNAL(sigContextMenuRequested(const QString&,const QPoint&)), this, SLOT(slotContextMenuRequested(const QString&,const QPoint&)) ); - connect( m_pViewTree, SIGNAL(itemRenamed(QListViewItem *)), this, SLOT(slotItemRenamedInplace(QListViewItem *)) ); - connect( m_pViewTree, SIGNAL(sigKeyPressed(QKeyEvent* )),this,SLOT(slotTreeViewKeyPressed(QKeyEvent*))); + connect( m_pViewTree, SIGNAL(sigSelectionChanged(const TQDomElement &)), this, SLOT(slotSelectionChanged(const TQDomElement &)) ); + connect( m_pViewTree, SIGNAL(sigSelectionChanged(const TQDomCharacterData &)), this, SLOT(slotSelectionChanged(const TQDomCharacterData &)) ); + connect( m_pViewTree, SIGNAL(sigSelectionChanged(const TQDomProcessingInstruction &)), this, SLOT(slotSelectionChanged(const TQDomProcessingInstruction &)) ); + connect( m_pViewTree, SIGNAL(sigContextMenuRequested(const TQString&,const TQPoint&)), this, SLOT(slotContextMenuRequested(const TQString&,const TQPoint&)) ); + connect( m_pViewTree, SIGNAL(itemRenamed(TQListViewItem *)), this, SLOT(slotItemRenamedInplace(TQListViewItem *)) ); + connect( m_pViewTree, SIGNAL(sigKeyPressed(TQKeyEvent* )),this,SLOT(slotTreeViewKeyPressed(TQKeyEvent*))); // create tab widget ---------------------- - m_pTabWidget = new QTabWidget( pSplitter, "KXMLEditorPart tabwidget"); - m_pTabWidget->setFocusPolicy( QWidget::NoFocus ); + m_pTabWidget = new TQTabWidget( pSplitter, "KXMLEditorPart tabwidget"); + m_pTabWidget->setFocusPolicy( TQWidget::NoFocus ); // create element view m_pViewElement = new KXE_ViewElement( m_pTabWidget, instance()->config(), "KXMLEditorPart element view" ); m_pTabWidget->addTab( m_pViewElement, g_iconElement, i18n("Element") ); - connect( m_pViewElement, SIGNAL(sigContextMenuRequested(const QString&,const QPoint&)), this, SLOT(slotContextMenuRequested(const QString&,const QPoint&)) ); - connect( m_pViewElement, SIGNAL(sigAttributeNameChangedInplace(const QDomAttr&, const QString)), this, SLOT(slotAttributeNameChangedInplace(const QDomAttr&, const QString)) ); - connect( m_pViewElement, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)), this, SLOT(slotAttributeValueChangedInplace(const QDomAttr&, const QString)) ); + connect( m_pViewElement, SIGNAL(sigContextMenuRequested(const TQString&,const TQPoint&)), this, SLOT(slotContextMenuRequested(const TQString&,const TQPoint&)) ); + connect( m_pViewElement, SIGNAL(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)), this, SLOT(slotAttributeNameChangedInplace(const TQDomAttr&, const TQString)) ); + connect( m_pViewElement, SIGNAL(sigAttributeValueChangedInplace(const TQDomAttr&, const TQString)), this, SLOT(slotAttributeValueChangedInplace(const TQDomAttr&, const TQString)) ); // create edit widget, that display XML character data contents - m_pViewContents = new QTextEdit( m_pTabWidget, "KXMLEditorPart contents view" ); + m_pViewContents = new TQTextEdit( m_pTabWidget, "KXMLEditorPart contents view" ); m_pTabWidget->addTab( m_pViewContents, g_iconText, i18n("Contents") ); m_pViewContents->setReadOnly( true ); - m_pViewContents->setWordWrap( QTextEdit::NoWrap ); - m_pViewContents->setTextFormat(QTextEdit::PlainText); + m_pViewContents->setWordWrap( TQTextEdit::NoWrap ); + m_pViewContents->setTextFormat(TQTextEdit::PlainText); // create proc.instr. view - m_pViewProcInstr = new QTextEdit( m_pTabWidget, "KXMLEditorPart proc.instr. view" ); + m_pViewProcInstr = new TQTextEdit( m_pTabWidget, "KXMLEditorPart proc.instr. view" ); m_pTabWidget->addTab( m_pViewProcInstr, g_iconProcessingInstruction, i18n("Proc.Instruction") ); m_pViewProcInstr->setReadOnly( true ); - m_pViewProcInstr->setWordWrap( QTextEdit::NoWrap ); + m_pViewProcInstr->setWordWrap( TQTextEdit::NoWrap ); connect( this, SIGNAL(started(KIO::Job*)), this, SLOT(started()) ); connect( this, SIGNAL(completed()), this, SLOT(completed()) ); - connect( this, SIGNAL(canceled(const QString &)), this, SLOT(canceled()) ); + connect( this, SIGNAL(canceled(const TQString &)), this, SLOT(canceled()) ); ////////////////////////////// // INIT BEGIN STATE @@ -325,7 +325,7 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget setReadWrite(fReadWrite); // configuring splitter sizes - QValueList<int> list = instance()->config()->readIntListEntry(CONFIG_MAIN_SPLITTER_SIZES); + TQValueList<int> list = instance()->config()->readIntListEntry(CONFIG_MAIN_SPLITTER_SIZES); if (!list.isEmpty()) pSplitter->setSizes(list); @@ -402,7 +402,7 @@ void KXMLEditorPart::setModified( bool bModified ) { m_bAlreadyModified = bModified; - QString szNewCaption = m_url.prettyURL(); + TQString szNewCaption = m_url.prettyURL(); emit setWindowCaption( szNewCaption ); } @@ -458,7 +458,7 @@ void KXMLEditorPart::slotActPrint() void KXMLEditorPart::slotActProperties() { - QDomNode* pNode = m_pViewTree->getSelectedNode(); + TQDomNode* pNode = m_pViewTree->getSelectedNode(); if (pNode) { if (pNode->isElement()) @@ -474,7 +474,7 @@ void KXMLEditorPart::slotActProperties() void KXMLEditorPart::slotActDelete() { - QDomNode* pNode = m_pViewTree->getSelectedNode(); + TQDomNode* pNode = m_pViewTree->getSelectedNode(); if (!m_pViewElement->hasFocus()) { @@ -488,11 +488,11 @@ void KXMLEditorPart::slotActDelete() else { // we can have also delete attribute selected on a element view - QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); + TQDomAttr domAttr = m_pViewElement->getSelectedAttribute(); if (!domAttr.isNull()) { - QDomElement domElement = pNode->toElement(); - QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); + TQDomElement domElement = pNode->toElement(); + TQDomAttr domAttr = m_pViewElement->getSelectedAttribute(); KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr); m_pCmdHistory->addCommand(pCmd); @@ -510,7 +510,7 @@ void KXMLEditorPart::slotEditCut() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if(pNode) { // copy to clipboard @@ -526,13 +526,13 @@ void KXMLEditorPart::slotEditCopy() { kdDebug() << "KXMLEditor " << k_funcinfo << endl; - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if(pNode) { - QTextDrag *pDrag = copyNode(m_pViewTree->getSelectedNode()); + TQTextDrag *pDrag = copyNode(m_pViewTree->getSelectedNode()); if(pDrag) - QApplication::clipboard()->setData(pDrag); + TQApplication::clipboard()->setData(pDrag); } else kdError() << "KXMLEditorPart::slotEditCopy no element selected." << endl; @@ -550,11 +550,11 @@ void KXMLEditorPart::slotEditPaste() if (document()->documentElement().isNull()) { - pasteNode(0, QApplication::clipboard()->data()); + pasteNode(0, TQApplication::clipboard()->data()); } else { - pasteNode(m_pViewTree->getSelectedNode(), QApplication::clipboard()->data()); + pasteNode(m_pViewTree->getSelectedNode(), TQApplication::clipboard()->data()); } } @@ -587,7 +587,7 @@ void KXMLEditorPart::slotEditFindNext() } // get node to start with (either the next node of the item selected at the tree view or documents root node) - QDomNode node = ( (m_pViewTree->getSelectedNode()) && (! m_pViewTree->getSelectedNode()->isNull()) ) ? domTool_nextNode(* m_pViewTree->getSelectedNode()) : document()->documentElement(); + TQDomNode node = ( (m_pViewTree->getSelectedNode()) && (! m_pViewTree->getSelectedNode()->isNull()) ) ? domTool_nextNode(* m_pViewTree->getSelectedNode()) : document()->documentElement(); // start testing til the last node while( ! node.isNull() ) @@ -619,7 +619,7 @@ void KXMLEditorPart::slotXmlElementInsert() if ( document()->documentElement().isNull() ) // the document doesn't { // have a root element yet - if ( dlg.exec( false, true, false ) == QDialog::Accepted ) + if ( dlg.exec( false, true, false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEElementCommand(document(), document(), dlg.nsURI(), dlg.prefix(), dlg.name()); m_pCmdHistory->addCommand(pCmd); @@ -627,13 +627,13 @@ void KXMLEditorPart::slotXmlElementInsert() } else // the document seems to { // have a root element - QDomNode * pParentNode = m_pViewTree->getSelectedNode(); + TQDomNode * pParentNode = m_pViewTree->getSelectedNode(); if ( (pParentNode) && (pParentNode->isElement()) ) { - QDomElement domParentElement = pParentNode->toElement(); + TQDomElement domParentElement = pParentNode->toElement(); - if ( dlg.exec( false, false, false ) == QDialog::Accepted ) + if ( dlg.exec( false, false, false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEElementCommand(document(), domParentElement, dlg.nsURI(), dlg.prefix(), dlg.name(), dlg.atTop()); m_pCmdHistory->addCommand(pCmd); @@ -654,7 +654,7 @@ void KXMLEditorPart::slotXmlElementEdit() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotXmlElementEdit no node selected or selected node is no XML element." << endl; @@ -663,7 +663,7 @@ void KXMLEditorPart::slotXmlElementEdit() emit setStatusBarText( i18n("Editing XML element...") ); - QDomElement domElement = pNode->toElement(); + TQDomElement domElement = pNode->toElement(); KXEElementDialog dlg( widget(), "XML element dialog" ); @@ -672,7 +672,7 @@ void KXMLEditorPart::slotXmlElementEdit() if(!domElement.namespaceURI().isNull()) dlg.setNsURI(domElement.namespaceURI() ); - if ( dlg.exec( true, false, domElement.namespaceURI().isNull() ) == QDialog::Accepted ) + if ( dlg.exec( true, false, domElement.namespaceURI().isNull() ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEEditElementCommand(document(), domElement, dlg.prefix(), dlg.name()); m_pCmdHistory->addCommand(pCmd); @@ -689,7 +689,7 @@ void KXMLEditorPart::slotActEditRawXml() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotActEditRawXml no node selected or selected node is no XML element." << endl; @@ -698,24 +698,24 @@ void KXMLEditorPart::slotActEditRawXml() emit setStatusBarText( i18n("Editing raw XML...") ); - QDomElement domElement = pNode->toElement(); + TQDomElement domElement = pNode->toElement(); - QString strXML; + TQString strXML; - QTextStream streamXML(&strXML, IO_WriteOnly); + TQTextStream streamXML(&strXML, IO_WriteOnly); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps(); pNode->save(streamXML, iIndent); KXETextEditorDialog dlg(0, "Text dialog"); dlg.setEditorText(strXML); - if((dlg.exec() == QDialog::Accepted) && (strXML != dlg.editorText())) + if((dlg.exec() == TQDialog::Accepted) && (strXML != dlg.editorText())) { - QString strXML = "<root>" + dlg.editorText() + "</root>"; + TQString strXML = "<root>" + dlg.editorText() + "</root>"; // create XML documemt from text - QString strErrorMsg; + TQString strErrorMsg; int iErrorLine, iErrorColumn; - QDomDocument doc; + TQDomDocument doc; if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) { @@ -735,7 +735,7 @@ void KXMLEditorPart::slotActEditRawXml() return; } - QDomElement domNewElement = doc.firstChild().firstChild().toElement(); + TQDomElement domNewElement = doc.firstChild().firstChild().toElement(); KCommand *pCmd = new KXEEditRawXmlCommand(document(), domElement, domNewElement); m_pCmdHistory->addCommand(pCmd); } @@ -751,7 +751,7 @@ void KXMLEditorPart::slotXmlAttributesAdd() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotXmlAttributesAdd no node selected or selected node is no XML element." << endl; @@ -762,8 +762,8 @@ void KXMLEditorPart::slotXmlAttributesAdd() KXEAttributeDialog dlg( widget(), "attribute dialog" ); - QDomElement domOwnerElement = pNode->toElement(); - if ( dlg.exec( ) == QDialog::Accepted ) + TQDomElement domOwnerElement = pNode->toElement(); + if ( dlg.exec( ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEAttributeCommand(document(), domOwnerElement, dlg.attributeNamespace(), dlg.QName(), dlg.Value()); m_pCmdHistory->addCommand(pCmd); @@ -780,7 +780,7 @@ void KXMLEditorPart::slotXmlAttributesDel() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotXmlAttributesDel no node selected or selected node is no XML element." << endl; @@ -792,7 +792,7 @@ void KXMLEditorPart::slotXmlAttributesDel() emit setStatusBarText( i18n("Delete all attributes...") ); - QDomElement domOwnerElement = pNode->toElement(); + TQDomElement domOwnerElement = pNode->toElement(); KCommand *pCmd = new KXEDeleteAllAttribCommand(document(), domOwnerElement); m_pCmdHistory->addCommand(pCmd); @@ -810,7 +810,7 @@ void KXMLEditorPart::slotXmlAttributeDel() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotXmlAttributeDel no node selected or selected node is no XML element." << endl; @@ -819,8 +819,8 @@ void KXMLEditorPart::slotXmlAttributeDel() emit setStatusBarText( i18n("Delete attribute...") ); - QDomElement domElement = pNode->toElement(); - QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); + TQDomElement domElement = pNode->toElement(); + TQDomAttr domAttr = m_pViewElement->getSelectedAttribute(); KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr); m_pCmdHistory->addCommand(pCmd); @@ -838,7 +838,7 @@ void KXMLEditorPart::slotXmlProcInstrInsert() KXEProcInstrDialog dlg( widget(), "proc. instr. dialog" ); - QDomNode * pParentNode = m_pViewTree->getSelectedNode(); + TQDomNode * pParentNode = m_pViewTree->getSelectedNode(); if ( (pParentNode) && (!pParentNode->isElement()) ) { kdError() << k_funcinfo << " The selected node is no XML element." << endl; @@ -848,7 +848,7 @@ void KXMLEditorPart::slotXmlProcInstrInsert() { if ( ! pParentNode ) // no node selected -> the new node should be a direct child of the document { - if ( dlg.exec( false, true ) == QDialog::Accepted ) + if ( dlg.exec( false, true ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEProcInstrCommand(document(), document(), dlg.atTop(), dlg.target(), dlg.data()); m_pCmdHistory->addCommand(pCmd); @@ -856,9 +856,9 @@ void KXMLEditorPart::slotXmlProcInstrInsert() } else { - if ( dlg.exec( false, false ) == QDialog::Accepted ) + if ( dlg.exec( false, false ) == TQDialog::Accepted ) { - QDomElement domParentElement = pParentNode->toElement(); + TQDomElement domParentElement = pParentNode->toElement(); KCommand *pCmd = new KXEProcInstrCommand(document(), domParentElement, dlg.atTop(), dlg.target(), dlg.data()); m_pCmdHistory->addCommand(pCmd); @@ -879,7 +879,7 @@ void KXMLEditorPart::slotXmlProcInstrEdit() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isProcessingInstruction()) ) { kdError() << "KXMLEditorPart::slotXmlProcInstrEdit no node selected or selected node is no processing instruction." << endl; @@ -888,7 +888,7 @@ void KXMLEditorPart::slotXmlProcInstrEdit() emit setStatusBarText( i18n("Editing processing instruction...") ); - QDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); + TQDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); // We have two different kinds of processing instructions: // - a special one - defining the documents XML version and encoding @@ -903,7 +903,7 @@ void KXMLEditorPart::slotXmlProcInstrEdit() dlg.setTarget(domProcInstr.target()); dlg.setData(domProcInstr.data()); - if ( dlg.exec( true, false ) == QDialog::Accepted ) + if ( dlg.exec( true, false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEEditProcInstrCommand(document(), domProcInstr, dlg.data()); m_pCmdHistory->addCommand(pCmd); @@ -921,7 +921,7 @@ void KXMLEditorPart::slotActInsertText() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotActInsertText no element selected." << endl; @@ -933,9 +933,9 @@ void KXMLEditorPart::slotActInsertText() KXECharDataDialog dlg( widget()); dlg.setCaption(i18n("Insert text")); - QDomElement domParentElement = pNode->toElement(); + TQDomElement domParentElement = pNode->toElement(); - if ( dlg.exec( false ) == QDialog::Accepted ) + if ( dlg.exec( false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataTextNode, dlg.contents()); m_pCmdHistory->addCommand(pCmd); @@ -952,7 +952,7 @@ void KXMLEditorPart::slotActInsertCDATA() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotActInsertCDATA no element selected." << endl; @@ -964,9 +964,9 @@ void KXMLEditorPart::slotActInsertCDATA() KXECharDataDialog dlg( widget()); dlg.setCaption(i18n("Insert CDATA")); - QDomElement domParentElement = pNode->toElement(); + TQDomElement domParentElement = pNode->toElement(); - if ( dlg.exec( false ) == QDialog::Accepted ) + if ( dlg.exec( false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataCDATASection, dlg.contents()); m_pCmdHistory->addCommand(pCmd); @@ -983,7 +983,7 @@ void KXMLEditorPart::slotActInsertComment() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isElement()) ) { kdError() << "KXMLEditorPart::slotActInsertComment no element selected." << endl; @@ -995,9 +995,9 @@ void KXMLEditorPart::slotActInsertComment() KXECharDataDialog dlg( widget()); dlg.setCaption(i18n("Insert comment")); - QDomElement domParentElement = pNode->toElement(); + TQDomElement domParentElement = pNode->toElement(); - if ( dlg.exec( false ) == QDialog::Accepted ) + if ( dlg.exec( false ) == TQDialog::Accepted ) { KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataComment, dlg.contents()); m_pCmdHistory->addCommand(pCmd); @@ -1015,7 +1015,7 @@ void KXMLEditorPart::slotXmlCharDataEdit() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( (!pNode) || (!pNode->isCharacterData()) ) { kdError() << "KXMLEditorPart::slotXmlCharDataEdit no node selected or selected node is no character data." << endl; @@ -1024,7 +1024,7 @@ void KXMLEditorPart::slotXmlCharDataEdit() emit setStatusBarText( i18n("Editing character data...") ); - QDomCharacterData domCharData = pNode->toCharacterData(); + TQDomCharacterData domCharData = pNode->toCharacterData(); KXECharDataDialog dlg( widget() ); @@ -1042,7 +1042,7 @@ void KXMLEditorPart::slotXmlCharDataEdit() // dlg.setCharDataKind(eCharDataKind); dlg.setContents(domCharData.data()); - if ( dlg.exec( true ) == QDialog::Accepted ) + if ( dlg.exec( true ) == TQDialog::Accepted ) { KCommand *pCmd = new KXEEditCharDataCommand(document(), domCharData, dlg.contents()); m_pCmdHistory->addCommand(pCmd); @@ -1059,7 +1059,7 @@ void KXMLEditorPart::slotXmlMoveNodeUp() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( ! pNode ) { kdError() << "KXMLEditorPart::slotXmlMoveNodeUp no node selected." << endl; @@ -1082,7 +1082,7 @@ void KXMLEditorPart::slotXmlMoveNodeDown() return; } - QDomNode * pNode = m_pViewTree->getSelectedNode(); + TQDomNode * pNode = m_pViewTree->getSelectedNode(); if ( ! pNode ) { kdError() << "KXMLEditorPart::slotXmlMoveNodeDown no node selected." << endl; @@ -1118,9 +1118,9 @@ void KXMLEditorPart::slotPathSelected( ) } -void KXMLEditorPart::slotPathSelected( const QString & strPath ) +void KXMLEditorPart::slotPathSelected( const TQString & strPath ) { - QDomNode node = domTool_matchingNode( document()->toDocument(), strPath ); + TQDomNode node = domTool_matchingNode( document()->toDocument(), strPath ); if(node.isNull()) { // node don't exists, remove item from combo m_pActPathCombo->removeItem(strPath); @@ -1141,7 +1141,7 @@ void KXMLEditorPart::slotPathClear() m_pActPathCombo->slotFocusEdit(); } -void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) +void KXMLEditorPart::slotItemRenamedInplace( TQListViewItem * pItem ) { KXE_TreeViewItem * pXMLItem = static_cast <KXE_TreeViewItem*> (pItem); @@ -1151,7 +1151,7 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) return; } - QDomElement domElement = pXMLItem->xmlNode()->toElement(); + TQDomElement domElement = pXMLItem->xmlNode()->toElement(); if ( domElement.nodeName() != pItem->text(0) ) // if really something was changed { @@ -1161,7 +1161,7 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) if ( nPosColon == -1 ) // if no namespace prefix was entered, { // check name - QString strMessage = KXEElementDialog::checkName(pItem->text(0)); + TQString strMessage = KXEElementDialog::checkName(pItem->text(0)); if(strMessage.length() > 0) { // restore old name @@ -1172,17 +1172,17 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) // clear the elements namespace prefix // and set the entered text as its tag name - KCommand *pCmd = new KXEEditElementCommand(document(), domElement, QString::null, pItem->text(0)); + KCommand *pCmd = new KXEEditElementCommand(document(), domElement, TQString::null, pItem->text(0)); m_pCmdHistory->addCommand(pCmd); } else { // otherwise split up the entered text by the first colon and - QString strPrefix(pItem->text(0).left(nPosColon)); - QString strName(pItem->text(0).right( pItem->text(0).length() - nPosColon - 1 )); + TQString strPrefix(pItem->text(0).left(nPosColon)); + TQString strName(pItem->text(0).right( pItem->text(0).length() - nPosColon - 1 )); // check name - QString strMessage = KXEElementDialog::checkName(strName); + TQString strMessage = KXEElementDialog::checkName(strName); if(strMessage.length() > 0) { // restore old name @@ -1210,7 +1210,7 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) } } -void KXMLEditorPart::slotAttributeNameChangedInplace( const QDomAttr & domAttr, const QString strNewName ) +void KXMLEditorPart::slotAttributeNameChangedInplace( const TQDomAttr & domAttr, const TQString strNewName ) { if ( *m_pViewTree->getSelectedNode() == domAttr.ownerElement() ) // if the corresponding element { // is still selected @@ -1219,7 +1219,7 @@ void KXMLEditorPart::slotAttributeNameChangedInplace( const QDomAttr & domAttr, } } -void KXMLEditorPart::slotAttributeValueChangedInplace( const QDomAttr & domAttr, const QString strNewValue ) +void KXMLEditorPart::slotAttributeValueChangedInplace( const TQDomAttr & domAttr, const TQString strNewValue ) { if ( *m_pViewTree->getSelectedNode() == domAttr.ownerElement() ) // if the corresponding element { // is still selected @@ -1233,15 +1233,15 @@ void KXMLEditorPart::slotAttributeValueChangedInplace( const QDomAttr & domAttr, ///////////////////////////////////////////////////////////////////// /** Copy XML node into clipboard */ -QTextDrag * KXMLEditorPart::copyNode(QDomNode * pNode) +TQTextDrag * KXMLEditorPart::copyNode(TQDomNode * pNode) { - QTextDrag *pDrag = 0; - QString strXML; + TQTextDrag *pDrag = 0; + TQString strXML; - QTextStream streamXML(&strXML, IO_WriteOnly); + TQTextStream streamXML(&strXML, IO_WriteOnly); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps(); pNode->save(streamXML, iIndent); - pDrag = new QTextDrag(strXML, m_pViewTree); + pDrag = new TQTextDrag(strXML, m_pViewTree); /*if(pNode->isElement()) pDrag->setSubtype(KXE_TreeViewItem::m_strSubtypeXML); @@ -1269,12 +1269,12 @@ QTextDrag * KXMLEditorPart::copyNode(QDomNode * pNode) // data - data to pasted // //----------------------------------------------------------------------------- -bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) +bool KXMLEditorPart::pasteNode(TQDomNode * pTargetNode, TQMimeSource *data) { - QString strText; + TQString strText; // Drop XML Processing Instruction - if(QTextDrag::decode(data, strText)) + if(TQTextDrag::decode(data, strText)) { if(strText.find("<?xml ") == 0) { KMessageBox::sorry(0, i18n("This processing instruction cannot be pasted here !")); @@ -1283,12 +1283,12 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) //--- - QString strXML = "<root>" + strText + "</root>"; + TQString strXML = "<root>" + strText + "</root>"; // Paste clipboard contents as XML element - QString strErrorMsg; + TQString strErrorMsg; int iErrorLine, iErrorColumn; - QDomDocument doc; + TQDomDocument doc; if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) { kdDebug() << "KXMLEditorPart::pasteNode: Failed parsing the file." << endl; @@ -1316,13 +1316,13 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) } // Append it as root node - QDomElement newNode = doc.documentElement().firstChild().cloneNode(true).toElement(); + TQDomElement newNode = doc.documentElement().firstChild().cloneNode(true).toElement(); KCommand *pCmd = new KXEPasteToDocumentCommand(document(), document(), newNode); m_pCmdHistory->addCommand(pCmd); } else - { QDomNode sourceNode = doc.firstChild().firstChild().cloneNode(true); + { TQDomNode sourceNode = doc.firstChild().firstChild().cloneNode(true); /* L.V. @@ -1331,17 +1331,17 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) if(sourceNode.isElement()) { - QDomElement domSourceElement = sourceNode.toElement(); + TQDomElement domSourceElement = sourceNode.toElement(); - QDomNamedNodeMap list = domSourceElement.attributes(); + TQDomNamedNodeMap list = domSourceElement.attributes(); unsigned int iLength = list.length(); for ( unsigned int iRow = 0; iRow < iLength; iRow++ ) { - QDomAttr a = list.item(iRow).toAttr(); + TQDomAttr a = list.item(iRow).toAttr(); - QDomElement domOwnerElement = a.ownerElement(); + TQDomElement domOwnerElement = a.ownerElement(); if(domOwnerElement.isNull()) KMessageBox::sorry(m_pViewTree, i18n("Cloned owner is null !")); }*/ @@ -1349,7 +1349,7 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) if(pTargetNode->isElement()) { - QDomElement domTargetElement = pTargetNode->toElement(); + TQDomElement domTargetElement = pTargetNode->toElement(); KCommand *pCmd = new KXEPasteToElementCommand(document(), domTargetElement, sourceNode); m_pCmdHistory->addCommand(pCmd); return true; @@ -1357,8 +1357,8 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) if(pTargetNode->isProcessingInstruction() && sourceNode.isProcessingInstruction()) { // Replace contents of selected node - QDomProcessingInstruction domTargetProcInstr = pTargetNode->toProcessingInstruction(); - QDomProcessingInstruction domSourceProcInstr = sourceNode.toProcessingInstruction(); + TQDomProcessingInstruction domTargetProcInstr = pTargetNode->toProcessingInstruction(); + TQDomProcessingInstruction domSourceProcInstr = sourceNode.toProcessingInstruction(); KCommand *pCmd = new KXEPasteToProcInstrCommand(document(), domTargetProcInstr, domSourceProcInstr); m_pCmdHistory->addCommand(pCmd); @@ -1367,8 +1367,8 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) if(pTargetNode->isCharacterData() && sourceNode.isCharacterData()) { // Replace contents of selected node - QDomCharacterData domTargetCharData = pTargetNode->toCharacterData(); - QDomCharacterData domSourceCharData = sourceNode.toCharacterData(); + TQDomCharacterData domTargetCharData = pTargetNode->toCharacterData(); + TQDomCharacterData domSourceCharData = sourceNode.toCharacterData(); KCommand *pCmd = new KXEPasteToCharDataCommand(document(), domTargetCharData, domSourceCharData); m_pCmdHistory->addCommand(pCmd); @@ -1392,7 +1392,7 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data) // domSourceNode - source node // //----------------------------------------------------------------------------- -bool KXMLEditorPart::dropMoveNode(QDomElement & domTargetElement, QDomNode & domSourceNode) +bool KXMLEditorPart::dropMoveNode(TQDomElement & domTargetElement, TQDomNode & domSourceNode) { KCommand *pCmd = new KXEDragDropMoveCommand(document(), domTargetElement, domSourceNode); m_pCmdHistory->addCommand(pCmd); @@ -1412,14 +1412,14 @@ int headerHeight, footerHeight; // used in few functions, nevertheless temporary void KXMLEditorPart::print(KPrinter* pPrinter) { - // setup the printer. with Qt, you always "print" to a - // QPainter.. whether the output medium is a pixmap, a screen, or paper - QPainter p; - QPainter *painter = &p; - QFont font( KXMLEditorFactory::configuration()->print()->fontFamily(), + // setup the printer. with TQt, you always "print" to a + // TQPainter.. whether the output medium is a pixmap, a screen, or paper + TQPainter p; + TQPainter *painter = &p; + TQFont font( KXMLEditorFactory::configuration()->print()->fontFamily(), KXMLEditorFactory::configuration()->print()->fontSize() ); - QPaintDeviceMetrics metrics((QPrinter*)pPrinter); // determining + TQPaintDeviceMetrics metrics((TQPrinter*)pPrinter); // determining int width = metrics.width(); // width and int height = metrics.height(); // height of the page @@ -1444,7 +1444,7 @@ void KXMLEditorPart::print(KPrinter* pPrinter) painter->end(); // finish print job } -void KXMLEditorPart::printHeader(QPainter* painter,int pageNumber, int ypos, int width) +void KXMLEditorPart::printHeader(TQPainter* painter,int pageNumber, int ypos, int width) { pageNumber = pageNumber; if ( KXMLEditorFactory::configuration()->print()->hasHeader() ) @@ -1454,7 +1454,7 @@ void KXMLEditorPart::printHeader(QPainter* painter,int pageNumber, int ypos, int } } -bool KXMLEditorPart::printPage(QPainter* painter,int pageNumber, int top, int width, int height) +bool KXMLEditorPart::printPage(TQPainter* painter,int pageNumber, int top, int width, int height) { width = width; if (pageNumber==0) @@ -1462,7 +1462,7 @@ bool KXMLEditorPart::printPage(QPainter* painter,int pageNumber, int top, int wi // initialization of working variables is done when // first page is about to be printed m_printLineNumber = 0; - m_printLines = QStringList::split( "\n", document()->toString(KXMLEditorFactory::configuration()->print()->indentSteps()) ); + m_printLines = TQStringList::split( "\n", document()->toString(KXMLEditorFactory::configuration()->print()->indentSteps()) ); } int lineHeight = (int)(painter->font().pointSize()*(1+m_printLinespace)); int y = top; @@ -1476,7 +1476,7 @@ bool KXMLEditorPart::printPage(QPainter* painter,int pageNumber, int top, int wi return true; // there are still some pages to print } -void KXMLEditorPart::printFooter(QPainter* painter,int pageNumber, int ypos, int width) +void KXMLEditorPart::printFooter(TQPainter* painter,int pageNumber, int ypos, int width) { if ( KXMLEditorFactory::configuration()->print()->hasFooter() ) { @@ -1491,15 +1491,15 @@ void KXMLEditorPart::printFooter(QPainter* painter,int pageNumber, int ypos, int // OTHER SLOTS ///////////////////////////////////////////////////////////////////// -void KXMLEditorPart::slotTreeViewKeyPressed(QKeyEvent *e) +void KXMLEditorPart::slotTreeViewKeyPressed(TQKeyEvent *e) { // few keypresses are recognized and proper actions // are executed. switch (e->key()) { - case Qt::Key_Delete : slotActDelete(); break; - case Qt::Key_Return : - case Qt::Key_Enter : slotActProperties(); break; + case TQt::Key_Delete : slotActDelete(); break; + case TQt::Key_Return : + case TQt::Key_Enter : slotActProperties(); break; } } @@ -1551,7 +1551,7 @@ void KXMLEditorPart::slotSelectionCleared(bool bRootElementExists) m_pActPathCombo->slotClearEdit(); } -void KXMLEditorPart::slotSelectionChanged( const QDomElement & selectedNode) +void KXMLEditorPart::slotSelectionChanged( const TQDomElement & selectedNode) { // Enable/Disable actions if(m_pBrowserExt) @@ -1607,7 +1607,7 @@ void KXMLEditorPart::slotSelectionChanged( const QDomElement & selectedNode) m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(selectedNode) ); } -void KXMLEditorPart::slotSelectionChanged( const QDomCharacterData & selectedNode ) +void KXMLEditorPart::slotSelectionChanged( const TQDomCharacterData & selectedNode ) { // Enable/Disable actions if(m_pBrowserExt) @@ -1653,7 +1653,7 @@ void KXMLEditorPart::slotSelectionChanged( const QDomCharacterData & selectedNod m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(selectedNode) ); } -void KXMLEditorPart::slotSelectionChanged( const QDomProcessingInstruction & selectedNode ) +void KXMLEditorPart::slotSelectionChanged( const TQDomProcessingInstruction & selectedNode ) { // Enable/Disable actions if(m_pBrowserExt) @@ -1709,9 +1709,9 @@ void KXMLEditorPart::slotSelectionChanged( const QDomProcessingInstruction & sel m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(selectedNode) ); } -void KXMLEditorPart::slotContextMenuRequested( const QString & szMenuName, const QPoint & pos ) +void KXMLEditorPart::slotContextMenuRequested( const TQString & szMenuName, const TQPoint & pos ) { - QWidget * pContainer = hostContainer(szMenuName); + TQWidget * pContainer = hostContainer(szMenuName); if ( ! pContainer ) { @@ -1734,12 +1734,12 @@ void KXMLEditorPart::slotContextMenuRequested( const QString & szMenuName, const // FUNCTIONS CALLED FROM KXECommand CHILD CLASSES ///////////////////////////////////////////////////////////////////// -void KXMLEditorPart::updateNodeCreated(const QDomNode & node) +void KXMLEditorPart::updateNodeCreated(const TQDomNode & node) { m_pViewTree->updateNodeCreated(node); } -void KXMLEditorPart::updateNodeDeleted( const QDomNode & node ) +void KXMLEditorPart::updateNodeDeleted( const TQDomNode & node ) { m_pViewTree->updateNodeDeleted(node); @@ -1748,25 +1748,25 @@ void KXMLEditorPart::updateNodeDeleted( const QDomNode & node ) m_pActXmlElementInsert->setEnabled(true); } -void KXMLEditorPart::updateNodeChanged( const QDomElement & domElement ) +void KXMLEditorPart::updateNodeChanged( const TQDomElement & domElement ) { m_pViewTree->updateNodeChanged(domElement); m_pViewElement->slotChange(domElement); } -void KXMLEditorPart::updateNodeChanged( const QDomCharacterData & domCharData ) +void KXMLEditorPart::updateNodeChanged( const TQDomCharacterData & domCharData ) { m_pViewTree->updateNodeChanged(domCharData); m_pViewContents->setText( domCharData.data() ); } -void KXMLEditorPart::updateNodeChanged( const QDomProcessingInstruction &domProcInstr ) +void KXMLEditorPart::updateNodeChanged( const TQDomProcessingInstruction &domProcInstr ) { m_pViewTree->updateNodeChanged(domProcInstr); m_pViewProcInstr->setText( domProcInstr.data() ); } -void KXMLEditorPart::updateNodeMoved( const QDomNode & domNode ) +void KXMLEditorPart::updateNodeMoved( const TQDomNode & domNode ) { m_pViewTree->updateNodeMoved(domNode); } @@ -1776,7 +1776,7 @@ bool KXMLEditorPart::slotFileSaveAs() { emit setStatusBarText( i18n("Saving file with a new filename...") ); - KFileDialog dlg( QDir::currentDirPath(), // start dir. + KFileDialog dlg( TQDir::currentDirPath(), // start dir. i18n(FILE_DIALOG_FILTER), // filter widget(), // parent "file dialog for saving", // name @@ -1792,7 +1792,7 @@ bool KXMLEditorPart::slotFileSaveAs() { // append filetype if necessary if(dlg.currentFilter() != "*.*") - { QString strExtension = dlg.currentFilter(); + { TQString strExtension = dlg.currentFilter(); strExtension.remove('*'); if(strExtension != url.fileName().right(strExtension.length())) @@ -1819,20 +1819,20 @@ void KXMLEditorPart::slotDocOpened() // same document again and compare the measurements. // Olaf // -// TODO: the three lines operating with the QTime objects +// TODO: the three lines operating with the TQTime objects // can be removed later // update the view m_pViewTree->updateClear(); int i = document()->childNodes().length(); - //QTime t1 = QTime::currentTime(); //TODO: remove this line later (Olaf) + //TQTime t1 = TQTime::currentTime(); //TODO: remove this line later (Olaf) while ( i > 0 ) { i--; m_pViewTree->updateNodeCreated( document()->childNodes().item(i) ); } - //QTime t2 = QTime::currentTime(); //TODO: remove this and the next line later (Olaf) + //TQTime t2 = TQTime::currentTime(); //TODO: remove this and the next line later (Olaf) //kdDebug() << "KXMLEditorPart::slotDocOpened() time difference: " << t1.msecsTo(t2) << " msecs" << endl; m_pActPathCombo->slotClear(); @@ -1853,12 +1853,12 @@ void KXMLEditorPart::setDocument(KXEDocument *pDocument) // document modification is also dispatched connect(pDocument,SIGNAL(sigModified(bool)),this,SLOT(setModified(bool))); // update notifications - connect(pDocument,SIGNAL(sigNodeChanged(const QDomElement&)),this,SLOT(updateNodeChanged(const QDomElement&))); - connect(pDocument,SIGNAL(sigNodeChanged(const QDomProcessingInstruction&)),this,SLOT(updateNodeChanged(const QDomProcessingInstruction&))); - connect(pDocument,SIGNAL(sigNodeChanged(const QDomCharacterData&)),this,SLOT(updateNodeChanged(const QDomCharacterData&))); - connect(pDocument,SIGNAL(sigNodeCreated(const QDomNode&)),this,SLOT(updateNodeCreated(const QDomNode&))); - connect(pDocument,SIGNAL(sigNodeDeleted(const QDomNode&)),this,SLOT(updateNodeDeleted(const QDomNode&))); - connect(pDocument,SIGNAL(sigNodeMoved(const QDomNode&)),this,SLOT(updateNodeMoved(const QDomNode&))); + connect(pDocument,SIGNAL(sigNodeChanged(const TQDomElement&)),this,SLOT(updateNodeChanged(const TQDomElement&))); + connect(pDocument,SIGNAL(sigNodeChanged(const TQDomProcessingInstruction&)),this,SLOT(updateNodeChanged(const TQDomProcessingInstruction&))); + connect(pDocument,SIGNAL(sigNodeChanged(const TQDomCharacterData&)),this,SLOT(updateNodeChanged(const TQDomCharacterData&))); + connect(pDocument,SIGNAL(sigNodeCreated(const TQDomNode&)),this,SLOT(updateNodeCreated(const TQDomNode&))); + connect(pDocument,SIGNAL(sigNodeDeleted(const TQDomNode&)),this,SLOT(updateNodeDeleted(const TQDomNode&))); + connect(pDocument,SIGNAL(sigNodeMoved(const TQDomNode&)),this,SLOT(updateNodeMoved(const TQDomNode&))); // merging document action collection insertChildClient(pDocument); } diff --git a/part/kxmleditorpart.h b/part/kxmleditorpart.h index 319c577..7087bf0 100644 --- a/part/kxmleditorpart.h +++ b/part/kxmleditorpart.h @@ -21,26 +21,26 @@ #include <kparts/part.h> #include <kparts/browserextension.h> -#include <qdom.h> -#include <qptrlist.h> +#include <tqdom.h> +#include <tqptrlist.h> #include "kxe_treeview.h" #define FILE_DIALOG_FILTER "*.xml|XML files\n*.xsl|XSL files\n*.xslt|XSLT files\n*.svg|SVG files\n*.xul|XUL files\n*.rc|Resource UI files\n*.ui|User Interface UI files\n*|All files" -class QTabWidget; +class TQTabWidget; class KXE_ViewElement; class KXESearchDialog; -class QTextEdit; +class TQTextEdit; class KAction; class KToolBarPopupAction; class KXmlEditorComboAction; -class QDomNode; -class QKeyEvent; +class TQDomNode; +class TQKeyEvent; class KXMLEditorPartIfaceReadOnly; // DCOP interface class KCommandHistory; class KPrinter; -class QSplitter; +class TQSplitter; class KXEDocument; @@ -54,7 +54,7 @@ public: Creates the actions, the view (widgets) and changes to "begin state". */ - KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget * pParent, const char * pszName ); + KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidget * pParent, const char * pszName ); /** @short Destructor */ virtual ~KXMLEditorPart(); @@ -63,16 +63,16 @@ public: virtual void setReadWrite( bool fReadWrite = true ); /** @short Returns the selected XML object's path or an empty string, if no object is selected. */ - QString getSelectedPath() const { return m_pViewTree->getSelectedPath(); } + TQString getSelectedPath() const { return m_pViewTree->getSelectedPath(); } /** @short Copy XML node into clipboard */ - QTextDrag * copyNode(QDomNode *); + TQTextDrag * copyNode(TQDomNode *); /** @short Paste XML node from clipboard into document */ - bool pasteNode(QDomNode *, QMimeSource *); + bool pasteNode(TQDomNode *, TQMimeSource *); /** @short Drag&Drop move */ - bool dropMoveNode(QDomElement &, QDomNode &); + bool dropMoveNode(TQDomElement &, TQDomNode &); /** @short Prints the document on specified printer. @param pPrinter printer which will be used for printing. */ @@ -94,22 +94,22 @@ public slots: virtual void setModified( bool fModified ); /** @short Updates tree view after creating new element */ - void updateNodeCreated(const QDomNode & node); + void updateNodeCreated(const TQDomNode & node); /** @short Updates tree view after deleting new element */ - void updateNodeDeleted(const QDomNode & node); + void updateNodeDeleted(const TQDomNode & node); /** @short Updates tree view after change element properties */ - void updateNodeChanged( const QDomElement & domElement ); + void updateNodeChanged( const TQDomElement & domElement ); /** @short Updates tree view after change char. data properties */ - void updateNodeChanged( const QDomCharacterData & node ) ; + void updateNodeChanged( const TQDomCharacterData & node ) ; /** @short Updates tree view after change proc. instr. properties */ - void updateNodeChanged( const QDomProcessingInstruction &domProcInstr ); + void updateNodeChanged( const TQDomProcessingInstruction &domProcInstr ); /** @short Updates tree view after move node */ - void updateNodeMoved( const QDomNode & node ); + void updateNodeMoved( const TQDomNode & node ); /** * @short Reimplemented from @ref KParts::KReadWritePart::setModified. @@ -221,18 +221,18 @@ public slots: /** @short Shows configuration dialog (@ref OptionsDialog) */ void slotConfigure(); - void slotPathSelected( const QString & szPath ); + void slotPathSelected( const TQString & szPath ); void slotPathSelected(); void slotPathClear(); /** @short Called when a tree view items text was changed via inplace-renaming. */ - void slotItemRenamedInplace( QListViewItem * pItem ); + void slotItemRenamedInplace( TQListViewItem * pItem ); /** @short Called whan an attributes name was changed via inplace editing. */ - void slotAttributeNameChangedInplace( const QDomAttr &, const QString ); + void slotAttributeNameChangedInplace( const TQDomAttr &, const TQString ); /** @short Called whan an attributes value was changed via inplace editing. */ - void slotAttributeValueChangedInplace( const QDomAttr &, const QString ); + void slotAttributeValueChangedInplace( const TQDomAttr &, const TQString ); /** @short Called when File->Print or icon from the toolbar is selected. */ void slotActPrint(); @@ -246,7 +246,7 @@ public slots: /** @short Slot for removing XML nodes. */ void slotActDelete(); - void slotTreeViewKeyPressed(QKeyEvent *e); + void slotTreeViewKeyPressed(TQKeyEvent *e); /** @short Slot that performs redo function. */ void slotActRedo(); @@ -270,7 +270,7 @@ protected: @param ypos y coordinate of upper border of the header @sa printPage() @sa printFooter() */ - void printHeader(QPainter* painter, int pageNumber, int ypos, int width); + void printHeader(TQPainter* painter, int pageNumber, int ypos, int width); /** @short Draws footer for printouts (page number). @param painter a painter to use for drawing @@ -278,7 +278,7 @@ protected: @param ypos y coordinate of upper border of the footer @sa printHeader() @sa printFooter() */ - void printFooter(QPainter* painter,int pageNumber, int ypos, int width); + void printFooter(TQPainter* painter,int pageNumber, int ypos, int width); /** @short Draws page for printing purposes. @@ -290,13 +290,13 @@ protected: @param width,height size of the medium (e.g. paper) @sa printPage() @sa printHeader() */ - bool printPage(QPainter* painter,int pageNumber, int top, int width, int height); + bool printPage(TQPainter* painter,int pageNumber, int top, int width, int height); /** @short Used in printing function printPage(). */ unsigned int m_printLineNumber; /** @short Used in printing function printPage(). */ - QStringList m_printLines; + TQStringList m_printLines; // the actions KAction * m_pActEditFind; @@ -329,16 +329,16 @@ protected: void slotSelectionCleared(bool); /** @short Enables/disables actions depending on the given XML element and changes views */ - void slotSelectionChanged( const QDomElement & ); + void slotSelectionChanged( const TQDomElement & ); /** @short Enables/disables actions and changes views */ - void slotSelectionChanged( const QDomCharacterData & ); + void slotSelectionChanged( const TQDomCharacterData & ); /** @short Enables/disables actions and changes views */ - void slotSelectionChanged( const QDomProcessingInstruction & ); + void slotSelectionChanged( const TQDomProcessingInstruction & ); /** @short Shows the requested context menu at the given position. */ - void slotContextMenuRequested( const QString & szMenuName, const QPoint & pos ); + void slotContextMenuRequested( const TQString & szMenuName, const TQPoint & pos ); /** @short Invoked everytime document has new content */ void slotDocOpened(); @@ -348,16 +348,16 @@ protected: KXE_TreeView * m_pViewTree; /** the tab widget, contains: m_pViewElement, m_pViewContents */ - QTabWidget * m_pTabWidget; + TQTabWidget * m_pTabWidget; /** widget to display XML element */ KXE_ViewElement * m_pViewElement; /** edit widget for contents */ - QTextEdit * m_pViewContents; + TQTextEdit * m_pViewContents; /** widget to display a proc.instr. */ - QTextEdit * m_pViewProcInstr; + TQTextEdit * m_pViewProcInstr; /** the search dialog, used for find action */ KXESearchDialog * m_pDlgSearch; @@ -411,7 +411,7 @@ protected: KPrinter *m_pPrinter; /** spitter - main widget in the part */ - QSplitter *pSplitter; + TQSplitter *pSplitter; /** Pointer to underlying KXEDocument object */ KXEDocument* m_pDocument; diff --git a/part/qdom_add.cpp b/part/qdom_add.cpp index 142b873..ccca6bc 100644 --- a/part/qdom_add.cpp +++ b/part/qdom_add.cpp @@ -15,39 +15,39 @@ * * ***************************************************************************/ -/** This file contains useful datatypes and functions in addition to the Qt DOM classes. */ +/** This file contains useful datatypes and functions in addition to the TQt DOM classes. */ #include "qdom_add.h" #include <kiconloader.h> #include <kdebug.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include "kxmleditorfactory.h" #include "kxesearchdialog.h" -QPixmap g_iconElement( UserIcon("xml_element",KXMLEditorFactory::instance()) ); -QPixmap g_iconText( UserIcon("xml_text",KXMLEditorFactory::instance()) ); -QPixmap g_iconComment( UserIcon("xml_comment",KXMLEditorFactory::instance()) ); -QPixmap g_iconCDATASection( UserIcon("xml_cdata",KXMLEditorFactory::instance()) ); -QPixmap g_iconProcessingInstruction( UserIcon("xml_procinstr",KXMLEditorFactory::instance()) ); -QPixmap g_iconElement_b( UserIcon("xml_element_b",KXMLEditorFactory::instance()) ); -QPixmap g_iconText_b( UserIcon("xml_text_b",KXMLEditorFactory::instance()) ); -QPixmap g_iconComment_b( UserIcon("xml_comment_b",KXMLEditorFactory::instance()) ); -QPixmap g_iconCDATASection_b( UserIcon("xml_cdata_b",KXMLEditorFactory::instance()) ); -QPixmap g_iconProcessingInstruction_b( UserIcon("xml_procinstr_b",KXMLEditorFactory::instance()) ); -QPixmap g_iconUnknown; - -const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool bBookmarked ) +TQPixmap g_iconElement( UserIcon("xml_element",KXMLEditorFactory::instance()) ); +TQPixmap g_iconText( UserIcon("xml_text",KXMLEditorFactory::instance()) ); +TQPixmap g_iconComment( UserIcon("xml_comment",KXMLEditorFactory::instance()) ); +TQPixmap g_iconCDATASection( UserIcon("xml_cdata",KXMLEditorFactory::instance()) ); +TQPixmap g_iconProcessingInstruction( UserIcon("xml_procinstr",KXMLEditorFactory::instance()) ); +TQPixmap g_iconElement_b( UserIcon("xml_element_b",KXMLEditorFactory::instance()) ); +TQPixmap g_iconText_b( UserIcon("xml_text_b",KXMLEditorFactory::instance()) ); +TQPixmap g_iconComment_b( UserIcon("xml_comment_b",KXMLEditorFactory::instance()) ); +TQPixmap g_iconCDATASection_b( UserIcon("xml_cdata_b",KXMLEditorFactory::instance()) ); +TQPixmap g_iconProcessingInstruction_b( UserIcon("xml_procinstr_b",KXMLEditorFactory::instance()) ); +TQPixmap g_iconUnknown; + +const TQPixmap & domTool_getIconForNodeType( TQDomNode::NodeType type, bool bBookmarked ) { if(!bBookmarked) { switch(type) - { case QDomNode::ElementNode: return g_iconElement; break; - case QDomNode::TextNode: return g_iconText; break; - case QDomNode::CDATASectionNode: return g_iconCDATASection; break; - case QDomNode::CommentNode: return g_iconComment; break; - case QDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction; break; + { case TQDomNode::ElementNode: return g_iconElement; break; + case TQDomNode::TextNode: return g_iconText; break; + case TQDomNode::CDATASectionNode: return g_iconCDATASection; break; + case TQDomNode::CommentNode: return g_iconComment; break; + case TQDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction; break; default: kdDebug() << "domTool_getIconForNodeType: unknown node type (" << type << ")" << endl; @@ -55,11 +55,11 @@ const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool bBookm } else { switch(type) - { case QDomNode::ElementNode: return g_iconElement_b; break; - case QDomNode::TextNode: return g_iconText_b; break; - case QDomNode::CDATASectionNode: return g_iconCDATASection_b; break; - case QDomNode::CommentNode: return g_iconComment_b; break; - case QDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction_b; break; + { case TQDomNode::ElementNode: return g_iconElement_b; break; + case TQDomNode::TextNode: return g_iconText_b; break; + case TQDomNode::CDATASectionNode: return g_iconCDATASection_b; break; + case TQDomNode::CommentNode: return g_iconComment_b; break; + case TQDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction_b; break; default: kdDebug() << "domTool_getIconForNodeType: unknown node type (" << type << ")" << endl; @@ -69,22 +69,22 @@ const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool bBookm } // Obtain XPath for all nodes, instead of elements -QString domTool_getPath( const QDomNode & node ) +TQString domTool_getPath( const TQDomNode & node ) { if ( node.isNull() ) { kdDebug() << "domTool_getPath: elelent given" << endl; - return QString(); + return TQString(); } if(node.isElement()) { - kdDebug() << "use domTool_getPath( const QDomElement & domElement ) for elements" << endl; + kdDebug() << "use domTool_getPath( const TQDomElement & domElement ) for elements" << endl; } - QString strReturn; + TQString strReturn; - QDomNode parentNode = node.parentNode(); + TQDomNode parentNode = node.parentNode(); if ( (!parentNode.isNull()) && (!parentNode.isDocument()) ) { strReturn = domTool_getPath( parentNode.toElement() ); // get the parent's path @@ -98,16 +98,16 @@ QString domTool_getPath( const QDomNode & node ) } // Obtain XPath for elements -QString domTool_getPath( const QDomElement & domElement ) +TQString domTool_getPath( const TQDomElement & domElement ) { if ( domElement.isNull() ) { kdDebug() << "domTool_getPath: no node given" << endl; - return QString(); + return TQString(); } - QString strReturn; - QDomNode parentNode = domElement.parentNode(); + TQString strReturn; + TQDomNode parentNode = domElement.parentNode(); if ( (!parentNode.isNull()) && (!parentNode.isDocument()) ) { // calculate index - only for elements with the same name @@ -115,12 +115,12 @@ QString domTool_getPath( const QDomElement & domElement ) bool bUseIndex = false; // index is used only when exist sibling(s) with the same name // traverse previous sibling elements with same name and calculate index - QDomNode tmpNode = domElement.previousSibling(); + TQDomNode tmpNode = domElement.previousSibling(); while ( ! tmpNode.isNull() ) { if(tmpNode.isElement()) { - QDomElement domSiblingElement = tmpNode.toElement(); + TQDomElement domSiblingElement = tmpNode.toElement(); if(domElement.tagName() == domSiblingElement.tagName()) { i++; bUseIndex = true; @@ -133,12 +133,12 @@ QString domTool_getPath( const QDomElement & domElement ) { // traverse next sibling elements with same name // and decide, if index is necessary - QDomNode tmpNode = domElement.nextSibling(); + TQDomNode tmpNode = domElement.nextSibling(); while ( ! tmpNode.isNull() ) { if(tmpNode.isElement()) { - QDomElement domSiblingElement = tmpNode.toElement(); + TQDomElement domSiblingElement = tmpNode.toElement(); if(domElement.tagName() == domSiblingElement.tagName()) bUseIndex = true; @@ -155,7 +155,7 @@ QString domTool_getPath( const QDomElement & domElement ) if(bUseIndex) { - QString strIndex; + TQString strIndex; strIndex.setNum(i+1); strReturn += "[" + strIndex + "]"; // append the index } @@ -166,7 +166,7 @@ QString domTool_getPath( const QDomElement & domElement ) return strReturn; } -unsigned int domTool_getLevel( const QDomNode & node ) +unsigned int domTool_getLevel( const TQDomNode & node ) { if ( node.isNull() ) { @@ -175,7 +175,7 @@ unsigned int domTool_getLevel( const QDomNode & node ) } unsigned int iLevel = 0; - QDomNode parentNode = node.parentNode(); + TQDomNode parentNode = node.parentNode(); while ( ! parentNode.isNull() ) { iLevel++; @@ -185,26 +185,26 @@ unsigned int domTool_getLevel( const QDomNode & node ) return iLevel - 1; } -QString domTool_save( const QDomNode & node, int iIndent ) +TQString domTool_save( const TQDomNode & node, int iIndent ) { - QString strXML; - QTextStream ts( & strXML, IO_WriteOnly ); + TQString strXML; + TQTextStream ts( & strXML, IO_WriteOnly ); node.save(ts, iIndent); return strXML; } -QDomNode domTool_prevNode( const QDomNode & node ) +TQDomNode domTool_prevNode( const TQDomNode & node ) { if ( node.isNull() ) { kdDebug() << "domTool_prevNode: internal implementation error - the given node is an empty one" << endl; - return QDomNode(); + return TQDomNode(); } if ( ! node.previousSibling().isNull() ) // if there is a prev. sibling { // return its last grand child (if there is any) - QDomNode prevNode = node.previousSibling(); + TQDomNode prevNode = node.previousSibling(); while ( ! prevNode.lastChild().isNull() ) prevNode = prevNode.lastChild(); return prevNode; @@ -214,12 +214,12 @@ QDomNode domTool_prevNode( const QDomNode & node ) } -QDomNode domTool_nextNode( const QDomNode & node ) +TQDomNode domTool_nextNode( const TQDomNode & node ) { if ( node.isNull() ) { kdDebug() << "domTool_nextNode: internal implementation error - the given node is an empty one" << endl; - return QDomNode(); + return TQDomNode(); } // checking for a child @@ -231,7 +231,7 @@ QDomNode domTool_nextNode( const QDomNode & node ) return node.nextSibling(); // there is no next sibling -> checking for parents' next sibling(s) - QDomNode nodeParent = node.parentNode(); + TQDomNode nodeParent = node.parentNode(); while ( ! nodeParent.isNull() ) { if ( ! nodeParent.nextSibling().isNull() ) @@ -241,15 +241,15 @@ QDomNode domTool_nextNode( const QDomNode & node ) } // parent has no parents anymore - return QDomNode(); // return empty node + return TQDomNode(); // return empty node } -QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath ) +TQDomNode domTool_matchingNode( const TQDomNode & node, const TQString & szPath ) { if(szPath.length() == 0) - return QDomNode(); // return void node + return TQDomNode(); // return void node - QString szNodePath = node.isDocument() ? QString("") : domTool_getPath(node); + TQString szNodePath = node.isDocument() ? TQString("") : domTool_getPath(node); if ( szPath == szNodePath ) // test if the strings match return node; @@ -257,15 +257,15 @@ QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath ) // we will find any node in root element subtree if ( szPath.length() <= szNodePath.length() ) // the given string must be longer - return QDomNode(); // otherwise we don't need to check the childs + return TQDomNode(); // otherwise we don't need to check the childs if ( szPath.left(szNodePath.length()) != szNodePath ) // the nodes path must be left part of the given path - return QDomNode(); // otherwise we don't need to check the childs + return TQDomNode(); // otherwise we don't need to check the childs */ // recursively check the childs - QDomNode nodeChild = node.firstChild(); - QDomNode nodeTmp; + TQDomNode nodeChild = node.firstChild(); + TQDomNode nodeTmp; while ( ! nodeChild.isNull() ) { nodeTmp = domTool_matchingNode( nodeChild, szPath ); @@ -274,10 +274,10 @@ QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath ) nodeChild = nodeChild.nextSibling(); } - return QDomNode(); // nothing found -> return empty node + return TQDomNode(); // nothing found -> return empty node } -bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions ) +bool domTool_match( TQDomNode node, const KXESearchDialog * const pConditions ) { if ( node.isNull() ) { @@ -293,7 +293,7 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions ) switch ( node.nodeType() ) { - case QDomNode::ElementNode: // ---------------------------------------- + case TQDomNode::ElementNode: // ---------------------------------------- { if ( pConditions->getInElementNames() ) { @@ -303,7 +303,7 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions ) if ( ( pConditions->getInAttributeNames() ) || ( pConditions->getInAttributeValues() ) ) { - QDomNamedNodeMap list = node.toElement().attributes(); + TQDomNamedNodeMap list = node.toElement().attributes(); unsigned int iLength = list.length(); if ( iLength <= 0 ) return false; // no attributes @@ -324,9 +324,9 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions ) break; } - case QDomNode::TextNode: // ---------------------------------------- - case QDomNode::CDATASectionNode: - case QDomNode::CommentNode: + case TQDomNode::TextNode: // ---------------------------------------- + case TQDomNode::CDATASectionNode: + case TQDomNode::CommentNode: { if ( pConditions->getInContents() ) { diff --git a/part/qdom_add.h b/part/qdom_add.h index 4e9634c..6f47426 100644 --- a/part/qdom_add.h +++ b/part/qdom_add.h @@ -15,41 +15,41 @@ * * ***************************************************************************/ -#ifndef QDOM_ADD_H -#define QDOM_ADD_H +#ifndef TQDOM_ADD_H +#define TQDOM_ADD_H -/** This file contains useful datatypes and functions in addition to the Qt DOM classes. */ +/** This file contains useful datatypes and functions in addition to the TQt DOM classes. */ -#include <qpixmap.h> -#include <qdom.h> +#include <tqpixmap.h> +#include <tqdom.h> class KXESearchDialog; -extern QPixmap g_iconElement; -extern QPixmap g_iconText; -extern QPixmap g_iconComment; -extern QPixmap g_iconCDATASection; -extern QPixmap g_iconProcessingInstruction; -extern QPixmap g_iconElement_b; -extern QPixmap g_iconText_b; -extern QPixmap g_iconComment_b; -extern QPixmap g_iconCDATASection_b; -extern QPixmap g_iconProcessingInstruction_b; +extern TQPixmap g_iconElement; +extern TQPixmap g_iconText; +extern TQPixmap g_iconComment; +extern TQPixmap g_iconCDATASection; +extern TQPixmap g_iconProcessingInstruction; +extern TQPixmap g_iconElement_b; +extern TQPixmap g_iconText_b; +extern TQPixmap g_iconComment_b; +extern TQPixmap g_iconCDATASection_b; +extern TQPixmap g_iconProcessingInstruction_b; /** Returns the corresponding pixmap/icon to the given node type. */ -const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool ); +const TQPixmap & domTool_getIconForNodeType( TQDomNode::NodeType type, bool ); /** Returns the path of the given node. */ -QString domTool_getPath( const QDomNode & ); +TQString domTool_getPath( const TQDomNode & ); /** Returns the path of the given node. */ -QString domTool_getPath( const QDomElement & ); +TQString domTool_getPath( const TQDomElement & ); /** Returns the level (how deep in tree) of the given node. */ -unsigned int domTool_getLevel( const QDomNode & ); +unsigned int domTool_getLevel( const TQDomNode & ); -/** Returns a QString with the XML representation of the given node including all its children (uses @ref QDomNode::save). */ -QString domTool_save( const QDomNode &, int ); +/** Returns a TQString with the XML representation of the given node including all its children (uses @ref TQDomNode::save). */ +TQString domTool_save( const TQDomNode &, int ); /** * Returns the previous node of the given one or an empty node, if it is the first. @@ -58,23 +58,23 @@ QString domTool_save( const QDomNode &, int ); * if there is no sibling above, it will be its parent or * an empty node (if there is no parent). */ -QDomNode domTool_prevNode( const QDomNode & node ); +TQDomNode domTool_prevNode( const TQDomNode & node ); /** * Returns the next node of the given one or an empty node, if it is the last. * This will be it's first child, * if there are no childs, it will be the next sibling * and if there are no siblings below, it will be the parent's next sibling ... */ -QDomNode domTool_nextNode( const QDomNode & node ); +TQDomNode domTool_nextNode( const TQDomNode & node ); /** * Tests the given node and its (grand)childs. * Returns the node, which matches the given path, oran empty node (if no one matches). */ -QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath ); +TQDomNode domTool_matchingNode( const TQDomNode & node, const TQString & szPath ); /** Tests, if the given node matches the conditions of the given search. */ -bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions ); +bool domTool_match( TQDomNode node, const KXESearchDialog * const pConditions ); #endif |