2015-02-27 03:00:11 +08:00
|
|
|
#ifndef SINGLE_APPLICATION_H
|
|
|
|
#define SINGLE_APPLICATION_H
|
2012-12-23 06:12:38 +08:00
|
|
|
|
2015-06-09 22:29:20 +08:00
|
|
|
// Change this to inherit from QGuiApplication or QCoreApplication
|
|
|
|
#define QAPPLICATION_CLASS QApplication
|
|
|
|
|
|
|
|
#define QUOTE(C) #C
|
|
|
|
#define INCLUDE_FILE(C) QUOTE(C)
|
|
|
|
#include INCLUDE_FILE(QAPPLICATION_CLASS)
|
2015-06-06 05:26:41 +08:00
|
|
|
|
|
|
|
class SingleApplicationPrivate;
|
2012-12-23 06:12:38 +08:00
|
|
|
|
|
|
|
/**
|
2015-02-27 03:19:38 +08:00
|
|
|
* @brief The SingleApplication class handles multipe instances of the same Application
|
2015-02-27 03:00:11 +08:00
|
|
|
* @see QApplication
|
2012-12-23 06:12:38 +08:00
|
|
|
*/
|
2015-06-09 22:29:20 +08:00
|
|
|
class SingleApplication : public QAPPLICATION_CLASS
|
2012-12-23 06:12:38 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-04-08 05:17:57 +08:00
|
|
|
explicit SingleApplication(int&, char *[]);
|
2012-12-23 06:12:38 +08:00
|
|
|
~SingleApplication();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void showUp();
|
|
|
|
|
|
|
|
private slots:
|
2015-02-27 03:00:11 +08:00
|
|
|
void slotConnectionEstablished();
|
|
|
|
|
2012-12-23 06:12:38 +08:00
|
|
|
private:
|
2015-06-06 05:26:41 +08:00
|
|
|
SingleApplicationPrivate *d_ptr;
|
2012-12-23 06:12:38 +08:00
|
|
|
};
|
|
|
|
|
2015-02-27 03:00:11 +08:00
|
|
|
#endif // SINGLE_APPLICATION_H
|