From a374efce3a207b39514be3c52264091400ce297e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:44:41 +0000 Subject: TQt4 port kdeedu This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdeedu/kdeeduui/kdeeduglossary.cpp | 44 ++++++++++++++-------------- libkdeedu/kdeeduui/kdeeduglossary.h | 7 +++-- libkdeedu/kdeeduui/kedusimpleentrydlg.h | 1 + libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui | 30 +++++++++---------- 4 files changed, 42 insertions(+), 40 deletions(-) (limited to 'libkdeedu/kdeeduui') diff --git a/libkdeedu/kdeeduui/kdeeduglossary.cpp b/libkdeedu/kdeeduui/kdeeduglossary.cpp index 1b0902b1..ff108975 100644 --- a/libkdeedu/kdeeduui/kdeeduglossary.cpp +++ b/libkdeedu/kdeeduui/kdeeduglossary.cpp @@ -41,25 +41,25 @@ Glossary::~Glossary() bool Glossary::loadLayout( TQDomDocument &Document, const KURL& url ) { - TQFile layoutFile( url.path() ); + TQFile tqlayoutFile( url.path() ); - if (!layoutFile.exists()) + if (!tqlayoutFile.exists()) { - kdDebug() << "no such file: " << layoutFile.name() << endl; + kdDebug() << "no such file: " << tqlayoutFile.name() << endl; return false; } - if (!layoutFile.open(IO_ReadOnly)) + if (!tqlayoutFile.open(IO_ReadOnly)) return false; ///Check if document is well-formed - if (!Document.setContent(&layoutFile)) + if (!Document.setContent(&tqlayoutFile)) { kdDebug() << "wrong xml" << endl; - layoutFile.close(); + tqlayoutFile.close(); return false; } - layoutFile.close(); + tqlayoutFile.close(); return true; } @@ -100,8 +100,8 @@ void Glossary::fixImagePath() for ( ; it != itEnd ; ++it ) { - ( *it )->setDesc( ( *it )->desc().replace("[img]", firstpart ) ); - ( *it )->setDesc( ( *it )->desc().replace("[/img]", "\" />" ) ); + ( *it )->setDesc( ( *it )->desc().tqreplace("[img]", firstpart ) ); + ( *it )->setDesc( ( *it )->desc().tqreplace("[/img]", "\" />" ) ); } } @@ -136,15 +136,15 @@ TQValueList Glossary::readItems( TQDomDocument &itemDocument ) item->setName( i18n( nameNode.toElement( ).text().utf8() ) ); - item->setDesc( desc.replace("[b]", "" ) ); - item->setDesc( item->desc().replace("[/b]", "" ) ); - item->setDesc( item->desc().replace("[i]", "" ) ); - item->setDesc( item->desc().replace("[/i]", "" ) ); - item->setDesc( item->desc().replace("[sub]", "" ) ); - item->setDesc( item->desc().replace("[/sub]", "" ) ); - item->setDesc( item->desc().replace("[sup]", "" ) ); - item->setDesc( item->desc().replace("[/sup]", "" ) ); - item->setDesc( item->desc().replace("[br]", "
" ) ); + item->setDesc( desc.tqreplace("[b]", "" ) ); + item->setDesc( item->desc().tqreplace("[/b]", "" ) ); + item->setDesc( item->desc().tqreplace("[i]", "" ) ); + item->setDesc( item->desc().tqreplace("[/i]", "" ) ); + item->setDesc( item->desc().tqreplace("[sub]", "" ) ); + item->setDesc( item->desc().tqreplace("[/sub]", "" ) ); + item->setDesc( item->desc().tqreplace("[sup]", "" ) ); + item->setDesc( item->desc().tqreplace("[/sup]", "" ) ); + item->setDesc( item->desc().tqreplace("[br]", "
" ) ); refNodeList = refNode.elementsByTagName( "refitem" ); for ( uint it = 0; it < refNodeList.count(); it++ ) @@ -162,8 +162,8 @@ TQValueList Glossary::readItems( TQDomDocument &itemDocument ) -GlossaryDialog::GlossaryDialog( bool folded, TQWidget *parent, const char *name) - : KDialogBase( Plain, i18n( "Glossary" ), Close, NoDefault, parent, name, false ) +GlossaryDialog::GlossaryDialog( bool folded, TQWidget *tqparent, const char *name) + : KDialogBase( Plain, i18n( "Glossary" ), Close, NoDefault, tqparent, name, false ) { //this string will be used for all items. If a backgroundpicture should //be used call Glossary::setBackgroundPicture(). @@ -216,7 +216,7 @@ GlossaryDialog::~GlossaryDialog() void GlossaryDialog::keyPressEvent(TQKeyEvent* e) { - if (e->key() == Qt::Key_Return) { + if (e->key() == TQt::Key_Return) { e->ignore(); } KDialogBase::keyPressEvent(e); @@ -396,7 +396,7 @@ TQString GlossaryItem::parseReferences() const htmlcode += "
"; else first = false; - htmlcode += TQString( "%2" ).arg( m_ref[i], m_ref[i] ); + htmlcode += TQString( "%2" ).tqarg( m_ref[i], m_ref[i] ); } return htmlcode; diff --git a/libkdeedu/kdeeduui/kdeeduglossary.h b/libkdeedu/kdeeduui/kdeeduglossary.h index 44b0cf85..e6a0622f 100644 --- a/libkdeedu/kdeeduui/kdeeduglossary.h +++ b/libkdeedu/kdeeduui/kdeeduglossary.h @@ -148,7 +148,7 @@ class Glossary TQString m_picturepath; /** - * Load the layout from an XML file. + * Load the tqlayout from an XML file. * * @param doc The TQDomDocument which will contain the read XML * contents. @@ -174,7 +174,7 @@ class Glossary * A GlossaryItem stores the information of the content of * the item and its name. Furthermore, every item can have * a number of pictures or references associated to it. - * These are stored as QStringLists. + * These are stored as TQStringLists. */ class GlossaryItem { @@ -240,9 +240,10 @@ class GlossaryItem class GlossaryDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GlossaryDialog( bool folded = true, TQWidget *parent=0, const char *name=0); + GlossaryDialog( bool folded = true, TQWidget *tqparent=0, const char *name=0); ~GlossaryDialog(); void keyPressEvent(TQKeyEvent*); diff --git a/libkdeedu/kdeeduui/kedusimpleentrydlg.h b/libkdeedu/kdeeduui/kedusimpleentrydlg.h index f110fab6..d84fe00c 100644 --- a/libkdeedu/kdeeduui/kedusimpleentrydlg.h +++ b/libkdeedu/kdeeduui/kedusimpleentrydlg.h @@ -7,6 +7,7 @@ class KEduSimpleEntryDlg : public KEduSimpleEntryDlgForm { Q_OBJECT + TQ_OBJECT public: diff --git a/libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui b/libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui index 32fa6b68..82c5203f 100644 --- a/libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui +++ b/libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui @@ -1,10 +1,10 @@ KEduSimpleEntryDlgForm - + Simple_entry_dialog - + 0 0 @@ -15,11 +15,11 @@ Simple Entry Dialog - + e_original - + 40 80 @@ -28,11 +28,11 @@ - + e_translation - + 40 180 @@ -41,11 +41,11 @@ - + PushButton1 - + 50 360 @@ -57,11 +57,11 @@ &OK - + PushButton1_2 - + 460 360 @@ -73,11 +73,11 @@ C&ancel - + TextLabel1 - + 40 50 @@ -89,11 +89,11 @@ Original: - + TextLabel1_2 - + 40 150 @@ -106,5 +106,5 @@ - + -- cgit v1.2.1