SingleApplication/singleapplication.h

32 lines
559 B
C
Raw Normal View History

#ifndef SINGLE_APPLICATION_H
#define SINGLE_APPLICATION_H
2012-12-23 06:12:38 +08:00
#include <QApplication>
2012-12-23 06:12:38 +08:00
#include <QLocalSocket>
#include <QLocalServer>
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
*/
class SingleApplication : public QApplication
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:
QLocalSocket *socket;
QLocalServer *server;
2012-12-23 06:12:38 +08:00
};
#endif // SINGLE_APPLICATION_H