summaryrefslogtreecommitdiffstats
path: root/libkdeedu/kdeeduui
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
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')
-rw-r--r--libkdeedu/kdeeduui/kdeeduglossary.cpp44
-rw-r--r--libkdeedu/kdeeduui/kdeeduglossary.h7
-rw-r--r--libkdeedu/kdeeduui/kedusimpleentrydlg.h1
-rw-r--r--libkdeedu/kdeeduui/kedusimpleentrydlgForm.ui30
4 files changed, 42 insertions, 40 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;
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 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KEduSimpleEntryDlgForm</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>Simple_entry_dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -15,11 +15,11 @@
<property name="caption">
<string>Simple Entry Dialog</string>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>e_original</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>40</x>
<y>80</y>
@@ -28,11 +28,11 @@
</rect>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>e_translation</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>40</x>
<y>180</y>
@@ -41,11 +41,11 @@
</rect>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton1</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>50</x>
<y>360</y>
@@ -57,11 +57,11 @@
<string>&amp;OK</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton1_2</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>460</x>
<y>360</y>
@@ -73,11 +73,11 @@
<string>C&amp;ancel</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>40</x>
<y>50</y>
@@ -89,11 +89,11 @@
<string>Original:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1_2</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>40</x>
<y>150</y>
@@ -106,5 +106,5 @@
</property>
</widget>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>