summaryrefslogtreecommitdiffstats
path: root/libkdeedu/kdeeduui/kdeeduglossary.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /libkdeedu/kdeeduui/kdeeduglossary.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
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
Diffstat (limited to 'libkdeedu/kdeeduui/kdeeduglossary.cpp')
-rw-r--r--libkdeedu/kdeeduui/kdeeduglossary.cpp44
1 files changed, 22 insertions, 22 deletions
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<GlossaryItem*> Glossary::readItems( TQDomDocument &itemDocument )
item->setName( i18n( nameNode.toElement( ).text().utf8() ) );
- item->setDesc( desc.replace("[b]", "<b>" ) );
- item->setDesc( item->desc().replace("[/b]", "</b>" ) );
- item->setDesc( item->desc().replace("[i]", "<i>" ) );
- item->setDesc( item->desc().replace("[/i]", "</i>" ) );
- item->setDesc( item->desc().replace("[sub]", "<sub>" ) );
- item->setDesc( item->desc().replace("[/sub]", "</sub>" ) );
- item->setDesc( item->desc().replace("[sup]", "<sup>" ) );
- item->setDesc( item->desc().replace("[/sup]", "</sup>" ) );
- item->setDesc( item->desc().replace("[br]", "<br />" ) );
+ item->setDesc( desc.tqreplace("[b]", "<b>" ) );
+ item->setDesc( item->desc().tqreplace("[/b]", "</b>" ) );
+ item->setDesc( item->desc().tqreplace("[i]", "<i>" ) );
+ item->setDesc( item->desc().tqreplace("[/i]", "</i>" ) );
+ item->setDesc( item->desc().tqreplace("[sub]", "<sub>" ) );
+ item->setDesc( item->desc().tqreplace("[/sub]", "</sub>" ) );
+ item->setDesc( item->desc().tqreplace("[sup]", "<sup>" ) );
+ item->setDesc( item->desc().tqreplace("[/sup]", "</sup>" ) );
+ item->setDesc( item->desc().tqreplace("[br]", "<br />" ) );
refNodeList = refNode.elementsByTagName( "refitem" );
for ( uint it = 0; it < refNodeList.count(); it++ )
@@ -162,8 +162,8 @@ TQValueList<GlossaryItem*> 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 += "<br>";
else
first = false;
- htmlcode += TQString( "<a href=\"item://%1\">%2</a>" ).arg( m_ref[i], m_ref[i] );
+ htmlcode += TQString( "<a href=\"item://%1\">%2</a>" ).tqarg( m_ref[i], m_ref[i] );
}
return htmlcode;