summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src/global.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
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /klinkstatus/src/global.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus/src/global.h')
-rw-r--r--klinkstatus/src/global.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/klinkstatus/src/global.h b/klinkstatus/src/global.h
new file mode 100644
index 00000000..2ee2f0c0
--- /dev/null
+++ b/klinkstatus/src/global.h
@@ -0,0 +1,60 @@
+//
+// C++ Interface: global
+//
+// Description:
+//
+//
+// Author: Paulo Moura Guedes <moura@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <qobject.h>
+class QCString;
+
+class DCOPClient;
+class KURL;
+class KProcess;
+
+/**
+@author Paulo Moura Guedes
+*/
+class Global : public QObject
+{
+ Q_OBJECT
+public:
+ static Global* self();
+ ~Global();
+
+ static bool isKLinkStatusEmbeddedInQuanta();
+ static bool isQuantaRunningAsUnique();
+ static bool isQuantaAvailableViaDCOP();
+ static QCString quantaDCOPAppId();
+ static KURL urlWithQuantaPreviewPrefix(KURL const& url);
+
+ //static void setLoopStarted(bool flag);
+ static void openQuanta(QStringList const& args);
+
+private:
+ Global(QObject *parent = 0, const char *name = 0);
+ static void execCommand(QString const& command);
+
+private slots:
+ void slotGetScriptOutput(KProcess* process, char* buffer, int buflen);
+ void slotGetScriptError(KProcess* process, char* buffer, int buflen);
+ void slotProcessExited(KProcess* process);
+ void slotProcessTimeout();
+
+private:
+ static Global* m_self_;
+
+ DCOPClient* dcop_client_;
+ bool loop_started_;
+ QString script_output_;
+ KProcess* process_PS_;
+};
+
+#endif