Initial TQt conversion

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 9 years ago
parent e28665ce3b
commit 38dca4b75c

@ -18,7 +18,7 @@
#include "dcopiface_shell.h" #include "dcopiface_shell.h"
#include "kxmleditorshell.h" #include "kxmleditorshell.h"
QString TQString
KXMLEditorShellIface::Quit() KXMLEditorShellIface::Quit()
{ {
// m_pKXEShell->close(); // m_pKXEShell->close();

@ -54,7 +54,7 @@ k_dcop:
* *
* @returns Error description or empty string if program closed. * @returns Error description or empty string if program closed.
**/ **/
QString Quit(); TQString Quit();
/** /**

@ -12,7 +12,7 @@
#include "kxeshellmanager.h" #include "kxeshellmanager.h"
#include "kxmleditorshell.h" #include "kxmleditorshell.h"
#include <qptrlist.h> #include <tqptrlist.h>
KXEShellManager::KXEShellManager() KXEShellManager::KXEShellManager()
{ {
@ -49,7 +49,7 @@ void KXEShellManager::removeShell(KXMLEditorShell* pShell)
/*! /*!
\fn KXEShellManager::shells() \fn KXEShellManager::shells()
*/ */
QPtrList<KXMLEditorShell>* KXEShellManager::shells() TQPtrList<KXMLEditorShell>* KXEShellManager::shells()
{ {
return &m_shells; return &m_shells;
} }

@ -15,7 +15,7 @@
@file @file
*/ */
#include <qptrlist.h> #include <tqptrlist.h>
class KXMLEditorShell; class KXMLEditorShell;
@ -55,11 +55,11 @@ public:
void removeShell(KXMLEditorShell* pShell); void removeShell(KXMLEditorShell* pShell);
/** @short Returns list of currently opened shells. */ /** @short Returns list of currently opened shells. */
QPtrList<KXMLEditorShell> *shells(); TQPtrList<KXMLEditorShell> *shells();
private: private:
/** @short Internally stores list of available shells. */ /** @short Internally stores list of available shells. */
QPtrList<KXMLEditorShell> m_shells; TQPtrList<KXMLEditorShell> m_shells;
}; };
#endif #endif

@ -38,7 +38,7 @@
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <qevent.h> #include <tqevent.h>
#include "dcopiface_shell.h" #include "dcopiface_shell.h"
@ -116,7 +116,7 @@ void KXMLEditorShell::slotFileOpen()
{ {
statusBar()->message( i18n("Opening file...") ); statusBar()->message( i18n("Opening file...") );
KURL url = KFileDialog::getOpenURL( QString::null, KURL url = KFileDialog::getOpenURL( TQString::null,
i18n(FILE_DIALOG_FILTER), i18n(FILE_DIALOG_FILTER),
this ); this );
openURL(url); openURL(url);
@ -261,7 +261,7 @@ void KXMLEditorShell::readProperties( KConfig * pConfig )
KParts::MainWindow::readProperties(pConfig); KParts::MainWindow::readProperties(pConfig);
/// @todo Check if ths is a deadcode /// @todo Check if ths is a deadcode
// QString strURL = pConfig->readEntry( "CurrentURL", "" ); // TQString strURL = pConfig->readEntry( "CurrentURL", "" );
// if ( strURL.isEmpty()) // if ( strURL.isEmpty())
// part()->openURL( strURL ); // 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), // Set main window caption (by using the base class functionality),
// Enables/disables Save button (corresponding to the parts modified status) // Enables/disables Save button (corresponding to the parts modified status)
void KXMLEditorShell::setCaption( const QString & strCaption ) void KXMLEditorShell::setCaption( const TQString & strCaption )
{ {
if (part()) if (part())
{ {
@ -335,14 +335,14 @@ void KXMLEditorShell::mail()
if (!part()->url().isEmpty()) if (!part()->url().isEmpty())
{ {
QStringList urls(part()->url().url()); // we can prepare then list of attachments (1 element in the list) TQStringList 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 TQString 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 kapp->invokeMailer(TQString::null, // finally we can compose e-mail (addressed to no-one) out of that
QString::null, TQString::null,
QString::null, TQString::null,
theSubject, // subject theSubject, // subject
QString::null, // body TQString::null, // body
QString::null, TQString::null,
urls); // attachments urls); // attachments
} }
} }
@ -398,12 +398,12 @@ void KXMLEditorShell::setPart(KParts::ReadWritePart* pPart)
connect(m_windowMenu,SIGNAL(aboutToShow()),this,SLOT(slotBeforeWindowMenuShown())); 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"); 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; KParts::ReadWritePart* newPart = 0L;
KLibFactory * pFactory = KLibLoader::self()->factory(libName); KLibFactory * pFactory = KLibLoader::self()->factory(libName);
@ -432,7 +432,7 @@ void KXMLEditorShell::close()
void KXMLEditorShell::slotActWindowCloseAllOthers() void KXMLEditorShell::slotActWindowCloseAllOthers()
{ {
QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
for (it.toFirst();it.current();++it) for (it.toFirst();it.current();++it)
{ {
if (it.current()!=this) if (it.current()!=this)
@ -473,7 +473,7 @@ void KXMLEditorShell::slotBeforeWindowMenuShown()
// and then we can add entries for all shells // and then we can add entries for all shells
// that are registered in Shell Manager... // that are registered in Shell Manager...
QPtrListIterator<KXMLEditorShell> it (*(manager()->shells())); TQPtrListIterator<KXMLEditorShell> it (*(manager()->shells()));
for (it.toFirst(); it.current();++it) for (it.toFirst(); it.current();++it)
{ {
int id = m_windowMenu->insertItem(it.current()->caption(),it.current(),SLOT(slotActivate())); int id = m_windowMenu->insertItem(it.current()->caption(),it.current(),SLOT(slotActivate()));

@ -64,9 +64,9 @@ class KXMLEditorShell : public KParts::MainWindow
/** @short Creates new part which can be shown in the shell. /** @short Creates new part which can be shown in the shell.
@param parent parent object for the part*/ @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. */ /** @short Changes currenly shown part. */
void setPart(KParts::ReadWritePart* pPart); void setPart(KParts::ReadWritePart* pPart);
@ -96,7 +96,7 @@ class KXMLEditorShell : public KParts::MainWindow
void slotConfigureToolbars(); void slotConfigureToolbars();
/** @short Changes shell caption.*/ /** @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. /** @short Sends currently opened XML file over e-mail.

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if(args->count()) if(args->count())
{ QString strPath; { TQString strPath;
if(args->count() > 1) if(args->count() > 1)
{ strPath = args->arg(1); { strPath = args->arg(1);

@ -19,10 +19,10 @@
// include files for QT // include files for QT
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qapplication.h> #include <tqapplication.h>
// include files for KDE // include files for KDE
#include <ktoolbar.h> #include <ktoolbar.h>
@ -36,11 +36,11 @@
// //
//------------------------------------------------------------------- //-------------------------------------------------------------------
KXmlEditorComboAction::KXmlEditorComboAction(const QString& text, KXmlEditorComboAction::KXmlEditorComboAction(const TQString& text,
int accel, int accel,
const QObject *receiver, const TQObject *receiver,
const char *member, const char *member,
QObject* parent, TQObject* parent,
const char* name) const char* name)
: KAction(text, accel, parent, name), : KAction(text, accel, parent, name),
m_pCombo(0) m_pCombo(0)
@ -54,12 +54,12 @@ KXmlEditorComboAction::~KXmlEditorComboAction()
//delete m_pCombo; // L.V. this cause crash !!! //delete m_pCombo; // L.V. this cause crash !!!
} }
QComboBox* KXmlEditorComboAction::comboBox() TQComboBox* KXmlEditorComboAction::comboBox()
{ {
return m_pCombo; return m_pCombo;
} }
int KXmlEditorComboAction::plug(QWidget *w, int index) int KXmlEditorComboAction::plug(TQWidget *w, int index)
{ {
// if ( !w->inherits( "KToolBar" ) ); // if ( !w->inherits( "KToolBar" ) );
// return -1; // return -1;
@ -69,11 +69,11 @@ int KXmlEditorComboAction::plug(QWidget *w, int index)
int id = KAction::getToolButtonID(); int id = KAction::getToolButtonID();
//kdDebug() << "KXmlEditorComboAction::plug id=" << id << endl; //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->setEditable(true);
m_pCombo->setInsertionPolicy(QComboBox::NoInsertion); m_pCombo->setInsertionPolicy(TQComboBox::NoInsertion);
toolBar->insertWidget( id, 70, m_pCombo, index ); 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 ); addContainer( toolBar, id );
@ -81,12 +81,12 @@ int KXmlEditorComboAction::plug(QWidget *w, int index)
toolBar->setItemAutoSized(id, true); toolBar->setItemAutoSized(id, true);
QWhatsThis::add( m_pCombo, whatsThis() ); TQWhatsThis::add( m_pCombo, whatsThis() );
return containerCount() - 1; return containerCount() - 1;
} }
void KXmlEditorComboAction::unplug(QWidget *w) void KXmlEditorComboAction::unplug(TQWidget *w)
{ {
// if ( !w->inherits( "KToolBar" ) ) // if ( !w->inherits( "KToolBar" ) )
// return; // return;
@ -135,18 +135,18 @@ void KXmlEditorComboAction::slotFocusEdit()
m_pCombo->setFocus(); m_pCombo->setFocus();
} }
QString KXmlEditorComboAction::currentText() const TQString KXmlEditorComboAction::currentText() const
{ {
if ( containerCount() == 0 ) if ( containerCount() == 0 )
{ {
kdWarning() << "[KXmlEditorComboAction::currentText] action not plugged" << endl; kdWarning() << "[KXmlEditorComboAction::currentText] action not plugged" << endl;
return QString::null; return TQString::null;
} }
return m_pCombo->currentText(); return m_pCombo->currentText();
} }
const QPixmap * KXmlEditorComboAction::currentPixmap() const const TQPixmap * KXmlEditorComboAction::currentPixmap() const
{ {
if ( containerCount() == 0 ) if ( containerCount() == 0 )
{ {
@ -157,7 +157,7 @@ const QPixmap * KXmlEditorComboAction::currentPixmap() const
return m_pCombo->pixmap( m_pCombo->currentItem() ); 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 ) if ( containerCount() == 0 )
{ {
@ -179,7 +179,7 @@ void KXmlEditorComboAction::insertItem( const QPixmap & pixmap, const QString &
m_pCombo->removeItem(15); m_pCombo->removeItem(15);
} }
void KXmlEditorComboAction::removeItem( const QString & text ) void KXmlEditorComboAction::removeItem( const TQString & text )
{ {
if ( containerCount() == 0 ) if ( containerCount() == 0 )
{ {
@ -197,7 +197,7 @@ void KXmlEditorComboAction::removeItem( const QString & text )
m_pCombo->removeItem(nIndex); m_pCombo->removeItem(nIndex);
} }
int KXmlEditorComboAction::findItem( const QString & text ) int KXmlEditorComboAction::findItem( const TQString & text )
{ {
if ( containerCount() == 0 ) if ( containerCount() == 0 )
{ {
@ -217,13 +217,13 @@ int KXmlEditorComboAction::findItem( const QString & text )
return nIndex; return nIndex;
} }
ToolbarLabel::ToolbarLabel( const QString& text ) ToolbarLabel::ToolbarLabel( const TQString& text )
: QLabel( text, 0L, "kde toolbar widget" ) // Use this name for it to be styled! : TQLabel( text, 0L, "kde toolbar widget" ) // Use this name for it to be styled!
// , m_mw(mw) // , m_mw(mw)
{ {
setBackgroundMode( Qt::PaletteButton ); setBackgroundMode( TQt::PaletteButton );
setAlignment( (QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft) | setAlignment( (TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft) |
Qt::AlignVCenter | Qt::ShowPrefix ); TQt::AlignVCenter | TQt::ShowPrefix );
adjustSize(); adjustSize();
} }

@ -19,8 +19,8 @@
#define ACTIONS_H #define ACTIONS_H
#include <kaction.h> #include <kaction.h>
#include <qlabel.h> #include <tqlabel.h>
class QComboBox; class TQComboBox;
/** /**
*@author Lumir Vanek *@author Lumir Vanek
@ -30,33 +30,33 @@ class KXmlEditorComboAction : public KAction
{ {
Q_OBJECT Q_OBJECT
public: 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(); ~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). */ /** Returns the text from the combobox' editline (@ref TQComboBox::currentText). */
QString currentText() const; TQString currentText() const;
/** Returns the current pixmap or 0, if there isn't any (see @ref QComboBox::pixmap). */ /** Returns the current pixmap or 0, if there isn't any (see @ref TQComboBox::pixmap). */
const QPixmap * currentPixmap() const; const TQPixmap * currentPixmap() const;
/** /**
* Inserts the given item as the first. * Inserts the given item as the first.
* Deletes the old entry, if the item was already in the list. * 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. */ /** Tries to remove the item with the given text. */
void removeItem( const QString & text ); void removeItem( const TQString & text );
/** returns combo box */ /** returns combo box */
QComboBox *comboBox(); TQComboBox *comboBox();
public slots: public slots:
/** Clears the whole combobox using @ref QComboBox::clear. */ /** Clears the whole combobox using @ref TQComboBox::clear. */
void slotClear(); void slotClear();
/** Clears the combobox' editline. */ /** Clears the combobox' editline. */
void slotClearEdit(); void slotClearEdit();
@ -68,20 +68,20 @@ protected:
* Tries to find an item with the given text. If it finds it, * Tries to find an item with the given text. If it finds it,
* the items id is returned, otherwise -1. * the items id is returned, otherwise -1.
*/ */
virtual int findItem( const QString & text ); virtual int findItem( const TQString & text );
private: private:
const QObject *m_receiver; const TQObject *m_receiver;
const char *m_member; const char *m_member;
QComboBox * m_pCombo; TQComboBox * m_pCombo;
}; };
class ToolbarLabel : public QLabel class ToolbarLabel : public TQLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
ToolbarLabel( const QString & text ); ToolbarLabel( const TQString & text );
}; };

@ -22,7 +22,7 @@
/////////// Cutting element to clipboard ////////// /////////// Cutting element to clipboard //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXECutCommand::KXECutCommand(KXEDocument *pDocument, QDomNode &domNode) KXECutCommand::KXECutCommand(KXEDocument *pDocument, TQDomNode &domNode)
: KXEDeleteNodeCommand(pDocument, domNode) : KXEDeleteNodeCommand(pDocument, domNode)
{ {
} }
@ -37,8 +37,8 @@ KXECutCommand::~KXECutCommand()
KXEPasteToDocumentCommand::KXEPasteToDocumentCommand( KXEPasteToDocumentCommand::KXEPasteToDocumentCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomDocument *pDomTargetDoc, TQDomDocument *pDomTargetDoc,
QDomElement &domSourceElement TQDomElement &domSourceElement
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -56,14 +56,14 @@ KXEPasteToDocumentCommand::~KXEPasteToDocumentCommand()
void KXEPasteToDocumentCommand::execute() void KXEPasteToDocumentCommand::execute()
{ {
// Insert root element // Insert root element
QDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true); TQDomNode newNode = m_pDomTargetDoc->importNode(m_domSourceElement, true);
m_pDomTargetDoc->appendChild(newNode); m_pDomTargetDoc->appendChild(newNode);
m_pDocument->updateNodeCreated(newNode); m_pDocument->updateNodeCreated(newNode);
} }
void KXEPasteToDocumentCommand::unexecute() void KXEPasteToDocumentCommand::unexecute()
{ {
QDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement()); TQDomNode removedNode = m_pDomTargetDoc->removeChild( m_pDomTargetDoc->documentElement());
if ( removedNode.isNull() ) if ( removedNode.isNull() )
kdError() << "KXEPasteToDocumentCommand::unexecute error removing node." << endl; kdError() << "KXEPasteToDocumentCommand::unexecute error removing node." << endl;
@ -79,8 +79,8 @@ void KXEPasteToDocumentCommand::unexecute()
KXEPasteToElementCommand::KXEPasteToElementCommand( KXEPasteToElementCommand::KXEPasteToElementCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement & domTargetElement, TQDomElement & domTargetElement,
QDomNode &domSourceNode TQDomNode &domSourceNode
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -117,8 +117,8 @@ void KXEPasteToElementCommand::unexecute()
KXEPasteToProcInstrCommand::KXEPasteToProcInstrCommand( KXEPasteToProcInstrCommand::KXEPasteToProcInstrCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomProcessingInstruction &domTargetProcInstr, TQDomProcessingInstruction &domTargetProcInstr,
QDomProcessingInstruction &domSourceProcInstr TQDomProcessingInstruction &domSourceProcInstr
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -158,8 +158,8 @@ void KXEPasteToProcInstrCommand::unexecute()
KXEPasteToCharDataCommand::KXEPasteToCharDataCommand( KXEPasteToCharDataCommand::KXEPasteToCharDataCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomCharacterData &domTargetCharData, TQDomCharacterData &domTargetCharData,
QDomCharacterData &domSourceCharData TQDomCharacterData &domSourceCharData
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -197,8 +197,8 @@ void KXEPasteToCharDataCommand::unexecute()
KXEDragDropMoveCommand::KXEDragDropMoveCommand( KXEDragDropMoveCommand::KXEDragDropMoveCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement & domTargetElement, TQDomElement & domTargetElement,
QDomNode &domSourceNode TQDomNode &domSourceNode
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -247,7 +247,7 @@ void KXEDragDropMoveCommand::unexecute()
/////////// Deleting node ////////// /////////// Deleting node //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, QDomNode &domNode) KXEDeleteNodeCommand::KXEDeleteNodeCommand(KXEDocument *pDocument, TQDomNode &domNode)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_domNode = domNode; m_domNode = domNode;
@ -288,8 +288,8 @@ void KXEDeleteNodeCommand::unexecute()
KXEDeleteAttrCommand::KXEDeleteAttrCommand( KXEDeleteAttrCommand::KXEDeleteAttrCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement &domOwnerElement, TQDomElement &domOwnerElement,
QDomAttr &domAttr TQDomAttr &domAttr
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -319,7 +319,7 @@ void KXEDeleteAttrCommand::unexecute()
KXEDeleteAllAttribCommand::KXEDeleteAllAttribCommand( KXEDeleteAllAttribCommand::KXEDeleteAllAttribCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement &domOwnerElement TQDomElement &domOwnerElement
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -333,7 +333,7 @@ KXEDeleteAllAttribCommand::~KXEDeleteAllAttribCommand()
void KXEDeleteAllAttribCommand::execute() void KXEDeleteAllAttribCommand::execute()
{ {
QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes();
uint nAttributes = mapAttributes.count(); uint nAttributes = mapAttributes.count();
if( nAttributes == 0 ) if( nAttributes == 0 )
@ -341,11 +341,11 @@ void KXEDeleteAllAttribCommand::execute()
for( uint nRow = nAttributes; nRow > 0; nRow-- ) for( uint nRow = nAttributes; nRow > 0; nRow-- )
{ {
QDomNode node = mapAttributes.item(nRow-1); TQDomNode node = mapAttributes.item(nRow-1);
if ( node.isAttr() ) 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_listRemovedAttributes.append(pNodeCloned);
m_domOwnerElement.removeAttributeNode(node.toAttr()); m_domOwnerElement.removeAttributeNode(node.toAttr());
@ -359,13 +359,13 @@ void KXEDeleteAllAttribCommand::execute()
void KXEDeleteAllAttribCommand::unexecute() void KXEDeleteAllAttribCommand::unexecute()
{ {
QDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes(); TQDomNamedNodeMap mapAttributes = m_domOwnerElement.attributes();
uint nAttributes = m_listRemovedAttributes.count(); uint nAttributes = m_listRemovedAttributes.count();
if ( nAttributes == 0 ) if ( nAttributes == 0 )
return; return;
QDomAttr *pDomAttr; TQDomAttr *pDomAttr;
for ( pDomAttr = m_listRemovedAttributes.first(); pDomAttr; pDomAttr = m_listRemovedAttributes.next() ) for ( pDomAttr = m_listRemovedAttributes.first(); pDomAttr; pDomAttr = m_listRemovedAttributes.next() )
{ {
if(!pDomAttr->namespaceURI().isEmpty()) if(!pDomAttr->namespaceURI().isEmpty())
@ -383,7 +383,7 @@ void KXEDeleteAllAttribCommand::unexecute()
/////////// Moving node up ////////// /////////// Moving node up //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, QDomNode &domNode) KXEUpCommand::KXEUpCommand(KXEDocument *pDocument, TQDomNode &domNode)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_domNode = domNode; m_domNode = domNode;
@ -399,14 +399,14 @@ KXEUpCommand::~KXEUpCommand()
void KXEUpCommand::execute() void KXEUpCommand::execute()
{ {
QDomNode domPrevSibling = m_domNode.previousSibling(); TQDomNode domPrevSibling = m_domNode.previousSibling();
if ( domPrevSibling.isNull() ) if ( domPrevSibling.isNull() )
{ {
kdError() << "KXEUpCommand::execute selected node doesn't seem to have a previous sibling." << endl; kdError() << "KXEUpCommand::execute selected node doesn't seem to have a previous sibling." << endl;
return; return;
} }
QDomNode domNode = m_domParentNode.removeChild( m_domNode ); TQDomNode domNode = m_domParentNode.removeChild( m_domNode );
if ( domNode.isNull() ) if ( domNode.isNull() )
kdError() << "KXEUpCommand::execute can't remove child node." << endl; kdError() << "KXEUpCommand::execute can't remove child node." << endl;
else else
@ -423,14 +423,14 @@ void KXEUpCommand::execute()
void KXEUpCommand::unexecute() void KXEUpCommand::unexecute()
{ {
QDomNode domNextSibling = m_domNode.nextSibling(); TQDomNode domNextSibling = m_domNode.nextSibling();
if ( domNextSibling.isNull() ) if ( domNextSibling.isNull() )
{ {
kdError() << "KXEUpCommand::unexecute selected node doesn't seem to have a next sibling." << endl; kdError() << "KXEUpCommand::unexecute selected node doesn't seem to have a next sibling." << endl;
return; return;
} }
QDomNode domNode = m_domParentNode.removeChild( m_domNode ); TQDomNode domNode = m_domParentNode.removeChild( m_domNode );
if ( domNode.isNull() ) if ( domNode.isNull() )
kdError() << "KXEUpCommand::unexecute can't remove child node." << endl; kdError() << "KXEUpCommand::unexecute can't remove child node." << endl;
else else
@ -449,7 +449,7 @@ void KXEUpCommand::unexecute()
/////////// Moving node down ////////// /////////// Moving node down //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, QDomNode &domNode) KXEDownCommand::KXEDownCommand(KXEDocument *pDocument, TQDomNode &domNode)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_domNode = domNode; m_domNode = domNode;
@ -465,14 +465,14 @@ KXEDownCommand::~KXEDownCommand()
void KXEDownCommand::execute() void KXEDownCommand::execute()
{ {
QDomNode domNextSibling = m_domNode.nextSibling(); TQDomNode domNextSibling = m_domNode.nextSibling();
if ( domNextSibling.isNull() ) if ( domNextSibling.isNull() )
{ {
kdError() << "KXEDownCommand::execute selected node doesn't seem to have a next sibling." << endl; kdError() << "KXEDownCommand::execute selected node doesn't seem to have a next sibling." << endl;
return; return;
} }
QDomNode domNode = m_domParentNode.removeChild( m_domNode ); TQDomNode domNode = m_domParentNode.removeChild( m_domNode );
if ( domNode.isNull() ) if ( domNode.isNull() )
kdError() << "KXEDownCommand::execute can't remove child node." << endl; kdError() << "KXEDownCommand::execute can't remove child node." << endl;
else else
@ -489,14 +489,14 @@ void KXEDownCommand::execute()
void KXEDownCommand::unexecute() void KXEDownCommand::unexecute()
{ {
QDomNode domPrevSibling = m_domNode.previousSibling(); TQDomNode domPrevSibling = m_domNode.previousSibling();
if ( domPrevSibling.isNull() ) if ( domPrevSibling.isNull() )
{ {
kdError() << "KXEDownCommand::unexecute selected node doesn't seem to have a previous sibling." << endl; kdError() << "KXEDownCommand::unexecute selected node doesn't seem to have a previous sibling." << endl;
return; return;
} }
QDomNode domNode = m_domParentNode.removeChild( m_domNode ); TQDomNode domNode = m_domParentNode.removeChild( m_domNode );
if ( domNode.isNull() ) if ( domNode.isNull() )
kdError() << "KXEDownCommand::unexecute can't remove child node." << endl; kdError() << "KXEDownCommand::unexecute can't remove child node." << endl;
else else
@ -517,8 +517,8 @@ void KXEDownCommand::unexecute()
KXEEditCharDataCommand::KXEEditCharDataCommand( KXEEditCharDataCommand::KXEEditCharDataCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomCharacterData &domCharacterData, TQDomCharacterData &domCharacterData,
const QString strNewContents const TQString strNewContents
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -549,8 +549,8 @@ void KXEEditCharDataCommand::unexecute()
KXEEditProcInstrCommand::KXEEditProcInstrCommand( KXEEditProcInstrCommand::KXEEditProcInstrCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomProcessingInstruction &domProcInstr, TQDomProcessingInstruction &domProcInstr,
const QString strNewData const TQString strNewData
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -581,9 +581,9 @@ void KXEEditProcInstrCommand::unexecute()
KXEEditElementCommand::KXEEditElementCommand( KXEEditElementCommand::KXEEditElementCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement &domElement, TQDomElement &domElement,
const QString strNewPrefix, const TQString strNewPrefix,
const QString strNewName const TQString strNewName
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -627,8 +627,8 @@ void KXEEditElementCommand::unexecute()
KXEEditAttrValueCommand::KXEEditAttrValueCommand( KXEEditAttrValueCommand::KXEEditAttrValueCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
const QDomAttr &domAttr, const TQDomAttr &domAttr,
const QString strNewValue const TQString strNewValue
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -662,8 +662,8 @@ void KXEEditAttrValueCommand::unexecute()
KXEEditAttrNameCommand::KXEEditAttrNameCommand( KXEEditAttrNameCommand::KXEEditAttrNameCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
const QDomAttr &domOldAttr, const TQDomAttr &domOldAttr,
const QString strNewName const TQString strNewName
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -722,8 +722,8 @@ void KXEEditAttrNameCommand::unexecute()
KXEEditRawXmlCommand::KXEEditRawXmlCommand( KXEEditRawXmlCommand::KXEEditRawXmlCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement &domOldElement, TQDomElement &domOldElement,
QDomElement &domNewElement TQDomElement &domNewElement
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {

@ -21,7 +21,7 @@
#include <klocale.h> #include <klocale.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
/** /**
@file @file
@ -35,21 +35,21 @@ class KXEDeleteNodeCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEDeleteNodeCommand(KXEDocument*, QDomNode &); KXEDeleteNodeCommand(KXEDocument*, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXEDeleteNodeCommand(); ~KXEDeleteNodeCommand();
/** @brief Performs node removal.*/ /** @brief Performs node removal.*/
virtual void execute(); virtual void execute();
/** @brief Node removal rollback.*/ /** @brief Node removal rollback.*/
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Delete node"); } virtual TQString name() const { return i18n("Delete node"); }
protected: protected:
/** @short Stores infromation about parent node of the node to be deleted. */ /** @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. */ /** @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. */ /** @short Stores infromation about sibling node of the node to be deleted. */
QDomNode m_afterNode; TQDomNode m_afterNode;
}; };
/** /**
@short Command for removing element attributes. @short Command for removing element attributes.
@ -58,19 +58,19 @@ class KXEDeleteAttrCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEDeleteAttrCommand(KXEDocument*, QDomElement &, QDomAttr &); KXEDeleteAttrCommand(KXEDocument*, TQDomElement &, TQDomAttr &);
/** @brief Destructor */ /** @brief Destructor */
~KXEDeleteAttrCommand(); ~KXEDeleteAttrCommand();
/** @brief Preforms attributte removal. */ /** @brief Preforms attributte removal. */
virtual void execute(); virtual void execute();
/** @brief Attributte removal rollback. */ /** @brief Attributte removal rollback. */
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Delete attribute"); } virtual TQString name() const { return i18n("Delete attribute"); }
protected: protected:
/** @brief Stores attribute owner. */ /** @brief Stores attribute owner. */
QDomElement m_domOwnerElement; TQDomElement m_domOwnerElement;
/** @brief Attribute about to be removed. */ /** @brief Attribute about to be removed. */
QDomAttr m_domAttr; TQDomAttr m_domAttr;
}; };
/** /**
@ -80,15 +80,15 @@ class KXEDeleteAllAttribCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEDeleteAllAttribCommand(KXEDocument*, QDomElement &); KXEDeleteAllAttribCommand(KXEDocument*, TQDomElement &);
/** @brief Destructor */ /** @brief Destructor */
~KXEDeleteAllAttribCommand(); ~KXEDeleteAllAttribCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Delete all attributes"); } virtual TQString name() const { return i18n("Delete all attributes"); }
protected: protected:
QDomElement m_domOwnerElement; TQDomElement m_domOwnerElement;
QPtrList<QDomAttr> m_listRemovedAttributes; TQPtrList<TQDomAttr> m_listRemovedAttributes;
}; };
/** /**
@ -98,10 +98,10 @@ class KXECutCommand : public KXEDeleteNodeCommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXECutCommand(KXEDocument*, QDomNode &); KXECutCommand(KXEDocument*, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXECutCommand(); ~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: public:
/** @brief Constructor */ /** @brief Constructor */
KXEPasteToDocumentCommand(KXEDocument*, QDomDocument *, QDomElement &); KXEPasteToDocumentCommand(KXEDocument*, TQDomDocument *, TQDomElement &);
/** @brief Destructor */ /** @brief Destructor */
~KXEPasteToDocumentCommand(); ~KXEPasteToDocumentCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Paste node to document"); } virtual TQString name() const { return i18n("Paste node to document"); }
protected: protected:
QDomDocument * m_pDomTargetDoc; TQDomDocument * m_pDomTargetDoc;
QDomElement m_domSourceElement; TQDomElement m_domSourceElement;
}; };
/** /**
@ -129,47 +129,47 @@ class KXEPasteToElementCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEPasteToElementCommand(KXEDocument*, QDomElement &, QDomNode &); KXEPasteToElementCommand(KXEDocument*, TQDomElement &, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXEPasteToElementCommand(); ~KXEPasteToElementCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Paste node to element"); } virtual TQString name() const { return i18n("Paste node to element"); }
protected: protected:
QDomElement m_domTargetElement; TQDomElement m_domTargetElement;
QDomNode m_domSourceNode; TQDomNode m_domSourceNode;
}; };
class KXEPasteToProcInstrCommand : public KXECommand class KXEPasteToProcInstrCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEPasteToProcInstrCommand(KXEDocument*, QDomProcessingInstruction &, QDomProcessingInstruction &); KXEPasteToProcInstrCommand(KXEDocument*, TQDomProcessingInstruction &, TQDomProcessingInstruction &);
/** @brief Destructor */ /** @brief Destructor */
~KXEPasteToProcInstrCommand(); ~KXEPasteToProcInstrCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); 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: protected:
QDomProcessingInstruction m_domTargetProcInstr; TQDomProcessingInstruction m_domTargetProcInstr;
QString m_strNewData; TQString m_strNewData;
QString m_strOldData; TQString m_strOldData;
}; };
class KXEPasteToCharDataCommand : public KXECommand class KXEPasteToCharDataCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEPasteToCharDataCommand(KXEDocument*, QDomCharacterData &, QDomCharacterData &); KXEPasteToCharDataCommand(KXEDocument*, TQDomCharacterData &, TQDomCharacterData &);
/** @brief Destructor */ /** @brief Destructor */
~KXEPasteToCharDataCommand(); ~KXEPasteToCharDataCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); 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: protected:
QDomCharacterData m_domTargetCharData; TQDomCharacterData m_domTargetCharData;
QString m_strNewData; TQString m_strNewData;
QString m_strOldData; TQString m_strOldData;
}; };
/** /**
@ -179,16 +179,16 @@ class KXEDragDropMoveCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEDragDropMoveCommand(KXEDocument*, QDomElement &, QDomNode &); KXEDragDropMoveCommand(KXEDocument*, TQDomElement &, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXEDragDropMoveCommand(); ~KXEDragDropMoveCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Drag&&drop node"); } virtual TQString name() const { return i18n("Drag&&drop node"); }
protected: protected:
QDomElement m_domTargetElement; TQDomElement m_domTargetElement;
QDomNode m_domSourceNode; TQDomNode m_domSourceNode;
QDomNode m_domPreviousParentNode; TQDomNode m_domPreviousParentNode;
}; };
/** /**
@ -198,15 +198,15 @@ class KXEUpCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEUpCommand(KXEDocument*, QDomNode &); KXEUpCommand(KXEDocument*, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXEUpCommand(); ~KXEUpCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Move node up"); } virtual TQString name() const { return i18n("Move node up"); }
protected: protected:
QDomNode m_domParentNode; TQDomNode m_domParentNode;
QDomNode m_domNode; TQDomNode m_domNode;
}; };
/** /**
@ -216,31 +216,31 @@ class KXEDownCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEDownCommand(KXEDocument*, QDomNode &); KXEDownCommand(KXEDocument*, TQDomNode &);
/** @brief Destructor */ /** @brief Destructor */
~KXEDownCommand(); ~KXEDownCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Move node down"); } virtual TQString name() const { return i18n("Move node down"); }
protected: protected:
QDomNode m_domParentNode; TQDomNode m_domParentNode;
QDomNode m_domNode; TQDomNode m_domNode;
}; };
class KXEEditCharDataCommand : public KXECommand class KXEEditCharDataCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditCharDataCommand(KXEDocument*, QDomCharacterData &, const QString); KXEEditCharDataCommand(KXEDocument*, TQDomCharacterData &, const TQString);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditCharDataCommand(); ~KXEEditCharDataCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Editing character data"); } virtual TQString name() const { return i18n("Editing character data"); }
protected: protected:
QDomCharacterData m_domCharacterData; TQDomCharacterData m_domCharacterData;
QString m_strNewContents; TQString m_strNewContents;
QString m_strOldContents; TQString m_strOldContents;
}; };
/** /**
@ -250,16 +250,16 @@ class KXEEditProcInstrCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditProcInstrCommand(KXEDocument*, QDomProcessingInstruction &, const QString); KXEEditProcInstrCommand(KXEDocument*, TQDomProcessingInstruction &, const TQString);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditProcInstrCommand(); ~KXEEditProcInstrCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Editing proc. instruction"); } virtual TQString name() const { return i18n("Editing proc. instruction"); }
protected: protected:
QDomProcessingInstruction m_domProcInstr; TQDomProcessingInstruction m_domProcInstr;
QString m_strNewData; TQString m_strNewData;
QString m_strOldData; TQString m_strOldData;
}; };
/** /**
@ -269,18 +269,18 @@ class KXEEditElementCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditElementCommand(KXEDocument*, QDomElement &, const QString, const QString); KXEEditElementCommand(KXEDocument*, TQDomElement &, const TQString, const TQString);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditElementCommand(); ~KXEEditElementCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Editing element"); } virtual TQString name() const { return i18n("Editing element"); }
protected: protected:
QDomElement m_domElement; TQDomElement m_domElement;
QString m_strNewPrefix; TQString m_strNewPrefix;
QString m_strNewName; TQString m_strNewName;
QString m_strOldPrefix; TQString m_strOldPrefix;
QString m_strOldName; TQString m_strOldName;
}; };
/** /**
@ -290,16 +290,16 @@ class KXEEditAttrValueCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditAttrValueCommand(KXEDocument*, const QDomAttr &, const QString); KXEEditAttrValueCommand(KXEDocument*, const TQDomAttr &, const TQString);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditAttrValueCommand(); ~KXEEditAttrValueCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Edit attribute value"); } virtual TQString name() const { return i18n("Edit attribute value"); }
protected: protected:
QDomAttr m_domAttr; TQDomAttr m_domAttr;
QString m_strNewValue; TQString m_strNewValue;
QString m_strOldValue; TQString m_strOldValue;
}; };
/** /**
@ -309,18 +309,18 @@ class KXEEditAttrNameCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditAttrNameCommand(KXEDocument*, const QDomAttr &, const QString); KXEEditAttrNameCommand(KXEDocument*, const TQDomAttr &, const TQString);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditAttrNameCommand(); ~KXEEditAttrNameCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Edit attribute name"); } virtual TQString name() const { return i18n("Edit attribute name"); }
protected: protected:
QDomElement m_domOwnerElement; TQDomElement m_domOwnerElement;
QString m_strNewName; TQString m_strNewName;
QString m_strOldName; TQString m_strOldName;
QString m_strValue; TQString m_strValue;
QString m_strNamespaceURI; TQString m_strNamespaceURI;
}; };
/** /**
@ -330,17 +330,17 @@ class KXEEditRawXmlCommand : public KXECommand
{ {
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXEEditRawXmlCommand(KXEDocument*, QDomElement &, QDomElement &); KXEEditRawXmlCommand(KXEDocument*, TQDomElement &, TQDomElement &);
/** @brief Destructor */ /** @brief Destructor */
~KXEEditRawXmlCommand(); ~KXEEditRawXmlCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Editing raw XML"); } virtual TQString name() const { return i18n("Editing raw XML"); }
protected: protected:
QDomElement m_domOldElement; TQDomElement m_domOldElement;
QDomNode m_domParentNode; TQDomNode m_domParentNode;
QDomElement m_domNewElement; TQDomElement m_domNewElement;
QDomNode m_afterNode; TQDomNode m_afterNode;
}; };
#endif #endif

@ -15,14 +15,14 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include "commands_file.h" #include "commands_file.h"
#include <qstring.h> #include <tqstring.h>
#include <kurl.h> #include <kurl.h>
#include <kmessagebox.h> #include <kmessagebox.h>
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
/////////// Setting Version & Encoding ////////// /////////// 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) : KXECommand(pDocument)
{ {
m_strOldData = oldData; m_strOldData = oldData;
@ -47,7 +47,7 @@ void KXEVersionEncodingCommand::unexecute()
/////////// Attaching stylesheet ////////// /////////// Attaching stylesheet //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXEStylesheetAttachCommand::KXEStylesheetAttachCommand(KXEDocument* pDocument,const QString& prevStylesheet,const QString& newStylesheet) KXEStylesheetAttachCommand::KXEStylesheetAttachCommand(KXEDocument* pDocument,const TQString& prevStylesheet,const TQString& newStylesheet)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_strNewStylesheet = newStylesheet; m_strNewStylesheet = newStylesheet;
@ -75,7 +75,7 @@ void KXEStylesheetAttachCommand::unexecute()
/////////// Detaching Stylesheet ////////// /////////// Detaching Stylesheet //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXEStylesheetDetachCommand::KXEStylesheetDetachCommand(KXEDocument* pDocument,const QString& prevStylesheet) KXEStylesheetDetachCommand::KXEStylesheetDetachCommand(KXEDocument* pDocument,const TQString& prevStylesheet)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_strPrevStylesheet = prevStylesheet; m_strPrevStylesheet = prevStylesheet;
@ -100,14 +100,14 @@ void KXEStylesheetDetachCommand::unexecute()
/////////// Attaching Schema ////////// /////////// Attaching Schema //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema) KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_pDocument = pDocument; m_pDocument = pDocument;
m_strNewSchema = newSchema; m_strNewSchema = newSchema;
m_strPrevSchema = ""; m_strPrevSchema = "";
} }
KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema,const QString& prevSchema) KXESchemaAttachCommand::KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema,const TQString& prevSchema)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_strNewSchema = newSchema; m_strNewSchema = newSchema;
@ -135,7 +135,7 @@ void KXESchemaAttachCommand::unexecute()
/////////// Detaching schema ////////// /////////// Detaching schema //////////
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KXESchemaDetachCommand::KXESchemaDetachCommand(KXEDocument* pDocument, const QString& schema) KXESchemaDetachCommand::KXESchemaDetachCommand(KXEDocument* pDocument, const TQString& schema)
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
m_schema = schema; m_schema = schema;

@ -33,70 +33,70 @@ Command for setting version and encoding to XML file.
*/ */
class KXEDocument; class KXEDocument;
class QString; class TQString;
class KXEVersionEncodingCommand : public KXECommand class KXEVersionEncodingCommand : public KXECommand
{ {
public: public:
KXEVersionEncodingCommand(KXEDocument* pDocument, const QString& oldData, const QString &newData); KXEVersionEncodingCommand(KXEDocument* pDocument, const TQString& oldData, const TQString &newData);
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Changing version and encoding"); } virtual TQString name() const { return i18n("Changing version and encoding"); }
~KXEVersionEncodingCommand(); ~KXEVersionEncodingCommand();
protected: protected:
QString m_strOldData; TQString m_strOldData;
QString m_strNewData; TQString m_strNewData;
}; };
class KXEStylesheetAttachCommand : public KXECommand class KXEStylesheetAttachCommand : public KXECommand
{ {
public: public:
KXEStylesheetAttachCommand(KXEDocument* pDocument,const QString& prevStylesheet,const QString& newStylesheet); KXEStylesheetAttachCommand(KXEDocument* pDocument,const TQString& prevStylesheet,const TQString& newStylesheet);
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Attaching stylesheet ")+m_strNewStylesheet; } virtual TQString name() const { return i18n("Attaching stylesheet ")+m_strNewStylesheet; }
~KXEStylesheetAttachCommand(); ~KXEStylesheetAttachCommand();
protected: protected:
QString m_strPrevStylesheet; TQString m_strPrevStylesheet;
QString m_strNewStylesheet; TQString m_strNewStylesheet;
}; };
class KXEStylesheetDetachCommand : public KXECommand class KXEStylesheetDetachCommand : public KXECommand
{ {
public: public:
KXEStylesheetDetachCommand(KXEDocument* pDocument,const QString& prevStylesheet); KXEStylesheetDetachCommand(KXEDocument* pDocument,const TQString& prevStylesheet);
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Detaching stylesheet ")+m_strPrevStylesheet; } virtual TQString name() const { return i18n("Detaching stylesheet ")+m_strPrevStylesheet; }
~KXEStylesheetDetachCommand(); ~KXEStylesheetDetachCommand();
protected: protected:
QString m_strPrevStylesheet; TQString m_strPrevStylesheet;
}; };
class KXESchemaAttachCommand : public KXECommand class KXESchemaAttachCommand : public KXECommand
{ {
public: public:
KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema); KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema);
KXESchemaAttachCommand(KXEDocument *pDocument,const QString& newSchema, const QString& prevSchema); KXESchemaAttachCommand(KXEDocument *pDocument,const TQString& newSchema, const TQString& prevSchema);
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Attaching schema ")+m_strNewSchema; } virtual TQString name() const { return i18n("Attaching schema ")+m_strNewSchema; }
~KXESchemaAttachCommand(); ~KXESchemaAttachCommand();
protected: protected:
QString m_strNewSchema; TQString m_strNewSchema;
QString m_strPrevSchema; TQString m_strPrevSchema;
}; };
class KXESchemaDetachCommand : public KXECommand class KXESchemaDetachCommand : public KXECommand
{ {
public: public:
KXESchemaDetachCommand(KXEDocument* pDocument, const QString& schema); KXESchemaDetachCommand(KXEDocument* pDocument, const TQString& schema);
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Detaching schema ")+m_schema; } virtual TQString name() const { return i18n("Detaching schema ")+m_schema; }
~KXESchemaDetachCommand(); ~KXESchemaDetachCommand();
protected: protected:
QString m_schema; TQString m_schema;
}; };
#endif #endif

@ -16,7 +16,7 @@
***************************************************************************/ ***************************************************************************/
#include "commands_insert.h" #include "commands_insert.h"
#include <qstring.h> #include <tqstring.h>
#include <kdebug.h> #include <kdebug.h>
@ -26,10 +26,10 @@
KXEElementCommand::KXEElementCommand( KXEElementCommand::KXEElementCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomDocument * pDomDoc, TQDomDocument * pDomDoc,
QString strNsURI, TQString strNsURI,
QString strPrefix, TQString strPrefix,
QString strName TQString strName
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -46,10 +46,10 @@ KXEElementCommand::KXEElementCommand(
KXEElementCommand::KXEElementCommand( KXEElementCommand::KXEElementCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement & domParentElement, TQDomElement & domParentElement,
QString strNsURI, TQString strNsURI,
QString strPrefix, TQString strPrefix,
QString strName, TQString strName,
bool bAtTop bool bAtTop
) )
: KXECommand(pDocument) : KXECommand(pDocument)
@ -85,7 +85,7 @@ void KXEElementCommand::execute()
// Insert child element // Insert child element
if ( m_bAtTop ) if ( m_bAtTop )
{ // insert as first child { // insert as first child
QDomNode domFirstChildNode = m_domParentElement.firstChild(); TQDomNode domFirstChildNode = m_domParentElement.firstChild();
if ( domFirstChildNode.isNull() ) if ( domFirstChildNode.isNull() )
m_domParentElement.appendChild( m_domElement ); // no childs yet -> simply append m_domParentElement.appendChild( m_domElement ); // no childs yet -> simply append
else else
@ -118,10 +118,10 @@ void KXEElementCommand::unexecute()
KXEAttributeCommand::KXEAttributeCommand( KXEAttributeCommand::KXEAttributeCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement &domOwnerElement, TQDomElement &domOwnerElement,
QString strNamespace, TQString strNamespace,
QString strQName, TQString strQName,
QString strValue TQString strValue
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -167,10 +167,10 @@ void KXEAttributeCommand::unexecute()
KXECharDataCommand::KXECharDataCommand( KXECharDataCommand::KXECharDataCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement & domParentElement, TQDomElement & domParentElement,
bool bAtTop, bool bAtTop,
CharDataKind eCharDataKind, CharDataKind eCharDataKind,
QString strContents TQString strContents
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -211,7 +211,7 @@ void KXECharDataCommand::execute()
{ {
if ( m_bAtTop ) if ( m_bAtTop )
{ // insert as first child { // insert as first child
QDomNode domFirstChildNode = m_domParentElement.firstChild(); TQDomNode domFirstChildNode = m_domParentElement.firstChild();
if ( domFirstChildNode.isNull() ) if ( domFirstChildNode.isNull() )
m_domParentElement.appendChild( m_domCharData ); // no childs yet -> simply append m_domParentElement.appendChild( m_domCharData ); // no childs yet -> simply append
else else
@ -239,10 +239,10 @@ void KXECharDataCommand::unexecute()
KXEProcInstrCommand::KXEProcInstrCommand( KXEProcInstrCommand::KXEProcInstrCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomDocument * pDomDoc, TQDomDocument * pDomDoc,
bool bAtTop, bool bAtTop,
QString strTarget, TQString strTarget,
QString strData TQString strData
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -260,10 +260,10 @@ KXEProcInstrCommand::KXEProcInstrCommand(
KXEProcInstrCommand::KXEProcInstrCommand( KXEProcInstrCommand::KXEProcInstrCommand(
KXEDocument *pDocument, KXEDocument *pDocument,
QDomElement & domParentElement, TQDomElement & domParentElement,
bool bAtTop, bool bAtTop,
QString strTarget, TQString strTarget,
QString strData TQString strData
) )
: KXECommand(pDocument) : KXECommand(pDocument)
{ {
@ -299,7 +299,7 @@ void KXEProcInstrCommand::execute()
// Insert child proc. instr // Insert child proc. instr
if ( m_bAtTop ) if ( m_bAtTop )
{ // insert as first child { // insert as first child
QDomNode domFirstChildNode = m_domParentElement.firstChild(); TQDomNode domFirstChildNode = m_domParentElement.firstChild();
if ( domFirstChildNode.isNull() ) if ( domFirstChildNode.isNull() )
m_domParentElement.appendChild( m_domProcInstr ); // no childs yet -> simply append m_domParentElement.appendChild( m_domProcInstr ); // no childs yet -> simply append
else else

@ -28,67 +28,67 @@
class KXEElementCommand : public KXECommand class KXEElementCommand : public KXECommand
{ {
public: public:
KXEElementCommand(KXEDocument*, QDomDocument *, QString, QString, QString); KXEElementCommand(KXEDocument*, TQDomDocument *, TQString, TQString, TQString);
KXEElementCommand(KXEDocument*, QDomElement &, QString, QString, QString, bool); KXEElementCommand(KXEDocument*, TQDomElement &, TQString, TQString, TQString, bool);
~KXEElementCommand(); ~KXEElementCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Insert element"); } virtual TQString name() const { return i18n("Insert element"); }
protected: protected:
QDomDocument * m_pDomDoc; TQDomDocument * m_pDomDoc;
QDomElement m_domParentElement; TQDomElement m_domParentElement;
bool m_bAtTop; bool m_bAtTop;
QDomElement m_domElement; TQDomElement m_domElement;
}; };
class KXEAttributeCommand : public KXECommand class KXEAttributeCommand : public KXECommand
{ {
public: public:
KXEAttributeCommand(KXEDocument*, QDomElement &, QString, QString, QString); KXEAttributeCommand(KXEDocument*, TQDomElement &, TQString, TQString, TQString);
~KXEAttributeCommand(); ~KXEAttributeCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Insert attribute"); } virtual TQString name() const { return i18n("Insert attribute"); }
protected: protected:
QString m_strNamespace; TQString m_strNamespace;
QString m_strQName; TQString m_strQName;
QString m_strValue; TQString m_strValue;
QDomElement m_domOwnerElement; TQDomElement m_domOwnerElement;
}; };
class KXECharDataCommand : public KXECommand class KXECharDataCommand : public KXECommand
{ {
public: public:
KXECharDataCommand(KXEDocument*, QDomElement &, bool, CharDataKind, QString); KXECharDataCommand(KXEDocument*, TQDomElement &, bool, CharDataKind, TQString);
~KXECharDataCommand(); ~KXECharDataCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Insert char data"); } virtual TQString name() const { return i18n("Insert char data"); }
protected: protected:
bool m_bAtTop; bool m_bAtTop;
QDomElement m_domParentElement; TQDomElement m_domParentElement;
QDomCharacterData m_domCharData; TQDomCharacterData m_domCharData;
}; };
class KXEProcInstrCommand : public KXECommand class KXEProcInstrCommand : public KXECommand
{ {
public: public:
KXEProcInstrCommand(KXEDocument*, QDomDocument *, bool, QString, QString); KXEProcInstrCommand(KXEDocument*, TQDomDocument *, bool, TQString, TQString);
KXEProcInstrCommand(KXEDocument*, QDomElement &, bool, QString, QString); KXEProcInstrCommand(KXEDocument*, TQDomElement &, bool, TQString, TQString);
~KXEProcInstrCommand(); ~KXEProcInstrCommand();
virtual void execute(); virtual void execute();
virtual void unexecute(); virtual void unexecute();
virtual QString name() const { return i18n("Insert proc. instr."); } virtual TQString name() const { return i18n("Insert proc. instr."); }
protected: protected:
QDomDocument * m_pDomDoc; TQDomDocument * m_pDomDoc;
QDomElement m_domParentElement; TQDomElement m_domParentElement;
bool m_bAtTop; bool m_bAtTop;
QDomProcessingInstruction m_domProcInstr; TQDomProcessingInstruction m_domProcInstr;
}; };
#endif #endif

@ -19,24 +19,24 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// KXMLEditorPartIfaceReadOnly // KXMLEditorPartIfaceReadOnly
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
QString TQString
KXMLEditorPartIfaceReadOnly::saveAsFile(const QString & ) KXMLEditorPartIfaceReadOnly::saveAsFile(const TQString & )
{ {
return "Not implemented."; return "Not implemented.";
} }
QString TQString
KXMLEditorPartIfaceReadOnly::selectNode(const QString & szPathToNode) KXMLEditorPartIfaceReadOnly::selectNode(const TQString & szPathToNode)
{ {
m_pKXEPart->slotPathSelected(szPathToNode); m_pKXEPart->slotPathSelected(szPathToNode);
if ( m_pKXEPart->getSelectedPath() == szPathToNode ) if ( m_pKXEPart->getSelectedPath() == szPathToNode )
return "Selecting node failed."; return "Selecting node failed.";
return QString(); return TQString();
} }
QString TQString
KXMLEditorPartIfaceReadOnly::currentNode() const KXMLEditorPartIfaceReadOnly::currentNode() const
{ {
return m_pKXEPart->getSelectedPath(); return m_pKXEPart->getSelectedPath();
@ -46,20 +46,20 @@ KXMLEditorPartIfaceReadOnly::currentNode() const
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// KXMLEditorPartIface // KXMLEditorPartIface
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
QString TQString
KXMLEditorPartIfaceReadWrite::openURL(const QString & szURL) KXMLEditorPartIfaceReadWrite::openURL(const TQString & szURL)
{ {
KURL url(szURL); KURL url(szURL);
if (! url.isValid () ) if (! url.isValid () )
return "URL is not valid."; return "URL is not valid.";
if ( m_pKXEPart->openURL(url) ) if ( m_pKXEPart->openURL(url) )
return QString(); return TQString();
else else
return "Opening URL failed."; return "Opening URL failed.";
} }
QString TQString
KXMLEditorPartIfaceReadWrite::close() KXMLEditorPartIfaceReadWrite::close()
{ {
return "Not implemented."; return "Not implemented.";

@ -62,18 +62,18 @@ k_dcop:
* @returns Error description or empty string if file succesfully saved. * @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 /** Tries to change current node
* @param pathToNode Path to new node * @param pathToNode Path to new node
* @returns Empty string if selection OK otherwise error description * @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 path to current node
* @returns If error empty string * @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. * @returns Error description or empty string if file succesfully loaded.
**/ **/
QString openURL(const QString & szURL); TQString openURL(const TQString & szURL);
/** /**
* Closes object behind interface. * Closes object behind interface.
@ -115,7 +115,7 @@ k_dcop:
* *
* @returns Error description or empty string if program closed. * @returns Error description or empty string if program closed.
**/ **/
QString close(); TQString close();
}; };

@ -32,19 +32,19 @@
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kmessagebox.h> #include <kmessagebox.h>
// include files for Qt // include files for TQt
#include "qdom_add.h" #include "qdom_add.h"
#include <qheader.h> #include <tqheader.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qdom.h> #include <tqdom.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qevent.h> #include <tqevent.h>
static const int autoOpenTimeout = 750; 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), : KListView(pParent,pszName),
m_pGUIClient(pGUIClient), m_pGUIClient(pGUIClient),
m_nBookmarkedItems(0) m_nBookmarkedItems(0)
@ -53,10 +53,10 @@ KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent, const
addColumn(i18n("Qualified name")); addColumn(i18n("Qualified name"));
setSelectionMode(QListView::Single); setSelectionMode(TQListView::Single);
connect( this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); 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); setReadWrite(false);
@ -64,7 +64,7 @@ KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, QWidget * pParent, const
m_pCurrentBeforeDropItem = 0; m_pCurrentBeforeDropItem = 0;
m_pDropItem = 0; m_pDropItem = 0;
m_autoOpenTimer = new QTimer(this); m_autoOpenTimer = new TQTimer(this);
connect(m_autoOpenTimer, SIGNAL(timeout()), this, SLOT(slotAutoOpenFolder())); connect(m_autoOpenTimer, SIGNAL(timeout()), this, SLOT(slotAutoOpenFolder()));
// Apply current configuration // Apply current configuration
@ -136,7 +136,7 @@ void KXE_TreeView::editDeselect()
void KXE_TreeView::viewNodeUp() void KXE_TreeView::viewNodeUp()
{ {
// get selected item from tree view // get selected item from tree view
QListViewItem * pSelItem = selectedItem(); TQListViewItem * pSelItem = selectedItem();
if ( ! pSelItem ) if ( ! pSelItem )
{ {
kdDebug() << "KXE_TreeView::slotViewNodeUp no item selected" << endl; kdDebug() << "KXE_TreeView::slotViewNodeUp no item selected" << endl;
@ -144,7 +144,7 @@ void KXE_TreeView::viewNodeUp()
} }
// get parent item // get parent item
QListViewItem * pParentItem = pSelItem->parent(); TQListViewItem * pParentItem = pSelItem->parent();
// select parent item in tree view // select parent item in tree view
if (pParentItem) if (pParentItem)
@ -157,7 +157,7 @@ void KXE_TreeView::viewNodeUp()
void KXE_TreeView::viewExpNode( int nLevel ) void KXE_TreeView::viewExpNode( int nLevel )
{ {
// get selected item from tree view (if any) // get selected item from tree view (if any)
QListViewItem * pSelItem = selectedItem(); TQListViewItem * pSelItem = selectedItem();
if ( ! pSelItem ) if ( ! pSelItem )
{ {
kdDebug() << "KXE_TreeView::slotViewExpNode no item selected" << endl; kdDebug() << "KXE_TreeView::slotViewExpNode no item selected" << endl;
@ -172,7 +172,7 @@ void KXE_TreeView::viewExpNode( int nLevel )
void KXE_TreeView::viewColNode( int nLevel ) void KXE_TreeView::viewColNode( int nLevel )
{ {
// get selected item from tree view (if any) // get selected item from tree view (if any)
QListViewItem * pSelItem = selectedItem(); TQListViewItem * pSelItem = selectedItem();
if ( ! pSelItem ) if ( ! pSelItem )
{ {
kdDebug() << "KXE_TreeView::slotViewColNode no item selected" << endl; kdDebug() << "KXE_TreeView::slotViewColNode no item selected" << endl;
@ -213,7 +213,7 @@ void KXE_TreeView::bookmarksPrev()
KXE_TreeViewItem * pSelItem = static_cast <KXE_TreeViewItem*> (selectedItem()); KXE_TreeViewItem * pSelItem = static_cast <KXE_TreeViewItem*> (selectedItem());
if ( ! pSelItem ) // If there is no item selected we take if ( ! pSelItem ) // If there is no item selected we take
{ // the last root items last grand child. { // 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 while ( pTmpItem->nextSibling() ) // find last child by
pTmpItem = pTmpItem->nextSibling(); // traversing all childs pTmpItem = pTmpItem->nextSibling(); // traversing all childs
@ -283,7 +283,7 @@ void KXE_TreeView::selectItem( KXE_TreeViewItem * const pItem )
ensureItemVisible( pItem ); ensureItemVisible( pItem );
} }
bool KXE_TreeView::selectNode( const QDomNode & node ) bool KXE_TreeView::selectNode( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -303,10 +303,10 @@ bool KXE_TreeView::selectNode( const QDomNode & node )
return true; return true;
} }
QDomNode * KXE_TreeView::getSelectedNode() const TQDomNode * KXE_TreeView::getSelectedNode() const
{ {
// get selected item from tree view // get selected item from tree view
QListViewItem * pSelItem = selectedItem(); TQListViewItem * pSelItem = selectedItem();
if ( ! pSelItem ) if ( ! pSelItem )
return 0; return 0;
@ -314,14 +314,14 @@ QDomNode * KXE_TreeView::getSelectedNode() const
return pSelTreeItem->xmlNode(); 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()); KXE_TreeViewItem * pTreeItem = static_cast<KXE_TreeViewItem*> (firstChild());
while ( pTreeItem ) while ( pTreeItem )
{ {
if (pTreeItem->xmlNode()->isProcessingInstruction()) if (pTreeItem->xmlNode()->isProcessingInstruction())
{ {
QDomProcessingInstruction domProcInstr = pTreeItem->xmlNode()->toProcessingInstruction(); TQDomProcessingInstruction domProcInstr = pTreeItem->xmlNode()->toProcessingInstruction();
if(domProcInstr.target() == target) if(domProcInstr.target() == target)
return pTreeItem->xmlNode(); 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 // get selected item from tree view
QListViewItem * pSelItem = selectedItem(); TQListViewItem * pSelItem = selectedItem();
if ( ! pSelItem ) if ( ! pSelItem )
return QString(); return TQString();
KXE_TreeViewItem * pSelTreeItem = static_cast <KXE_TreeViewItem *> (pSelItem); KXE_TreeViewItem * pSelTreeItem = static_cast <KXE_TreeViewItem *> (pSelItem);
return domTool_getPath( * pSelTreeItem->xmlNode() ); return domTool_getPath( * pSelTreeItem->xmlNode() );
} }
void KXE_TreeView::contentsMousePressEvent( QMouseEvent * pEvent ) void KXE_TreeView::contentsMousePressEvent( TQMouseEvent * pEvent )
{ {
KListView::contentsMousePressEvent(pEvent); KListView::contentsMousePressEvent(pEvent);
if ( pEvent->button() == RightButton ) if ( pEvent->button() == RightButton )
{ {
QString szMenuName; TQString szMenuName;
QListViewItem * pItem = itemAt( contentsToViewport(pEvent->pos()) ); TQListViewItem * pItem = itemAt( contentsToViewport(pEvent->pos()) );
if (pItem) if (pItem)
{ {
KXE_TreeViewItem * pTreeItem = static_cast <KXE_TreeViewItem*> (pItem); KXE_TreeViewItem * pTreeItem = static_cast <KXE_TreeViewItem*> (pItem);
switch( pTreeItem->xmlNode()->nodeType() ) switch( pTreeItem->xmlNode()->nodeType() )
{ {
case QDomNode::ElementNode: case TQDomNode::ElementNode:
szMenuName = "popupXmlElement"; szMenuName = "popupXmlElement";
break; break;
case QDomNode::TextNode: case TQDomNode::TextNode:
case QDomNode::CDATASectionNode: case TQDomNode::CDATASectionNode:
case QDomNode::CommentNode: case TQDomNode::CommentNode:
szMenuName = "popupXmlContent"; szMenuName = "popupXmlContent";
break; break;
case QDomNode::ProcessingInstructionNode: case TQDomNode::ProcessingInstructionNode:
szMenuName = "popupXmlProcInstr"; szMenuName = "popupXmlProcInstr";
break; break;
default: default:
@ -394,13 +394,13 @@ void KXE_TreeView::contentsMousePressEvent( QMouseEvent * pEvent )
else else
szMenuName = "popupXmlTree"; szMenuName = "popupXmlTree";
emit sigContextMenuRequested( szMenuName, QCursor::pos() ); emit sigContextMenuRequested( szMenuName, TQCursor::pos() );
return; return;
} }
//--- Drag & Drop ------------------------------------------------------ //--- Drag & Drop ------------------------------------------------------
QPoint p(contentsToViewport(pEvent->pos())); TQPoint p(contentsToViewport(pEvent->pos()));
QListViewItem *i = itemAt(p); TQListViewItem *i = itemAt(p);
if(pEvent->button() == LeftButton && i) if(pEvent->button() == LeftButton && i)
{ // if the user clicked into the root decoration of the item, don't try to start a drag! { // 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()); emit sigSelectionCleared(hasRootNode());
else else
{ {
QDomNode selectedNode = * ( pItem->xmlNode() ); // uses QDomNode copy constructor TQDomNode selectedNode = * ( pItem->xmlNode() ); // uses TQDomNode copy constructor
// choose appropriate object kind // choose appropriate object kind
switch ( selectedNode.nodeType() ) switch ( selectedNode.nodeType() )
{ {
case QDomNode::ElementNode: case TQDomNode::ElementNode:
emit sigSelectionChanged( selectedNode.toElement()); emit sigSelectionChanged( selectedNode.toElement());
break; break;
case QDomNode::TextNode: case TQDomNode::TextNode:
case QDomNode::CDATASectionNode: case TQDomNode::CDATASectionNode:
case QDomNode::CommentNode: case TQDomNode::CommentNode:
emit sigSelectionChanged( selectedNode.toCharacterData()); emit sigSelectionChanged( selectedNode.toCharacterData());
break; break;
case QDomNode::ProcessingInstructionNode: case TQDomNode::ProcessingInstructionNode:
emit sigSelectionChanged( selectedNode.toProcessingInstruction()); emit sigSelectionChanged( selectedNode.toProcessingInstruction());
break; 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); KXE_TreeViewItem * pTreeViewItem = static_cast<KXE_TreeViewItem*> (pItem);
pTreeViewItem->ensureGrandChildItemsCreated(); pTreeViewItem->ensureGrandChildItemsCreated();
@ -460,7 +460,7 @@ void KXE_TreeView::slotItemExpanded( QListViewItem * pItem )
// update slots // update slots
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
void KXE_TreeView::updateNodeCreated( const QDomNode & node ) void KXE_TreeView::updateNodeCreated( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -476,7 +476,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node )
if (node.isProcessingInstruction()) if (node.isProcessingInstruction())
// Tree looks much nicer if root processing instructions are ont the top... // Tree looks much nicer if root processing instructions are ont the top...
{ {
QDomNode *pNode = getSpecProcInstrNode("xml"); TQDomNode *pNode = getSpecProcInstrNode("xml");
if (pNode) if (pNode)
pNewItem = new KXE_TreeViewItem( node, this,findCorrespondingItem(*pNode)); pNewItem = new KXE_TreeViewItem( node, this,findCorrespondingItem(*pNode));
else 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. // 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. // 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()); KXE_TreeViewItem * pParentItem = static_cast<KXE_TreeViewItem*> (selectedItem());
if ( (!pParentItem) || ( *(pParentItem->xmlNode()) != parentNode ) ) 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, // 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. // because, the new item has to be inserted behind the given one.
QDomNode prevNode = node.previousSibling(); TQDomNode prevNode = node.previousSibling();
if ( prevNode.isNull() ) if ( prevNode.isNull() )
{ // it seems to be the first child node, so create a first child item { // it seems to be the first child node, so create a first child item
pNewItem = new KXE_TreeViewItem( node, pParentItem ); pNewItem = new KXE_TreeViewItem( node, pParentItem );
@ -538,7 +538,7 @@ void KXE_TreeView::updateNodeCreated( const QDomNode & node )
ensureItemVisible( pNewItem ); ensureItemVisible( pNewItem );
} }
void KXE_TreeView::updateNodeChanged( const QDomNode & node ) void KXE_TreeView::updateNodeChanged( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -564,7 +564,7 @@ void KXE_TreeView::updateNodeChanged( const QDomNode & node )
ensureItemVisible( pItem ); ensureItemVisible( pItem );
} }
void KXE_TreeView::updateNodeDeleted( const QDomNode & node ) void KXE_TreeView::updateNodeDeleted( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -591,7 +591,7 @@ void KXE_TreeView::updateNodeDeleted( const QDomNode & node )
emit sigSelectionCleared(hasRootNode()); emit sigSelectionCleared(hasRootNode());
} }
void KXE_TreeView::updateNodeMoved( const QDomNode & node ) void KXE_TreeView::updateNodeMoved( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -661,7 +661,7 @@ void KXE_TreeView::updateClear()
clear(); clear();
} }
void KXE_TreeView::rename( QListViewItem * pItem, int nColumn ) void KXE_TreeView::rename( TQListViewItem * pItem, int nColumn )
{ {
if ( nColumn != 0 ) // inplace editing only if ( nColumn != 0 ) // inplace editing only
return; // for the first column return; // for the first column
@ -681,7 +681,7 @@ void KXE_TreeView::rename( QListViewItem * pItem, int nColumn )
// misc functions // 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()); KXE_TreeViewItem * pItem = static_cast<KXE_TreeViewItem*> (firstChild());
while ( pItem ) while ( pItem )
@ -699,7 +699,7 @@ KXE_TreeViewItem * KXE_TreeView::findCorrespondingItem( const QDomNode & node )
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
/** Overrides KListView::contentsMouseMoveEvent */ /** Overrides KListView::contentsMouseMoveEvent */
void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e) void KXE_TreeView::contentsMouseMoveEvent(TQMouseEvent *e)
{ {
KListView::contentsMouseMoveEvent(e); KListView::contentsMouseMoveEvent(e);
@ -712,20 +712,20 @@ void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e)
m_bDrag = false; m_bDrag = false;
QListViewItem *item = itemAt(contentsToViewport(m_dragPos)); TQListViewItem *item = itemAt(contentsToViewport(m_dragPos));
if(!item || !item->isSelectable()) if(!item || !item->isSelectable())
return; return;
// copy item into clipboard // copy item into clipboard
KXE_TreeViewItem *pXmlTreeItem = static_cast <KXE_TreeViewItem *> (item); 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 // Start a drag
const QPixmap *pix = item->pixmap(0); const TQPixmap *pix = item->pixmap(0);
if(pix && pDrag->pixmap().isNull()) 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); pDrag->setPixmap(*pix, hotspot);
} }
@ -733,14 +733,14 @@ void KXE_TreeView::contentsMouseMoveEvent(QMouseEvent *e)
} }
/** Overrides KListView::contentsMouseReleaseEvent */ /** Overrides KListView::contentsMouseReleaseEvent */
void KXE_TreeView::contentsMouseReleaseEvent(QMouseEvent *e) void KXE_TreeView::contentsMouseReleaseEvent(TQMouseEvent *e)
{ {
KListView::contentsMouseReleaseEvent(e); KListView::contentsMouseReleaseEvent(e);
m_bDrag = false; m_bDrag = false;
} }
/** Overrides QScrollView::contentsDragEnterEvent */ /** Overrides TQScrollView::contentsDragEnterEvent */
void KXE_TreeView::contentsDragEnterEvent(QDragEnterEvent *e) void KXE_TreeView::contentsDragEnterEvent(TQDragEnterEvent *e)
{ {
m_pDropItem = 0; m_pDropItem = 0;
m_pCurrentBeforeDropItem = selectedItem(); m_pCurrentBeforeDropItem = selectedItem();
@ -754,10 +754,10 @@ void KXE_TreeView::contentsDragEnterEvent(QDragEnterEvent *e)
} }
} }
/** Overrides QScrollView::contentsDragMoveEvent */ /** Overrides TQScrollView::contentsDragMoveEvent */
void KXE_TreeView::contentsDragMoveEvent(QDragMoveEvent *e) 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 // Accept drops on the background, if Texts
if(!item && (m_lstDropFormats.contains("text/"))) if(!item && (m_lstDropFormats.contains("text/")))
@ -786,8 +786,8 @@ void KXE_TreeView::contentsDragMoveEvent(QDragMoveEvent *e)
} }
} }
/** Overrides QScrollView::contentsDragLeaveEvent */ /** Overrides TQScrollView::contentsDragLeaveEvent */
void KXE_TreeView::contentsDragLeaveEvent(QDragLeaveEvent *e) void KXE_TreeView::contentsDragLeaveEvent(TQDragLeaveEvent *e)
{ {
e=e; e=e;
// Restore the current item to what it was before the dragging (#17070) // 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(); m_lstDropFormats.clear();
} }
/** Overrides QScrollView::contentsDropEvent */ /** Overrides TQScrollView::contentsDropEvent */
void KXE_TreeView::contentsDropEvent(QDropEvent *pDropEvent) void KXE_TreeView::contentsDropEvent(TQDropEvent *pDropEvent)
{ {
m_autoOpenTimer->stop(); m_autoOpenTimer->stop();
@ -822,16 +822,16 @@ void KXE_TreeView::slotAutoOpenFolder()
} }
/** Drop or paste text into item */ /** 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; KXE_TreeViewItem* pTreeItem = 0;
if(pItem) if(pItem)
pTreeItem = static_cast <KXE_TreeViewItem *> (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 // 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 { // make check, if moved item is not moved to itself
if(m_pCurrentBeforeDropItem && pTreeItem && (m_pCurrentBeforeDropItem == pTreeItem)) if(m_pCurrentBeforeDropItem && pTreeItem && (m_pCurrentBeforeDropItem == pTreeItem))
{ return false; { return false;
@ -849,10 +849,10 @@ bool KXE_TreeView::drop(QListViewItem *pItem, QDropEvent *pDropEvent)
return false; return false;
} }
QDomNode * pNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); TQDomNode * pNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode();
if (pNode->isProcessingInstruction()) if (pNode->isProcessingInstruction())
{ {
QDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); TQDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction();
if(domProcInstr.target() == "xml") if(domProcInstr.target() == "xml")
{ KMessageBox::sorry(0, i18n("This processing instruction cannot be moved !")); { 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 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 // remove source item
QDomNode * pSourceNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode(); TQDomNode * pSourceNode = static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->xmlNode();
QDomElement domTargetElement = pTargetNode->toElement(); TQDomElement domTargetElement = pTargetNode->toElement();
if((dynamic_cast <KXMLEditorPart *> (m_pGUIClient))->dropMoveNode(domTargetElement, *pSourceNode)) 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() KXE_TreeViewItem* KXE_TreeView::lastChild()
{ {
QListViewItem* pItem = firstChild(); TQListViewItem* pItem = firstChild();
if (pItem && pItem->nextSibling()) if (pItem && pItem->nextSibling())
do do
pItem = pItem->nextSibling(); pItem = pItem->nextSibling();
@ -902,7 +902,7 @@ KXE_TreeViewItem* KXE_TreeView::lastChild()
return (KXE_TreeViewItem*) pItem; return (KXE_TreeViewItem*) pItem;
} }
void KXE_TreeView::keyPressEvent(QKeyEvent *e) void KXE_TreeView::keyPressEvent(TQKeyEvent *e)
{ {
KListView::keyPressEvent(e); KListView::keyPressEvent(e);
emit sigKeyPressed(e); emit sigKeyPressed(e);

@ -19,19 +19,19 @@
#define KXE_TREEVIEW_H #define KXE_TREEVIEW_H
#include <klistview.h> #include <klistview.h>
#include <qstrlist.h> #include <tqstrlist.h>
class KXESearchDialog; class KXESearchDialog;
class QDomDocument; class TQDomDocument;
class QDomNode; class TQDomNode;
class QDomElement; class TQDomElement;
class QDomCharacterData; class TQDomCharacterData;
class QDomProcessingInstruction; class TQDomProcessingInstruction;
class QMouseEvent; class TQMouseEvent;
class QTimer; class TQTimer;
class QKeyEvent; class TQKeyEvent;
class KXMLGUIClient; class KXMLGUIClient;
class KXE_TreeViewItem; class KXE_TreeViewItem;
@ -44,7 +44,7 @@ class KXE_TreeView : public KListView
Q_OBJECT Q_OBJECT
public: 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. */ /** Changes the behaviour of this view to readonly or readwrite. */
void setReadWrite( bool fReadWrite ); void setReadWrite( bool fReadWrite );
@ -54,22 +54,22 @@ public:
/** Selects the item corresponding to the given node. /** Selects the item corresponding to the given node.
* Returns true on success, false otherwise. */ * 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). */ /** 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). */ /** 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. */ /** 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. */ /** Returns true, if this tree view contains bookmarked tree items and false otherwise. */
bool containsBookmarkedItems() const { return (m_nBookmarkedItems>0); } bool containsBookmarkedItems() const { return (m_nBookmarkedItems>0); }
/** Drop or paste text into item */ /** Drop or paste text into item */
bool drop(QListViewItem *, QDropEvent *); bool drop(TQListViewItem *, TQDropEvent *);
/** toggles bookmark on the selected item */ /** toggles bookmark on the selected item */
void bookmarksToggle(); void bookmarksToggle();
@ -96,16 +96,16 @@ public:
* Creates new item(s) to the given node (and its child nodes) * Creates new item(s) to the given node (and its child nodes)
* and inserts it (or them) in the tree. * 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. */ /** 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. */ /** 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. */ /** Moves the item corresponding to the given node. */
void updateNodeMoved( const QDomNode & node ); void updateNodeMoved( const TQDomNode & node );
/** Clears the whole tree. */ /** Clears the whole tree. */
void updateClear(); void updateClear();
@ -117,7 +117,7 @@ public:
* class functionality is used and the signal * class functionality is used and the signal
* @ref sigItemRenamedInplace emitted. * @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 */ /** Returns info, is root element is already created */
bool hasRootNode(); bool hasRootNode();
@ -140,13 +140,13 @@ signals:
void sigSelectionCleared(bool); void sigSelectionCleared(bool);
/** emitted, when an XML element item is selected */ /** emitted, when an XML element item is selected */
void sigSelectionChanged( const QDomElement & ); void sigSelectionChanged( const TQDomElement & );
/** emitted, when an XML Content item is selected */ /** 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 */ /** emitted, when an XML proc.instr. item is selected */
void sigSelectionChanged( const QDomProcessingInstruction & ); void sigSelectionChanged( const TQDomProcessingInstruction & );
/** /**
* Signals the change of bookmark status. * Signals the change of bookmark status.
@ -156,35 +156,35 @@ signals:
void sigNewBookmarkStatus( bool fStatus ); void sigNewBookmarkStatus( bool fStatus );
/** Emitted, when a context menu is requested */ /** 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. */ /** Emitted when user presses a key. */
void sigKeyPressed(QKeyEvent* e); void sigKeyPressed(TQKeyEvent* e);
protected: protected:
/** if RMB shows the popupmenu corresponding to the selected item */ /** 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. */ /** Finds the corresponding treeview item to the given node. */
KXE_TreeViewItem * findCorrespondingItem( const QDomNode & node ); KXE_TreeViewItem * findCorrespondingItem( const TQDomNode & node );
/** Overrides KListView::contentsMouseReleaseEvent */ /** Overrides KListView::contentsMouseReleaseEvent */
void contentsMouseReleaseEvent(QMouseEvent *); void contentsMouseReleaseEvent(TQMouseEvent *);
/** Overrides KListView::contentsMouseMoveEvent */ /** Overrides KListView::contentsMouseMoveEvent */
void contentsMouseMoveEvent(QMouseEvent *); void contentsMouseMoveEvent(TQMouseEvent *);
/** Overrides QScrollView::contentsDragEnterEvent */ /** Overrides TQScrollView::contentsDragEnterEvent */
void contentsDragEnterEvent(QDragEnterEvent *); void contentsDragEnterEvent(TQDragEnterEvent *);
/** Overrides QScrollView::contentsDragMoveEvent */ /** Overrides TQScrollView::contentsDragMoveEvent */
void contentsDragMoveEvent(QDragMoveEvent *); void contentsDragMoveEvent(TQDragMoveEvent *);
/** Overrides QScrollView::contentsDragLeaveEvent */ /** Overrides TQScrollView::contentsDragLeaveEvent */
void contentsDragLeaveEvent(QDragLeaveEvent *); void contentsDragLeaveEvent(TQDragLeaveEvent *);
/** Overrides QScrollView::contentsDropEvent */ /** Overrides TQScrollView::contentsDropEvent */
void contentsDropEvent(QDropEvent *); void contentsDropEvent(TQDropEvent *);
virtual void keyPressEvent(QKeyEvent *e); virtual void keyPressEvent(TQKeyEvent *e);
protected slots: protected slots:
/** Checks, which type of item was selected an emits the corresponding signal. */ /** 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 * because KXMLEditor could have been in "create items on demand" mode during
* the opening of the document. * 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: private slots:
@ -217,19 +217,19 @@ protected:
bool m_bDrag; bool m_bDrag;
/** Contain mouse position of drag operation */ /** Contain mouse position of drag operation */
QPoint m_dragPos; TQPoint m_dragPos;
/** The item that was current before the drag-enter event happened */ /** 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) */ /** The item we are moving the mouse over (during a drag) */
QListViewItem *m_pDropItem; TQListViewItem *m_pDropItem;
/** List of avalilable drop formats */ /** List of avalilable drop formats */
QStrList m_lstDropFormats; TQStrList m_lstDropFormats;
/** Timer for counting time to auto open fselected folder while drag */ /** Timer for counting time to auto open fselected folder while drag */
QTimer *m_autoOpenTimer; TQTimer *m_autoOpenTimer;
}; };
#endif #endif

@ -23,14 +23,14 @@
#include "qdom_add.h" #include "qdom_add.h"
#include <qregexp.h> #include <tqregexp.h>
#include <klistview.h> #include <klistview.h>
#include <kdebug.h> #include <kdebug.h>
#include <kiconloader.h> #include <kiconloader.h>
KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent ) KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent )
: QListViewItem(pParent), : TQListViewItem(pParent),
m_xmlNode(xmlNode), m_xmlNode(xmlNode),
m_pPrevSibling(0), m_pPrevSibling(0),
m_bBookmarked(false), m_bBookmarked(false),
@ -41,8 +41,8 @@ KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pP
initChilds(); initChilds();
} }
KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParent, QListViewItem* pAfter) KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, KListView * pParent, TQListViewItem* pAfter)
: QListViewItem(pParent,pAfter), : TQListViewItem(pParent,pAfter),
m_xmlNode(xmlNode), m_xmlNode(xmlNode),
m_pPrevSibling(0), m_pPrevSibling(0),
m_bBookmarked(false), m_bBookmarked(false),
@ -53,8 +53,8 @@ KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParen
initChilds(); initChilds();
} }
KXE_TreeViewItem::KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent, QListViewItem * pAfter ) KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent, TQListViewItem * pAfter )
: QListViewItem( pParent, pAfter ), : TQListViewItem( pParent, pAfter ),
m_xmlNode(xmlNode), m_xmlNode(xmlNode),
m_pPrevSibling(0), m_pPrevSibling(0),
m_bBookmarked(false), m_bBookmarked(false),
@ -98,16 +98,16 @@ void KXE_TreeViewItem::setTexts()
{ {
switch ( m_xmlNode.nodeType() ) switch ( m_xmlNode.nodeType() )
{ {
case QDomNode::ElementNode: case TQDomNode::ElementNode:
setText( 0, m_xmlNode.toElement().nodeName() ); setText( 0, m_xmlNode.toElement().nodeName() );
if ( KXMLEditorFactory::configuration()->treeview()->elemDisplMode() == KXETreeViewSettings::NoAttributes ) if ( KXMLEditorFactory::configuration()->treeview()->elemDisplMode() == KXETreeViewSettings::NoAttributes )
setText( 1, QString() ); setText( 1, TQString() );
else else
{ {
// parse all attributes to fill the second column // parse all attributes to fill the second column
QString str2ndCol; TQString str2ndCol;
for ( uint i=0; i < m_xmlNode.toElement().attributes().length(); i++ ) for ( uint i=0; i < m_xmlNode.toElement().attributes().length(); i++ )
{ {
if ( i > 0 ) if ( i > 0 )
@ -120,15 +120,15 @@ void KXE_TreeViewItem::setTexts()
} }
break; break;
case QDomNode::TextNode: case TQDomNode::TextNode:
case QDomNode::CDATASectionNode: case TQDomNode::CDATASectionNode:
case QDomNode::CommentNode: case TQDomNode::CommentNode:
{ {
// set name // set name
QString strText = m_xmlNode.toCharacterData().data(); TQString strText = m_xmlNode.toCharacterData().data();
strText = strText.replace( QRegExp("\n"), " " ); // replace every newline by a space strText = strText.replace( TQRegExp("\n"), " " ); // replace every newline by a space
strText = strText.replace( QRegExp("\t"), "" ); // removes every tab strText = strText.replace( TQRegExp("\t"), "" ); // removes every tab
strText = strText.replace( QRegExp("\r"), "" ); // removes every return strText = strText.replace( TQRegExp("\r"), "" ); // removes every return
strText = strText.simplifyWhiteSpace(); strText = strText.simplifyWhiteSpace();
if( strText.length() > 30 ) // reduce name length, if necessary if( strText.length() > 30 ) // reduce name length, if necessary
strText = strText.left(30) + "..."; strText = strText.left(30) + "...";
@ -137,7 +137,7 @@ void KXE_TreeViewItem::setTexts()
break; break;
} }
case QDomNode::ProcessingInstructionNode: case TQDomNode::ProcessingInstructionNode:
setText( 0, m_xmlNode.toProcessingInstruction().target() ); setText( 0, m_xmlNode.toProcessingInstruction().target() );
break; break;
@ -169,12 +169,12 @@ bool KXE_TreeViewItem::toggleBookmark()
KXE_TreeViewItem * KXE_TreeViewItem::lastChild() const KXE_TreeViewItem * KXE_TreeViewItem::lastChild() const
{ {
// take the first child // take the first child
QListViewItem * pTmpItem = firstChild(); TQListViewItem * pTmpItem = firstChild();
// if there are no childs return 0 // if there are no childs return 0
if ( ! pTmpItem ) if ( ! pTmpItem )
return 0; return 0;
QListViewItem * pTmpItem2; TQListViewItem * pTmpItem2;
while ( (pTmpItem2 = pTmpItem->nextSibling()) != 0 ) // traversing all childs while ( (pTmpItem2 = pTmpItem->nextSibling()) != 0 ) // traversing all childs
{ {
pTmpItem = pTmpItem2; pTmpItem = pTmpItem2;
@ -200,7 +200,7 @@ KXE_TreeViewItem * KXE_TreeViewItem::prevItem()
KXE_TreeViewItem * KXE_TreeViewItem::nextItem() KXE_TreeViewItem * KXE_TreeViewItem::nextItem()
{ {
// checking for a child // checking for a child
QListViewItem * pTmp = firstChild(); TQListViewItem * pTmp = firstChild();
if (pTmp) if (pTmp)
return static_cast <KXE_TreeViewItem*> (pTmp); return static_cast <KXE_TreeViewItem*> (pTmp);
@ -210,7 +210,7 @@ KXE_TreeViewItem * KXE_TreeViewItem::nextItem()
return static_cast <KXE_TreeViewItem*> (pTmp); return static_cast <KXE_TreeViewItem*> (pTmp);
// there is no next sibling -> checking for parents' next sibling(s) // there is no next sibling -> checking for parents' next sibling(s)
QListViewItem * pParent = parent(); TQListViewItem * pParent = parent();
while (pParent) while (pParent)
{ {
pTmp = pParent->nextSibling(); pTmp = pParent->nextSibling();
@ -286,7 +286,7 @@ void KXE_TreeViewItem::ensureChildItemsCreated()
{ {
if ( ! m_bChildsCreated ) if ( ! m_bChildsCreated )
{ {
QDomNode tmpNode = m_xmlNode.lastChild(); TQDomNode tmpNode = m_xmlNode.lastChild();
while ( ! tmpNode.isNull() ) while ( ! tmpNode.isNull() )
{ {
@ -326,5 +326,5 @@ void KXE_TreeViewItem::startRename( int iCol )
// we can start renaming in-place. // we can start renaming in-place.
// Remember: This function is only reached for items representing XML elements. // Remember: This function is only reached for items representing XML elements.
if ( (reinterpret_cast<KListView*> ( listView() ))->isRenameable( iCol ) ) if ( (reinterpret_cast<KListView*> ( listView() ))->isRenameable( iCol ) )
QListViewItem::startRename( iCol ); TQListViewItem::startRename( iCol );
} }

@ -18,24 +18,24 @@
#ifndef KXE_TREEVIEWITEM_H #ifndef KXE_TREEVIEWITEM_H
#define KXE_TREEVIEWITEM_H #define KXE_TREEVIEWITEM_H
#include <qlistview.h> #include <tqlistview.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qdom.h> #include <tqdom.h>
class KListView; 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 * @short tree item
* @author The KXMLEditor Team * @author The KXMLEditor Team
*/ */
class KXE_TreeViewItem : public QListViewItem class KXE_TreeViewItem : public TQListViewItem
{ {
public: public:
KXE_TreeViewItem( const QDomNode & xmlNode, KListView * pParent, QListViewItem* pAfter=NULL); KXE_TreeViewItem( const TQDomNode & xmlNode, KListView * pParent, TQListViewItem* pAfter=NULL);
KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent ); KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent );
KXE_TreeViewItem( const QDomNode & xmlNode, QListViewItem * pParent, QListViewItem * pAfter ); KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent, TQListViewItem * pAfter );
~KXE_TreeViewItem(); ~KXE_TreeViewItem();
/** /**
@ -47,7 +47,7 @@ class KXE_TreeViewItem : public QListViewItem
void setTexts(); void setTexts();
/** Returns the corresponding XML node, e.g. the XML node represented by this tree item. */ /** 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). */ /** Returns true, if this tree item is bookmarked (false otherwise). */
bool isBookmarked() const { return m_bBookmarked; } bool isBookmarked() const { return m_bBookmarked; }
@ -65,7 +65,7 @@ class KXE_TreeViewItem : public QListViewItem
KXE_TreeViewItem * prevSibling() const { return m_pPrevSibling; } 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. * Returns this items previous siblings last grand child, if there is one.
* Otherwise it returns this items previous sibling or, * Otherwise it returns this items previous sibling or,
* if there are no sibling above, it returns this items parent 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(); 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. * 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, * This will be it's first child,
* if there are no childs, it will be the next sibling * if there are no childs, it will be the next sibling
@ -110,7 +110,7 @@ class KXE_TreeViewItem : public QListViewItem
protected: protected:
QDomNode m_xmlNode; TQDomNode m_xmlNode;
KXE_TreeViewItem * m_pPrevSibling; KXE_TreeViewItem * m_pPrevSibling;
bool m_bBookmarked; bool m_bBookmarked;
bool m_bChildsCreated; bool m_bChildsCreated;

@ -23,8 +23,8 @@
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <klocale.h>
KXE_ViewAttributes::KXE_ViewAttributes( QWidget * pParent, const char * pszName ) KXE_ViewAttributes::KXE_ViewAttributes( TQWidget * pParent, const char * pszName )
: QTable( 0, 3, pParent, pszName ) : TQTable( 0, 3, pParent, pszName )
{ {
horizontalHeader()->setLabel( 0, i18n("Namespace") ); horizontalHeader()->setLabel( 0, i18n("Namespace") );
horizontalHeader()->setLabel( 1, i18n("Name") ); 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)) ); connect( this, SIGNAL(valueChanged(int,int)), this, SLOT(slotItemRenamedInplace(int,int)) );
} }
QDomAttr KXE_ViewAttributes::getSelectedAttribute() const TQDomAttr KXE_ViewAttributes::getSelectedAttribute() const
{ {
if ( currentRow() == -1 ) if ( currentRow() == -1 )
return QDomAttr(); return TQDomAttr();
if ( m_domElement.attributes().item(currentRow()).isAttr() ) if ( m_domElement.attributes().item(currentRow()).isAttr() )
{ {
return m_domElement.attributes().item(currentRow()).toAttr(); return m_domElement.attributes().item(currentRow()).toAttr();
} }
else else
return QDomAttr(); return TQDomAttr();
} }
void KXE_ViewAttributes::setReadWrite( bool fReadWrite ) void KXE_ViewAttributes::setReadWrite( bool fReadWrite )
@ -56,19 +56,19 @@ void KXE_ViewAttributes::setReadWrite( bool fReadWrite )
setColumnReadOnly( 2, ! fReadWrite ); setColumnReadOnly( 2, ! fReadWrite );
if ( 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 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; nCol = nCol;
QString szMenuName = ( nRow == -1 ) ? "popupXmlAttributes" : "popupXmlAttribute"; TQString szMenuName = ( nRow == -1 ) ? "popupXmlAttributes" : "popupXmlAttribute";
emit sigContextMenuRequested( szMenuName, pos ); emit sigContextMenuRequested( szMenuName, pos );
} }
void KXE_ViewAttributes::slotChange( const QDomElement & element ) void KXE_ViewAttributes::slotChange( const TQDomElement & element )
{ {
m_domElement = element; m_domElement = element;
@ -79,7 +79,7 @@ void KXE_ViewAttributes::slotChange( const QDomElement & element )
{ {
for ( uint iRow = 0; iRow < iLength; iRow++ ) for ( uint iRow = 0; iRow < iLength; iRow++ )
{ {
QDomNode node = m_domElement.attributes().item(iRow); TQDomNode node = m_domElement.attributes().item(iRow);
if ( node.isAttr() ) if ( node.isAttr() )
{ {
setText( iRow, 0, node.toAttr().namespaceURI() ); setText( iRow, 0, node.toAttr().namespaceURI() );
@ -105,12 +105,12 @@ void KXE_ViewAttributes::slotItemRenamedInplace( int nRow, int nCol )
return; return;
} }
QDomNode node = m_domElement.attributes().item(nRow); TQDomNode node = m_domElement.attributes().item(nRow);
if ( node.isAttr() ) if ( node.isAttr() )
{ if (nCol == 1) { if (nCol == 1)
{ {
// check if name is OK // check if name is OK
QString strMessage = KXEAttributeDialog::checkName(text(nRow,nCol)); TQString strMessage = KXEAttributeDialog::checkName(text(nRow,nCol));
if(strMessage.length() > 0) if(strMessage.length() > 0)
{ {
// restore old name // 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 if ( node.toAttr().value() != text(nRow,nCol) ) // only if the value really was changed
{ {
// check if value is OK // check if value is OK
QString strMessage = KXEAttributeDialog::checkValue(text(nRow,nCol)); TQString strMessage = KXEAttributeDialog::checkValue(text(nRow,nCol));
if(strMessage.length() > 0) if(strMessage.length() > 0)
{ {
// restore old value // restore old value

@ -18,22 +18,22 @@
#ifndef KXE_VIEWATTRIBUTES_H #ifndef KXE_VIEWATTRIBUTES_H
#define KXE_VIEWATTRIBUTES_H #define KXE_VIEWATTRIBUTES_H
#include <qtable.h> #include <tqtable.h>
#include <qdom.h> #include <tqdom.h>
/** /**
* @author The KXMLEditor Team * @author The KXMLEditor Team
*/ */
class KXE_ViewAttributes : public QTable class KXE_ViewAttributes : public TQTable
{ {
Q_OBJECT Q_OBJECT
public: 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. */ /** 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. */ /** Changes the behaviour of this view to readonly or readwrite. */
void setReadWrite( bool fReadWrite ); void setReadWrite( bool fReadWrite );
@ -41,17 +41,17 @@ class KXE_ViewAttributes : public QTable
public slots: public slots:
/** Changes/Rebuilds the whole table according to the given element's attributes. */ /** Changes/Rebuilds the whole table according to the given element's attributes. */
void slotChange( const QDomElement & element ); void slotChange( const TQDomElement & element );
protected: protected:
/** the currently selected node */ /** the currently selected node */
QDomElement m_domElement; TQDomElement m_domElement;
protected slots: protected slots:
/** Called, when a context menu was requested (connected to @ref QTable::contextMenuRequested). */ /** Called, when a context menu was requested (connected to @ref TQTable::contextMenuRequested). */
void slotContextMenuRequested( int nRow, int nCol, const QPoint & pos ); void slotContextMenuRequested( int nRow, int nCol, const TQPoint & pos );
/** Called, when an item was changed via inplace editing. */ /** Called, when an item was changed via inplace editing. */
void slotItemRenamedInplace( int nRow, int nCol ); void slotItemRenamedInplace( int nRow, int nCol );
@ -59,13 +59,13 @@ class KXE_ViewAttributes : public QTable
signals: signals:
/** Emitted, when a context menu is requested */ /** 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. */ /** 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. */ /** Emitted, when an attributes value was renamed via inplace editing. */
void sigAttributeValueChangedInplace( const QDomAttr &, const QString ); void sigAttributeValueChangedInplace( const TQDomAttr &, const TQString );
}; };
#endif #endif

@ -26,37 +26,37 @@
#include <kconfig.h> #include <kconfig.h>
#include <ktextedit.h> #include <ktextedit.h>
#include <qdom.h> #include <tqdom.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qpalette.h> #include <tqpalette.h>
#include "qdom_add.h" #include "qdom_add.h"
#define CONFIG_SPLITTER_SIZES "View Element splitter sizes" #define CONFIG_SPLITTER_SIZES "View Element splitter sizes"
KXE_ViewElement::KXE_ViewElement( QWidget * pParent, KConfig *pConfig, const char * pszName ) KXE_ViewElement::KXE_ViewElement( TQWidget * pParent, KConfig *pConfig, const char * pszName )
: QSplitter( Qt::Vertical, pParent, pszName ) : TQSplitter( TQt::Vertical, pParent, pszName )
{ {
setOpaqueResize(true); setOpaqueResize(true);
m_pConfig = pConfig; m_pConfig = pConfig;
m_pViewAttributes = new KXE_ViewAttributes( this, "table of element attributes"); 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(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)), this, SIGNAL(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)) );
connect( m_pViewAttributes, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)), this, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)) ); 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 = new KTextEdit( this, "plain XML" );
m_pViewPlainXML->setReadOnly(true); m_pViewPlainXML->setReadOnly(true);
m_pViewPlainXML->setTextFormat(KTextEdit::PlainText); m_pViewPlainXML->setTextFormat(KTextEdit::PlainText);
m_pViewPlainXML->setPaletteBackgroundColor(pParent->palette().active().base()); // Owerwrite read-only background color 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); m_pSyntaxHighlighter = new KXESyntaxHighlighter(m_pViewPlainXML);
// configuring splitter sizes // configuring splitter sizes
if (m_pConfig) if (m_pConfig)
{ {
QValueList<int> list = m_pConfig->readIntListEntry(CONFIG_SPLITTER_SIZES); TQValueList<int> list = m_pConfig->readIntListEntry(CONFIG_SPLITTER_SIZES);
if (!list.isEmpty()) if (!list.isEmpty())
setSizes(list); setSizes(list);
} }
@ -76,7 +76,7 @@ KXE_ViewElement::~KXE_ViewElement()
delete m_pSyntaxHighlighter; delete m_pSyntaxHighlighter;
} }
QDomAttr KXE_ViewElement::getSelectedAttribute() const TQDomAttr KXE_ViewElement::getSelectedAttribute() const
{ {
return m_pViewAttributes->getSelectedAttribute(); return m_pViewAttributes->getSelectedAttribute();
} }
@ -86,7 +86,7 @@ void KXE_ViewElement::setReadWrite( bool fReadWrite )
m_pViewAttributes->setReadWrite(fReadWrite); m_pViewAttributes->setReadWrite(fReadWrite);
} }
void KXE_ViewElement::slotChange( const QDomElement & element ) void KXE_ViewElement::slotChange( const TQDomElement & element )
{ {
// change attribute view // change attribute view
m_pViewAttributes->slotChange(element); m_pViewAttributes->slotChange(element);
@ -113,13 +113,13 @@ void KXE_ViewElement::slotTextViewSettingsChanged()
if(KXMLEditorFactory::configuration()->textview()->isWrapOn()) if(KXMLEditorFactory::configuration()->textview()->isWrapOn())
{ {
m_pViewPlainXML->setHScrollBarMode(QScrollView::AlwaysOff); m_pViewPlainXML->setHScrollBarMode(TQScrollView::AlwaysOff);
m_pViewPlainXML->setWordWrap(QTextEdit::WidgetWidth); m_pViewPlainXML->setWordWrap(TQTextEdit::WidgetWidth);
} }
else else
{ {
m_pViewPlainXML->setHScrollBarMode(QScrollView::Auto); m_pViewPlainXML->setHScrollBarMode(TQScrollView::Auto);
m_pViewPlainXML->setWordWrap(QTextEdit::NoWrap); m_pViewPlainXML->setWordWrap(TQTextEdit::NoWrap);
} }
m_pSyntaxHighlighter->rehighlight(); m_pSyntaxHighlighter->rehighlight();

@ -18,9 +18,9 @@
#ifndef KXE_VIEWELEMENT_H #ifndef KXE_VIEWELEMENT_H
#define KXE_VIEWELEMENT_H #define KXE_VIEWELEMENT_H
#include <qsplitter.h> #include <tqsplitter.h>
#include <qdom.h> #include <tqdom.h>
// forward declarations // forward declarations
class KXE_ViewAttributes; class KXE_ViewAttributes;
@ -35,17 +35,17 @@ class KXESyntaxHighlighter;
* *
* @short Widget for XML elements. * @short Widget for XML elements.
*/ */
class KXE_ViewElement : public QSplitter class KXE_ViewElement : public TQSplitter
{ {
Q_OBJECT Q_OBJECT
public: public:
KXE_ViewElement( QWidget * pParent, KConfig *pConfig, const char * pszName = 0 ); KXE_ViewElement( TQWidget * pParent, KConfig *pConfig, const char * pszName = 0 );
~KXE_ViewElement(); ~KXE_ViewElement();
/** Returns a pointer to the currently selected attribute or a null pointer. */ /** 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. */ /** Changes the behaviour of this view to readonly or readwrite. */
void setReadWrite( bool fReadWrite ); void setReadWrite( bool fReadWrite );
@ -53,7 +53,7 @@ class KXE_ViewElement : public QSplitter
public slots: public slots:
/** Changes/Rebuilds the whole widget according to the given element. */ /** Changes/Rebuilds the whole widget according to the given element. */
void slotChange( const QDomElement & ); void slotChange( const TQDomElement & );
/** /**
* Changes syntax highlighting colors. * Changes syntax highlighting colors.
@ -76,19 +76,19 @@ class KXE_ViewElement : public QSplitter
signals: signals:
/** Emitted, when a context menu is requested (see @ref KXE_ViewAttributes::sigContextMenuRequested) */ /** 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 * Emitted, when an attributes name was renamed via inplace editing
* (see @ref KXE_ViewAttributes::sigAttributeChangedInplace). * (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 * Emitted, when an attributes value was renamed via inplace editing
* (see @ref KXE_ViewAttributes::sigAttributeChangedInplace). * (see @ref KXE_ViewAttributes::sigAttributeChangedInplace).
*/ */
void sigAttributeValueChangedInplace( const QDomAttr &, const QString ); void sigAttributeValueChangedInplace( const TQDomAttr &, const TQString );
}; };
#endif #endif

@ -21,14 +21,14 @@
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
#include <qframe.h> #include <tqframe.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#define CONF_ENTRY_NAME_EXTS_TARGZ "Extensions" #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 ), : KXESettings( "TarGz Extensions", pParent, pszName ),
m_pDialogPage(0) m_pDialogPage(0)
{ {
@ -46,22 +46,22 @@ void KXEArchiveExtsSettings::read( const KConfig * pConfig )
m_lstExtensions = pConfig->readListEntry( CONF_ENTRY_NAME_EXTS_TARGZ ); m_lstExtensions = pConfig->readListEntry( CONF_ENTRY_NAME_EXTS_TARGZ );
} }
QString KXEArchiveExtsSettings::dialogPageName() const TQString KXEArchiveExtsSettings::dialogPageName() const
{ {
return i18n( "Archive Extensions" ); return i18n( "Archive Extensions" );
} }
QString KXEArchiveExtsSettings::dialogPageHeader() const TQString KXEArchiveExtsSettings::dialogPageHeader() const
{ {
return i18n( "Specify Archive Extensions" ); return i18n( "Specify Archive Extensions" );
} }
QString KXEArchiveExtsSettings::dialogPageIcon() const TQString KXEArchiveExtsSettings::dialogPageIcon() const
{ {
return "filetypes"; return "filetypes";
} }
QWidget * KXEArchiveExtsSettings::dialogPage( QFrame * pParent ) TQWidget * KXEArchiveExtsSettings::dialogPage( TQFrame * pParent )
{ {
if ( ! m_pDialogPage ) if ( ! m_pDialogPage )
{ {
@ -71,10 +71,10 @@ QWidget * KXEArchiveExtsSettings::dialogPage( QFrame * pParent )
// and fill its widgets with the corresponding values // and fill its widgets with the corresponding values
updatePage(); 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_pBtnNew, SIGNAL(clicked()), this, SLOT(slotPageAddExtension()) );
connect( m_pDialogPage->m_pBtnDelete, SIGNAL(clicked()), this, SLOT(slotPageDeleteExtension()) ); 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_pBtnNew, SIGNAL(clicked()), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pBtnDelete, 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 ) if ( m_pDialogPage )
{ {
m_lstExtensions.clear(); m_lstExtensions.clear();
QListBoxItem * pTmpItem = m_pDialogPage->m_pExtensions->firstItem(); TQListBoxItem * pTmpItem = m_pDialogPage->m_pExtensions->firstItem();
while ( pTmpItem ) while ( pTmpItem )
{ {
m_lstExtensions << pTmpItem->text(); m_lstExtensions << pTmpItem->text();
@ -113,7 +113,7 @@ void KXEArchiveExtsSettings::updatePage() const
// additional slots for the corresponding configuration dialog page // // 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->setText( strText );
m_pDialogPage->m_pExtension->setEnabled( true ); m_pDialogPage->m_pExtension->setEnabled( true );
@ -142,7 +142,7 @@ void KXEArchiveExtsSettings::slotPageDeleteExtension()
m_pDialogPage->m_pExtensions->setSelected( m_pDialogPage->m_pExtensions->currentItem(), true ); 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 ) && if ( ( m_pDialogPage->m_pExtensions->count() > 0 ) &&
( m_pDialogPage->m_pExtensions->currentText() != m_pDialogPage->m_pExtension->text() ) ) ( m_pDialogPage->m_pExtensions->currentText() != m_pDialogPage->m_pExtension->text() ) )

@ -20,7 +20,7 @@
#include "kxesettings.h" #include "kxesettings.h"
#include <qstringlist.h> #include <tqstringlist.h>
class KXEArchiveExtsSettingsPage; class KXEArchiveExtsSettingsPage;
@ -36,27 +36,27 @@ class KXEArchiveExtsSettings : public KXESettings
public: 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. // 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 * Derived from @ref KXESettings
*/ */
virtual QString dialogPageName() const; virtual TQString dialogPageName() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageHeader() const; virtual TQString dialogPageHeader() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageIcon() const; virtual TQString dialogPageIcon() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QWidget * dialogPage( QFrame * pParent ); virtual TQWidget * dialogPage( TQFrame * pParent );
protected: protected:
@ -78,7 +78,7 @@ class KXEArchiveExtsSettings : public KXESettings
virtual void updatePage() const; virtual void updatePage() const;
// the settings itself // the settings itself
QStringList m_lstExtensions; TQStringList m_lstExtensions;
/** /**
* the corresponding configuration dialog page * the corresponding configuration dialog page
@ -94,7 +94,7 @@ class KXEArchiveExtsSettings : public KXESettings
/** /**
* Copies the selected item's extension to the editline. * 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. * 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. * Copies the lineedit's current text to the currently selected item.
*/ */
void slotPageUpdateExtension( const QString & ); void slotPageUpdateExtension( const TQString & );
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEArchiveExtsSettingsPage</class> <class>KXEArchiveExtsSettingsPage</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KXEArchiveExtsSettingsPage</cstring> <cstring>KXEArchiveExtsSettingsPage</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblExtensions</cstring> <cstring>m_pLblExtensions</cstring>
</property> </property>
@ -36,7 +36,7 @@ This list contains the known extensions for archive files.&lt;br&gt;
You can choose one to edit or remove it with the dialog widgets below.</string> You can choose one to edit or remove it with the dialog widgets below.</string>
</property> </property>
</widget> </widget>
<widget class="QListBox" row="1" column="0"> <widget class="TQListBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pExtensions</cstring> <cstring>m_pExtensions</cstring>
</property> </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> This list contains the known extensions for archive files.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0"> <widget class="TQLayoutWidget" row="2" column="0">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -60,7 +60,7 @@ This list contains the known extensions for archive files.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblExtension</cstring> <cstring>m_pLblExtension</cstring>
</property> </property>
@ -76,7 +76,7 @@ This list contains the known extensions for archive files.</string>
Change the selected extension here.</string> Change the selected extension here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="0" column="1"> <widget class="TQLineEdit" row="0" column="1">
<property name="name"> <property name="name">
<cstring>m_pExtension</cstring> <cstring>m_pExtension</cstring>
</property> </property>
@ -103,7 +103,7 @@ Change the selected extension here.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -111,7 +111,7 @@ Change the selected extension here.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnNew</cstring> <cstring>m_pBtnNew</cstring>
</property> </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> You can create a new item for another known extension in the list above.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnDelete</cstring> <cstring>m_pBtnDelete</cstring>
</property> </property>
@ -167,7 +167,7 @@ You can delete the selected extension from the list above.</string>
</grid> </grid>
</widget> </widget>
<slots> <slots>
<slot>slotUpdateExtension( const QString &amp; )</slot> <slot>slotUpdateExtension( const TQString &amp; )</slot>
<slot>slotDeleteExtension()</slot> <slot>slotDeleteExtension()</slot>
<slot>slotAddExtension()</slot> <slot>slotAddExtension()</slot>
</slots> </slots>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEAttachDialogBase</class> <class>KXEAttachDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXEAttachDialogBase</cstring> <cstring>KXEAttachDialogBase</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>Label</cstring> <cstring>Label</cstring>
</property> </property>
@ -35,7 +35,7 @@
<cstring>attachURI</cstring> <cstring>attachURI</cstring>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -49,7 +49,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonHelp</cstring> <cstring>buttonHelp</cstring>
</property> </property>
@ -80,7 +80,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -97,7 +97,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>

@ -21,15 +21,15 @@
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <klocale.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlabel.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 ) : KXEAttributeDialogBase( pParent, pszName, fModal, fl )
{ {
connect( m_pEditNamespace, SIGNAL(textChanged(const QString &)), this, SLOT(slotNamespaceChanged(const QString &)) ); connect( m_pEditNamespace, SIGNAL(textChanged(const TQString &)), this, SLOT(slotNamespaceChanged(const TQString &)) );
connect( m_pEditQName, SIGNAL(textChanged(const QString &)), this, SLOT(slotNameChanged(const QString &)) ); connect( m_pEditQName, SIGNAL(textChanged(const TQString &)), this, SLOT(slotNameChanged(const TQString &)) );
connect( m_pEditValue, SIGNAL(textChanged(const QString &)), this, SLOT(slotValueChanged(const QString &)) ); connect( m_pEditValue, SIGNAL(textChanged(const TQString &)), this, SLOT(slotValueChanged(const TQString &)) );
} }
void KXEAttributeDialog::clearDialog() void KXEAttributeDialog::clearDialog()
@ -59,9 +59,9 @@ int KXEAttributeDialog::exec()
return iReturn; 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()) if(strMessage.isEmpty())
{ {
strMessage = checkNamespace(m_pEditNamespace->text()); strMessage = checkNamespace(m_pEditNamespace->text());
@ -77,9 +77,9 @@ void KXEAttributeDialog::slotNameChanged(const QString & strNewName)
m_pBtnOK->setEnabled(true); 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()) if(strMessage.isEmpty())
{ {
strMessage = checkNamespace(m_pEditNamespace->text()); strMessage = checkNamespace(m_pEditNamespace->text());
@ -95,9 +95,9 @@ void KXEAttributeDialog::slotValueChanged(const QString & strNewValue)
m_pBtnOK->setEnabled(true); 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()) if(strMessage.isEmpty())
{ {
strMessage = checkNamespace(strNewNamespace); strMessage = checkNamespace(strNewNamespace);
@ -114,7 +114,7 @@ void KXEAttributeDialog::slotNamespaceChanged(const QString & strNewNamespace)
} }
// Check, if XML attribute name is OK // Check, if XML attribute name is OK
QString KXEAttributeDialog::checkNamespace(const QString strAtttributeName) TQString KXEAttributeDialog::checkNamespace(const TQString strAtttributeName)
{ {
if(strAtttributeName.length() == 0) if(strAtttributeName.length() == 0)
return ""; return "";
@ -124,10 +124,10 @@ QString KXEAttributeDialog::checkNamespace(const QString strAtttributeName)
return i18n("Atttribute namespace cannot contain space !"); return i18n("Atttribute namespace cannot contain space !");
// Forbidden characters // Forbidden characters
QString strForbiddenChars("<>\"'"); TQString strForbiddenChars("<>\"'");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strAtttributeName.find(ch) >= 0) if(strAtttributeName.find(ch) >= 0)
return i18n("Atttribute namespace cannot contain character: %1 !").arg(ch); 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 // Check, if XML attribute name is OK
QString KXEAttributeDialog::checkName(const QString strAtttributeName) TQString KXEAttributeDialog::checkName(const TQString strAtttributeName)
{ {
if(strAtttributeName.length() == 0) if(strAtttributeName.length() == 0)
return ""; return "";
@ -147,10 +147,10 @@ QString KXEAttributeDialog::checkName(const QString strAtttributeName)
return i18n("Atttribute name cannot contain space !"); return i18n("Atttribute name cannot contain space !");
// Forbidden characters // Forbidden characters
QString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); TQString strForbiddenChars("&@#$%^()%+?=:<>;\"'*");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strAtttributeName.find(ch) >= 0) if(strAtttributeName.find(ch) >= 0)
return i18n("Atttribute name cannot contain character: %1 !").arg(ch); 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 // Check, if XML attribute value is OK
QString KXEAttributeDialog::checkValue(const QString strData) TQString KXEAttributeDialog::checkValue(const TQString strData)
{ {
if(strData.length() == 0) if(strData.length() == 0)
return ""; return "";
// Forbidden characters // Forbidden characters
QString strForbiddenChars("<>\""); TQString strForbiddenChars("<>\"");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strData.find(ch) >= 0) if(strData.find(ch) >= 0)
return i18n("Attribute value cannot contain character: %1 !").arg(ch); return i18n("Attribute value cannot contain character: %1 !").arg(ch);

@ -20,23 +20,23 @@
#include "kxeattributedialogbase.h" #include "kxeattributedialogbase.h"
#include <qdom.h> #include <tqdom.h>
class KXEAttributeDialog : public KXEAttributeDialogBase class KXEAttributeDialog : public KXEAttributeDialogBase
{ {
Q_OBJECT Q_OBJECT
public: 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 TQString attributeNamespace() const { return m_strNamespace; }
const QString QName() const { return m_strQName; } const TQString QName() const { return m_strQName; }
const QString Value() const { return m_strValue; } const TQString Value() const { return m_strValue; }
/** /**
* To be used for adding an attribute to new XML element. * To be used for adding an attribute to new XML element.
* *
* @return see @ref QDialog::exec * @return see @ref TQDialog::exec
*/ */
int exec( ); int exec( );
@ -46,37 +46,37 @@ class KXEAttributeDialog : public KXEAttributeDialogBase
void clearDialog(); void clearDialog();
// Check, if XML attribute name is OK // Check, if XML attribute name is OK
static QString checkName(const QString); static TQString checkName(const TQString);
// Check, if XML attribute value is OK // Check, if XML attribute value is OK
static QString checkValue(const QString); static TQString checkValue(const TQString);
// Check, if XML attribute namespace is OK // Check, if XML attribute namespace is OK
static QString checkNamespace(const QString); static TQString checkNamespace(const TQString);
protected slots: protected slots:
/** /**
* Called, when user change attribute name. * Called, when user change attribute name.
* Disables the OK button, if user input is wrong or incomplete. * 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. * Called, when user change attribute value.
* Disables the OK button, if user input is wrong or incomplete. * 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. * Called, when user change attribute namespace.
* Disables the OK button, if user input is wrong or incomplete. * Disables the OK button, if user input is wrong or incomplete.
*/ */
void slotNamespaceChanged(const QString &); void slotNamespaceChanged(const TQString &);
protected: protected:
QString m_strNamespace; TQString m_strNamespace;
QString m_strQName; TQString m_strQName;
QString m_strValue; TQString m_strValue;
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEAttributeDialogBase</class> <class>KXEAttributeDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXEAttributeDialogBase</cstring> <cstring>KXEAttributeDialogBase</cstring>
</property> </property>
@ -79,7 +79,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLineEdit" row="1" column="0"> <widget class="TQLineEdit" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditNamespace</cstring> <cstring>m_pEditNamespace</cstring>
</property> </property>
@ -89,7 +89,7 @@
Enter the namespace URI for this attribute here.</string> Enter the namespace URI for this attribute here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="5" column="0"> <widget class="TQLineEdit" row="5" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditValue</cstring> <cstring>m_pEditValue</cstring>
</property> </property>
@ -99,7 +99,7 @@ Enter the namespace URI for this attribute here.</string>
Enter the attribute's value here.</string> Enter the attribute's value here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="0"> <widget class="TQLineEdit" row="3" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditQName</cstring> <cstring>m_pEditQName</cstring>
</property> </property>
@ -109,7 +109,7 @@ Enter the attribute's value here.</string>
Enter a qualified name for the attribute here.</string> Enter a qualified name for the attribute here.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -140,7 +140,7 @@ Enter a qualified name for the attribute here.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnOK</cstring> <cstring>m_pBtnOK</cstring>
</property> </property>
@ -157,7 +157,7 @@ Enter a qualified name for the attribute here.</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnCancel</cstring> <cstring>m_pBtnCancel</cstring>
</property> </property>
@ -173,7 +173,7 @@ Enter a qualified name for the attribute here.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblValue</cstring> <cstring>m_pLblValue</cstring>
</property> </property>
@ -189,7 +189,7 @@ Enter a qualified name for the attribute here.</string>
Enter the attribute's value here.</string> Enter the attribute's value here.</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblQName</cstring> <cstring>m_pLblQName</cstring>
</property> </property>
@ -205,7 +205,7 @@ Enter the attribute's value here.</string>
Enter a qualified name for the attribute here.</string> Enter a qualified name for the attribute here.</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblNamespace</cstring> <cstring>m_pLblNamespace</cstring>
</property> </property>
@ -221,7 +221,7 @@ Enter a qualified name for the attribute here.</string>
Enter the namespace URI for this attribute here.</string> Enter the namespace URI for this attribute here.</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="6" column="0"> <widget class="TQLabel" row="6" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabelMessage</cstring> <cstring>m_pTextLabelMessage</cstring>
</property> </property>

@ -17,15 +17,15 @@
#include "kxechardatadialog.h" #include "kxechardatadialog.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qtextedit.h> #include <tqtextedit.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.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 ) : KXECharDataDialogBase( pParent, pszName, fModal, fl )
{ {
connect( m_pEditData, SIGNAL(textChanged()), this, SLOT(slotDataChanged()) ); connect( m_pEditData, SIGNAL(textChanged()), this, SLOT(slotDataChanged()) );
@ -82,7 +82,7 @@ int KXECharDataDialog::exec()
void KXECharDataDialog::slotDataChanged() void KXECharDataDialog::slotDataChanged()
{ {
QString strMessage = checkContents(m_pEditData->text()); TQString strMessage = checkContents(m_pEditData->text());
m_pTextLabelMessage->setText(strMessage); m_pTextLabelMessage->setText(strMessage);
@ -93,22 +93,22 @@ void KXECharDataDialog::slotDataChanged()
} }
// Check, if XML chardata contents is OK // Check, if XML chardata contents is OK
QString KXECharDataDialog::checkContents(const QString strData) TQString KXECharDataDialog::checkContents(const TQString strData)
{ {
if(strData.length() == 0) if(strData.length() == 0)
return ""; return "";
// Forbidden characters // Forbidden characters
/*QString strForbiddenChars("<>"); /*TQString strForbiddenChars("<>");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strData.find(ch) >= 0) if(strData.find(ch) >= 0)
return i18n("Contents cannot contain character: %1 !").arg(ch); 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 charactesr and data() unescapes it back to original string
*/ */

@ -32,13 +32,13 @@ class KXECharDataDialog : public KXECharDataDialogBase
Q_OBJECT Q_OBJECT
public: 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 CharDataKind charDataKind() const { return m_eCharDataKind; }
const bool atTop() const { return m_bAtTop; } 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; } // void setCharDataKind(const CharDataKind eCharDataKind) { m_eCharDataKind = eCharDataKind; }
public: public:
@ -47,7 +47,7 @@ class KXECharDataDialog : public KXECharDataDialogBase
* To be used for inserting the given XML character data as child * To be used for inserting the given XML character data as child
* of the given parent element. * of the given parent element.
* *
* @return see @ref QDialog::exec * @return see @ref TQDialog::exec
*/ */
int exec( bool ); int exec( bool );
@ -57,7 +57,7 @@ class KXECharDataDialog : public KXECharDataDialogBase
void clearDialog(); void clearDialog();
// check contents // check contents
static QString checkContents(const QString); static TQString checkContents(const TQString);
protected: protected:
/** /**
@ -77,7 +77,7 @@ class KXECharDataDialog : public KXECharDataDialogBase
protected: protected:
//CharDataKind m_eCharDataKind; //CharDataKind m_eCharDataKind;
bool m_bAtTop; bool m_bAtTop;
QString m_strContents; TQString m_strContents;
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXECharDataDialogBase</class> <class>KXECharDataDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXECharDataDialogBase</cstring> <cstring>KXECharDataDialogBase</cstring>
</property> </property>
@ -28,7 +28,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>Layout4</cstring> <cstring>Layout4</cstring>
</property> </property>
@ -42,7 +42,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblInsert</cstring> <cstring>m_pLblInsert</cstring>
</property> </property>
@ -58,7 +58,7 @@
Choose, where to place this XML character data in the XML elements list of childnodes.</string> Choose, where to place this XML character data in the XML elements list of childnodes.</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>at bottom</string> <string>at bottom</string>
@ -97,7 +97,7 @@ Choose, where to place this XML character data in the XML elements list of child
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QTextEdit" row="1" column="0"> <widget class="TQTextEdit" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditData</cstring> <cstring>m_pEditData</cstring>
</property> </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> <string>You can edit the XML character data in this editor.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -142,7 +142,7 @@ Choose, where to place this XML character data in the XML elements list of child
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnOK</cstring> <cstring>m_pBtnOK</cstring>
</property> </property>
@ -159,7 +159,7 @@ Choose, where to place this XML character data in the XML elements list of child
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnCancel</cstring> <cstring>m_pBtnCancel</cstring>
</property> </property>
@ -172,7 +172,7 @@ Choose, where to place this XML character data in the XML elements list of child
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabelMessage</cstring> <cstring>m_pTextLabelMessage</cstring>
</property> </property>

@ -17,11 +17,11 @@
#include "kxechoosestringdialog.h" #include "kxechoosestringdialog.h"
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qlabel.h> #include <tqlabel.h>
KXEChooseStringDialog::KXEChooseStringDialog(QWidget *parent, KXEChooseStringDialog::KXEChooseStringDialog(TQWidget *parent,
const char *name, const char *name,
const char *szCaption, const char *szCaption,
const char *szPrompt) const char *szPrompt)

@ -20,7 +20,7 @@
#include "kxechoosestringdialogbase.h" #include "kxechoosestringdialogbase.h"
#include <qwidget.h> #include <tqwidget.h>
/**Dialog with combobox that allow enter /**Dialog with combobox that allow enter
or select any string or select any string
@ -31,14 +31,14 @@ class KXEChooseStringDialog : public KXEChooseStringDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
KXEChooseStringDialog(QWidget *, const char *, const char *, const char *); KXEChooseStringDialog(TQWidget *, const char *, const char *, const char *);
protected slots: // Protected slots protected slots: // Protected slots
/** Called, when user press OK button */ /** Called, when user press OK button */
void slotOk(); void slotOk();
public: // Public attributes public: // Public attributes
/** Contain text choosed by user */ /** Contain text choosed by user */
QString m_strChoosedText; TQString m_strChoosedText;
}; };
#endif #endif

@ -3,7 +3,7 @@
<comment>Dialog with combobox that allow enter <comment>Dialog with combobox that allow enter
or select any string</comment> or select any string</comment>
<author>Lumir Vanek</author> <author>Lumir Vanek</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXEChooseStringDialogBase</cstring> <cstring>KXEChooseStringDialogBase</cstring>
</property> </property>
@ -28,7 +28,7 @@ or select any string</comment>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </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"> <property name="name">
<cstring>m_pComboBox</cstring> <cstring>m_pComboBox</cstring>
</property> </property>
@ -38,7 +38,7 @@ or select any string</comment>
Enter or choose string, that you want.</string> Enter or choose string, that you want.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>Layout3</cstring> <cstring>Layout3</cstring>
</property> </property>
@ -69,7 +69,7 @@ Enter or choose string, that you want.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pPushButtonOk</cstring> <cstring>m_pPushButtonOk</cstring>
</property> </property>
@ -77,7 +77,7 @@ Enter or choose string, that you want.</string>
<string>&amp;OK</string> <string>&amp;OK</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pPushButtonCancel</cstring> <cstring>m_pPushButtonCancel</cstring>
</property> </property>
@ -87,7 +87,7 @@ Enter or choose string, that you want.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabel</cstring> <cstring>m_pTextLabel</cstring>
</property> </property>

@ -27,11 +27,11 @@
#include <kdialogbase.h> #include <kdialogbase.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <qlayout.h> #include <tqlayout.h>
KXEConfiguration::KXEConfiguration() KXEConfiguration::KXEConfiguration()
: QObject( 0, "KXMLEditor's configuration (KXEConfiguration)" ), : TQObject( 0, "KXMLEditor's configuration (KXEConfiguration)" ),
m_pDialog( 0 ) m_pDialog( 0 )
{ {
// initialize all setting group objects // initialize all setting group objects
@ -94,15 +94,15 @@ void KXEConfiguration::showDialog()
connect( m_pDialog, SIGNAL(okClicked()), this, SLOT(slotDlgApplied()) ); connect( m_pDialog, SIGNAL(okClicked()), this, SLOT(slotDlgApplied()) );
// and add the pages // and add the pages
QFrame * pFrame; TQFrame * pFrame;
QWidget * pPage; TQWidget * pPage;
QVBoxLayout * pLayout; TQVBoxLayout * pLayout;
// - tree view properties page // - tree view properties page
pFrame = m_pDialog->addPage( m_pTreeView->dialogPageName(), pFrame = m_pDialog->addPage( m_pTreeView->dialogPageName(),
m_pTreeView->dialogPageHeader(), m_pTreeView->dialogPageHeader(),
KGlobal::instance()->iconLoader()->loadIcon( m_pTreeView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); KGlobal::instance()->iconLoader()->loadIcon( m_pTreeView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) );
pLayout = new QVBoxLayout( pFrame ); pLayout = new TQVBoxLayout( pFrame );
pPage = m_pTreeView->dialogPage( pFrame ); pPage = m_pTreeView->dialogPage( pFrame );
pLayout->addWidget( pPage ); pLayout->addWidget( pPage );
connect( m_pTreeView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); connect( m_pTreeView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) );
@ -111,7 +111,7 @@ void KXEConfiguration::showDialog()
pFrame = m_pDialog->addPage( m_pTextView->dialogPageName(), pFrame = m_pDialog->addPage( m_pTextView->dialogPageName(),
m_pTextView->dialogPageHeader(), m_pTextView->dialogPageHeader(),
KGlobal::instance()->iconLoader()->loadIcon( m_pTextView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); KGlobal::instance()->iconLoader()->loadIcon( m_pTextView->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) );
pLayout = new QVBoxLayout( pFrame ); pLayout = new TQVBoxLayout( pFrame );
pPage = m_pTextView->dialogPage( pFrame ); pPage = m_pTextView->dialogPage( pFrame );
pLayout->addWidget( pPage ); pLayout->addWidget( pPage );
connect( m_pTextView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); connect( m_pTextView, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) );
@ -120,7 +120,7 @@ void KXEConfiguration::showDialog()
pFrame = m_pDialog->addPage( m_pNewFile->dialogPageName(), pFrame = m_pDialog->addPage( m_pNewFile->dialogPageName(),
m_pNewFile->dialogPageHeader(), m_pNewFile->dialogPageHeader(),
KGlobal::instance()->iconLoader()->loadIcon( m_pNewFile->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); KGlobal::instance()->iconLoader()->loadIcon( m_pNewFile->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) );
pLayout = new QVBoxLayout( pFrame ); pLayout = new TQVBoxLayout( pFrame );
pPage = m_pNewFile->dialogPage( pFrame ); pPage = m_pNewFile->dialogPage( pFrame );
pLayout->addWidget( pPage ); pLayout->addWidget( pPage );
connect( m_pNewFile, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); connect( m_pNewFile, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) );
@ -129,7 +129,7 @@ void KXEConfiguration::showDialog()
pFrame = m_pDialog->addPage( m_pPrint->dialogPageName(), pFrame = m_pDialog->addPage( m_pPrint->dialogPageName(),
m_pPrint->dialogPageHeader(), m_pPrint->dialogPageHeader(),
KGlobal::instance()->iconLoader()->loadIcon( m_pPrint->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); KGlobal::instance()->iconLoader()->loadIcon( m_pPrint->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) );
pLayout = new QVBoxLayout( pFrame ); pLayout = new TQVBoxLayout( pFrame );
pPage = m_pPrint->dialogPage( pFrame ); pPage = m_pPrint->dialogPage( pFrame );
pLayout->addWidget( pPage ); pLayout->addWidget( pPage );
connect( m_pPrint, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); connect( m_pPrint, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) );
@ -138,7 +138,7 @@ void KXEConfiguration::showDialog()
pFrame = m_pDialog->addPage( m_pArcExts->dialogPageName(), pFrame = m_pDialog->addPage( m_pArcExts->dialogPageName(),
m_pArcExts->dialogPageHeader(), m_pArcExts->dialogPageHeader(),
KGlobal::instance()->iconLoader()->loadIcon( m_pArcExts->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) ); KGlobal::instance()->iconLoader()->loadIcon( m_pArcExts->dialogPageIcon(), KIcon::NoGroup, KIcon::SizeMedium ) );
pLayout = new QVBoxLayout( pFrame ); pLayout = new TQVBoxLayout( pFrame );
pPage = m_pArcExts->dialogPage( pFrame ); pPage = m_pArcExts->dialogPage( pFrame );
pLayout->addWidget( pPage ); pLayout->addWidget( pPage );
connect( m_pArcExts, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) ); connect( m_pArcExts, SIGNAL(sigDialogPageChanged()), this, SLOT(slotDlgChanged()) );

@ -18,7 +18,7 @@
#ifndef KXECONFIGURATION_H #ifndef KXECONFIGURATION_H
#define KXECONFIGURATION_H #define KXECONFIGURATION_H
#include <qobject.h> #include <tqobject.h>
class KXETreeViewSettings; class KXETreeViewSettings;
class KXETextViewSettings; class KXETextViewSettings;
@ -39,7 +39,7 @@ class KDialogBase;
* @short container for KXMLEditor's configuration data * @short container for KXMLEditor's configuration data
* @author Olaf Hartig * @author Olaf Hartig
*/ */
class KXEConfiguration : public QObject class KXEConfiguration : public TQObject
{ {
Q_OBJECT Q_OBJECT

@ -37,16 +37,16 @@
#include <kurl.h> #include <kurl.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qbuffer.h> #include <tqbuffer.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qtextcodec.h> #include <tqtextcodec.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
KXEDocument::KXEDocument(QObject *parent, const char *name) KXEDocument::KXEDocument(TQObject *parent, const char *name)
:QObject (parent,name), :TQObject (parent,name),
QDomDocument(), TQDomDocument(),
KXMLGUIClient() KXMLGUIClient()
{ {
m_bDocIsCompressed = false; 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() && if (this->documentElement().isNull() &&
KMessageBox::warningContinueCancel(0, KMessageBox::warningContinueCancel(0,
@ -73,14 +73,14 @@ bool KXEDocument::save(const QString &strFileName)
return false; return false;
} }
QString strXML; TQString strXML;
QTextStream streamXML(&strXML, IO_WriteOnly); TQTextStream streamXML(&strXML, IO_WriteOnly);
int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps(); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps();
((QDomDocument*)this)->save(streamXML, iIndent); ((TQDomDocument*)this)->save(streamXML, iIndent);
QString strEncoding; TQString strEncoding;
QTextCodec *pTextCodec; TQTextCodec *pTextCodec;
// find encoding info // find encoding info
if(strXML.left(5) == "<?xml") if(strXML.left(5) == "<?xml")
@ -91,9 +91,9 @@ bool KXEDocument::save(const QString &strFileName)
iStart += 8; // skip encoding iStart += 8; // skip encoding
// search " or ' after 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 iStart++; // skip ch
if((iEnd = strXML.find(ch, iStart)) > 0) if((iEnd = strXML.find(ch, iStart)) > 0)
{ {
@ -104,23 +104,23 @@ bool KXEDocument::save(const QString &strFileName)
} }
if(strEncoding.length() <= 0) if(strEncoding.length() <= 0)
pTextCodec = QTextCodec::codecForLocale(); // default pTextCodec = TQTextCodec::codecForLocale(); // default
else else
pTextCodec = QTextCodec::codecForName(strEncoding); pTextCodec = TQTextCodec::codecForName(strEncoding);
if(pTextCodec == 0) if(pTextCodec == 0)
{ if(KMessageBox::questionYesNo(0, i18n("Codec for encoding %1 not found ! Continue saving ?").arg(strEncoding)) != KMessageBox::Yes) { if(KMessageBox::questionYesNo(0, i18n("Codec for encoding %1 not found ! Continue saving ?").arg(strEncoding)) != KMessageBox::Yes)
return false; return false;
} }
QCString strDecoded; TQCString strDecoded;
if(pTextCodec) if(pTextCodec)
{ strDecoded = pTextCodec->fromUnicode(strXML); { strDecoded = pTextCodec->fromUnicode(strXML);
} }
// save string to file // save string to file
if(!m_bDocIsCompressed) if(!m_bDocIsCompressed)
{ QFile file(strFileName); { TQFile file(strFileName);
if(file.open(IO_WriteOnly) == true) if(file.open(IO_WriteOnly) == true)
{ file.writeBlock(strDecoded, strDecoded.length()); { file.writeBlock(strDecoded, strDecoded.length());
file.flush(); file.flush();
@ -134,7 +134,7 @@ bool KXEDocument::save(const QString &strFileName)
} }
else else
{ // obtain file extension ----------------------------------------- { // obtain file extension -----------------------------------------
QString strExtension; TQString strExtension;
int iPos = strFileName.findRev('.'); int iPos = strFileName.findRev('.');
@ -167,14 +167,14 @@ bool KXEDocument::save(const QString &strFileName)
return true; 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; kdDebug() << "KXEDocument::open: opening file " << strFileName << endl;
// obtain file extension ----------------------------------------- // obtain file extension -----------------------------------------
QString strExtension; TQString strExtension;
int iPos = strFileName.findRev('.'); int iPos = strFileName.findRev('.');
@ -182,7 +182,7 @@ bool KXEDocument::open(const QString &strFileName)
{ strExtension = strFileName.mid(iPos + 1); { strExtension = strFileName.mid(iPos + 1);
} }
QString strTmpfileName; TQString strTmpfileName;
if ( KXMLEditorFactory::configuration()->archexts()->extensions().contains(strExtension) ) if ( KXMLEditorFactory::configuration()->archexts()->extensions().contains(strExtension) )
{ {
@ -196,7 +196,7 @@ bool KXEDocument::open(const QString &strFileName)
} }
tmp.setAutoDelete(false); tmp.setAutoDelete(false);
QFile &fileTemporary = *(tmp.file()); TQFile &fileTemporary = *(tmp.file());
if(strExtension == "svgz") if(strExtension == "svgz")
@ -211,12 +211,12 @@ bool KXEDocument::open(const QString &strFileName)
{ m_strCompressedTarEntryName = m_strCompressedTarEntryName.mid(iPos + 1); { 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 )) if(pIODevice->open( IO_ReadOnly ))
{ {
QTextStream stream(pIODevice); TQTextStream stream(pIODevice);
QString line; TQString line;
//int i = 1; //int i = 1;
while ( !stream.atEnd() ) while ( !stream.atEnd() )
{ {
@ -263,7 +263,7 @@ bool KXEDocument::open(const QString &strFileName)
if(entry && entry->isFile()) if(entry && entry->isFile())
{ const KArchiveFile *pTarFile = static_cast <const KArchiveFile *> (entry); { const KArchiveFile *pTarFile = static_cast <const KArchiveFile *> (entry);
QBuffer buffer(pTarFile->data()); TQBuffer buffer(pTarFile->data());
buffer.open(IO_ReadOnly); buffer.open(IO_ReadOnly);
fileTemporary.writeBlock(buffer.buffer(), buffer.size()); fileTemporary.writeBlock(buffer.buffer(), buffer.size());
@ -284,7 +284,7 @@ bool KXEDocument::open(const QString &strFileName)
// ( 1.) parse the file and fill our document // ( 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)) if(! file.open(IO_ReadOnly))
{ {
kdDebug() << "KXEDocument::openFile: Can't open file." << endl; kdDebug() << "KXEDocument::openFile: Can't open file." << endl;
@ -292,42 +292,42 @@ bool KXEDocument::open(const QString &strFileName)
} }
// auxiliary file for obtaining encoding info // auxiliary file for obtaining encoding info
QFile fileAux(m_bDocIsCompressed ? strTmpfileName : strFileName); TQFile fileAux(m_bDocIsCompressed ? strTmpfileName : strFileName);
if(! fileAux.open(IO_ReadOnly)) if(! fileAux.open(IO_ReadOnly))
{ {
kdDebug() << "KXEDocument::openFile: Can't open file." << endl; kdDebug() << "KXEDocument::openFile: Can't open file." << endl;
return false; return false;
} }
QTextStream txtStreamLocal( & file ); TQTextStream txtStreamLocal( & file );
// Lookup at XML document encoding ----------------------------------------------- // Lookup at XML document encoding -----------------------------------------------
QTextStream txtStreamAux( & fileAux ); TQTextStream txtStreamAux( & fileAux );
QString strFirstLine = txtStreamAux.readLine(); TQString strFirstLine = txtStreamAux.readLine();
fileAux.close(); fileAux.close();
int iStart, iEnd; int iStart, iEnd;
if((iStart = strFirstLine.find("encoding", 0)) > 0) if((iStart = strFirstLine.find("encoding", 0)) > 0)
{ {
QString strEncoding; TQString strEncoding;
// info about encoding found; // info about encoding found;
iStart += 8; // skip encoding iStart += 8; // skip encoding
// search " or ' after 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 iStart++; // skip ch
if((iEnd = strFirstLine.find(ch, iStart)) > 0) if((iEnd = strFirstLine.find(ch, iStart)) > 0)
{ {
strEncoding = strFirstLine.mid(iStart, iEnd - iStart); strEncoding = strFirstLine.mid(iStart, iEnd - iStart);
QTextCodec *pTextCodec = QTextCodec::codecForName(strEncoding); TQTextCodec *pTextCodec = TQTextCodec::codecForName(strEncoding);
if(pTextCodec) if(pTextCodec)
txtStreamLocal.setCodec(pTextCodec); txtStreamLocal.setCodec(pTextCodec);
else else
{ {
KMessageBox::sorry(0, i18n("Codec for encoding %1 not found ! Using locale encoding for load.").arg(strEncoding)); 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 else
{ {
// XML documment dont have info about encoding, set default UTF-8 // 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(); file.close();
if(m_bDocIsCompressed) if(m_bDocIsCompressed)
{ {
QDir dir; TQDir dir;
dir.remove(strTmpfileName); dir.remove(strTmpfileName);
} }
//-- Set string with XML to QDomDocument ------------------------------------------ //-- Set string with XML to TQDomDocument ------------------------------------------
QString strErrorMsg; TQString strErrorMsg;
int iErrorLine, iErrorColumn; 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) ) if( ! pNewDoc->setContent(strFileContents, true, &strErrorMsg, &iErrorLine, &iErrorColumn) )
{ kdDebug() << "KXEDocument::openFile: Failed parsing the file." << endl; { 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 // The following commented code is performance wise buggy, because the string
// gets parsed a second time. I replaced it with this code. // gets parsed a second time. I replaced it with this code.
// copy the content of the parsed document to this one // copy the content of the parsed document to this one
QDomNode e = pNewDoc->removeChild( pNewDoc->documentElement() ); TQDomNode e = pNewDoc->removeChild( pNewDoc->documentElement() );
QDomDocument::operator=( *pNewDoc ); TQDomDocument::operator=( *pNewDoc );
appendChild( e ); appendChild( e );
// Here comes the "buggy" code. // Here comes the "buggy" code.
//this->setContent(pNewDoc->toString(),true,0,0); // and take the new one //this->setContent(pNewDoc->toString(),true,0,0); // and take the new one
@ -397,37 +397,37 @@ void KXEDocument::setURL(KURL url)
emit sigURLChanged(url); emit sigURLChanged(url);
} }
void KXEDocument::updateNodeCreated(const QDomNode & node) void KXEDocument::updateNodeCreated(const TQDomNode & node)
{ {
emit sigNodeCreated(node); emit sigNodeCreated(node);
setModified(); setModified();
} }
void KXEDocument::updateNodeDeleted(const QDomNode & node) void KXEDocument::updateNodeDeleted(const TQDomNode & node)
{ {
emit sigNodeDeleted(node); emit sigNodeDeleted(node);
setModified(); setModified();
} }
void KXEDocument::updateNodeChanged( const QDomElement & domElement ) void KXEDocument::updateNodeChanged( const TQDomElement & domElement )
{ {
emit sigNodeChanged(domElement); emit sigNodeChanged(domElement);
setModified(); setModified();
} }
void KXEDocument::updateNodeChanged( const QDomCharacterData & node ) void KXEDocument::updateNodeChanged( const TQDomCharacterData & node )
{ {
emit sigNodeChanged(node); emit sigNodeChanged(node);
setModified(); setModified();
} }
void KXEDocument::updateNodeChanged( const QDomProcessingInstruction &domProcInstr ) void KXEDocument::updateNodeChanged( const TQDomProcessingInstruction &domProcInstr )
{ {
emit sigNodeChanged(domProcInstr); emit sigNodeChanged(domProcInstr);
setModified(); setModified();
} }
void KXEDocument::updateNodeMoved( const QDomNode & node ) void KXEDocument::updateNodeMoved( const TQDomNode & node )
{ {
emit sigNodeMoved(node); emit sigNodeMoved(node);
setModified(); setModified();
@ -435,7 +435,7 @@ void KXEDocument::updateNodeMoved( const QDomNode & node )
void KXEDocument::attachStylesheet(const KURL& stylesheet) 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() void KXEDocument::detachStylesheet()
@ -445,7 +445,7 @@ void KXEDocument::detachStylesheet()
void KXEDocument::attachSchema(const KURL& schema) void KXEDocument::attachSchema(const KURL& schema)
{ {
QDomElement domElement = documentElement(); TQDomElement domElement = documentElement();
if (!domElement.isNull()) if (!domElement.isNull())
{ {
domElement.setAttributeNS(SCHEMA_NAMESPACE, domElement.setAttributeNS(SCHEMA_NAMESPACE,
@ -459,7 +459,7 @@ void KXEDocument::attachSchema(const KURL& schema)
void KXEDocument::detachSchema() void KXEDocument::detachSchema()
{ {
QDomElement domElement = this->documentElement(); TQDomElement domElement = this->documentElement();
if (!domElement.isNull()) if (!domElement.isNull())
{ {
domElement.removeAttributeNS(SCHEMA_NAMESPACE,SCHEMA_ATTRIBUTE); 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 // removing old one
removeSpecProcInstr(target); removeSpecProcInstr(target);
// create new one // create new one
if (!data.isEmpty()) 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 (!node.isNull())
// if there is already xml instruction, then put that one below it // if there is already xml instruction, then put that one below it
this->insertAfter(domProcInstr,node); this->insertAfter(domProcInstr,node);
@ -491,25 +491,25 @@ void KXEDocument::setSpecProcInstr(const QString& target, const QString& data)
setModified(); setModified();
} }
void KXEDocument::removeSpecProcInstr(const QString &target) void KXEDocument::removeSpecProcInstr(const TQString &target)
{ {
QDomNode domNode = getSpecProcInstr(target); TQDomNode domNode = getSpecProcInstr(target);
if (!domNode.isNull()) if (!domNode.isNull())
{ {
updateNodeDeleted(domNode); updateNodeDeleted(domNode);
((QDomDocument*)this)->removeChild(domNode); ((TQDomDocument*)this)->removeChild(domNode);
setModified(); setModified();
} }
} }
QDomNode KXEDocument::getSpecProcInstr(const QString& target) TQDomNode KXEDocument::getSpecProcInstr(const TQString& target)
{ {
QDomNode result; TQDomNode result;
QDomNodeList domNodeList = this->childNodes(); TQDomNodeList domNodeList = this->childNodes();
for (uint i=0;i<domNodeList.count();i++) for (uint i=0;i<domNodeList.count();i++)
if (domNodeList.item(i).isProcessingInstruction()) if (domNodeList.item(i).isProcessingInstruction())
{ {
QDomProcessingInstruction domProcInstr = domNodeList.item(i).toProcessingInstruction(); TQDomProcessingInstruction domProcInstr = domNodeList.item(i).toProcessingInstruction();
if (domProcInstr.target()==target) if (domProcInstr.target()==target)
return domNodeList.item(i); return domNodeList.item(i);
} }
@ -542,7 +542,7 @@ void KXEDocument::newFile()
} }
case KXENewFileSettings::UseDefaults: 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; break;
} }
emit sigOpened(); emit sigOpened();
@ -553,7 +553,7 @@ void KXEDocument::newFile()
KCommand * KXEDocument::actDetachStylesheet() KCommand * KXEDocument::actDetachStylesheet()
{ {
QDomNode domNode = getSpecProcInstr("xml-stylesheet"); TQDomNode domNode = getSpecProcInstr("xml-stylesheet");
if (!domNode.isNull()) if (!domNode.isNull())
{ {
KCommand *pCmd = new KXEStylesheetDetachCommand(this,domNode.toProcessingInstruction().data()); KCommand *pCmd = new KXEStylesheetDetachCommand(this,domNode.toProcessingInstruction().data());
@ -568,8 +568,8 @@ KCommand * KXEDocument::actAttachStylesheet()
dlg.Label->setText(i18n("Stylesheet URL:")); dlg.Label->setText(i18n("Stylesheet URL:"));
if (dlg.exec()) if (dlg.exec())
{ {
QDomNode domNode = getSpecProcInstr("xml-stylesheet"); TQDomNode domNode = getSpecProcInstr("xml-stylesheet");
QString data = ""; TQString data = "";
if (!domNode.isNull()) if (!domNode.isNull())
data = domNode.toProcessingInstruction().data(); data = domNode.toProcessingInstruction().data();
KCommand *pCmd = new KXEStylesheetAttachCommand(this,data,dlg.attachURI->url()); KCommand *pCmd = new KXEStylesheetAttachCommand(this,data,dlg.attachURI->url());
@ -610,7 +610,7 @@ KCommand * KXEDocument::actAttachSchema()
// Instert or edit special processing instruction <?xml ... ?> // Instert or edit special processing instruction <?xml ... ?>
KCommand * KXEDocument::actVersionEncoding() KCommand * KXEDocument::actVersionEncoding()
{ {
QDomNode node = getSpecProcInstr("xml"); TQDomNode node = getSpecProcInstr("xml");
KXESpecProcInstrDialog dlg; KXESpecProcInstrDialog dlg;
if(!node.isNull()) if(!node.isNull())
@ -621,7 +621,7 @@ KCommand * KXEDocument::actVersionEncoding()
if(dlg.exec()) if(dlg.exec())
{ {
QString strOldData = ""; TQString strOldData = "";
if (!node.isNull()) if (!node.isNull())
strOldData = node.toProcessingInstruction().data(); strOldData = node.toProcessingInstruction().data();
KCommand *pCmd = new KXEVersionEncodingCommand(this,strOldData,dlg.getData()); KCommand *pCmd = new KXEVersionEncodingCommand(this,strOldData,dlg.getData());

@ -14,8 +14,8 @@
#include <kurl.h> #include <kurl.h>
#include <qobject.h> #include <tqobject.h>
#include <qdom.h> #include <tqdom.h>
#include <kparts/part.h> #include <kparts/part.h>
#include <kxmlguiclient.h> #include <kxmlguiclient.h>
@ -23,7 +23,7 @@
#define SCHEMA_ATTRIBUTE "schemaLocation" #define SCHEMA_ATTRIBUTE "schemaLocation"
#define SCHEMA_ATTRIBUTE_XSI "xsi:schemaLocation" #define SCHEMA_ATTRIBUTE_XSI "xsi:schemaLocation"
class QString; class TQString;
class KCommand; class KCommand;
@ -39,21 +39,21 @@ Stores XML document data which can be manipulated by KXMLEditor application.
@author Adam Charytoniuk @author Adam Charytoniuk
*/ */
class KXEDocument : public QObject, public QDomDocument, public KXMLGUIClient class KXEDocument : public TQObject, public TQDomDocument, public KXMLGUIClient
{ {
Q_OBJECT Q_OBJECT
public: public:
/** @short Constructor */ /** @short Constructor */
KXEDocument(QObject *parent=0, const char *name=0); KXEDocument(TQObject *parent=0, const char *name=0);
/** @short Destructor */ /** @short Destructor */
~KXEDocument(); ~KXEDocument();
/** @short Saves document into given file */ /** @short Saves document into given file */
bool save(const QString &); bool save(const TQString &);
/** @short Loads document from given file */ /** @short Loads document from given file */
bool open(const QString &); bool open(const TQString &);
/** @short Sets modification flag. /** @short Sets modification flag.
@ -76,7 +76,7 @@ public:
@param node newly created node @param node newly created node
*/ */
void updateNodeCreated(const QDomNode & node); void updateNodeCreated(const TQDomNode & node);
/** @short Notifies views about deleting 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. This will give a chanse to the views to remove that node visualization.
@param node that is going to be deleted @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 /** @short Notifies views about element properties changes
Should be called after element name or element attributes are changed. Should be called after element name or element attributes are changed.
@param domElement element that has 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 /** @short Notifies views after change char. data properties
@ -99,21 +99,21 @@ public:
(including texts, comments, .CDATA sections). (including texts, comments, .CDATA sections).
@param node character data node that has changed @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 /** @short Notifies views after change proc. instr. properties
Should be called after any processing intruction is changed. Should be called after any processing intruction is changed.
@param domProcInstr processing instruction that has changed @param domProcInstr processing instruction that has changed
*/ */
void updateNodeChanged( const QDomProcessingInstruction &domProcInstr ); void updateNodeChanged( const TQDomProcessingInstruction &domProcInstr );
/** @short Notifies views after moving node /** @short Notifies views after moving node
Should be called if any node in the document was moved. Should be called if any node in the document was moved.
@param node XML node that has been 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. /** @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). @warning Removes processing instruction from DomDocument children node list only (no subnodes are modiified).
@sa setSpecProcInstr() @sa setSpecProcInstr()
*/ */
void removeSpecProcInstr(const QString &target); void removeSpecProcInstr(const TQString &target);
/** @short Adds or changes (if already exists) processing instruction. /** @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 target processing intruction target
@param data processing intruction data @param data processing intruction data
@sa removeSpecProcInstr() @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. If given processing intruction is not found, null node is returned.
@param target name of the processing instruction target. @param target name of the processing instruction target.
@sa setSpecProcInstr() @sa setSpecProcInstr()
*/ */
QDomNode getSpecProcInstr(const QString& target); TQDomNode getSpecProcInstr(const TQString& target);
/** @short Attaches stylesheet to current XML file. /** @short Attaches stylesheet to current XML file.
@ -192,7 +192,7 @@ public:
KCommand * actAttachSchema(); KCommand * actAttachSchema();
private: private:
QString m_strCompressedTarEntryName; TQString m_strCompressedTarEntryName;
/** Equals true if document was opened from compressed file */ /** Equals true if document was opened from compressed file */
bool m_bDocIsCompressed; bool m_bDocIsCompressed;
/** @short Stores modification flag */ /** @short Stores modification flag */
@ -218,11 +218,11 @@ signals:
void sigURLChanged(KURL url); void sigURLChanged(KURL url);
/** @short Emitted when new node was added to document.*/ /** @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.*/ /** @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 .*/ /** @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. /** @short Emitted everytime character data node was changed.
This is the case for nodes like: This is the case for nodes like:
@ -230,11 +230,11 @@ signals:
- comments, - comments,
- CDATA sections, - CDATA sections,
*/ */
void sigNodeChanged( const QDomCharacterData & node ) ; void sigNodeChanged( const TQDomCharacterData & node ) ;
/** @short Emitted everytime processing instruction in document was changed .*/ /** @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 .*/ /** @short Emitted everytime document node was moved was changed .*/
void sigNodeMoved( const QDomNode & node ); void sigNodeMoved( const TQDomNode & node );
}; };
#endif #endif

@ -17,19 +17,19 @@
#include "kxeelementdialog.h" #include "kxeelementdialog.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <klineedit.h> #include <klineedit.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.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 ) : KXEElementDialogBase( pParent, pszName, fModal, fl )
{ {
connect( m_pEditNsURI, SIGNAL(textChanged(const QString&)), this, SLOT(slotNsURIChanged(const QString&)) ); connect( m_pEditNsURI, SIGNAL(textChanged(const TQString&)), this, SLOT(slotNsURIChanged(const TQString&)) );
connect( m_pEditName, SIGNAL(textChanged(const QString&)), this, SLOT(slotNameChanged(const QString&)) ); connect( m_pEditName, SIGNAL(textChanged(const TQString&)), this, SLOT(slotNameChanged(const TQString&)) );
} }
void KXEElementDialog::clearDialog() void KXEElementDialog::clearDialog()
@ -133,7 +133,7 @@ int KXEElementDialog::exec()
return KXEElementDialogBase::exec(); return KXEElementDialogBase::exec();
} }
void KXEElementDialog::slotNsURIChanged( const QString & strNewNsURI ) void KXEElementDialog::slotNsURIChanged( const TQString & strNewNsURI )
{ {
if ( strNewNsURI.isEmpty() ) if ( strNewNsURI.isEmpty() )
m_pEditPrefix->setEnabled(false); m_pEditPrefix->setEnabled(false);
@ -141,9 +141,9 @@ void KXEElementDialog::slotNsURIChanged( const QString & strNewNsURI )
m_pEditPrefix->setEnabled(true); 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); m_pTextLabelMessage->setText(strMessage);
@ -154,7 +154,7 @@ void KXEElementDialog::slotNameChanged( const QString & strNewName )
} }
// Check, if XML element name is OK // Check, if XML element name is OK
QString KXEElementDialog::checkName(const QString strElementName) TQString KXEElementDialog::checkName(const TQString strElementName)
{ {
if(strElementName.length() == 0) if(strElementName.length() == 0)
return ""; return "";
@ -168,17 +168,17 @@ QString KXEElementDialog::checkName(const QString strElementName)
return i18n("Element name cannot start with 'xml' or 'XML' !"); return i18n("Element name cannot start with 'xml' or 'XML' !");
// check first character // check first character
QChar firstChar(strElementName[0]); TQChar firstChar(strElementName[0]);
if((firstChar != '_') && !firstChar.isLetter()) if((firstChar != '_') && !firstChar.isLetter())
{ {
return i18n("Element name must start with an underscore or a letter !"); return i18n("Element name must start with an underscore or a letter !");
} }
// Forbidden characters // Forbidden characters
QString strForbiddenChars("&@#$%^()%+?=:<>;\"'*"); TQString strForbiddenChars("&@#$%^()%+?=:<>;\"'*");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strElementName.find(ch) >= 0) if(strElementName.find(ch) >= 0)
return i18n("Element name cannot contain character: %1 !").arg(ch); return i18n("Element name cannot contain character: %1 !").arg(ch);

@ -25,28 +25,28 @@ class KXEElementDialog : public KXEElementDialogBase
Q_OBJECT Q_OBJECT
public: 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: public:
const QString nsURI() const { return m_strNsURI; } const TQString nsURI() const { return m_strNsURI; }
const QString prefix() const { return m_strPrefix; } const TQString prefix() const { return m_strPrefix; }
const QString name() const { return m_strName; } const TQString name() const { return m_strName; }
const bool atTop() const { return m_bAtTop; } const bool atTop() const { return m_bAtTop; }
void setNsURI(const QString strNsURI) { m_strNsURI = strNsURI; } void setNsURI(const TQString strNsURI) { m_strNsURI = strNsURI; }
void setPrefix(const QString strPrefix) { m_strPrefix = strPrefix; } void setPrefix(const TQString strPrefix) { m_strPrefix = strPrefix; }
void setName(const QString strName) { m_strName = strName; } void setName(const TQString strName) { m_strName = strName; }
/** /**
* To be used for creating a new XML element * To be used for creating a new XML element
* *
* @return see @ref QDialog::exec * @return see @ref TQDialog::exec
*/ */
int exec( bool, bool, bool ); int exec( bool, bool, bool );
// check element name // check element name
static QString checkName(const QString); static TQString checkName(const TQString);
protected: protected:
/** /**
@ -74,18 +74,18 @@ class KXEElementDialog : public KXEElementDialogBase
protected slots: protected slots:
void slotNsURIChanged( const QString & szNewNsURI ); void slotNsURIChanged( const TQString & szNewNsURI );
/** /**
* Called, when the name in the edit line @ref DlgXMLElementBase::m_pEditName * Called, when the name in the edit line @ref DlgXMLElementBase::m_pEditName
* is changed. * is changed.
* Disables the OK button, if the given string is empty. * Disables the OK button, if the given string is empty.
*/ */
void slotNameChanged( const QString & szNewName ); void slotNameChanged( const TQString & szNewName );
protected: protected:
QString m_strNsURI; TQString m_strNsURI;
QString m_strPrefix; TQString m_strPrefix;
QString m_strName; TQString m_strName;
bool m_bAtTop; bool m_bAtTop;
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEElementDialogBase</class> <class>KXEElementDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXEElementDialogBase</cstring> <cstring>KXEElementDialogBase</cstring>
</property> </property>
@ -53,7 +53,7 @@
</size> </size>
</property> </property>
</spacer> </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"> <property name="name">
<cstring>m_pLblPrefix</cstring> <cstring>m_pLblPrefix</cstring>
</property> </property>
@ -103,7 +103,7 @@ You can enter the namespace prefix for this XML element here.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLineEdit" row="1" column="0"> <widget class="TQLineEdit" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditNsURI</cstring> <cstring>m_pEditNsURI</cstring>
</property> </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> You can enter the namespace URI of this XML element here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="5" column="0"> <widget class="TQLineEdit" row="5" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditName</cstring> <cstring>m_pEditName</cstring>
</property> </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> You have to enter this XML elements name here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="3" column="0"> <widget class="TQLineEdit" row="3" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditPrefix</cstring> <cstring>m_pEditPrefix</cstring>
</property> </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> You can enter the namespace prefix for this XML element here.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>m_pLblTagName</cstring> <cstring>m_pLblTagName</cstring>
</property> </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> You have to enter this XML elements name here.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>m_pLblNsURI</cstring> <cstring>m_pLblNsURI</cstring>
</property> </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> You can enter the namespace URI of this XML element here.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -194,7 +194,7 @@ You can enter the namespace URI of this XML element here.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnOK</cstring> <cstring>m_pBtnOK</cstring>
</property> </property>
@ -211,7 +211,7 @@ You can enter the namespace URI of this XML element here.</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnCancel</cstring> <cstring>m_pBtnCancel</cstring>
</property> </property>
@ -227,7 +227,7 @@ You can enter the namespace URI of this XML element here.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </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"> <property name="name">
<cstring>Layout4</cstring> <cstring>Layout4</cstring>
</property> </property>
@ -241,7 +241,7 @@ You can enter the namespace URI of this XML element here.</string>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblInsert</cstring> <cstring>m_pLblInsert</cstring>
</property> </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> Choose, where to place this XML element in the parent elements list of childelements.</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>at bottom</string> <string>at bottom</string>
@ -296,7 +296,7 @@ Choose, where to place this XML element in the parent elements list of childelem
</spacer> </spacer>
</hbox> </hbox>
</widget> </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"> <property name="name">
<cstring>m_pTextLabelMessage</cstring> <cstring>m_pTextLabelMessage</cstring>
</property> </property>

@ -11,10 +11,10 @@
// //
#include "kxefilenewdialog.h" #include "kxefilenewdialog.h"
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qframe.h> #include <tqframe.h>
KXEFileNewDialog::KXEFileNewDialog(QWidget* parent, const char* name) KXEFileNewDialog::KXEFileNewDialog(TQWidget* parent, const char* name)
: KXESpecProcInstrDialog(parent, name) : KXESpecProcInstrDialog(parent, name)
{ {
m_pDontShowAgain->show(); m_pDontShowAgain->show();

@ -22,7 +22,7 @@ Dialog for File->New assistance.
class KXEFileNewDialog : public KXESpecProcInstrDialog class KXEFileNewDialog : public KXESpecProcInstrDialog
{ {
public: public:
KXEFileNewDialog(QWidget* parent, const char* name=0); KXEFileNewDialog(TQWidget* parent, const char* name=0);
~KXEFileNewDialog(); ~KXEFileNewDialog();

@ -22,11 +22,11 @@
#include <kconfig.h> #include <kconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <qframe.h> #include <tqframe.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#define CONF_ENTRY_NAME_DFLT_VERSION "Default version" #define CONF_ENTRY_NAME_DFLT_VERSION "Default version"
#define DFLT_VALUE_DFLT_VERSION "1.0" #define DFLT_VALUE_DFLT_VERSION "1.0"
@ -38,7 +38,7 @@
#define DFLT_VALUE_NEWFILE_CREAT_BEHAVIOUR UseDefaults #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 ), : KXESettings( "New File Settings", pParent, pszName ),
m_strDfltVersion( DFLT_VALUE_DFLT_VERSION ), m_strDfltVersion( DFLT_VALUE_DFLT_VERSION ),
m_strDfltEncoding( DFLT_VALUE_DFLT_ENCODING ), 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" ); return i18n( "New Files" );
} }
QString KXENewFileSettings::dialogPageHeader() const TQString KXENewFileSettings::dialogPageHeader() const
{ {
return i18n( "New File Settings" ); return i18n( "New File Settings" );
} }
QString KXENewFileSettings::dialogPageIcon() const TQString KXENewFileSettings::dialogPageIcon() const
{ {
return "files"; return "files";
} }
QWidget * KXENewFileSettings::dialogPage( QFrame * pParent ) TQWidget * KXENewFileSettings::dialogPage( TQFrame * pParent )
{ {
if ( ! m_pDialogPage ) if ( ! m_pDialogPage )
@ -92,7 +92,7 @@ QWidget * KXENewFileSettings::dialogPage( QFrame * pParent )
m_pDialogPage->m_pDfltEncoding->insertStringList( encodings() ); m_pDialogPage->m_pDfltEncoding->insertStringList( encodings() );
updatePage(); 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_pDfltEncoding, SIGNAL(activated(int)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pNewFileCreatBehav1, SIGNAL(toggled(bool)), 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()) ); 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() ) if ( lstEncs.empty() )
{ {
lstEncs.append("UTF-8"); lstEncs.append("UTF-8");

@ -39,17 +39,17 @@ class KXENewFileSettings : public KXESettings
UseDefaults 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. // The following functions can be used to access this object's settings.
QString dfltVersion() const { return m_strDfltVersion; } TQString dfltVersion() const { return m_strDfltVersion; }
QString dfltEncoding() const { return m_strDfltEncoding; } TQString dfltEncoding() const { return m_strDfltEncoding; }
NewFileCreationBehaviour newFileCreaBehav() const { return m_enmNewFileCreaBehav; } NewFileCreationBehaviour newFileCreaBehav() const { return m_enmNewFileCreaBehav; }
/** /**
* Returns a list of all possible encodings. * 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, * Sets this object's new file creation behavior to the given one,
@ -62,19 +62,19 @@ class KXENewFileSettings : public KXESettings
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageName() const; virtual TQString dialogPageName() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageHeader() const; virtual TQString dialogPageHeader() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageIcon() const; virtual TQString dialogPageIcon() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QWidget * dialogPage( QFrame * pParent ); virtual TQWidget * dialogPage( TQFrame * pParent );
protected: protected:
@ -96,8 +96,8 @@ class KXENewFileSettings : public KXESettings
virtual void updatePage() const; virtual void updatePage() const;
// the settings itself // the settings itself
QString m_strDfltVersion; TQString m_strDfltVersion;
QString m_strDfltEncoding; TQString m_strDfltEncoding;
NewFileCreationBehaviour m_enmNewFileCreaBehav; NewFileCreationBehaviour m_enmNewFileCreaBehav;
/** /**

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXENewFileSettingsPage</class> <class>KXENewFileSettingsPage</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KXENewFileSettingsPage</cstring> <cstring>KXENewFileSettingsPage</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -27,7 +27,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblDfltVersion</cstring> <cstring>m_pLblDfltVersion</cstring>
</property> </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> Since there's only one XML version yet, you shouldn't change this value.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pDfltVersion</cstring> <cstring>m_pDfltVersion</cstring>
</property> </property>
@ -57,7 +57,7 @@ Since there's only one XML version yet, you shouldn't change this value.</string
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -65,7 +65,7 @@ Since there's only one XML version yet, you shouldn't change this value.</string
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblDfltEncoding</cstring> <cstring>m_pLblDfltEncoding</cstring>
</property> </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> You can determine the default encoding for XML documents being created. This version is the default setting in wizard dialogs.</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<property name="name"> <property name="name">
<cstring>m_pDfltEncoding</cstring> <cstring>m_pDfltEncoding</cstring>
</property> </property>
@ -93,7 +93,7 @@ You can determine the default encoding for XML documents being created. This ver
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>m_pNewFileCreatBehav</cstring> <cstring>m_pNewFileCreatBehav</cstring>
</property> </property>
@ -121,7 +121,7 @@ Creates an XML document with the default XML version and default encoding select
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pNewFileCreatBehav1</cstring> <cstring>m_pNewFileCreatBehav1</cstring>
</property> </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> <string>Start with new empty file</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pNewFileCreatBehav2</cstring> <cstring>m_pNewFileCreatBehav2</cstring>
</property> </property>
@ -140,7 +140,7 @@ Creates an XML document with the default XML version and default encoding select
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pNewFileCreatBehav3</cstring> <cstring>m_pNewFileCreatBehav3</cstring>
</property> </property>

@ -22,9 +22,9 @@
#include <kconfig.h> #include <kconfig.h>
#include <kfontcombo.h> #include <kfontcombo.h>
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#define CONF_ENTRY_NAME_FONTFAMILY "Print font family" #define CONF_ENTRY_NAME_FONTFAMILY "Print font family"
#define DFLT_VALUE_FONTFAMILY "Courier" #define DFLT_VALUE_FONTFAMILY "Courier"
@ -42,7 +42,7 @@
#define DFLT_VALUE_WITH_HEADER true #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 ), : KXESettings( "Print Settings", pParent, pszName ),
m_strFontFamily( DFLT_VALUE_FONTFAMILY ), m_strFontFamily( DFLT_VALUE_FONTFAMILY ),
m_iFontSize( DFLT_VALUE_FONTSIZE ), 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 ); m_bWithFooter = pConfig->readBoolEntry( CONF_ENTRY_NAME_WITH_HEADER, DFLT_VALUE_WITH_HEADER );
} }
QString KXEPrintSettings::dialogPageName() const TQString KXEPrintSettings::dialogPageName() const
{ {
return i18n( "Printing" ); return i18n( "Printing" );
} }
QString KXEPrintSettings::dialogPageHeader() const TQString KXEPrintSettings::dialogPageHeader() const
{ {
return i18n( "Print Settings" ); return i18n( "Print Settings" );
} }
QString KXEPrintSettings::dialogPageIcon() const TQString KXEPrintSettings::dialogPageIcon() const
{ {
return "printer2"; return "printer2";
} }
QWidget * KXEPrintSettings::dialogPage( QFrame * pParent ) TQWidget * KXEPrintSettings::dialogPage( TQFrame * pParent )
{ {
if ( ! m_pDialogPage ) if ( ! m_pDialogPage )
{ {

@ -32,10 +32,10 @@ class KXEPrintSettings : public KXESettings
{ {
public: 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. // 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 fontSize() const { return m_iFontSize; }
int indentSteps() const { return m_iIndentSteps; } int indentSteps() const { return m_iIndentSteps; }
bool hasHeader() const { return m_bWithHeader; } bool hasHeader() const { return m_bWithHeader; }
@ -44,19 +44,19 @@ class KXEPrintSettings : public KXESettings
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageName() const; virtual TQString dialogPageName() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageHeader() const; virtual TQString dialogPageHeader() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageIcon() const; virtual TQString dialogPageIcon() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QWidget * dialogPage( QFrame * pParent ); virtual TQWidget * dialogPage( TQFrame * pParent );
protected: protected:
@ -78,7 +78,7 @@ class KXEPrintSettings : public KXESettings
virtual void updatePage() const; virtual void updatePage() const;
// the settings itself // the settings itself
QString m_strFontFamily; TQString m_strFontFamily;
int m_iFontSize; int m_iFontSize;
int m_iIndentSteps; int m_iIndentSteps;
bool m_bWithHeader; bool m_bWithHeader;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEPrintSettingsPage</class> <class>KXEPrintSettingsPage</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KXEPrintSettingsPage</cstring> <cstring>KXEPrintSettingsPage</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblFontFamily</cstring> <cstring>m_pLblFontFamily</cstring>
</property> </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> Choose the font family you want to be used on printing your XML documents.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -59,7 +59,7 @@ Choose the font family you want to be used on printing your XML documents.</stri
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblFontSize</cstring> <cstring>m_pLblFontSize</cstring>
</property> </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> Choose the font size you want to be used on printing your XML documents.</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pFontSize</cstring> <cstring>m_pFontSize</cstring>
</property> </property>
@ -116,7 +116,7 @@ Choose the font size you want to be used on printing your XML documents.</string
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -124,7 +124,7 @@ Choose the font size you want to be used on printing your XML documents.</string
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblIndentSteps</cstring> <cstring>m_pLblIndentSteps</cstring>
</property> </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> Choose the number of characters you want to be used for indenting childnodes on printing you XML documents.</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pIndentSteps</cstring> <cstring>m_pIndentSteps</cstring>
</property> </property>
@ -169,7 +169,7 @@ Choose the number of characters you want to be used for indenting childnodes on
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pWithHeader</cstring> <cstring>m_pWithHeader</cstring>
</property> </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> You can determine wether you want a header to be printed on every page when printing you XML documents or not.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pWithFooter</cstring> <cstring>m_pWithFooter</cstring>
</property> </property>

@ -17,23 +17,23 @@
#include "kxeprocinstrdialog.h" #include "kxeprocinstrdialog.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qtextedit.h> #include <tqtextedit.h>
#include <klineedit.h> #include <klineedit.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.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 ) : KXEProcInstrDialogBase( pParent, pszName, fModal, fl )
{ {
// signals and slots connections // signals and slots connections
connect( m_pBtnOK, SIGNAL( clicked() ), this, SLOT( slotAccept() ) ); connect( m_pBtnOK, SIGNAL( clicked() ), this, SLOT( slotAccept() ) );
connect( m_pEditData, SIGNAL(textChanged()), this, SLOT(slotDataChanged()) ); 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() void KXEProcInstrDialog::slotDataChanged()
{ {
QString strMessage = checkData(m_pEditData->text()); TQString strMessage = checkData(m_pEditData->text());
if(strMessage.isEmpty()) if(strMessage.isEmpty())
strMessage = checkTarget(m_pEditTarget->text()); strMessage = checkTarget(m_pEditTarget->text());
@ -116,9 +116,9 @@ void KXEProcInstrDialog::slotDataChanged()
m_pBtnOK->setEnabled(true); 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()) if(strMessage.isEmpty())
strMessage = checkData(m_pEditData->text()); strMessage = checkData(m_pEditData->text());
@ -145,16 +145,16 @@ void KXEProcInstrDialog::slotAccept()
} }
// Check, if XML proc. instr. target is OK // Check, if XML proc. instr. target is OK
QString KXEProcInstrDialog::checkTarget(const QString strTarget) TQString KXEProcInstrDialog::checkTarget(const TQString strTarget)
{ {
if(strTarget.length() == 0) if(strTarget.length() == 0)
return ""; return "";
// Forbidden characters // Forbidden characters
QString strForbiddenChars("<>"); TQString strForbiddenChars("<>");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strTarget.find(ch) >= 0) if(strTarget.find(ch) >= 0)
return i18n("Target cannot contain character: %1 !").arg(ch); 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 // Check, if XML proc. instr. data is OK
QString KXEProcInstrDialog::checkData(const QString strData) TQString KXEProcInstrDialog::checkData(const TQString strData)
{ {
if(strData.length() == 0) if(strData.length() == 0)
return ""; return "";
// Forbidden characters // Forbidden characters
QString strForbiddenChars("<>"); TQString strForbiddenChars("<>");
for(unsigned int i = 0; i < strForbiddenChars.length(); i++) for(unsigned int i = 0; i < strForbiddenChars.length(); i++)
{ {
QChar ch = strForbiddenChars[i]; TQChar ch = strForbiddenChars[i];
if(strData.find(ch) >= 0) if(strData.find(ch) >= 0)
return i18n("Contents cannot contain character: %1 !").arg(ch); return i18n("Contents cannot contain character: %1 !").arg(ch);

@ -25,14 +25,14 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase
Q_OBJECT Q_OBJECT
public: 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 bool atTop() const { return m_bAtTop; }
const QString target() const { return m_strTarget; } const TQString target() const { return m_strTarget; }
const QString data() const { return m_strData; } const TQString data() const { return m_strData; }
void setTarget(const QString strTarget) { m_strTarget = strTarget; } void setTarget(const TQString strTarget) { m_strTarget = strTarget; }
void setData(const QString strData) { m_strData = strData; } void setData(const TQString strData) { m_strData = strData; }
public: public:
@ -40,7 +40,7 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase
* To be used for inserting a proc.instruction as child * To be used for inserting a proc.instruction as child
* of the given parent node. * of the given parent node.
* *
* @return see @ref QDialog::exec * @return see @ref TQDialog::exec
*/ */
int exec( bool, bool ); int exec( bool, bool );
@ -50,10 +50,10 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase
void clearDialog(); void clearDialog();
// check target // check target
static QString checkTarget(const QString); static TQString checkTarget(const TQString);
// check data // check data
static QString checkData(const QString); static TQString checkData(const TQString);
protected: protected:
/** /**
@ -73,14 +73,14 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase
* Called, when the target edit box is changed. * Called, when the target edit box is changed.
* Disables the OK button, if the editbox is empty. * Disables the OK button, if the editbox is empty.
*/ */
void slotTargetChanged(const QString &); void slotTargetChanged(const TQString &);
/** Called when user press OK button */ /** Called when user press OK button */
void slotAccept(); void slotAccept();
protected: protected:
QString m_strTarget; TQString m_strTarget;
QString m_strData; TQString m_strData;
bool m_bAtTop; bool m_bAtTop;
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXEProcInstrDialogBase</class> <class>KXEProcInstrDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXEProcInstrDialogBase</cstring> <cstring>KXEProcInstrDialogBase</cstring>
</property> </property>
@ -28,7 +28,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblTarget</cstring> <cstring>m_pLblTarget</cstring>
</property> </property>
@ -51,7 +51,7 @@
Define the target of this processing instruction here.</string> Define the target of this processing instruction here.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_pEditTarget</cstring> <cstring>m_pEditTarget</cstring>
</property> </property>
@ -77,7 +77,7 @@ Define the target of this processing instruction here.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblInsert</cstring> <cstring>m_pLblInsert</cstring>
</property> </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> Choose, where to place this processing instruction in the parent elements list.</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>at bottom</string> <string>at bottom</string>
@ -115,7 +115,7 @@ Choose, where to place this processing instruction in the parent elements list.<
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QTextEdit" row="1" column="0"> <widget class="TQTextEdit" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pEditData</cstring> <cstring>m_pEditData</cstring>
</property> </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> <string>Here you can enter the data (the instructions) of this XML processing instruction.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -157,7 +157,7 @@ Choose, where to place this processing instruction in the parent elements list.<
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnOK</cstring> <cstring>m_pBtnOK</cstring>
</property> </property>
@ -174,7 +174,7 @@ Choose, where to place this processing instruction in the parent elements list.<
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnCancel</cstring> <cstring>m_pBtnCancel</cstring>
</property> </property>
@ -190,7 +190,7 @@ Choose, where to place this processing instruction in the parent elements list.<
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabelMessage</cstring> <cstring>m_pTextLabelMessage</cstring>
</property> </property>

@ -17,9 +17,9 @@
#include "kxesearchdialog.h" #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) : KXESearchDialogBase(parent, name, modal)
{ {
m_pPushButtonFind->setEnabled(false); m_pPushButtonFind->setEnabled(false);
@ -27,7 +27,7 @@ KXESearchDialog::KXESearchDialog(QWidget *parent, const char *name, bool modal)
m_pPushButtonFind->setDefault(true); m_pPushButtonFind->setDefault(true);
} }
void KXESearchDialog::slotTextChanged(const QString& string) void KXESearchDialog::slotTextChanged(const TQString& string)
{ {
if ( string.isEmpty() ) if ( string.isEmpty() )
m_pPushButtonFind->setEnabled(false); m_pPushButtonFind->setEnabled(false);

@ -20,8 +20,8 @@
#include "kxesearchdialogbase.h" #include "kxesearchdialogbase.h"
#include <qlineedit.h> #include <tqlineedit.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
/** /**
* Dialog for input information from user * Dialog for input information from user
@ -33,9 +33,9 @@ class KXESearchDialog : public KXESearchDialogBase
Q_OBJECT Q_OBJECT
public: 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 getMatchCase() const { return m_pCheckBoxMatchCase->isChecked(); }
bool getInElementNames() const { return m_pCheckBoxElementNames->isChecked(); } bool getInElementNames() const { return m_pCheckBoxElementNames->isChecked(); }
bool getInAttributeNames() const { return m_pCheckBoxAttributeNames->isChecked(); } bool getInAttributeNames() const { return m_pCheckBoxAttributeNames->isChecked(); }
@ -48,7 +48,7 @@ class KXESearchDialog : public KXESearchDialogBase
protected slots: protected slots:
/** Called when text in edit line is changed */ /** 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. */ /** Called on a change of the "find in" checkbuttons. */
virtual void slotFindInChanged(); virtual void slotFindInChanged();

@ -3,7 +3,7 @@
<comment>Dialog for input information from user <comment>Dialog for input information from user
about searching in XML document</comment> about searching in XML document</comment>
<author>Lumir Vanek</author> <author>Lumir Vanek</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXESearchDialogBase</cstring> <cstring>KXESearchDialogBase</cstring>
</property> </property>
@ -40,7 +40,7 @@ about searching in XML document</comment>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </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"> <property name="name">
<cstring>Layout5</cstring> <cstring>Layout5</cstring>
</property> </property>
@ -54,7 +54,7 @@ about searching in XML document</comment>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pTextLabelSearchedString</cstring> <cstring>m_pTextLabelSearchedString</cstring>
</property> </property>
@ -94,7 +94,7 @@ Here you can enter the string you want to search for in your XML document.</stri
</spacer> </spacer>
</hbox> </hbox>
</widget> </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"> <property name="name">
<cstring>m_pEditSearchedString</cstring> <cstring>m_pEditSearchedString</cstring>
</property> </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> Here you can enter the string you want to search for in your XML document.</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout13</cstring> <cstring>layout13</cstring>
</property> </property>
@ -128,7 +128,7 @@ Here you can enter the string you want to search for in your XML document.</stri
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pPushButtonFind</cstring> <cstring>m_pPushButtonFind</cstring>
</property> </property>
@ -136,7 +136,7 @@ Here you can enter the string you want to search for in your XML document.</stri
<string>&amp;Find</string> <string>&amp;Find</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pPushButtonCancel</cstring> <cstring>m_pPushButtonCancel</cstring>
</property> </property>
@ -163,7 +163,7 @@ Here you can enter the string you want to search for in your XML document.</stri
</size> </size>
</property> </property>
</spacer> </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"> <property name="name">
<cstring>m_pGroupBoxSearchIn</cstring> <cstring>m_pGroupBoxSearchIn</cstring>
</property> </property>
@ -193,7 +193,7 @@ These are
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxElementNames</cstring> <cstring>m_pCheckBoxElementNames</cstring>
</property> </property>
@ -201,7 +201,7 @@ These are
<string>Element names</string> <string>Element names</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxAttributeNames</cstring> <cstring>m_pCheckBoxAttributeNames</cstring>
</property> </property>
@ -209,7 +209,7 @@ These are
<string>Attribute names</string> <string>Attribute names</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxAttributeValues</cstring> <cstring>m_pCheckBoxAttributeValues</cstring>
</property> </property>
@ -217,7 +217,7 @@ These are
<string>Attribute values</string> <string>Attribute values</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxContents</cstring> <cstring>m_pCheckBoxContents</cstring>
</property> </property>
@ -227,7 +227,7 @@ These are
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="1"> <widget class="TQLayoutWidget" row="2" column="1">
<property name="name"> <property name="name">
<cstring>layout23</cstring> <cstring>layout23</cstring>
</property> </property>
@ -252,7 +252,7 @@ These are
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxMatchCase</cstring> <cstring>m_pCheckBoxMatchCase</cstring>
</property> </property>
@ -291,9 +291,9 @@ Check this for case sensitive search.</string>
<connections> <connections>
<connection> <connection>
<sender>m_pEditSearchedString</sender> <sender>m_pEditSearchedString</sender>
<signal>textChanged(const QString&amp;)</signal> <signal>textChanged(const TQString&amp;)</signal>
<receiver>KXESearchDialogBase</receiver> <receiver>KXESearchDialogBase</receiver>
<slot>slotTextChanged(const QString&amp;)</slot> <slot>slotTextChanged(const TQString&amp;)</slot>
</connection> </connection>
<connection> <connection>
<sender>m_pPushButtonCancel</sender> <sender>m_pPushButtonCancel</sender>
@ -344,7 +344,7 @@ Check this for case sensitive search.</string>
</tabstops> </tabstops>
<slots> <slots>
<slot access="protected">slotFindInChanged()</slot> <slot access="protected">slotFindInChanged()</slot>
<slot access="protected">slotTextChanged(const QString &amp;)</slot> <slot access="protected">slotTextChanged(const TQString &amp;)</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -19,8 +19,8 @@
#include <kconfig.h> #include <kconfig.h>
KXESettings::KXESettings( const QString & strConfigGroup, QObject * pParent, const char * pszName ) KXESettings::KXESettings( const TQString & strConfigGroup, TQObject * pParent, const char * pszName )
: QObject( pParent, pszName ), : TQObject( pParent, pszName ),
m_bPageChanged( false ), m_bPageChanged( false ),
m_strConfigGroup( strConfigGroup ) m_strConfigGroup( strConfigGroup )
{ {

@ -18,10 +18,10 @@
#ifndef KXESETTINGS_H #ifndef KXESETTINGS_H
#define KXESETTINGS_H #define KXESETTINGS_H
#include <qobject.h> #include <tqobject.h>
class KConfig; class KConfig;
class QFrame; class TQFrame;
/** /**
* This is an abstract base class for classes representing a group, that stores * This is an abstract base class for classes representing a group, that stores
@ -30,7 +30,7 @@ class QFrame;
* *
* @author Olaf Hartig * @author Olaf Hartig
*/ */
class KXESettings : public QObject class KXESettings : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -42,7 +42,7 @@ class KXESettings : public QObject
* @param strConfigGroup the name of the corresponding group in the config file, * @param strConfigGroup the name of the corresponding group in the config file,
* it is copied to the member @ref m_strConfigGroup * 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 * 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. * pages in the configuration dialog.
* This name has to be internationalized. * 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 * You can override this function and return a header line to
* be used for the corresponding configuration dialog page. * be used for the corresponding configuration dialog page.
@ -88,12 +88,12 @@ class KXESettings : public QObject
* @ref dialogPageName) * @ref dialogPageName)
* This string has to be internationalized. * 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 * Override this function and return the (file-)name of the icon
* to be used in the configuration dialog for the corresponding page. * 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 * Override this function to create the corresponding configuration
* dialog page with the given parent and return it. * 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 * Connect the signal @ref sigDialogPageChanged to the page's
* data changed signal(s). * data changed signal(s).
*/ */
virtual QWidget * dialogPage( QFrame * pParent ) = 0; virtual TQWidget * dialogPage( TQFrame * pParent ) = 0;
signals: signals:
@ -168,7 +168,7 @@ class KXESettings : public QObject
/** /**
* name of the config group for this group of settings * name of the config group for this group of settings
*/ */
const QString m_strConfigGroup; const TQString m_strConfigGroup;
}; };

@ -21,17 +21,17 @@
#include "kxeconfiguration.h" #include "kxeconfiguration.h"
#include "kxenewfilesettings.h" #include "kxenewfilesettings.h"
#include <qstring.h> #include <tqstring.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qframe.h> #include <tqframe.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kdebug.h> #include <kdebug.h>
KXESpecProcInstrDialog::KXESpecProcInstrDialog(QWidget *parent, const char *name ) KXESpecProcInstrDialog::KXESpecProcInstrDialog(TQWidget *parent, const char *name )
: KXESpecProcInstrDialogBase(parent,name) : KXESpecProcInstrDialogBase(parent,name)
{ {
m_pComboBoxEncoding->insertStringList( KXMLEditorFactory::configuration()->newfile()->encodings() ); 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; TQString strVersion;
QString strEncoding; TQString strEncoding;
int iStart, iEnd; int iStart, iEnd;
@ -63,9 +63,9 @@ void KXESpecProcInstrDialog::fillDialog( const QString strData )
iStart += 7; // skip version iStart += 7; // skip version
// search " or ' after 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 iStart++; // skip ch
if((iEnd = strData.find(ch, iStart)) > 0) if((iEnd = strData.find(ch, iStart)) > 0)
strVersion = strData.mid(iStart, iEnd - iStart); strVersion = strData.mid(iStart, iEnd - iStart);
@ -81,9 +81,9 @@ void KXESpecProcInstrDialog::fillDialog( const QString strData )
iStart += 8; // skip encoding iStart += 8; // skip encoding
// search " or ' after 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 iStart++; // skip ch
if((iEnd = strData.find(ch, iStart)) > 0) if((iEnd = strData.find(ch, iStart)) > 0)
strEncoding = strData.mid(iStart, iEnd - iStart); strEncoding = strData.mid(iStart, iEnd - iStart);
@ -117,7 +117,7 @@ void KXESpecProcInstrDialog::slotAccept()
@param version XML file version @param version XML file version
@param encoding encoding type for the XML file @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); 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 = '...' ". 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()+"' "; "' encoding = '"+m_pComboBoxEncoding->currentText()+"' ";
} }

@ -20,7 +20,7 @@
#include "kxespecprocinstrdialogbase.h" #include "kxespecprocinstrdialogbase.h"
#include <qwidget.h> #include <tqwidget.h>
/** /**
*@author Lumir Vanek *@author Lumir Vanek
@ -31,16 +31,16 @@ class KXESpecProcInstrDialog : public KXESpecProcInstrDialogBase
Q_OBJECT Q_OBJECT
public: public:
KXESpecProcInstrDialog(QWidget *parent=0, const char *name=0); KXESpecProcInstrDialog(TQWidget *parent=0, const char *name=0);
~KXESpecProcInstrDialog(); ~KXESpecProcInstrDialog();
QString getData(); TQString getData();
/** Initialize dialog from given target and data string */ /** 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 */ /** Initialize dialog from given data string */
void fillDialog(const QString); void fillDialog(const TQString);
int exec(); int exec();

@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXESpecProcInstrDialogBase</class> <class>KXESpecProcInstrDialogBase</class>
<author>Lumir Vanek</author> <author>Lumir Vanek</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXESpecProcInstrDialogBase</cstring> <cstring>KXESpecProcInstrDialogBase</cstring>
</property> </property>
@ -34,7 +34,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabel1</cstring> <cstring>m_pTextLabel1</cstring>
</property> </property>
@ -49,7 +49,7 @@
You can determine the XML version for XML document.</string> You can determine the XML version for XML document.</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="1" column="0"> <widget class="TQLineEdit" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pLineEditVersion</cstring> <cstring>m_pLineEditVersion</cstring>
</property> </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> You can determine the XML version for XML document.</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pTextLabel2</cstring> <cstring>m_pTextLabel2</cstring>
</property> </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> You can determine the encoding used while saving this XML document.</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="3" column="0"> <widget class="TQComboBox" row="3" column="0">
<property name="name"> <property name="name">
<cstring>m_pComboBoxEncoding</cstring> <cstring>m_pComboBoxEncoding</cstring>
</property> </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> You can determine the encoding used while saving this XML document.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="4" column="0"> <widget class="TQLayoutWidget" row="4" column="0">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -93,7 +93,7 @@ You can determine the encoding used while saving this XML document.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pDontShowAgain</cstring> <cstring>m_pDontShowAgain</cstring>
</property> </property>
@ -110,7 +110,7 @@ If you select this option, your choice will be remembered. Next time you create
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QFrame" row="5" column="0"> <widget class="TQFrame" row="5" column="0">
<property name="name"> <property name="name">
<cstring>m_pHLine</cstring> <cstring>m_pHLine</cstring>
</property> </property>
@ -121,7 +121,7 @@ If you select this option, your choice will be remembered. Next time you create
<enum>Raised</enum> <enum>Raised</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="6" column="0"> <widget class="TQLayoutWidget" row="6" column="0">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -146,7 +146,7 @@ If you select this option, your choice will be remembered. Next time you create
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnOK</cstring> <cstring>m_pBtnOK</cstring>
</property> </property>
@ -157,7 +157,7 @@ If you select this option, your choice will be remembered. Next time you create
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>m_pBtnCancel</cstring> <cstring>m_pBtnCancel</cstring>
</property> </property>

@ -19,18 +19,18 @@
#include <iostream> #include <iostream>
#include <qcolor.h> #include <tqcolor.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qstring.h> #include <tqstring.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <ktextedit.h> #include <ktextedit.h>
// Regular expressions for parsing XML borrowed from: // Regular expressions for parsing XML borrowed from:
// http://www.cs.sfu.ca/~cameron/REX.html // http://www.cs.sfu.ca/~cameron/REX.html
KXESyntaxHighlighter::KXESyntaxHighlighter(QTextEdit *textEdit) KXESyntaxHighlighter::KXESyntaxHighlighter(TQTextEdit *textEdit)
: QSyntaxHighlighter(textEdit) : TQSyntaxHighlighter(textEdit)
{ {
m_clrDefaultText.setRgb(0, 0, 0); m_clrDefaultText.setRgb(0, 0, 0);
m_clrElementName.setRgb(128, 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) //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(), QColor(0, 0, 0)); setFormat(0 , text.length(), TQColor(0, 0, 0));
int iBracketNesting = 0; int iBracketNesting = 0;
m_eParserState = parsingNone; m_eParserState = parsingNone;
@ -58,7 +58,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
if(endStateOfLastPara == 1) if(endStateOfLastPara == 1)
{ {
QRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment TQRegExp patternComment("[^-]*-([^-][^-]*-)*->"); // search end of comment
pos=patternComment.search(text, i); pos=patternComment.search(text, i);
if(pos >= 0) // end comment found ? if(pos >= 0) // end comment found ?
@ -137,7 +137,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
if(m_eParserState == expectAttributeValue) if(m_eParserState == expectAttributeValue)
{ {
QRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value TQRegExp patternAttribute("\"[^<\"]*\"|'[^<']*'"); // search attribute value
pos=patternAttribute.search(text, i); pos=patternAttribute.search(text, i);
if(pos == (int) i) // attribute value found ? if(pos == (int) i) // attribute value found ?
@ -162,7 +162,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
case '!': case '!':
if(m_eParserState == expectElementNameOrSlash) if(m_eParserState == expectElementNameOrSlash)
{ {
QRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment TQRegExp patternComment("<!--[^-]*-([^-][^-]*-)*->"); // search comment
pos=patternComment.search(text, i-1); pos=patternComment.search(text, i-1);
if(pos == (int) i-1) // comment found ? if(pos == (int) i-1) // comment found ?
@ -178,7 +178,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
} }
else else
{ // Try find multiline comment { // Try find multiline comment
QRegExp patternCommentStart("<!--"); // search comment start TQRegExp patternCommentStart("<!--"); // search comment start
pos=patternCommentStart.search(text, i-1); pos=patternCommentStart.search(text, i-1);
if(pos == (int)i-1) // comment found ? if(pos == (int)i-1) // comment found ?
@ -207,7 +207,7 @@ int KXESyntaxHighlighter::highlightParagraph(const QString& text, int endStateOf
return 0; 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 int l = 0; // length of matched text
@ -216,7 +216,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text)
case expectElementNameOrSlash: case expectElementNameOrSlash:
case expectElementName: 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); int pos=patternName.search(text, i);
if(pos == i) // found ? if(pos == i) // found ?
@ -233,7 +233,7 @@ int KXESyntaxHighlighter::processDefaultText(int i, const QString& text)
case expectAtttributeOrEndOfElement: 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); int pos=patternName.search(text, i);
if(pos == i) // found ? if(pos == i) // found ?

@ -18,50 +18,50 @@
#ifndef KXESYNTAXHIGHLIGHTER_H #ifndef KXESYNTAXHIGHLIGHTER_H
#define KXESYNTAXHIGHLIGHTER_H #define KXESYNTAXHIGHLIGHTER_H
#include <qsyntaxhighlighter.h> #include <tqsyntaxhighlighter.h>
class QTextEdit; class TQTextEdit;
/**XML Syntax highlighter /**XML Syntax highlighter
*@author Lumir Vanek *@author Lumir Vanek
*/ */
class KXESyntaxHighlighter : public QSyntaxHighlighter class KXESyntaxHighlighter : public TQSyntaxHighlighter
{ {
public: public:
KXESyntaxHighlighter(QTextEdit *); KXESyntaxHighlighter(TQTextEdit *);
~KXESyntaxHighlighter(); ~KXESyntaxHighlighter();
int highlightParagraph(const QString &text, int endStateOfLastPara); int highlightParagraph(const TQString &text, int endStateOfLastPara);
void setColorDefaultText(const QColor color) { m_clrDefaultText = color; } void setColorDefaultText(const TQColor color) { m_clrDefaultText = color; }
void setColorElementNames(const QColor color) { m_clrElementName = color; } void setColorElementNames(const TQColor color) { m_clrElementName = color; }
void setColorAttributeNames(const QColor color) { m_clrAttributeName = color; } void setColorAttributeNames(const TQColor color) { m_clrAttributeName = color; }
void setColorAttributeValues(const QColor color) { m_clrAttributeValue = color; } void setColorAttributeValues(const TQColor color) { m_clrAttributeValue = color; }
void setColorXmlSyntaxChars(const QColor color) { m_clrXmlSyntaxChar = color; } void setColorXmlSyntaxChars(const TQColor color) { m_clrXmlSyntaxChar = color; }
void setColorComments(const QColor color) { m_clrComment = color; } void setColorComments(const TQColor color) { m_clrComment = color; }
void setColorSyntaxError(const QColor color) { m_clrSyntaxError = color; } void setColorSyntaxError(const TQColor color) { m_clrSyntaxError = color; }
const QColor colorDefaultText() const { return m_clrDefaultText; } const TQColor colorDefaultText() const { return m_clrDefaultText; }
const QColor colorElementNames() const { return m_clrElementName; } const TQColor colorElementNames() const { return m_clrElementName; }
const QColor colorAttributeNames() const { return m_clrAttributeName; } const TQColor colorAttributeNames() const { return m_clrAttributeName; }
const QColor colorAttributeValues() const { return m_clrAttributeValue; } const TQColor colorAttributeValues() const { return m_clrAttributeValue; }
const QColor colorXmlSyntaxChars() const { return m_clrXmlSyntaxChar; } const TQColor colorXmlSyntaxChars() const { return m_clrXmlSyntaxChar; }
const QColor colorComments() const { return m_clrComment; } const TQColor colorComments() const { return m_clrComment; }
const QColor colorSyntaxError() const { return m_clrSyntaxError; } const TQColor colorSyntaxError() const { return m_clrSyntaxError; }
protected: protected:
int processDefaultText(int, const QString&); int processDefaultText(int, const TQString&);
protected: protected:
QColor m_clrDefaultText; TQColor m_clrDefaultText;
QColor m_clrElementName; TQColor m_clrElementName;
QColor m_clrAttributeName; TQColor m_clrAttributeName;
QColor m_clrAttributeValue; TQColor m_clrAttributeValue;
QColor m_clrXmlSyntaxChar; // < > = " TQColor m_clrXmlSyntaxChar; // < > = "
QColor m_clrComment; TQColor m_clrComment;
QColor m_clrSyntaxError; TQColor m_clrSyntaxError;
// states for parsing XML // states for parsing XML
enum ParserState enum ParserState

@ -21,15 +21,15 @@
#include "kxeconfiguration.h" #include "kxeconfiguration.h"
#include "kxetextviewsettings.h" #include "kxetextviewsettings.h"
#include <qdom.h> #include <tqdom.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <ktextedit.h> #include <ktextedit.h>
#include <klocale.h> #include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
KXETextEditorDialog::KXETextEditorDialog(QWidget *parent, const char *name) KXETextEditorDialog::KXETextEditorDialog(TQWidget *parent, const char *name)
: KXETextEditorDialogBase(parent,name) : KXETextEditorDialogBase(parent,name)
{ {
m_pSyntaxHighlighter = new KXESyntaxHighlighter(m_pTextEditor); m_pSyntaxHighlighter = new KXESyntaxHighlighter(m_pTextEditor);
@ -68,12 +68,12 @@ void KXETextEditorDialog::accept()
bool KXETextEditorDialog::validateXml(bool bInfoIfOK) bool KXETextEditorDialog::validateXml(bool bInfoIfOK)
{ {
QString strXML = "<root>" + editorText() + "</root>"; TQString strXML = "<root>" + editorText() + "</root>";
// create XML documemt from text // create XML documemt from text
QString strErrorMsg; TQString strErrorMsg;
int iErrorLine, iErrorColumn; int iErrorLine, iErrorColumn;
QDomDocument doc; TQDomDocument doc;
if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) )
{ kdDebug() << "KXETextEditorDialog::validateXml: Failed parsing the file." << endl; { kdDebug() << "KXETextEditorDialog::validateXml: Failed parsing the file." << endl;
@ -112,8 +112,8 @@ void KXETextEditorDialog::slotTextViewSettingsChanged()
if(KXMLEditorFactory::configuration()->textview()->isWrapOn()) if(KXMLEditorFactory::configuration()->textview()->isWrapOn())
{ {
m_pTextEditor->setHScrollBarMode(QScrollView::AlwaysOff); m_pTextEditor->setHScrollBarMode(TQScrollView::AlwaysOff);
m_pTextEditor->setWordWrap(QTextEdit::WidgetWidth); m_pTextEditor->setWordWrap(TQTextEdit::WidgetWidth);
} }
m_pSyntaxHighlighter->rehighlight(); m_pSyntaxHighlighter->rehighlight();

@ -18,9 +18,9 @@
#ifndef KXETEXTEDITORDIALOG_H #ifndef KXETEXTEDITORDIALOG_H
#define KXETEXTEDITORDIALOG_H #define KXETEXTEDITORDIALOG_H
#include <qwidget.h> #include <tqwidget.h>
#include <qstring.h> #include <tqstring.h>
#include <qsyntaxhighlighter.h> #include <tqsyntaxhighlighter.h>
#include <ktextedit.h> #include <ktextedit.h>
@ -35,11 +35,11 @@ class KXETextEditorDialog : public KXETextEditorDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
KXETextEditorDialog(QWidget *parent=0, const char *name=0); KXETextEditorDialog(TQWidget *parent=0, const char *name=0);
~KXETextEditorDialog(); ~KXETextEditorDialog();
QString editorText() const { return m_pTextEditor->text(); } TQString editorText() const { return m_pTextEditor->text(); }
void setEditorText(const QString strText) { m_pTextEditor->setText(strText); } void setEditorText(const TQString strText) { m_pTextEditor->setText(strText); }
public slots: public slots:

@ -2,7 +2,7 @@
<class>KXETextEditorDialogBase</class> <class>KXETextEditorDialogBase</class>
<comment>Dialog for editing XML node as raw text</comment> <comment>Dialog for editing XML node as raw text</comment>
<author>Lumir Vanek</author> <author>Lumir Vanek</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>KXETextEditorDialogBase</cstring> <cstring>KXETextEditorDialogBase</cstring>
</property> </property>
@ -52,7 +52,7 @@
<string>You can edit your XML document as raw text in this editor.</string> <string>You can edit your XML document as raw text in this editor.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="2"> <widget class="TQPushButton" row="1" column="2">
<property name="name"> <property name="name">
<cstring>m_pButtonOk</cstring> <cstring>m_pButtonOk</cstring>
</property> </property>
@ -72,7 +72,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="3"> <widget class="TQPushButton" row="1" column="3">
<property name="name"> <property name="name">
<cstring>m_pButtonCancel</cstring> <cstring>m_pButtonCancel</cstring>
</property> </property>
@ -86,7 +86,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="0"> <widget class="TQPushButton" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pButtonValidate</cstring> <cstring>m_pButtonValidate</cstring>
</property> </property>

@ -22,31 +22,31 @@
#include <kconfig.h> #include <kconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#define CONF_ENTRY_NAME_COLOR_DEFAULT_TEXT "DefaultText" #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 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 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 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 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 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 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 CONF_ENTRY_NAME_INDENT_STEPS "XML indentation"
#define DFLT_VALUE_INDENT_STEPS 2 #define DFLT_VALUE_INDENT_STEPS 2
@ -54,7 +54,7 @@
#define CONF_ENTRY_WRAP_ON "Text Wrap On" #define CONF_ENTRY_WRAP_ON "Text Wrap On"
#define DFLT_VALUE_WRAP_ON false #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 ), : KXESettings( "Text editor", pParent, pszName ),
m_colorDfltText( DFLT_VALUE_COLOR_DEFAULT_TEXT ), m_colorDfltText( DFLT_VALUE_COLOR_DEFAULT_TEXT ),
m_colorElemNames( DFLT_VALUE_COLOR_ELEMENT_NAMES ), 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" ); return i18n( "Text view" );
} }
QString KXETextViewSettings::dialogPageHeader() const TQString KXETextViewSettings::dialogPageHeader() const
{ {
return i18n( "Text view properties" ); return i18n( "Text view properties" );
} }
QString KXETextViewSettings::dialogPageIcon() const TQString KXETextViewSettings::dialogPageIcon() const
{ {
return "colorize"; return "colorize";
} }
QWidget * KXETextViewSettings::dialogPage( QFrame * pParent ) TQWidget * KXETextViewSettings::dialogPage( TQFrame * pParent )
{ {
if ( ! m_pDialogPage ) if ( ! m_pDialogPage )
{ {
@ -132,13 +132,13 @@ QWidget * KXETextViewSettings::dialogPage( QFrame * pParent )
// and fill its widgets with the corresponding values // and fill its widgets with the corresponding values
updatePage(); updatePage();
connect( m_pDialogPage->m_pColorDfltText, 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 QColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pColorElemNames, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pColorAttrNames, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pColorAttrNames, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pColorAttrValues, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pColorAttrValues, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pColorSyntaxChars, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pColorSyntaxChars, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pColorComments, SIGNAL(changed(const QColor&)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pColorComments, SIGNAL(changed(const TQColor&)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pColorErrors, SIGNAL(changed(const QColor&)), 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_pIndentSteps, SIGNAL(valueChanged(int)), this, SIGNAL(sigDialogPageChanged()) );
connect( m_pDialogPage->m_pCheckBoxWrapOn, SIGNAL(toggled(bool)), this, SIGNAL(sigDialogPageChanged()) ); connect( m_pDialogPage->m_pCheckBoxWrapOn, SIGNAL(toggled(bool)), this, SIGNAL(sigDialogPageChanged()) );
} }

@ -20,7 +20,7 @@
#include "kxesettings.h" #include "kxesettings.h"
#include <qcolor.h> #include <tqcolor.h>
class KXETextViewSettingsPage; class KXETextViewSettingsPage;
@ -34,35 +34,35 @@ class KXETextViewSettings : public KXESettings
{ {
public: 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. // The following functions can be used to access this object's settings.
const QColor & colorDfltText() const { return m_colorDfltText; } const TQColor & colorDfltText() const { return m_colorDfltText; }
const QColor & colorElemNames() const { return m_colorElemNames; } const TQColor & colorElemNames() const { return m_colorElemNames; }
const QColor & colorAttrNames() const { return m_colorAttrNames; } const TQColor & colorAttrNames() const { return m_colorAttrNames; }
const QColor & colorAttrValues() const { return m_colorAttrValues; } const TQColor & colorAttrValues() const { return m_colorAttrValues; }
const QColor & colorSyntaxChars() const { return m_colorSyntaxChars; } const TQColor & colorSyntaxChars() const { return m_colorSyntaxChars; }
const QColor & colorComments() const { return m_colorComments; } const TQColor & colorComments() const { return m_colorComments; }
const QColor & colorErrors() const { return m_colorErrors; } const TQColor & colorErrors() const { return m_colorErrors; }
int indentSteps() const { return m_iIndentSteps; } int indentSteps() const { return m_iIndentSteps; }
bool isWrapOn() const { return m_bWrapOn; } bool isWrapOn() const { return m_bWrapOn; }
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageName() const; virtual TQString dialogPageName() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageHeader() const; virtual TQString dialogPageHeader() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageIcon() const; virtual TQString dialogPageIcon() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QWidget * dialogPage( QFrame * pParent ); virtual TQWidget * dialogPage( TQFrame * pParent );
protected: protected:
@ -84,13 +84,13 @@ class KXETextViewSettings : public KXESettings
virtual void updatePage() const; virtual void updatePage() const;
// the settings itself // the settings itself
QColor m_colorDfltText; TQColor m_colorDfltText;
QColor m_colorElemNames; TQColor m_colorElemNames;
QColor m_colorAttrNames; TQColor m_colorAttrNames;
QColor m_colorAttrValues; TQColor m_colorAttrValues;
QColor m_colorSyntaxChars; TQColor m_colorSyntaxChars;
QColor m_colorComments; TQColor m_colorComments;
QColor m_colorErrors; TQColor m_colorErrors;
int m_iIndentSteps; int m_iIndentSteps;
bool m_bWrapOn; bool m_bWrapOn;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXETextViewSettingsPage</class> <class>KXETextViewSettingsPage</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KXETextViewSettingsPage</cstring> <cstring>KXETextViewSettingsPage</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox" row="0" column="0"> <widget class="TQGroupBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pBoxSyntaxHL</cstring> <cstring>m_pBoxSyntaxHL</cstring>
</property> </property>
@ -35,7 +35,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorDfltText</cstring> <cstring>m_pLblColorDfltText</cstring>
</property> </property>
@ -54,7 +54,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorElemNames</cstring> <cstring>m_pLblColorElemNames</cstring>
</property> </property>
@ -73,7 +73,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="6" column="0"> <widget class="TQLabel" row="6" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorErrors</cstring> <cstring>m_pLblColorErrors</cstring>
</property> </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> <cstring>m_pColorErrors</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorAttrValues</cstring> <cstring>m_pLblColorAttrValues</cstring>
</property> </property>
@ -103,7 +103,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> <widget class="TQLabel" row="5" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorComments</cstring> <cstring>m_pLblColorComments</cstring>
</property> </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> <cstring>m_pColorComments</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorAttrNames</cstring> <cstring>m_pLblColorAttrNames</cstring>
</property> </property>
@ -141,7 +141,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>m_pLblColorSyntaxChars</cstring> <cstring>m_pLblColorSyntaxChars</cstring>
</property> </property>
@ -170,7 +170,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -178,7 +178,7 @@ You can define the colors to be used, when showing your XML documents as raw tex
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblIndentSteps</cstring> <cstring>m_pLblIndentSteps</cstring>
</property> </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> 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> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pIndentSteps</cstring> <cstring>m_pIndentSteps</cstring>
</property> </property>
@ -240,7 +240,7 @@ You can choose the number of characters you want to be used for indenting childn
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>m_pCheckBoxWrapOn</cstring> <cstring>m_pCheckBoxWrapOn</cstring>
</property> </property>

@ -22,11 +22,11 @@
#include <kconfig.h> #include <kconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <qframe.h> #include <tqframe.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#define CONF_ENTRY_NAME_ITEMS_ON_DEMAND "Create items on demand" #define CONF_ENTRY_NAME_ITEMS_ON_DEMAND "Create items on demand"
#define DFLT_VALUE_ITEMS_ON_DEMAND true #define DFLT_VALUE_ITEMS_ON_DEMAND true
@ -47,7 +47,7 @@
#define DFLT_VALUE_ELEM_DISPL_MODE NoAttributes #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 ), : KXESettings( "Tree View", pParent, pszName ),
m_bCreateItemsOnDemand( DFLT_VALUE_ITEMS_ON_DEMAND ), m_bCreateItemsOnDemand( DFLT_VALUE_ITEMS_ON_DEMAND ),
m_iDfltExpLevel( DFLT_VALUE_DFLT_EXP_LEVEL ), 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 ) ); 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" ); return i18n( "Tree View" );
} }
QString KXETreeViewSettings::dialogPageHeader() const TQString KXETreeViewSettings::dialogPageHeader() const
{ {
return i18n( "Tree view properties" ); return i18n( "Tree view properties" );
} }
QString KXETreeViewSettings::dialogPageIcon() const TQString KXETreeViewSettings::dialogPageIcon() const
{ {
return "view_tree"; return "view_tree";
} }
QWidget * KXETreeViewSettings::dialogPage( QFrame * pParent ) TQWidget * KXETreeViewSettings::dialogPage( TQFrame * pParent )
{ {
if ( ! m_pDialogPage ) if ( ! m_pDialogPage )
{ {

@ -39,7 +39,7 @@ class KXETreeViewSettings : public KXESettings
NamesAndValues 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. // The following functions can be used to access this object's settings.
bool createItemsOnDemand() const { return m_bCreateItemsOnDemand; } bool createItemsOnDemand() const { return m_bCreateItemsOnDemand; }
@ -52,19 +52,19 @@ class KXETreeViewSettings : public KXESettings
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageName() const; virtual TQString dialogPageName() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageHeader() const; virtual TQString dialogPageHeader() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QString dialogPageIcon() const; virtual TQString dialogPageIcon() const;
/** /**
* Derived from @ref KXESettings * Derived from @ref KXESettings
*/ */
virtual QWidget * dialogPage( QFrame * pParent ); virtual TQWidget * dialogPage( TQFrame * pParent );
protected: protected:

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KXETreeViewSettingsPage</class> <class>KXETreeViewSettingsPage</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KXETreeViewSettingsPage</cstring> <cstring>KXETreeViewSettingsPage</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pCreateItemsOnDemand</cstring> <cstring>m_pCreateItemsOnDemand</cstring>
</property> </property>
@ -40,7 +40,7 @@ file.
Creating items on demand saves time and memory while opening very big, deep nested XML documents.</string> Creating items on demand saves time and memory while opening very big, deep nested XML documents.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pDecorateRoot</cstring> <cstring>m_pDecorateRoot</cstring>
</property> </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> A decoration is a + or - icon, with which the item can be opened or closed to show or hide its childitems.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </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"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_pLblDfltExpLevel</cstring> <cstring>m_pLblDfltExpLevel</cstring>
</property> </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> You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document.</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox"> <widget class="TQSpinBox">
<property name="name"> <property name="name">
<cstring>m_pDfltExpLevel</cstring> <cstring>m_pDfltExpLevel</cstring>
</property> </property>
@ -97,7 +97,7 @@ You can determine up to which level the tree view items should be opened (showin
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>m_pBoxDnD</cstring> <cstring>m_pBoxDnD</cstring>
</property> </property>
@ -108,7 +108,7 @@ You can determine up to which level the tree view items should be opened (showin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pEnableDrag</cstring> <cstring>m_pEnableDrag</cstring>
</property> </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> You can determine wether dragging items (and their corresponding XML nodes) from the tree view is enabled or disabled.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_pEnableDrop</cstring> <cstring>m_pEnableDrop</cstring>
</property> </property>
@ -151,7 +151,7 @@ You can determine wether dropping XML nodes to the tree view is enabled or disab
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>m_pElemDisplMode</cstring> <cstring>m_pElemDisplMode</cstring>
</property> </property>
@ -174,7 +174,7 @@ the attributes' names and the corresponding values are shown</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pElemDisplMode1</cstring> <cstring>m_pElemDisplMode1</cstring>
</property> </property>
@ -185,7 +185,7 @@ the attributes' names and the corresponding values are shown</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pElemDisplMode2</cstring> <cstring>m_pElemDisplMode2</cstring>
</property> </property>
@ -193,7 +193,7 @@ the attributes' names and the corresponding values are shown</string>
<string>Attribute names only</string> <string>Attribute names only</string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_pElemDisplMode3</cstring> <cstring>m_pElemDisplMode3</cstring>
</property> </property>

@ -35,7 +35,7 @@ extern "C"
KInstance * KXMLEditorFactory::s_instance = 0L; KInstance * KXMLEditorFactory::s_instance = 0L;
KXEConfiguration * KXMLEditorFactory::s_pKXEConfig = 0L; KXEConfiguration * KXMLEditorFactory::s_pKXEConfig = 0L;
KXMLEditorFactory::KXMLEditorFactory( QObject * pParent, const char * pszName ) KXMLEditorFactory::KXMLEditorFactory( TQObject * pParent, const char * pszName )
: KParts::Factory(pParent,pszName) : KParts::Factory(pParent,pszName)
{ {
} }
@ -53,7 +53,7 @@ KXMLEditorFactory::~KXMLEditorFactory()
s_instance = 0L; 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 // eliminating compiler warnings
pParent = pParent; pParent = pParent;
@ -61,14 +61,14 @@ KParts::Part * KXMLEditorFactory::createPartObject( QWidget * pParentWidget, con
KParts::Part * pPart=0L; KParts::Part * pPart=0L;
KXEDocument* pDocument=0L; KXEDocument* pDocument=0L;
if ( QCString(pszClassName) == "KParts::ReadOnlyPart" ) if ( TQCString(pszClassName) == "KParts::ReadOnlyPart" )
{ {
pDocument = new KXEDocument(); pDocument = new KXEDocument();
pPart = new KXMLEditorPart( false, pDocument, pParentWidget, pszWidgetName ); pPart = new KXMLEditorPart( false, pDocument, pParentWidget, pszWidgetName );
kdDebug() << "KXMLEditorFactory::createPartObject: read only KXMLEditorPart created" << endl; kdDebug() << "KXMLEditorFactory::createPartObject: read only KXMLEditorPart created" << endl;
} }
else if ( (QCString(pszClassName) == "KParts::ReadWritePart") || else if ( (TQCString(pszClassName) == "KParts::ReadWritePart") ||
(QCString(pszClassName) == "KXMLEditorPart") ) (TQCString(pszClassName) == "KXMLEditorPart") )
{ {
pDocument = new KXEDocument(); pDocument = new KXEDocument();
pPart = new KXMLEditorPart( true, pDocument, pParentWidget, pszWidgetName ); pPart = new KXMLEditorPart( true, pDocument, pParentWidget, pszWidgetName );

@ -35,12 +35,12 @@ class KXMLEditorFactory : public KParts::Factory
public: public:
/** @brief Constructor */ /** @brief Constructor */
KXMLEditorFactory( QObject * pParent = 0, const char * pszName = 0 ); KXMLEditorFactory( TQObject * pParent = 0, const char * pszName = 0 );
/** @brief Destructor */ /** @brief Destructor */
virtual ~KXMLEditorFactory(); virtual ~KXMLEditorFactory();
/** @short Creates part object, depending on given part class */ /** @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 KInstance * instance();
static KXEConfiguration * configuration(); static KXEConfiguration * configuration();

@ -64,30 +64,30 @@
#include <ktoolbar.h> #include <ktoolbar.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qtextcodec.h> #include <tqtextcodec.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qsplitter.h> #include <tqsplitter.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qtextedit.h> #include <tqtextedit.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qfile.h> #include <tqfile.h>
#include <qtextstream.h> #include <tqtextstream.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qbuffer.h> #include <tqbuffer.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <qevent.h> #include <tqevent.h>
#include "dcopiface_part_ro.h" // DCOP Iface #include "dcopiface_part_ro.h" // DCOP Iface
#define CONFIG_MAIN_SPLITTER_SIZES "Main splitter sizes" #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), : KParts::ReadWritePart(pParent,pszName),
m_pDlgSearch(0), m_pDlgSearch(0),
m_pDocument(0) m_pDocument(0)
@ -156,10 +156,10 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget
// path toolbar // path toolbar
m_pActPathCombo = new KXmlEditorComboAction( i18n("Path Bar"), 0, this, 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, new KAction( i18n("Clear Path Bar"), BarIcon("locationbar_erase", 16), 0, this,
SLOT(slotPathClear()), actionCollection(), "path_clear" ); 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" ); new KWidgetAction( m_locationLabel, i18n("Path: "), 0, this, 0, actionCollection(), "path_label" );
m_locationLabel->setBuddy( m_pActPathCombo->comboBox()); m_locationLabel->setBuddy( m_pActPathCombo->comboBox());
@ -236,8 +236,8 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget
// CREATE WIDGETS // CREATE WIDGETS
////////////////////////////// //////////////////////////////
pSplitter = new QSplitter( pParent, "KXMLEditorPart main widget (Splitter)" ); pSplitter = new TQSplitter( pParent, "KXMLEditorPart main widget (Splitter)" );
pSplitter->setFocusPolicy( QWidget::NoFocus ); pSplitter->setFocusPolicy( TQWidget::NoFocus );
pSplitter->setOpaqueResize(true); pSplitter->setOpaqueResize(true);
setWidget( pSplitter ); setWidget( pSplitter );
@ -245,40 +245,40 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget
m_pViewTree = new KXE_TreeView( this, pSplitter, "KXMLEditorPart treeview" ); m_pViewTree = new KXE_TreeView( this, pSplitter, "KXMLEditorPart treeview" );
connect( m_pViewTree, SIGNAL(sigSelectionCleared(bool)), this, SLOT(slotSelectionCleared(bool)) ); 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 TQDomElement &)), this, SLOT(slotSelectionChanged(const TQDomElement &)) );
connect( m_pViewTree, SIGNAL(sigSelectionChanged(const QDomCharacterData &)), this, SLOT(slotSelectionChanged(const QDomCharacterData &)) ); connect( m_pViewTree, SIGNAL(sigSelectionChanged(const TQDomCharacterData &)), this, SLOT(slotSelectionChanged(const TQDomCharacterData &)) );
connect( m_pViewTree, SIGNAL(sigSelectionChanged(const QDomProcessingInstruction &)), this, SLOT(slotSelectionChanged(const QDomProcessingInstruction &)) ); connect( m_pViewTree, SIGNAL(sigSelectionChanged(const TQDomProcessingInstruction &)), this, SLOT(slotSelectionChanged(const TQDomProcessingInstruction &)) );
connect( m_pViewTree, SIGNAL(sigContextMenuRequested(const QString&,const QPoint&)), this, SLOT(slotContextMenuRequested(const QString&,const QPoint&)) ); connect( m_pViewTree, SIGNAL(sigContextMenuRequested(const TQString&,const TQPoint&)), this, SLOT(slotContextMenuRequested(const TQString&,const TQPoint&)) );
connect( m_pViewTree, SIGNAL(itemRenamed(QListViewItem *)), this, SLOT(slotItemRenamedInplace(QListViewItem *)) ); connect( m_pViewTree, SIGNAL(itemRenamed(TQListViewItem *)), this, SLOT(slotItemRenamedInplace(TQListViewItem *)) );
connect( m_pViewTree, SIGNAL(sigKeyPressed(QKeyEvent* )),this,SLOT(slotTreeViewKeyPressed(QKeyEvent*))); connect( m_pViewTree, SIGNAL(sigKeyPressed(TQKeyEvent* )),this,SLOT(slotTreeViewKeyPressed(TQKeyEvent*)));
// create tab widget ---------------------- // create tab widget ----------------------
m_pTabWidget = new QTabWidget( pSplitter, "KXMLEditorPart tabwidget"); m_pTabWidget = new TQTabWidget( pSplitter, "KXMLEditorPart tabwidget");
m_pTabWidget->setFocusPolicy( QWidget::NoFocus ); m_pTabWidget->setFocusPolicy( TQWidget::NoFocus );
// create element view // create element view
m_pViewElement = new KXE_ViewElement( m_pTabWidget, instance()->config(), "KXMLEditorPart element view" ); m_pViewElement = new KXE_ViewElement( m_pTabWidget, instance()->config(), "KXMLEditorPart element view" );
m_pTabWidget->addTab( m_pViewElement, g_iconElement, i18n("Element") ); 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(sigContextMenuRequested(const TQString&,const TQPoint&)), this, SLOT(slotContextMenuRequested(const TQString&,const TQPoint&)) );
connect( m_pViewElement, SIGNAL(sigAttributeNameChangedInplace(const QDomAttr&, const QString)), this, SLOT(slotAttributeNameChangedInplace(const QDomAttr&, const QString)) ); connect( m_pViewElement, SIGNAL(sigAttributeNameChangedInplace(const TQDomAttr&, const TQString)), this, SLOT(slotAttributeNameChangedInplace(const TQDomAttr&, const TQString)) );
connect( m_pViewElement, SIGNAL(sigAttributeValueChangedInplace(const QDomAttr&, const QString)), this, SLOT(slotAttributeValueChangedInplace(const QDomAttr&, const QString)) ); 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 // 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_pTabWidget->addTab( m_pViewContents, g_iconText, i18n("Contents") );
m_pViewContents->setReadOnly( true ); m_pViewContents->setReadOnly( true );
m_pViewContents->setWordWrap( QTextEdit::NoWrap ); m_pViewContents->setWordWrap( TQTextEdit::NoWrap );
m_pViewContents->setTextFormat(QTextEdit::PlainText); m_pViewContents->setTextFormat(TQTextEdit::PlainText);
// create proc.instr. view // 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_pTabWidget->addTab( m_pViewProcInstr, g_iconProcessingInstruction, i18n("Proc.Instruction") );
m_pViewProcInstr->setReadOnly( true ); 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(started(KIO::Job*)), this, SLOT(started()) );
connect( this, SIGNAL(completed()), this, SLOT(completed()) ); 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 // INIT BEGIN STATE
@ -325,7 +325,7 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, QWidget
setReadWrite(fReadWrite); setReadWrite(fReadWrite);
// configuring splitter sizes // 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()) if (!list.isEmpty())
pSplitter->setSizes(list); pSplitter->setSizes(list);
@ -402,7 +402,7 @@ void KXMLEditorPart::setModified( bool bModified )
{ {
m_bAlreadyModified = bModified; m_bAlreadyModified = bModified;
QString szNewCaption = m_url.prettyURL(); TQString szNewCaption = m_url.prettyURL();
emit setWindowCaption( szNewCaption ); emit setWindowCaption( szNewCaption );
} }
@ -458,7 +458,7 @@ void KXMLEditorPart::slotActPrint()
void KXMLEditorPart::slotActProperties() void KXMLEditorPart::slotActProperties()
{ {
QDomNode* pNode = m_pViewTree->getSelectedNode(); TQDomNode* pNode = m_pViewTree->getSelectedNode();
if (pNode) if (pNode)
{ {
if (pNode->isElement()) if (pNode->isElement())
@ -474,7 +474,7 @@ void KXMLEditorPart::slotActProperties()
void KXMLEditorPart::slotActDelete() void KXMLEditorPart::slotActDelete()
{ {
QDomNode* pNode = m_pViewTree->getSelectedNode(); TQDomNode* pNode = m_pViewTree->getSelectedNode();
if (!m_pViewElement->hasFocus()) if (!m_pViewElement->hasFocus())
{ {
@ -488,11 +488,11 @@ void KXMLEditorPart::slotActDelete()
else else
{ {
// we can have also delete attribute selected on a element view // we can have also delete attribute selected on a element view
QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); TQDomAttr domAttr = m_pViewElement->getSelectedAttribute();
if (!domAttr.isNull()) if (!domAttr.isNull())
{ {
QDomElement domElement = pNode->toElement(); TQDomElement domElement = pNode->toElement();
QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); TQDomAttr domAttr = m_pViewElement->getSelectedAttribute();
KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr); KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -510,7 +510,7 @@ void KXMLEditorPart::slotEditCut()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if(pNode) if(pNode)
{ // copy to clipboard { // copy to clipboard
@ -526,13 +526,13 @@ void KXMLEditorPart::slotEditCopy()
{ {
kdDebug() << "KXMLEditor " << k_funcinfo << endl; kdDebug() << "KXMLEditor " << k_funcinfo << endl;
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if(pNode) if(pNode)
{ {
QTextDrag *pDrag = copyNode(m_pViewTree->getSelectedNode()); TQTextDrag *pDrag = copyNode(m_pViewTree->getSelectedNode());
if(pDrag) if(pDrag)
QApplication::clipboard()->setData(pDrag); TQApplication::clipboard()->setData(pDrag);
} }
else else
kdError() << "KXMLEditorPart::slotEditCopy no element selected." << endl; kdError() << "KXMLEditorPart::slotEditCopy no element selected." << endl;
@ -550,11 +550,11 @@ void KXMLEditorPart::slotEditPaste()
if (document()->documentElement().isNull()) if (document()->documentElement().isNull())
{ {
pasteNode(0, QApplication::clipboard()->data()); pasteNode(0, TQApplication::clipboard()->data());
} }
else 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) // 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 // start testing til the last node
while( ! node.isNull() ) while( ! node.isNull() )
@ -619,7 +619,7 @@ void KXMLEditorPart::slotXmlElementInsert()
if ( document()->documentElement().isNull() ) // the document doesn't if ( document()->documentElement().isNull() ) // the document doesn't
{ // have a root element yet { // 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()); KCommand *pCmd = new KXEElementCommand(document(), document(), dlg.nsURI(), dlg.prefix(), dlg.name());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -627,13 +627,13 @@ void KXMLEditorPart::slotXmlElementInsert()
} }
else // the document seems to else // the document seems to
{ // have a root element { // have a root element
QDomNode * pParentNode = m_pViewTree->getSelectedNode(); TQDomNode * pParentNode = m_pViewTree->getSelectedNode();
if ( (pParentNode) && (pParentNode->isElement()) ) 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()); KCommand *pCmd = new KXEElementCommand(document(), domParentElement, dlg.nsURI(), dlg.prefix(), dlg.name(), dlg.atTop());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -654,7 +654,7 @@ void KXMLEditorPart::slotXmlElementEdit()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotXmlElementEdit no node selected or selected node is no XML element." << endl; 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...") ); emit setStatusBarText( i18n("Editing XML element...") );
QDomElement domElement = pNode->toElement(); TQDomElement domElement = pNode->toElement();
KXEElementDialog dlg( widget(), "XML element dialog" ); KXEElementDialog dlg( widget(), "XML element dialog" );
@ -672,7 +672,7 @@ void KXMLEditorPart::slotXmlElementEdit()
if(!domElement.namespaceURI().isNull()) if(!domElement.namespaceURI().isNull())
dlg.setNsURI(domElement.namespaceURI() ); 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()); KCommand *pCmd = new KXEEditElementCommand(document(), domElement, dlg.prefix(), dlg.name());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -689,7 +689,7 @@ void KXMLEditorPart::slotActEditRawXml()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotActEditRawXml no node selected or selected node is no XML element." << endl; 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...") ); 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(); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps();
pNode->save(streamXML, iIndent); pNode->save(streamXML, iIndent);
KXETextEditorDialog dlg(0, "Text dialog"); KXETextEditorDialog dlg(0, "Text dialog");
dlg.setEditorText(strXML); 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 // create XML documemt from text
QString strErrorMsg; TQString strErrorMsg;
int iErrorLine, iErrorColumn; int iErrorLine, iErrorColumn;
QDomDocument doc; TQDomDocument doc;
if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) )
{ {
@ -735,7 +735,7 @@ void KXMLEditorPart::slotActEditRawXml()
return; return;
} }
QDomElement domNewElement = doc.firstChild().firstChild().toElement(); TQDomElement domNewElement = doc.firstChild().firstChild().toElement();
KCommand *pCmd = new KXEEditRawXmlCommand(document(), domElement, domNewElement); KCommand *pCmd = new KXEEditRawXmlCommand(document(), domElement, domNewElement);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
} }
@ -751,7 +751,7 @@ void KXMLEditorPart::slotXmlAttributesAdd()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotXmlAttributesAdd no node selected or selected node is no XML element." << endl; 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" ); KXEAttributeDialog dlg( widget(), "attribute dialog" );
QDomElement domOwnerElement = pNode->toElement(); TQDomElement domOwnerElement = pNode->toElement();
if ( dlg.exec( ) == QDialog::Accepted ) if ( dlg.exec( ) == TQDialog::Accepted )
{ {
KCommand *pCmd = new KXEAttributeCommand(document(), domOwnerElement, dlg.attributeNamespace(), dlg.QName(), dlg.Value()); KCommand *pCmd = new KXEAttributeCommand(document(), domOwnerElement, dlg.attributeNamespace(), dlg.QName(), dlg.Value());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -780,7 +780,7 @@ void KXMLEditorPart::slotXmlAttributesDel()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotXmlAttributesDel no node selected or selected node is no XML element." << endl; 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...") ); emit setStatusBarText( i18n("Delete all attributes...") );
QDomElement domOwnerElement = pNode->toElement(); TQDomElement domOwnerElement = pNode->toElement();
KCommand *pCmd = new KXEDeleteAllAttribCommand(document(), domOwnerElement); KCommand *pCmd = new KXEDeleteAllAttribCommand(document(), domOwnerElement);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -810,7 +810,7 @@ void KXMLEditorPart::slotXmlAttributeDel()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotXmlAttributeDel no node selected or selected node is no XML element." << endl; 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...") ); emit setStatusBarText( i18n("Delete attribute...") );
QDomElement domElement = pNode->toElement(); TQDomElement domElement = pNode->toElement();
QDomAttr domAttr = m_pViewElement->getSelectedAttribute(); TQDomAttr domAttr = m_pViewElement->getSelectedAttribute();
KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr); KCommand *pCmd = new KXEDeleteAttrCommand(document(), domElement, domAttr);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -838,7 +838,7 @@ void KXMLEditorPart::slotXmlProcInstrInsert()
KXEProcInstrDialog dlg( widget(), "proc. instr. dialog" ); KXEProcInstrDialog dlg( widget(), "proc. instr. dialog" );
QDomNode * pParentNode = m_pViewTree->getSelectedNode(); TQDomNode * pParentNode = m_pViewTree->getSelectedNode();
if ( (pParentNode) && (!pParentNode->isElement()) ) if ( (pParentNode) && (!pParentNode->isElement()) )
{ {
kdError() << k_funcinfo << " The selected node is no XML element." << endl; 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 ( ! 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()); KCommand *pCmd = new KXEProcInstrCommand(document(), document(), dlg.atTop(), dlg.target(), dlg.data());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -856,9 +856,9 @@ void KXMLEditorPart::slotXmlProcInstrInsert()
} }
else 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()); KCommand *pCmd = new KXEProcInstrCommand(document(), domParentElement, dlg.atTop(), dlg.target(), dlg.data());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -879,7 +879,7 @@ void KXMLEditorPart::slotXmlProcInstrEdit()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isProcessingInstruction()) ) if ( (!pNode) || (!pNode->isProcessingInstruction()) )
{ {
kdError() << "KXMLEditorPart::slotXmlProcInstrEdit no node selected or selected node is no processing instruction." << endl; 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...") ); emit setStatusBarText( i18n("Editing processing instruction...") );
QDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction(); TQDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction();
// We have two different kinds of processing instructions: // We have two different kinds of processing instructions:
// - a special one - defining the documents XML version and encoding // - a special one - defining the documents XML version and encoding
@ -903,7 +903,7 @@ void KXMLEditorPart::slotXmlProcInstrEdit()
dlg.setTarget(domProcInstr.target()); dlg.setTarget(domProcInstr.target());
dlg.setData(domProcInstr.data()); 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()); KCommand *pCmd = new KXEEditProcInstrCommand(document(), domProcInstr, dlg.data());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -921,7 +921,7 @@ void KXMLEditorPart::slotActInsertText()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotActInsertText no element selected." << endl; kdError() << "KXMLEditorPart::slotActInsertText no element selected." << endl;
@ -933,9 +933,9 @@ void KXMLEditorPart::slotActInsertText()
KXECharDataDialog dlg( widget()); KXECharDataDialog dlg( widget());
dlg.setCaption(i18n("Insert text")); 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()); KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataTextNode, dlg.contents());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -952,7 +952,7 @@ void KXMLEditorPart::slotActInsertCDATA()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotActInsertCDATA no element selected." << endl; kdError() << "KXMLEditorPart::slotActInsertCDATA no element selected." << endl;
@ -964,9 +964,9 @@ void KXMLEditorPart::slotActInsertCDATA()
KXECharDataDialog dlg( widget()); KXECharDataDialog dlg( widget());
dlg.setCaption(i18n("Insert CDATA")); 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()); KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataCDATASection, dlg.contents());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -983,7 +983,7 @@ void KXMLEditorPart::slotActInsertComment()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isElement()) ) if ( (!pNode) || (!pNode->isElement()) )
{ {
kdError() << "KXMLEditorPart::slotActInsertComment no element selected." << endl; kdError() << "KXMLEditorPart::slotActInsertComment no element selected." << endl;
@ -995,9 +995,9 @@ void KXMLEditorPart::slotActInsertComment()
KXECharDataDialog dlg( widget()); KXECharDataDialog dlg( widget());
dlg.setCaption(i18n("Insert comment")); 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()); KCommand *pCmd = new KXECharDataCommand(document(), domParentElement, dlg.atTop(), CharDataComment, dlg.contents());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -1015,7 +1015,7 @@ void KXMLEditorPart::slotXmlCharDataEdit()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( (!pNode) || (!pNode->isCharacterData()) ) if ( (!pNode) || (!pNode->isCharacterData()) )
{ {
kdError() << "KXMLEditorPart::slotXmlCharDataEdit no node selected or selected node is no character data." << endl; 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...") ); emit setStatusBarText( i18n("Editing character data...") );
QDomCharacterData domCharData = pNode->toCharacterData(); TQDomCharacterData domCharData = pNode->toCharacterData();
KXECharDataDialog dlg( widget() ); KXECharDataDialog dlg( widget() );
@ -1042,7 +1042,7 @@ void KXMLEditorPart::slotXmlCharDataEdit()
// dlg.setCharDataKind(eCharDataKind); // dlg.setCharDataKind(eCharDataKind);
dlg.setContents(domCharData.data()); dlg.setContents(domCharData.data());
if ( dlg.exec( true ) == QDialog::Accepted ) if ( dlg.exec( true ) == TQDialog::Accepted )
{ {
KCommand *pCmd = new KXEEditCharDataCommand(document(), domCharData, dlg.contents()); KCommand *pCmd = new KXEEditCharDataCommand(document(), domCharData, dlg.contents());
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -1059,7 +1059,7 @@ void KXMLEditorPart::slotXmlMoveNodeUp()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( ! pNode ) if ( ! pNode )
{ {
kdError() << "KXMLEditorPart::slotXmlMoveNodeUp no node selected." << endl; kdError() << "KXMLEditorPart::slotXmlMoveNodeUp no node selected." << endl;
@ -1082,7 +1082,7 @@ void KXMLEditorPart::slotXmlMoveNodeDown()
return; return;
} }
QDomNode * pNode = m_pViewTree->getSelectedNode(); TQDomNode * pNode = m_pViewTree->getSelectedNode();
if ( ! pNode ) if ( ! pNode )
{ {
kdError() << "KXMLEditorPart::slotXmlMoveNodeDown no node selected." << endl; 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()) if(node.isNull())
{ // node don't exists, remove item from combo { // node don't exists, remove item from combo
m_pActPathCombo->removeItem(strPath); m_pActPathCombo->removeItem(strPath);
@ -1141,7 +1141,7 @@ void KXMLEditorPart::slotPathClear()
m_pActPathCombo->slotFocusEdit(); m_pActPathCombo->slotFocusEdit();
} }
void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem ) void KXMLEditorPart::slotItemRenamedInplace( TQListViewItem * pItem )
{ {
KXE_TreeViewItem * pXMLItem = static_cast <KXE_TreeViewItem*> (pItem); KXE_TreeViewItem * pXMLItem = static_cast <KXE_TreeViewItem*> (pItem);
@ -1151,7 +1151,7 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem )
return; return;
} }
QDomElement domElement = pXMLItem->xmlNode()->toElement(); TQDomElement domElement = pXMLItem->xmlNode()->toElement();
if ( domElement.nodeName() != pItem->text(0) ) // if really something was changed 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, if ( nPosColon == -1 ) // if no namespace prefix was entered,
{ {
// check name // check name
QString strMessage = KXEElementDialog::checkName(pItem->text(0)); TQString strMessage = KXEElementDialog::checkName(pItem->text(0));
if(strMessage.length() > 0) if(strMessage.length() > 0)
{ {
// restore old name // restore old name
@ -1172,17 +1172,17 @@ void KXMLEditorPart::slotItemRenamedInplace( QListViewItem * pItem )
// clear the elements namespace prefix // clear the elements namespace prefix
// and set the entered text as its tag name // 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); m_pCmdHistory->addCommand(pCmd);
} }
else else
{ {
// otherwise split up the entered text by the first colon and // otherwise split up the entered text by the first colon and
QString strPrefix(pItem->text(0).left(nPosColon)); TQString strPrefix(pItem->text(0).left(nPosColon));
QString strName(pItem->text(0).right( pItem->text(0).length() - nPosColon - 1 )); TQString strName(pItem->text(0).right( pItem->text(0).length() - nPosColon - 1 ));
// check name // check name
QString strMessage = KXEElementDialog::checkName(strName); TQString strMessage = KXEElementDialog::checkName(strName);
if(strMessage.length() > 0) if(strMessage.length() > 0)
{ {
// restore old name // 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 if ( *m_pViewTree->getSelectedNode() == domAttr.ownerElement() ) // if the corresponding element
{ // is still selected { // 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 if ( *m_pViewTree->getSelectedNode() == domAttr.ownerElement() ) // if the corresponding element
{ // is still selected { // is still selected
@ -1233,15 +1233,15 @@ void KXMLEditorPart::slotAttributeValueChangedInplace( const QDomAttr & domAttr,
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
/** Copy XML node into clipboard */ /** Copy XML node into clipboard */
QTextDrag * KXMLEditorPart::copyNode(QDomNode * pNode) TQTextDrag * KXMLEditorPart::copyNode(TQDomNode * pNode)
{ {
QTextDrag *pDrag = 0; TQTextDrag *pDrag = 0;
QString strXML; TQString strXML;
QTextStream streamXML(&strXML, IO_WriteOnly); TQTextStream streamXML(&strXML, IO_WriteOnly);
int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps(); int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps();
pNode->save(streamXML, iIndent); pNode->save(streamXML, iIndent);
pDrag = new QTextDrag(strXML, m_pViewTree); pDrag = new TQTextDrag(strXML, m_pViewTree);
/*if(pNode->isElement()) /*if(pNode->isElement())
pDrag->setSubtype(KXE_TreeViewItem::m_strSubtypeXML); pDrag->setSubtype(KXE_TreeViewItem::m_strSubtypeXML);
@ -1269,12 +1269,12 @@ QTextDrag * KXMLEditorPart::copyNode(QDomNode * pNode)
// data - data to pasted // 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 // Drop XML Processing Instruction
if(QTextDrag::decode(data, strText)) if(TQTextDrag::decode(data, strText))
{ if(strText.find("<?xml ") == 0) { if(strText.find("<?xml ") == 0)
{ {
KMessageBox::sorry(0, i18n("This processing instruction cannot be pasted here !")); 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 // Paste clipboard contents as XML element
QString strErrorMsg; TQString strErrorMsg;
int iErrorLine, iErrorColumn; int iErrorLine, iErrorColumn;
QDomDocument doc; TQDomDocument doc;
if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) ) if(!doc.setContent(strXML, true, &strErrorMsg, &iErrorLine, &iErrorColumn) )
{ kdDebug() << "KXMLEditorPart::pasteNode: Failed parsing the file." << endl; { kdDebug() << "KXMLEditorPart::pasteNode: Failed parsing the file." << endl;
@ -1316,13 +1316,13 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
} }
// Append it as root node // 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); KCommand *pCmd = new KXEPasteToDocumentCommand(document(), document(), newNode);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
} }
else else
{ QDomNode sourceNode = doc.firstChild().firstChild().cloneNode(true); { TQDomNode sourceNode = doc.firstChild().firstChild().cloneNode(true);
/* /*
L.V. L.V.
@ -1331,17 +1331,17 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
if(sourceNode.isElement()) if(sourceNode.isElement())
{ {
QDomElement domSourceElement = sourceNode.toElement(); TQDomElement domSourceElement = sourceNode.toElement();
QDomNamedNodeMap list = domSourceElement.attributes(); TQDomNamedNodeMap list = domSourceElement.attributes();
unsigned int iLength = list.length(); unsigned int iLength = list.length();
for ( unsigned int iRow = 0; iRow < iLength; iRow++ ) 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()) if(domOwnerElement.isNull())
KMessageBox::sorry(m_pViewTree, i18n("Cloned owner is null !")); KMessageBox::sorry(m_pViewTree, i18n("Cloned owner is null !"));
}*/ }*/
@ -1349,7 +1349,7 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
if(pTargetNode->isElement()) if(pTargetNode->isElement())
{ {
QDomElement domTargetElement = pTargetNode->toElement(); TQDomElement domTargetElement = pTargetNode->toElement();
KCommand *pCmd = new KXEPasteToElementCommand(document(), domTargetElement, sourceNode); KCommand *pCmd = new KXEPasteToElementCommand(document(), domTargetElement, sourceNode);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
return true; return true;
@ -1357,8 +1357,8 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
if(pTargetNode->isProcessingInstruction() && sourceNode.isProcessingInstruction()) if(pTargetNode->isProcessingInstruction() && sourceNode.isProcessingInstruction())
{ // Replace contents of selected node { // Replace contents of selected node
QDomProcessingInstruction domTargetProcInstr = pTargetNode->toProcessingInstruction(); TQDomProcessingInstruction domTargetProcInstr = pTargetNode->toProcessingInstruction();
QDomProcessingInstruction domSourceProcInstr = sourceNode.toProcessingInstruction(); TQDomProcessingInstruction domSourceProcInstr = sourceNode.toProcessingInstruction();
KCommand *pCmd = new KXEPasteToProcInstrCommand(document(), domTargetProcInstr, domSourceProcInstr); KCommand *pCmd = new KXEPasteToProcInstrCommand(document(), domTargetProcInstr, domSourceProcInstr);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -1367,8 +1367,8 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
if(pTargetNode->isCharacterData() && sourceNode.isCharacterData()) if(pTargetNode->isCharacterData() && sourceNode.isCharacterData())
{ // Replace contents of selected node { // Replace contents of selected node
QDomCharacterData domTargetCharData = pTargetNode->toCharacterData(); TQDomCharacterData domTargetCharData = pTargetNode->toCharacterData();
QDomCharacterData domSourceCharData = sourceNode.toCharacterData(); TQDomCharacterData domSourceCharData = sourceNode.toCharacterData();
KCommand *pCmd = new KXEPasteToCharDataCommand(document(), domTargetCharData, domSourceCharData); KCommand *pCmd = new KXEPasteToCharDataCommand(document(), domTargetCharData, domSourceCharData);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -1392,7 +1392,7 @@ bool KXMLEditorPart::pasteNode(QDomNode * pTargetNode, QMimeSource *data)
// domSourceNode - source node // domSourceNode - source node
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool KXMLEditorPart::dropMoveNode(QDomElement & domTargetElement, QDomNode & domSourceNode) bool KXMLEditorPart::dropMoveNode(TQDomElement & domTargetElement, TQDomNode & domSourceNode)
{ {
KCommand *pCmd = new KXEDragDropMoveCommand(document(), domTargetElement, domSourceNode); KCommand *pCmd = new KXEDragDropMoveCommand(document(), domTargetElement, domSourceNode);
m_pCmdHistory->addCommand(pCmd); m_pCmdHistory->addCommand(pCmd);
@ -1412,14 +1412,14 @@ int headerHeight, footerHeight; // used in few functions, nevertheless temporary
void KXMLEditorPart::print(KPrinter* pPrinter) void KXMLEditorPart::print(KPrinter* pPrinter)
{ {
// setup the printer. with Qt, you always "print" to a // setup the printer. with TQt, you always "print" to a
// QPainter.. whether the output medium is a pixmap, a screen, or paper // TQPainter.. whether the output medium is a pixmap, a screen, or paper
QPainter p; TQPainter p;
QPainter *painter = &p; TQPainter *painter = &p;
QFont font( KXMLEditorFactory::configuration()->print()->fontFamily(), TQFont font( KXMLEditorFactory::configuration()->print()->fontFamily(),
KXMLEditorFactory::configuration()->print()->fontSize() ); KXMLEditorFactory::configuration()->print()->fontSize() );
QPaintDeviceMetrics metrics((QPrinter*)pPrinter); // determining TQPaintDeviceMetrics metrics((TQPrinter*)pPrinter); // determining
int width = metrics.width(); // width and int width = metrics.width(); // width and
int height = metrics.height(); // height of the page int height = metrics.height(); // height of the page
@ -1444,7 +1444,7 @@ void KXMLEditorPart::print(KPrinter* pPrinter)
painter->end(); // finish print job 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; pageNumber = pageNumber;
if ( KXMLEditorFactory::configuration()->print()->hasHeader() ) 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; width = width;
if (pageNumber==0) 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 // initialization of working variables is done when
// first page is about to be printed // first page is about to be printed
m_printLineNumber = 0; 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 lineHeight = (int)(painter->font().pointSize()*(1+m_printLinespace));
int y = top; 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 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() ) if ( KXMLEditorFactory::configuration()->print()->hasFooter() )
{ {
@ -1491,15 +1491,15 @@ void KXMLEditorPart::printFooter(QPainter* painter,int pageNumber, int ypos, int
// OTHER SLOTS // OTHER SLOTS
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
void KXMLEditorPart::slotTreeViewKeyPressed(QKeyEvent *e) void KXMLEditorPart::slotTreeViewKeyPressed(TQKeyEvent *e)
{ {
// few keypresses are recognized and proper actions // few keypresses are recognized and proper actions
// are executed. // are executed.
switch (e->key()) switch (e->key())
{ {
case Qt::Key_Delete : slotActDelete(); break; case TQt::Key_Delete : slotActDelete(); break;
case Qt::Key_Return : case TQt::Key_Return :
case Qt::Key_Enter : slotActProperties(); break; case TQt::Key_Enter : slotActProperties(); break;
} }
} }
@ -1551,7 +1551,7 @@ void KXMLEditorPart::slotSelectionCleared(bool bRootElementExists)
m_pActPathCombo->slotClearEdit(); m_pActPathCombo->slotClearEdit();
} }
void KXMLEditorPart::slotSelectionChanged( const QDomElement & selectedNode) void KXMLEditorPart::slotSelectionChanged( const TQDomElement & selectedNode)
{ {
// Enable/Disable actions // Enable/Disable actions
if(m_pBrowserExt) if(m_pBrowserExt)
@ -1607,7 +1607,7 @@ void KXMLEditorPart::slotSelectionChanged( const QDomElement & selectedNode)
m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(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 // Enable/Disable actions
if(m_pBrowserExt) if(m_pBrowserExt)
@ -1653,7 +1653,7 @@ void KXMLEditorPart::slotSelectionChanged( const QDomCharacterData & selectedNod
m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(selectedNode) ); 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 // Enable/Disable actions
if(m_pBrowserExt) if(m_pBrowserExt)
@ -1709,9 +1709,9 @@ void KXMLEditorPart::slotSelectionChanged( const QDomProcessingInstruction & sel
m_pActPathCombo->insertItem( domTool_getIconForNodeType(selectedNode.nodeType(), false), domTool_getPath(selectedNode) ); 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 ) if ( ! pContainer )
{ {
@ -1734,12 +1734,12 @@ void KXMLEditorPart::slotContextMenuRequested( const QString & szMenuName, const
// FUNCTIONS CALLED FROM KXECommand CHILD CLASSES // FUNCTIONS CALLED FROM KXECommand CHILD CLASSES
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
void KXMLEditorPart::updateNodeCreated(const QDomNode & node) void KXMLEditorPart::updateNodeCreated(const TQDomNode & node)
{ {
m_pViewTree->updateNodeCreated(node); m_pViewTree->updateNodeCreated(node);
} }
void KXMLEditorPart::updateNodeDeleted( const QDomNode & node ) void KXMLEditorPart::updateNodeDeleted( const TQDomNode & node )
{ {
m_pViewTree->updateNodeDeleted(node); m_pViewTree->updateNodeDeleted(node);
@ -1748,25 +1748,25 @@ void KXMLEditorPart::updateNodeDeleted( const QDomNode & node )
m_pActXmlElementInsert->setEnabled(true); m_pActXmlElementInsert->setEnabled(true);
} }
void KXMLEditorPart::updateNodeChanged( const QDomElement & domElement ) void KXMLEditorPart::updateNodeChanged( const TQDomElement & domElement )
{ {
m_pViewTree->updateNodeChanged(domElement); m_pViewTree->updateNodeChanged(domElement);
m_pViewElement->slotChange(domElement); m_pViewElement->slotChange(domElement);
} }
void KXMLEditorPart::updateNodeChanged( const QDomCharacterData & domCharData ) void KXMLEditorPart::updateNodeChanged( const TQDomCharacterData & domCharData )
{ {
m_pViewTree->updateNodeChanged(domCharData); m_pViewTree->updateNodeChanged(domCharData);
m_pViewContents->setText( domCharData.data() ); m_pViewContents->setText( domCharData.data() );
} }
void KXMLEditorPart::updateNodeChanged( const QDomProcessingInstruction &domProcInstr ) void KXMLEditorPart::updateNodeChanged( const TQDomProcessingInstruction &domProcInstr )
{ {
m_pViewTree->updateNodeChanged(domProcInstr); m_pViewTree->updateNodeChanged(domProcInstr);
m_pViewProcInstr->setText( domProcInstr.data() ); m_pViewProcInstr->setText( domProcInstr.data() );
} }
void KXMLEditorPart::updateNodeMoved( const QDomNode & domNode ) void KXMLEditorPart::updateNodeMoved( const TQDomNode & domNode )
{ {
m_pViewTree->updateNodeMoved(domNode); m_pViewTree->updateNodeMoved(domNode);
} }
@ -1776,7 +1776,7 @@ bool KXMLEditorPart::slotFileSaveAs()
{ {
emit setStatusBarText( i18n("Saving file with a new filename...") ); 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 i18n(FILE_DIALOG_FILTER), // filter
widget(), // parent widget(), // parent
"file dialog for saving", // name "file dialog for saving", // name
@ -1792,7 +1792,7 @@ bool KXMLEditorPart::slotFileSaveAs()
{ {
// append filetype if necessary // append filetype if necessary
if(dlg.currentFilter() != "*.*") if(dlg.currentFilter() != "*.*")
{ QString strExtension = dlg.currentFilter(); { TQString strExtension = dlg.currentFilter();
strExtension.remove('*'); strExtension.remove('*');
if(strExtension != url.fileName().right(strExtension.length())) if(strExtension != url.fileName().right(strExtension.length()))
@ -1819,20 +1819,20 @@ void KXMLEditorPart::slotDocOpened()
// same document again and compare the measurements. // same document again and compare the measurements.
// Olaf // Olaf
// //
// TODO: the three lines operating with the QTime objects // TODO: the three lines operating with the TQTime objects
// can be removed later // can be removed later
// update the view // update the view
m_pViewTree->updateClear(); m_pViewTree->updateClear();
int i = document()->childNodes().length(); 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 ) while ( i > 0 )
{ {
i--; i--;
m_pViewTree->updateNodeCreated( document()->childNodes().item(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; //kdDebug() << "KXMLEditorPart::slotDocOpened() time difference: " << t1.msecsTo(t2) << " msecs" << endl;
m_pActPathCombo->slotClear(); m_pActPathCombo->slotClear();
@ -1853,12 +1853,12 @@ void KXMLEditorPart::setDocument(KXEDocument *pDocument)
// document modification is also dispatched // document modification is also dispatched
connect(pDocument,SIGNAL(sigModified(bool)),this,SLOT(setModified(bool))); connect(pDocument,SIGNAL(sigModified(bool)),this,SLOT(setModified(bool)));
// update notifications // update notifications
connect(pDocument,SIGNAL(sigNodeChanged(const QDomElement&)),this,SLOT(updateNodeChanged(const QDomElement&))); connect(pDocument,SIGNAL(sigNodeChanged(const TQDomElement&)),this,SLOT(updateNodeChanged(const TQDomElement&)));
connect(pDocument,SIGNAL(sigNodeChanged(const QDomProcessingInstruction&)),this,SLOT(updateNodeChanged(const QDomProcessingInstruction&))); connect(pDocument,SIGNAL(sigNodeChanged(const TQDomProcessingInstruction&)),this,SLOT(updateNodeChanged(const TQDomProcessingInstruction&)));
connect(pDocument,SIGNAL(sigNodeChanged(const QDomCharacterData&)),this,SLOT(updateNodeChanged(const QDomCharacterData&))); connect(pDocument,SIGNAL(sigNodeChanged(const TQDomCharacterData&)),this,SLOT(updateNodeChanged(const TQDomCharacterData&)));
connect(pDocument,SIGNAL(sigNodeCreated(const QDomNode&)),this,SLOT(updateNodeCreated(const QDomNode&))); connect(pDocument,SIGNAL(sigNodeCreated(const TQDomNode&)),this,SLOT(updateNodeCreated(const TQDomNode&)));
connect(pDocument,SIGNAL(sigNodeDeleted(const QDomNode&)),this,SLOT(updateNodeDeleted(const QDomNode&))); connect(pDocument,SIGNAL(sigNodeDeleted(const TQDomNode&)),this,SLOT(updateNodeDeleted(const TQDomNode&)));
connect(pDocument,SIGNAL(sigNodeMoved(const QDomNode&)),this,SLOT(updateNodeMoved(const QDomNode&))); connect(pDocument,SIGNAL(sigNodeMoved(const TQDomNode&)),this,SLOT(updateNodeMoved(const TQDomNode&)));
// merging document action collection // merging document action collection
insertChildClient(pDocument); insertChildClient(pDocument);
} }

@ -21,26 +21,26 @@
#include <kparts/part.h> #include <kparts/part.h>
#include <kparts/browserextension.h> #include <kparts/browserextension.h>
#include <qdom.h> #include <tqdom.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include "kxe_treeview.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" #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 KXE_ViewElement;
class KXESearchDialog; class KXESearchDialog;
class QTextEdit; class TQTextEdit;
class KAction; class KAction;
class KToolBarPopupAction; class KToolBarPopupAction;
class KXmlEditorComboAction; class KXmlEditorComboAction;
class QDomNode; class TQDomNode;
class QKeyEvent; class TQKeyEvent;
class KXMLEditorPartIfaceReadOnly; // DCOP interface class KXMLEditorPartIfaceReadOnly; // DCOP interface
class KCommandHistory; class KCommandHistory;
class KPrinter; class KPrinter;
class QSplitter; class TQSplitter;
class KXEDocument; class KXEDocument;
@ -54,7 +54,7 @@ public:
Creates the actions, the view (widgets) and changes to "begin state". 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 */ /** @short Destructor */
virtual ~KXMLEditorPart(); virtual ~KXMLEditorPart();
@ -63,16 +63,16 @@ public:
virtual void setReadWrite( bool fReadWrite = true ); virtual void setReadWrite( bool fReadWrite = true );
/** @short Returns the selected XML object's path or an empty string, if no object is selected. */ /** @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 */ /** @short Copy XML node into clipboard */
QTextDrag * copyNode(QDomNode *); TQTextDrag * copyNode(TQDomNode *);
/** @short Paste XML node from clipboard into document */ /** @short Paste XML node from clipboard into document */
bool pasteNode(QDomNode *, QMimeSource *); bool pasteNode(TQDomNode *, TQMimeSource *);
/** @short Drag&Drop move */ /** @short Drag&Drop move */
bool dropMoveNode(QDomElement &, QDomNode &); bool dropMoveNode(TQDomElement &, TQDomNode &);
/** @short Prints the document on specified printer. /** @short Prints the document on specified printer.
@param pPrinter printer which will be used for printing. */ @param pPrinter printer which will be used for printing. */
@ -94,22 +94,22 @@ public slots:
virtual void setModified( bool fModified ); virtual void setModified( bool fModified );
/** @short Updates tree view after creating new element */ /** @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 */ /** @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 */ /** @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 */ /** @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 */ /** @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 */ /** @short Updates tree view after move node */
void updateNodeMoved( const QDomNode & node ); void updateNodeMoved( const TQDomNode & node );
/** /**
* @short Reimplemented from @ref KParts::KReadWritePart::setModified. * @short Reimplemented from @ref KParts::KReadWritePart::setModified.
@ -221,18 +221,18 @@ public slots:
/** @short Shows configuration dialog (@ref OptionsDialog) */ /** @short Shows configuration dialog (@ref OptionsDialog) */
void slotConfigure(); void slotConfigure();
void slotPathSelected( const QString & szPath ); void slotPathSelected( const TQString & szPath );
void slotPathSelected(); void slotPathSelected();
void slotPathClear(); void slotPathClear();
/** @short Called when a tree view items text was changed via inplace-renaming. */ /** @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. */ /** @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. */ /** @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. */ /** @short Called when File->Print or icon from the toolbar is selected. */
void slotActPrint(); void slotActPrint();
@ -246,7 +246,7 @@ public slots:
/** @short Slot for removing XML nodes. */ /** @short Slot for removing XML nodes. */
void slotActDelete(); void slotActDelete();
void slotTreeViewKeyPressed(QKeyEvent *e); void slotTreeViewKeyPressed(TQKeyEvent *e);
/** @short Slot that performs redo function. */ /** @short Slot that performs redo function. */
void slotActRedo(); void slotActRedo();
@ -270,7 +270,7 @@ protected:
@param ypos y coordinate of upper border of the header @param ypos y coordinate of upper border of the header
@sa printPage() @sa printFooter() @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). /** @short Draws footer for printouts (page number).
@param painter a painter to use for drawing @param painter a painter to use for drawing
@ -278,7 +278,7 @@ protected:
@param ypos y coordinate of upper border of the footer @param ypos y coordinate of upper border of the footer
@sa printHeader() @sa printFooter() @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. /** @short Draws page for printing purposes.
@ -290,13 +290,13 @@ protected:
@param width,height size of the medium (e.g. paper) @param width,height size of the medium (e.g. paper)
@sa printPage() @sa printHeader() @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(). */ /** @short Used in printing function printPage(). */
unsigned int m_printLineNumber; unsigned int m_printLineNumber;
/** @short Used in printing function printPage(). */ /** @short Used in printing function printPage(). */
QStringList m_printLines; TQStringList m_printLines;
// the actions // the actions
KAction * m_pActEditFind; KAction * m_pActEditFind;
@ -329,16 +329,16 @@ protected:
void slotSelectionCleared(bool); void slotSelectionCleared(bool);
/** @short Enables/disables actions depending on the given XML element and changes views */ /** @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 */ /** @short Enables/disables actions and changes views */
void slotSelectionChanged( const QDomCharacterData & ); void slotSelectionChanged( const TQDomCharacterData & );
/** @short Enables/disables actions and changes views */ /** @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. */ /** @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 */ /** @short Invoked everytime document has new content */
void slotDocOpened(); void slotDocOpened();
@ -348,16 +348,16 @@ protected:
KXE_TreeView * m_pViewTree; KXE_TreeView * m_pViewTree;
/** the tab widget, contains: m_pViewElement, m_pViewContents */ /** the tab widget, contains: m_pViewElement, m_pViewContents */
QTabWidget * m_pTabWidget; TQTabWidget * m_pTabWidget;
/** widget to display XML element */ /** widget to display XML element */
KXE_ViewElement * m_pViewElement; KXE_ViewElement * m_pViewElement;
/** edit widget for contents */ /** edit widget for contents */
QTextEdit * m_pViewContents; TQTextEdit * m_pViewContents;
/** widget to display a proc.instr. */ /** widget to display a proc.instr. */
QTextEdit * m_pViewProcInstr; TQTextEdit * m_pViewProcInstr;
/** the search dialog, used for find action */ /** the search dialog, used for find action */
KXESearchDialog * m_pDlgSearch; KXESearchDialog * m_pDlgSearch;
@ -411,7 +411,7 @@ protected:
KPrinter *m_pPrinter; KPrinter *m_pPrinter;
/** spitter - main widget in the part */ /** spitter - main widget in the part */
QSplitter *pSplitter; TQSplitter *pSplitter;
/** Pointer to underlying KXEDocument object */ /** Pointer to underlying KXEDocument object */
KXEDocument* m_pDocument; KXEDocument* m_pDocument;

@ -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 "qdom_add.h"
#include <kiconloader.h> #include <kiconloader.h>
#include <kdebug.h> #include <kdebug.h>
#include <qtextstream.h> #include <tqtextstream.h>
#include "kxmleditorfactory.h" #include "kxmleditorfactory.h"
#include "kxesearchdialog.h" #include "kxesearchdialog.h"
QPixmap g_iconElement( UserIcon("xml_element",KXMLEditorFactory::instance()) ); TQPixmap g_iconElement( UserIcon("xml_element",KXMLEditorFactory::instance()) );
QPixmap g_iconText( UserIcon("xml_text",KXMLEditorFactory::instance()) ); TQPixmap g_iconText( UserIcon("xml_text",KXMLEditorFactory::instance()) );
QPixmap g_iconComment( UserIcon("xml_comment",KXMLEditorFactory::instance()) ); TQPixmap g_iconComment( UserIcon("xml_comment",KXMLEditorFactory::instance()) );
QPixmap g_iconCDATASection( UserIcon("xml_cdata",KXMLEditorFactory::instance()) ); TQPixmap g_iconCDATASection( UserIcon("xml_cdata",KXMLEditorFactory::instance()) );
QPixmap g_iconProcessingInstruction( UserIcon("xml_procinstr",KXMLEditorFactory::instance()) ); TQPixmap g_iconProcessingInstruction( UserIcon("xml_procinstr",KXMLEditorFactory::instance()) );
QPixmap g_iconElement_b( UserIcon("xml_element_b",KXMLEditorFactory::instance()) ); TQPixmap g_iconElement_b( UserIcon("xml_element_b",KXMLEditorFactory::instance()) );
QPixmap g_iconText_b( UserIcon("xml_text_b",KXMLEditorFactory::instance()) ); TQPixmap g_iconText_b( UserIcon("xml_text_b",KXMLEditorFactory::instance()) );
QPixmap g_iconComment_b( UserIcon("xml_comment_b",KXMLEditorFactory::instance()) ); TQPixmap g_iconComment_b( UserIcon("xml_comment_b",KXMLEditorFactory::instance()) );
QPixmap g_iconCDATASection_b( UserIcon("xml_cdata_b",KXMLEditorFactory::instance()) ); TQPixmap g_iconCDATASection_b( UserIcon("xml_cdata_b",KXMLEditorFactory::instance()) );
QPixmap g_iconProcessingInstruction_b( UserIcon("xml_procinstr_b",KXMLEditorFactory::instance()) ); TQPixmap g_iconProcessingInstruction_b( UserIcon("xml_procinstr_b",KXMLEditorFactory::instance()) );
QPixmap g_iconUnknown; TQPixmap g_iconUnknown;
const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool bBookmarked ) const TQPixmap & domTool_getIconForNodeType( TQDomNode::NodeType type, bool bBookmarked )
{ {
if(!bBookmarked) if(!bBookmarked)
{ switch(type) { switch(type)
{ case QDomNode::ElementNode: return g_iconElement; break; { case TQDomNode::ElementNode: return g_iconElement; break;
case QDomNode::TextNode: return g_iconText; break; case TQDomNode::TextNode: return g_iconText; break;
case QDomNode::CDATASectionNode: return g_iconCDATASection; break; case TQDomNode::CDATASectionNode: return g_iconCDATASection; break;
case QDomNode::CommentNode: return g_iconComment; break; case TQDomNode::CommentNode: return g_iconComment; break;
case QDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction; break; case TQDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction; break;
default: default:
kdDebug() << "domTool_getIconForNodeType: unknown node type (" << type << ")" << endl; kdDebug() << "domTool_getIconForNodeType: unknown node type (" << type << ")" << endl;
@ -55,11 +55,11 @@ const QPixmap & domTool_getIconForNodeType( QDomNode::NodeType type, bool bBookm
} }
else else
{ switch(type) { switch(type)
{ case QDomNode::ElementNode: return g_iconElement_b; break; { case TQDomNode::ElementNode: return g_iconElement_b; break;
case QDomNode::TextNode: return g_iconText_b; break; case TQDomNode::TextNode: return g_iconText_b; break;
case QDomNode::CDATASectionNode: return g_iconCDATASection_b; break; case TQDomNode::CDATASectionNode: return g_iconCDATASection_b; break;
case QDomNode::CommentNode: return g_iconComment_b; break; case TQDomNode::CommentNode: return g_iconComment_b; break;
case QDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction_b; break; case TQDomNode::ProcessingInstructionNode: return g_iconProcessingInstruction_b; break;
default: default:
kdDebug() << "domTool_getIconForNodeType: unknown node type (" << type << ")" << endl; 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 // Obtain XPath for all nodes, instead of elements
QString domTool_getPath( const QDomNode & node ) TQString domTool_getPath( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
kdDebug() << "domTool_getPath: elelent given" << endl; kdDebug() << "domTool_getPath: elelent given" << endl;
return QString(); return TQString();
} }
if(node.isElement()) 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()) ) if ( (!parentNode.isNull()) && (!parentNode.isDocument()) )
{ {
strReturn = domTool_getPath( parentNode.toElement() ); // get the parent's path strReturn = domTool_getPath( parentNode.toElement() ); // get the parent's path
@ -98,16 +98,16 @@ QString domTool_getPath( const QDomNode & node )
} }
// Obtain XPath for elements // Obtain XPath for elements
QString domTool_getPath( const QDomElement & domElement ) TQString domTool_getPath( const TQDomElement & domElement )
{ {
if ( domElement.isNull() ) if ( domElement.isNull() )
{ {
kdDebug() << "domTool_getPath: no node given" << endl; kdDebug() << "domTool_getPath: no node given" << endl;
return QString(); return TQString();
} }
QString strReturn; TQString strReturn;
QDomNode parentNode = domElement.parentNode(); TQDomNode parentNode = domElement.parentNode();
if ( (!parentNode.isNull()) && (!parentNode.isDocument()) ) if ( (!parentNode.isNull()) && (!parentNode.isDocument()) )
{ {
// calculate index - only for elements with the same name // 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 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 // traverse previous sibling elements with same name and calculate index
QDomNode tmpNode = domElement.previousSibling(); TQDomNode tmpNode = domElement.previousSibling();
while ( ! tmpNode.isNull() ) while ( ! tmpNode.isNull() )
{ {
if(tmpNode.isElement()) if(tmpNode.isElement())
{ {
QDomElement domSiblingElement = tmpNode.toElement(); TQDomElement domSiblingElement = tmpNode.toElement();
if(domElement.tagName() == domSiblingElement.tagName()) if(domElement.tagName() == domSiblingElement.tagName())
{ i++; bUseIndex = true; { i++; bUseIndex = true;
@ -133,12 +133,12 @@ QString domTool_getPath( const QDomElement & domElement )
{ {
// traverse next sibling elements with same name // traverse next sibling elements with same name
// and decide, if index is necessary // and decide, if index is necessary
QDomNode tmpNode = domElement.nextSibling(); TQDomNode tmpNode = domElement.nextSibling();
while ( ! tmpNode.isNull() ) while ( ! tmpNode.isNull() )
{ {
if(tmpNode.isElement()) if(tmpNode.isElement())
{ {
QDomElement domSiblingElement = tmpNode.toElement(); TQDomElement domSiblingElement = tmpNode.toElement();
if(domElement.tagName() == domSiblingElement.tagName()) if(domElement.tagName() == domSiblingElement.tagName())
bUseIndex = true; bUseIndex = true;
@ -155,7 +155,7 @@ QString domTool_getPath( const QDomElement & domElement )
if(bUseIndex) if(bUseIndex)
{ {
QString strIndex; TQString strIndex;
strIndex.setNum(i+1); strIndex.setNum(i+1);
strReturn += "[" + strIndex + "]"; // append the index strReturn += "[" + strIndex + "]"; // append the index
} }
@ -166,7 +166,7 @@ QString domTool_getPath( const QDomElement & domElement )
return strReturn; return strReturn;
} }
unsigned int domTool_getLevel( const QDomNode & node ) unsigned int domTool_getLevel( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
@ -175,7 +175,7 @@ unsigned int domTool_getLevel( const QDomNode & node )
} }
unsigned int iLevel = 0; unsigned int iLevel = 0;
QDomNode parentNode = node.parentNode(); TQDomNode parentNode = node.parentNode();
while ( ! parentNode.isNull() ) while ( ! parentNode.isNull() )
{ {
iLevel++; iLevel++;
@ -185,26 +185,26 @@ unsigned int domTool_getLevel( const QDomNode & node )
return iLevel - 1; return iLevel - 1;
} }
QString domTool_save( const QDomNode & node, int iIndent ) TQString domTool_save( const TQDomNode & node, int iIndent )
{ {
QString strXML; TQString strXML;
QTextStream ts( & strXML, IO_WriteOnly ); TQTextStream ts( & strXML, IO_WriteOnly );
node.save(ts, iIndent); node.save(ts, iIndent);
return strXML; return strXML;
} }
QDomNode domTool_prevNode( const QDomNode & node ) TQDomNode domTool_prevNode( const TQDomNode & node )
{ {
if ( node.isNull() ) if ( node.isNull() )
{ {
kdDebug() << "domTool_prevNode: internal implementation error - the given node is an empty one" << endl; 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 if ( ! node.previousSibling().isNull() ) // if there is a prev. sibling
{ // return its last grand child (if there is any) { // return its last grand child (if there is any)
QDomNode prevNode = node.previousSibling(); TQDomNode prevNode = node.previousSibling();
while ( ! prevNode.lastChild().isNull() ) while ( ! prevNode.lastChild().isNull() )
prevNode = prevNode.lastChild(); prevNode = prevNode.lastChild();
return prevNode; 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() ) if ( node.isNull() )
{ {
kdDebug() << "domTool_nextNode: internal implementation error - the given node is an empty one" << endl; kdDebug() << "domTool_nextNode: internal implementation error - the given node is an empty one" << endl;
return QDomNode(); return TQDomNode();
} }
// checking for a child // checking for a child
@ -231,7 +231,7 @@ QDomNode domTool_nextNode( const QDomNode & node )
return node.nextSibling(); return node.nextSibling();
// there is no next sibling -> checking for parents' next sibling(s) // there is no next sibling -> checking for parents' next sibling(s)
QDomNode nodeParent = node.parentNode(); TQDomNode nodeParent = node.parentNode();
while ( ! nodeParent.isNull() ) while ( ! nodeParent.isNull() )
{ {
if ( ! nodeParent.nextSibling().isNull() ) if ( ! nodeParent.nextSibling().isNull() )
@ -241,15 +241,15 @@ QDomNode domTool_nextNode( const QDomNode & node )
} }
// parent has no parents anymore // 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) 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 if ( szPath == szNodePath ) // test if the strings match
return node; return node;
@ -257,15 +257,15 @@ QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath )
// we will find any node in root element subtree // we will find any node in root element subtree
if ( szPath.length() <= szNodePath.length() ) // the given string must be longer 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 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 // recursively check the childs
QDomNode nodeChild = node.firstChild(); TQDomNode nodeChild = node.firstChild();
QDomNode nodeTmp; TQDomNode nodeTmp;
while ( ! nodeChild.isNull() ) while ( ! nodeChild.isNull() )
{ {
nodeTmp = domTool_matchingNode( nodeChild, szPath ); nodeTmp = domTool_matchingNode( nodeChild, szPath );
@ -274,10 +274,10 @@ QDomNode domTool_matchingNode( const QDomNode & node, const QString & szPath )
nodeChild = nodeChild.nextSibling(); 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() ) if ( node.isNull() )
{ {
@ -293,7 +293,7 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions )
switch ( node.nodeType() ) switch ( node.nodeType() )
{ {
case QDomNode::ElementNode: // ---------------------------------------- case TQDomNode::ElementNode: // ----------------------------------------
{ {
if ( pConditions->getInElementNames() ) if ( pConditions->getInElementNames() )
{ {
@ -303,7 +303,7 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions )
if ( ( pConditions->getInAttributeNames() ) || ( pConditions->getInAttributeValues() ) ) if ( ( pConditions->getInAttributeNames() ) || ( pConditions->getInAttributeValues() ) )
{ {
QDomNamedNodeMap list = node.toElement().attributes(); TQDomNamedNodeMap list = node.toElement().attributes();
unsigned int iLength = list.length(); unsigned int iLength = list.length();
if ( iLength <= 0 ) if ( iLength <= 0 )
return false; // no attributes return false; // no attributes
@ -324,9 +324,9 @@ bool domTool_match( QDomNode node, const KXESearchDialog * const pConditions )
break; break;
} }
case QDomNode::TextNode: // ---------------------------------------- case TQDomNode::TextNode: // ----------------------------------------
case QDomNode::CDATASectionNode: case TQDomNode::CDATASectionNode:
case QDomNode::CommentNode: case TQDomNode::CommentNode:
{ {
if ( pConditions->getInContents() ) if ( pConditions->getInContents() )
{ {

@ -15,41 +15,41 @@
* * * *
***************************************************************************/ ***************************************************************************/
#ifndef QDOM_ADD_H #ifndef TQDOM_ADD_H
#define QDOM_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 <tqpixmap.h>
#include <qdom.h> #include <tqdom.h>
class KXESearchDialog; class KXESearchDialog;
extern QPixmap g_iconElement; extern TQPixmap g_iconElement;
extern QPixmap g_iconText; extern TQPixmap g_iconText;
extern QPixmap g_iconComment; extern TQPixmap g_iconComment;
extern QPixmap g_iconCDATASection; extern TQPixmap g_iconCDATASection;
extern QPixmap g_iconProcessingInstruction; extern TQPixmap g_iconProcessingInstruction;
extern QPixmap g_iconElement_b; extern TQPixmap g_iconElement_b;
extern QPixmap g_iconText_b; extern TQPixmap g_iconText_b;
extern QPixmap g_iconComment_b; extern TQPixmap g_iconComment_b;
extern QPixmap g_iconCDATASection_b; extern TQPixmap g_iconCDATASection_b;
extern QPixmap g_iconProcessingInstruction_b; extern TQPixmap g_iconProcessingInstruction_b;
/** Returns the corresponding pixmap/icon to the given node type. */ /** 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. */ /** Returns the path of the given node. */
QString domTool_getPath( const QDomNode & ); TQString domTool_getPath( const TQDomNode & );
/** Returns the path of the given node. */ /** 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. */ /** 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). */ /** Returns a TQString with the XML representation of the given node including all its children (uses @ref TQDomNode::save). */
QString domTool_save( const QDomNode &, int ); TQString domTool_save( const TQDomNode &, int );
/** /**
* Returns the previous node of the given one or an empty node, if it is the first. * 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 * if there is no sibling above, it will be its parent or
* an empty node (if there is no parent). * 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. * Returns the next node of the given one or an empty node, if it is the last.
* This will be it's first child, * This will be it's first child,
* if there are no childs, it will be the next sibling * 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 ... * 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. * Tests the given node and its (grand)childs.
* Returns the node, which matches the given path, oran empty node (if no one matches). * 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. */ /** 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 #endif

Loading…
Cancel
Save