diff options
author | Andrew Christian <andrew.christian@nokia.com> | 2012-03-22 12:09:27 -0400 |
---|---|---|
committer | Chris Craig <ext-chris.craig@nokia.com> | 2012-03-22 21:56:07 +0100 |
commit | 34f27402a2b09e70d74a2e9caad860e17b9bd505 (patch) | |
tree | 947a27423c6d4e321f789f06afc52c40c5e98054 /src/core/pipeprocessbackendfactory.h | |
parent | 1a45397265d17753225c2ca3134fd0793f70cfc8 (diff) |
Updated declarative interfaces
* Fixed up PipeProcessBackendFactory to support being instantiated
by declarative.
* Added a DeclarativeProcessManager::registerTypes() function to
call qmlRegisterType() for all usable classes.
* Updated registered QML class names for items in declarative to
follow the "PmNAME" convention (because the QML type name can't
be the same as the C++ type name)
* Updated documentation for declarative types
Change-Id: I587689752cb69c7280db67bbc20c1a91b0c6722a
Reviewed-by: Chris Craig <ext-chris.craig@nokia.com>
Diffstat (limited to 'src/core/pipeprocessbackendfactory.h')
-rw-r--r-- | src/core/pipeprocessbackendfactory.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/core/pipeprocessbackendfactory.h b/src/core/pipeprocessbackendfactory.h index 8023919..7dbee9e 100644 --- a/src/core/pipeprocessbackendfactory.h +++ b/src/core/pipeprocessbackendfactory.h @@ -47,12 +47,22 @@ QT_BEGIN_NAMESPACE_PROCESSMANAGER class Q_ADDON_PROCESSMANAGER_EXPORT PipeProcessBackendFactory : public RemoteProcessBackendFactory { Q_OBJECT + Q_PROPERTY(ProcessInfo* processInfo READ processInfo WRITE setProcessInfo NOTIFY processInfoChanged) + public: - PipeProcessBackendFactory(const ProcessInfo& info, QObject *parent = 0); + PipeProcessBackendFactory(QObject *parent = 0); virtual ~PipeProcessBackendFactory(); + virtual bool canCreate(const ProcessInfo &info) const; virtual QList<Q_PID> internalProcesses(); + ProcessInfo *processInfo() const; + void setProcessInfo(ProcessInfo *processInfo); + void setProcessInfo(ProcessInfo& processInfo); + +signals: + void processInfoChanged(); + protected: virtual bool send(const QJsonObject&); @@ -65,8 +75,12 @@ private slots: void pipeStateChanged(QProcess::ProcessState state); private: - QProcess *m_process; - QByteArray m_buffer; + void stopRemoteProcess(); + +private: + QProcess *m_process; + ProcessInfo *m_info; + QByteArray m_buffer; }; QT_END_NAMESPACE_PROCESSMANAGER |