SingleApplication/singleapplication.h

37 lines
757 B
C
Raw Normal View History

#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
#ifndef QAPPLICATION_CLASS
#define QAPPLICATION_CLASS QCoreApplication
#endif
2015-06-09 22:29:20 +08:00
#define QUOTE(C) #C
#define INCLUDE_FILE(C) QUOTE(C)
#include INCLUDE_FILE(QAPPLICATION_CLASS)
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
* @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:
explicit SingleApplication(int&, char *[]);
2012-12-23 06:12:38 +08:00
~SingleApplication();
signals:
void showUp();
private slots:
void slotConnectionEstablished();
2012-12-23 06:12:38 +08:00
private:
SingleApplicationPrivate *d_ptr;
2012-12-23 06:12:38 +08:00
};
#endif // SINGLE_APPLICATION_H