summaryrefslogtreecommitdiffstats
path: root/libkdepim/weaverextensions.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
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /libkdepim/weaverextensions.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.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/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/weaverextensions.h')
-rw-r--r--libkdepim/weaverextensions.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/libkdepim/weaverextensions.h b/libkdepim/weaverextensions.h
new file mode 100644
index 000000000..5f19743ba
--- /dev/null
+++ b/libkdepim/weaverextensions.h
@@ -0,0 +1,59 @@
+/* -*- C++ -*-
+
+ This file declares the Weaver Extensions basics.
+
+ $ Author: Mirko Boehm $
+ $ Copyright: (C) 2004, Mirko Boehm $
+ $ Contact: mirko@kde.org
+ http://www.kde.org
+ http://www.hackerbuero.org $
+ $ License: LGPL with the following explicit clarification:
+ This code may be linked against any version of the Qt toolkit
+ from Troll Tech, Norway. $
+
+*/
+
+#ifndef WEAVEREXTENSIONS_H
+#define WEAVEREXTENSIONS_H
+
+#include <qobject.h>
+
+namespace KPIM {
+namespace ThreadWeaver {
+
+ class Weaver;
+ class Thread;
+
+ /** A WeaverExtension can be attached to an existing Weaver object and
+ will then receive signals on actions the Weaver takes, like starting
+ to process a specific job, assigning a job to a thread or suspending a
+ thread. It can be used to monitor the state of a program, but also,
+ for example, to provide visualization of the Weaver's work load in GUI
+ programs. Derive from it to actually create an extension. */
+ class WeaverExtension : public QObject
+ {
+ Q_OBJECT
+ public:
+ WeaverExtension ( QObject *parent = 0, const char *name = 0);
+ /** Attach() is a convenience method that will connect all our
+ slots to signals emitted by the weaver. It is also possible to
+ avoid attach() and only connect necessary signals. */
+ void attach (Weaver *);
+ virtual ~WeaverExtension() = 0;
+ public slots:
+ // these methods are implemented, but do nothing in the default configuration
+ // a thread is created:
+ virtual void threadCreated (Thread *);
+ // a thread is destroyed:
+ virtual void threadDestroyed (Thread *);
+ // the thread is processing a job
+ virtual void threadBusy (Thread *);
+ // the thread is suspended and will be waked when jobs become
+ // available
+ virtual void threadSuspended (Thread *);
+ };
+
+} // namespace ThreadWeaver
+}
+
+#endif // WEAVEREXTENSIONS_H