#ifndef QTSINGLECOREAPPLICATION_H #define QTSINGLECOREAPPLICATION_H #include class QtLocalPeer; #ifndef QTSINGLECOREAPPLICATION_EXPORT # ifdef BUILD_STATIC_LIBRARIES # define QTSINGLEAPPLICATION_EXPORT # else # if defined(MAKE_QTSINGLECOREAPPLICATION_LIB) # define QTSINGLECOREAPPLICATION_EXPORT Q_DECL_EXPORT # else # define QTSINGLECOREAPPLICATION_EXPORT Q_DECL_IMPORT # endif # endif #endif class QTSINGLECOREAPPLICATION_EXPORT QtSingleCoreApplication : public QCoreApplication { Q_OBJECT public: QtSingleCoreApplication(int &argc, char **argv); QtSingleCoreApplication(const QString &appId, int &argc, char **argv); bool isRunning(); QString id() const; public Q_SLOTS: bool sendMessage(const QString &message, int timeout = 5000); Q_SIGNALS: void messageReceived(const QString &message); private: QtLocalPeer* peer; }; #endif