|
QtPass 1.6.0
Multi-platform GUI for pass, the standard unix password manager.
|
Provide single-instance application behavior and inter-process messaging using a unique key. More...
#include <singleapplication.h>
Public Slots | |
| void | receiveMessage () |
| SingleApplication::receiveMessage we have received (a command line) message. | |
Signals | |
| void | messageAvailable (const QString &message) |
| messageAvailable notification from commandline | |
Public Member Functions | |
| SingleApplication (int &argc, char *argv[], QString uniqueKey) | |
| SingleApplication::SingleApplication this replaces the QApplication allowing for local socket based communications. | |
| auto | isRunning () -> bool |
| SingleApplication::isRunning is there already a QtPass instance running, to check wether to be server or client. | |
| auto | sendMessage (const QString &message) -> bool |
| SingleApplication::sendMessage send a message (from commandline) to an already running QtPass instance. | |
Provide single-instance application behavior and inter-process messaging using a unique key.
This QApplication subclass detects whether another instance with the same unique key is already running and enables sending and receiving textual messages between instances (typically to forward command-line arguments to the already-running instance).
| argc | Reference to program argc forwarded to QApplication. |
| argv | Program argv forwarded to QApplication. |
| uniqueKey | Identifier used to scope the single-instance mechanism and the local IPC resources. |
Query whether another instance of the application is already running.
Send a textual message to the running instance identified by the unique key.
The message is delivered to the existing instance; intended use is to forward command-line arguments.
| message | Text to send to the running instance. |
Slot invoked when an incoming message is received on the local server.
Emits messageAvailable() with the received payload.
Notification emitted when a textual message from another process is received.
| message | The message payload (for example, forwarded command-line arguments). |
Definition at line 56 of file singleapplication.h.
| SingleApplication::SingleApplication | ( | int & | argc, |
| char * | argv[], | ||
| QString | uniqueKey ) |
SingleApplication::SingleApplication this replaces the QApplication allowing for local socket based communications.
| argc | |
| argv | |
| uniqueKey |
Definition at line 17 of file singleapplication.cpp.
| auto SingleApplication::isRunning | ( | ) | -> bool |
SingleApplication::isRunning is there already a QtPass instance running, to check wether to be server or client.
Definition at line 66 of file singleapplication.cpp.
|
signal |
messageAvailable notification from commandline
| message | args sent to qtpass executable |
|
slot |
SingleApplication::receiveMessage we have received (a command line) message.
Definition at line 46 of file singleapplication.cpp.
| auto SingleApplication::sendMessage | ( | const QString & | message | ) | -> bool |
SingleApplication::sendMessage send a message (from commandline) to an already running QtPass instance.
| message |
Definition at line 74 of file singleapplication.cpp.