QtPass
1.5.1
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
src
singleapplication.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
3
#ifndef SRC_SINGLEAPPLICATION_H_
4
#define SRC_SINGLEAPPLICATION_H_
5
6
#include <QApplication>
7
#include <QLocalServer>
8
#include <QSharedMemory>
9
16
class
SingleApplication
:
public
QApplication {
17
Q_OBJECT
18
public
:
19
SingleApplication
(
int
&argc,
char
*argv[], QString uniqueKey);
20
auto
isRunning
() -> bool;
21
auto
sendMessage
(
const
QString &message) -> bool;
22
23
public
slots:
24
void
receiveMessage
();
25
26
signals:
31
void
messageAvailable
(
const
QString &message);
32
33
private
:
34
bool
_isRunning;
35
QString _uniqueKey;
36
QSharedMemory sharedMemory;
37
QScopedPointer<QLocalServer> localServer;
38
39
static
const
int
timeout = 1000;
40
};
41
42
#endif
// SRC_SINGLEAPPLICATION_H_
SingleApplication
The SingleApplication class is used for commandline intergration.
Definition
singleapplication.h:16
SingleApplication::receiveMessage
void receiveMessage()
SingleApplication::receiveMessage we have received (a command line) message.
Definition
singleapplication.cpp:46
SingleApplication::isRunning
auto isRunning() -> bool
SingleApplication::isRunning is there already a QtPass instance running, to check wether to be server...
Definition
singleapplication.cpp:66
SingleApplication::messageAvailable
void messageAvailable(const QString &message)
messageAvailable notification from commandline
SingleApplication::sendMessage
auto sendMessage(const QString &message) -> bool
SingleApplication::sendMessage send a message (from commandline) to an already running QtPass instanc...
Definition
singleapplication.cpp:74
SingleApplication
#define SingleApplication
Definition
mainwindow.h:17
Generated by
1.9.8