summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/latex/latexplugin.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/plugins/latex/latexplugin.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/latex/latexplugin.h')
-rw-r--r--kopete/plugins/latex/latexplugin.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h
new file mode 100644
index 00000000..a0fcd7fd
--- /dev/null
+++ b/kopete/plugins/latex/latexplugin.h
@@ -0,0 +1,77 @@
+/*
+ latexplugin.h
+
+ Kopete Latex Plugin
+
+ Copyright (c) 2004 by Duncan Mac-Vicar Prett <duncan@kde.org>
+ Copyright (c) 2004-2005 by Olivier Goffart <ogoffart@kde. org>
+
+ Kopete (c) 2001-2004 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef LATEXPLUGIN_H
+#define LATEXPLUGIN_H
+
+#include <qobject.h>
+#include <qstring.h>
+
+#include <ktempfile.h>
+
+#include "kopetemessage.h"
+#include "kopeteplugin.h"
+
+class QStringList;
+class QString;
+
+
+namespace Kopete { class Message; class ChatSession; }
+
+/**
+ * @author Duncan Mac-Vicar Prett
+ */
+
+class LatexPlugin : public Kopete::Plugin
+{
+ Q_OBJECT
+
+public:
+ static LatexPlugin *plugin();
+
+ LatexPlugin( QObject *parent, const char *name, const QStringList &args );
+ ~LatexPlugin();
+
+public slots:
+ void slotSettingsChanged();
+ void slotMessageAboutToShow( Kopete::Message& msg );
+ void slotMessageAboutToSend( Kopete::Message& msg );
+ void slotNewChatSession( Kopete::ChatSession *KMM);
+
+public:
+ /**
+ * gives a latex formula, and return the filename of the file where the latex is stored.
+ */
+ QString handleLatex(const QString &latex);
+
+ /**
+ * return false if the latex formula may contains malicious commands
+ */
+ bool securityCheck(const QString & formula);
+
+
+private:
+ static LatexPlugin* s_pluginStatic;
+ QString m_convScript;
+ bool mMagickNotFoundShown;
+ QPtrList<KTempFile> m_tempFiles;
+};
+
+#endif