summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/latex
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/latex')
-rw-r--r--kopete/plugins/latex/latexguiclient.cpp10
-rw-r--r--kopete/plugins/latex/latexguiclient.h3
-rw-r--r--kopete/plugins/latex/latexplugin.cpp24
-rw-r--r--kopete/plugins/latex/latexplugin.h3
-rw-r--r--kopete/plugins/latex/latexpreferences.cpp4
-rw-r--r--kopete/plugins/latex/latexpreferences.h3
-rw-r--r--kopete/plugins/latex/latexprefsbase.ui28
7 files changed, 39 insertions, 36 deletions
diff --git a/kopete/plugins/latex/latexguiclient.cpp b/kopete/plugins/latex/latexguiclient.cpp
index ea9420fb..154a176a 100644
--- a/kopete/plugins/latex/latexguiclient.cpp
+++ b/kopete/plugins/latex/latexguiclient.cpp
@@ -33,13 +33,13 @@
#include "latexplugin.h"
#include "latexguiclient.h"
-LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent, const char *name )
-: TQObject( parent, name ), KXMLGUIClient( parent )
+LatexGUIClient::LatexGUIClient( Kopete::ChatSession *tqparent, const char *name )
+: TQObject( tqparent, name ), KXMLGUIClient( tqparent )
{
setInstance( LatexPlugin::plugin()->instance() );
connect( LatexPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) );
- m_manager = parent;
+ m_manager = tqparent;
new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, TQT_SLOT( slotPreview() ), actionCollection(), "latexPreview" );
@@ -57,14 +57,14 @@ void LatexGUIClient::slotPreview()
Kopete::Message msg = m_manager->view()->currentMessage();
TQString messageText = msg.plainBody();
- if(!messageText.contains("$$")) //we haven't found any latex strings
+ if(!messageText.tqcontains("$$")) //we haven't found any latex strings
{
KMessageBox::sorry(reinterpret_cast<TQWidget*>(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") );
return;
}
msg=Kopete::Message( msg.from() , msg.to() ,
- i18n("<b>Preview of the latex message :</b> <br />%1").arg(msg.plainBody()),
+ i18n("<b>Preview of the latex message :</b> <br />%1").tqarg(msg.plainBody()),
Kopete::Message::Internal , Kopete::Message::RichText);
m_manager->appendMessage(msg) ;
}
diff --git a/kopete/plugins/latex/latexguiclient.h b/kopete/plugins/latex/latexguiclient.h
index 03fdbd9e..6807ccb8 100644
--- a/kopete/plugins/latex/latexguiclient.h
+++ b/kopete/plugins/latex/latexguiclient.h
@@ -37,9 +37,10 @@ namespace Kopete { class ChatSession; }
class LatexGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- LatexGUIClient( Kopete::ChatSession *parent, const char *name=0L);
+ LatexGUIClient( Kopete::ChatSession *tqparent, const char *name=0L);
~LatexGUIClient();
private slots:
diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp
index 11537aba..61fab8a6 100644
--- a/kopete/plugins/latex/latexplugin.cpp
+++ b/kopete/plugins/latex/latexplugin.cpp
@@ -41,8 +41,8 @@
typedef KGenericFactory<LatexPlugin> LatexPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) )
-LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
-: Kopete::Plugin( LatexPluginFactory::instance(), parent, name )
+LatexPlugin::LatexPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ )
+: Kopete::Plugin( LatexPluginFactory::instance(), tqparent, name )
{
// kdDebug() << k_funcinfo << endl;
if( !s_pluginStatic )
@@ -101,7 +101,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
}
TQString messageText = msg.plainBody();
- if( !messageText.contains("$$"))
+ if( !messageText.tqcontains("$$"))
return;
//kdDebug() << k_funcinfo << " Using converter: " << m_convScript << endl;
@@ -132,7 +132,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
if(!securityCheck(formul))
continue;
- TQString fileName=handleLatex(formul.replace("$$",""));
+ TQString fileName=handleLatex(formul.tqreplace("$$",""));
// get the image and encode it with base64
#if ENCODED_IMAGE_MODE
@@ -145,7 +145,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
renderedImage.save( &buffer, "PNG" );
- TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) );
+ TQString imageURL = TQString::tqfromLatin1("data:image/png;base64,%1").tqarg( KCodecs::base64Encode( ba ) );
replaceMap[match] = imageURL;
}
#else
@@ -167,8 +167,8 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
continue;
imagePxWidth = theImage.width();
imagePxHeight = theImage.height();
- TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
- messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
+ TQString escapedLATEX=TQStyleSheet::escape(it.key()).tqreplace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
+ messageText.tqreplace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
}
msg.setBody( messageText, Kopete::Message::RichText );
@@ -187,7 +187,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
return;
TQString messageText = msg.plainBody();
- if( !messageText.contains("$$"))
+ if( !messageText.tqcontains("$$"))
return;
/* if( msg.from()->protocol()->pluginId()!="MSNProtocol" )
return;*/
@@ -206,7 +206,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
if(!url.isNull())
{
- TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","&quot;");
+ TQString escapedLATEX= TQStyleSheet::escape(messageText).tqreplace("\"","&quot;");
TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
msg.setBody( messageText, Kopete::Message::RichText );
}
@@ -230,9 +230,9 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula)
int hDPI, vDPI;
hDPI = LatexConfig::self()->horizontalDPI();
vDPI = LatexConfig::self()->verticalDPI();
- p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ;
+ p << m_convScript << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.tqarg(fileName) /*<< argumentFormat*/ << latexFormula ;
- kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl;
+ kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.tqarg(fileName) << endl;
// FIXME our sucky sync filter API limitations :-)
p.start(KProcess::Block);
@@ -241,7 +241,7 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula)
bool LatexPlugin::securityCheck(const TQString &latexFormula)
{
- return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
+ return !latexFormula.tqcontains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
"|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode"
"|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks"
"|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]"));
diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h
index 2eb9365b..5413626f 100644
--- a/kopete/plugins/latex/latexplugin.h
+++ b/kopete/plugins/latex/latexplugin.h
@@ -42,11 +42,12 @@ namespace Kopete { class Message; class ChatSession; }
class LatexPlugin : public Kopete::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
static LatexPlugin *plugin();
- LatexPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ LatexPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
~LatexPlugin();
public slots:
diff --git a/kopete/plugins/latex/latexpreferences.cpp b/kopete/plugins/latex/latexpreferences.cpp
index ff02c831..e7396282 100644
--- a/kopete/plugins/latex/latexpreferences.cpp
+++ b/kopete/plugins/latex/latexpreferences.cpp
@@ -30,8 +30,8 @@
typedef KGenericFactory<LatexPreferences> LatexPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_latex, LatexPreferencesFactory( "kcm_kopete_latex" ) )
-LatexPreferences::LatexPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
- : KCModule(LatexPreferencesFactory::instance(), parent, args)
+LatexPreferences::LatexPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args)
+ : KCModule(LatexPreferencesFactory::instance(), tqparent, args)
{
( new TQVBoxLayout( this ) )->setAutoAdd( true );
m_preferencesDialog = new LatexPrefsUI(this);
diff --git a/kopete/plugins/latex/latexpreferences.h b/kopete/plugins/latex/latexpreferences.h
index e5a70140..518d0fc6 100644
--- a/kopete/plugins/latex/latexpreferences.h
+++ b/kopete/plugins/latex/latexpreferences.h
@@ -31,9 +31,10 @@ class TQListViewItem;
class LatexPreferences : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- LatexPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
+ LatexPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~LatexPreferences();
virtual void save();
diff --git a/kopete/plugins/latex/latexprefsbase.ui b/kopete/plugins/latex/latexprefsbase.ui
index fbb11a21..fc2a865a 100644
--- a/kopete/plugins/latex/latexprefsbase.ui
+++ b/kopete/plugins/latex/latexprefsbase.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LatexPrefsUI</class>
<author>Duncan Mac-Vicar</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LatexPrefsUI</cstring>
</property>
@@ -17,7 +17,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -29,7 +29,7 @@
&lt;p&gt;This plugin requires ImageMagick convert program installed in order to work.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -50,22 +50,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -83,7 +83,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>280</width>
<height>20</height>
@@ -92,9 +92,9 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -105,7 +105,7 @@
<cstring>horizontalDPI</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -128,7 +128,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>220</width>
<height>20</height>
@@ -149,7 +149,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -158,7 +158,7 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>