From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kdcop/kdcoplistview.h | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 kdcop/kdcoplistview.h (limited to 'kdcop/kdcoplistview.h') 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 + * + * Licensed under the Artistic License. + */ + +#ifndef __KDCOPLISTVIEW_H__ +#define __KDCOPLISTVIEW_H__ + + +#include +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 -- cgit v1.2.1