qsrun/singleinstanceserver.h

22 lines
406 B
C
Raw Permalink Normal View History

#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
private:
2019-08-24 09:19:49 +02:00
QLocalServer server;
private slots:
2019-08-24 09:19:49 +02:00
void handleNewConnection();
public:
2019-08-24 09:19:49 +02:00
SingleInstanceServer();
bool listen(QString socketPath);
signals:
void receivedMaximizationRequest();
};
#endif // SINGLEINSTANCESERVER_H