2019-06-03 07:42:54 +02:00
|
|
|
#ifndef SINGLEINSTANCESERVER_H
|
|
|
|
#define SINGLEINSTANCESERVER_H
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QLocalServer>
|
|
|
|
|
|
|
|
class SingleInstanceServer : public QObject
|
|
|
|
{
|
2019-08-24 09:19:49 +02:00
|
|
|
Q_OBJECT
|
2019-06-03 07:42:54 +02:00
|
|
|
private:
|
2019-08-24 09:19:49 +02:00
|
|
|
QLocalServer server;
|
2019-06-03 07:42:54 +02:00
|
|
|
private slots:
|
2019-08-24 09:19:49 +02:00
|
|
|
void handleNewConnection();
|
2019-06-03 07:42:54 +02:00
|
|
|
public:
|
2019-08-24 09:19:49 +02:00
|
|
|
SingleInstanceServer();
|
|
|
|
bool listen(QString socketPath);
|
|
|
|
signals:
|
|
|
|
void receivedMaximizationRequest();
|
2019-06-03 07:42:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SINGLEINSTANCESERVER_H
|