KDSingleApplication API Documentation  1.1
Public Types | Public Slots | Signals | Public Member Functions | Properties | List of all members
KDSingleApplication Class Reference

#include <kdsingleapplication.h>

Inheritance diagram for KDSingleApplication:

Public Types

enum class  Option { None = 0x0 , IncludeUsernameInSocketName = 0x1 , IncludeSessionInSocketName = 0x2 }
 

Public Slots

bool sendMessage (const QByteArray &message)
 
bool sendMessageWithTimeout (const QByteArray &message, int timeout)
 

Signals

void messageReceived (const QByteArray &message)
 

Public Member Functions

 KDSingleApplication (const QString &name, Options options, QObject *parent=nullptr)
 
 KDSingleApplication (const QString &name, QObject *parent=nullptr)
 
 KDSingleApplication (QObject *parent=nullptr)
 
 ~KDSingleApplication ()
 
bool isPrimaryInstance () const
 
QString name () const
 

Properties

bool isPrimaryInstance
 
QString name
 

Detailed Description

Definition at line 22 of file kdsingleapplication.h.

Member Enumeration Documentation

◆ Option

Enumerator
None 
IncludeUsernameInSocketName 
IncludeSessionInSocketName 

Definition at line 31 of file kdsingleapplication.h.

Constructor & Destructor Documentation

◆ KDSingleApplication() [1/3]

KDSingleApplication::KDSingleApplication ( QObject *  parent = nullptr)
explicit

Definition at line 69 of file kdsingleapplication.cpp.

◆ KDSingleApplication() [2/3]

KDSingleApplication::KDSingleApplication ( const QString &  name,
QObject *  parent = nullptr 
)
explicit

Definition at line 74 of file kdsingleapplication.cpp.

◆ KDSingleApplication() [3/3]

KDSingleApplication::KDSingleApplication ( const QString &  name,
Options  options,
QObject *  parent = nullptr 
)
explicit

Definition at line 80 of file kdsingleapplication.cpp.

◆ ~KDSingleApplication()

KDSingleApplication::~KDSingleApplication ( )
default

Member Function Documentation

◆ isPrimaryInstance()

bool KDSingleApplication::isPrimaryInstance ( ) const

Definition at line 92 of file kdsingleapplication.cpp.

◆ messageReceived

void KDSingleApplication::messageReceived ( const QByteArray &  message)
signal

◆ name()

QString KDSingleApplication::name ( ) const

Definition at line 86 of file kdsingleapplication.cpp.

◆ sendMessage

bool KDSingleApplication::sendMessage ( const QByteArray &  message)
slot

Definition at line 98 of file kdsingleapplication.cpp.

References sendMessageWithTimeout().

◆ sendMessageWithTimeout

bool KDSingleApplication::sendMessageWithTimeout ( const QByteArray &  message,
int  timeout 
)
slot

Definition at line 103 of file kdsingleapplication.cpp.

References isPrimaryInstance.

Referenced by sendMessage().

Property Documentation

◆ isPrimaryInstance

bool KDSingleApplication::isPrimaryInstance
read

Definition at line 1 of file kdsingleapplication.h.

Referenced by sendMessageWithTimeout().

◆ name

QString KDSingleApplication::name
read

Definition at line 1 of file kdsingleapplication.h.


The documentation for this class was generated from the following files:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDSingleApplication
A helper class for single-instance policy Qt applications
Generated by doxygen 1.9.1