mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
34 lines
557 B
C++
34 lines
557 B
C++
#ifndef APPLICATION_H
|
|
#define APPLICATION_H
|
|
|
|
#include "localserver.h"
|
|
|
|
#include <QGuiApplication>
|
|
#include <QLocalSocket>
|
|
|
|
/**
|
|
* @brief The Application class handles trivial application initialization procedures
|
|
*/
|
|
class SingleApplication : public QGuiApplication
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SingleApplication(int, char *[]);
|
|
~SingleApplication();
|
|
bool shouldContinue();
|
|
|
|
signals:
|
|
void showUp();
|
|
|
|
private slots:
|
|
void slotShowUp();
|
|
|
|
private:
|
|
QLocalSocket* socket;
|
|
LocalServer* server;
|
|
bool _shouldContinue;
|
|
|
|
};
|
|
|
|
#endif // APPLICATION_H
|