summaryrefslogtreecommitdiffstats
path: root/kdcop/kdcoplistview.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
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdcop/kdcoplistview.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdcop/kdcoplistview.h')
-rw-r--r--kdcop/kdcoplistview.h133
1 files changed, 133 insertions, 0 deletions
diff --git a/kdcop/kdcoplistview.h b/kdcop/kdcoplistview.h
new file mode 100644
index 000000000..4a14620cc
--- /dev/null
+++ b/kdcop/kdcoplistview.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2000 by Ian Reinhart Geiser <geiseri@kde.org>
+ *
+ * Licensed under the Artistic License.
+ */
+
+#ifndef __KDCOPLISTVIEW_H__
+#define __KDCOPLISTVIEW_H__
+
+
+#include <klistview.h>
+class QDragObject;
+
+class KDCOPListView : public KListView
+{
+ Q_OBJECT
+
+ public:
+ KDCOPListView ( QWidget * parent = 0, const char * name = 0 );
+ virtual ~KDCOPListView();
+ QDragObject *dragObject();
+ void setMode(const QString &mode);
+ QString getCurrentCode() const;
+
+ private:
+ QString encode(QListViewItem *code);
+ QString mode;
+
+};
+
+class DCOPBrowserItem : public QListViewItem
+{
+ public:
+
+ enum Type { Application, Interface, Function };
+
+ DCOPBrowserItem(QListView * parent, Type type);
+ DCOPBrowserItem(QListViewItem * parent, Type type);
+
+ virtual ~DCOPBrowserItem() {}
+
+ Type type() const;
+
+ private:
+
+ Type type_;
+};
+
+class DCOPBrowserApplicationItem : public QObject, public DCOPBrowserItem
+{
+ Q_OBJECT
+ public:
+
+ DCOPBrowserApplicationItem(QListView * parent, const QCString & app);
+ virtual ~DCOPBrowserApplicationItem() {}
+
+ QCString app() const { return app_; }
+
+ virtual void setOpen(bool o);
+
+ protected:
+
+ virtual void populate();
+
+ private:
+
+ QCString app_;
+ private slots:
+ /**
+ * Theses two slots are used to get the icon of the application
+ */
+ void retreiveIcon(int callId, const QCString& replyType, const QByteArray &replyData);
+ void slotGotWindowName(int callId, const QCString& replyType, const QByteArray &replyData);
+};
+
+class DCOPBrowserInterfaceItem : public QObject, public DCOPBrowserItem
+{
+ public:
+
+ DCOPBrowserInterfaceItem
+ (
+ DCOPBrowserApplicationItem * parent,
+ const QCString & app,
+ const QCString & object,
+ bool def
+ );
+
+ virtual ~DCOPBrowserInterfaceItem() {}
+
+ QCString app() const { return app_; }
+ QCString object() const { return object_; }
+
+ virtual void setOpen(bool o);
+
+ protected:
+
+ virtual void populate();
+
+ private:
+
+ QCString app_;
+ QCString object_;
+};
+
+
+class DCOPBrowserFunctionItem : public DCOPBrowserItem
+{
+ public:
+
+ DCOPBrowserFunctionItem
+ (
+ DCOPBrowserInterfaceItem * parent,
+ const QCString & app,
+ const QCString & object,
+ const QCString & function
+ );
+
+ virtual ~DCOPBrowserFunctionItem() {}
+
+ QCString app() const { return app_; }
+ QCString object() const { return object_; }
+ QCString function() const { return function_; }
+
+ virtual void setOpen(bool o);
+
+ private:
+
+ QCString app_;
+ QCString object_;
+ QCString function_;
+};
+
+#endif