41 #ifndef QTSINGLEAPPLICATION_H 42 #define QTSINGLEAPPLICATION_H 44 #include <QApplication> 49 # if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) 50 # define QT_QTSINGLEAPPLICATION_EXPORT 51 # elif defined(QT_QTSINGLEAPPLICATION_IMPORT) 52 # if defined(QT_QTSINGLEAPPLICATION_EXPORT) 53 # undef QT_QTSINGLEAPPLICATION_EXPORT 55 # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) 56 # elif defined(QT_QTSINGLEAPPLICATION_EXPORT) 57 # undef QT_QTSINGLEAPPLICATION_EXPORT 58 # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) 61 # define QT_QTSINGLEAPPLICATION_EXPORT 71 #if QT_VERSION < 0x050000 73 # if defined(Q_WS_X11) 75 QtSingleApplication(Display *dpy,
int &argc,
char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
76 QtSingleApplication(Display* dpy,
const QString &appId,
int argc,
char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
78 #endif // QT_VERSION < 0x050000 83 void setActivationWindow(QWidget* aw,
bool activateOnMessage =
true);
84 QWidget* activationWindow()
const;
88 { isRunning(); Q_UNUSED(dummy) }
91 bool sendMessage(
const QString &message,
int timeout = 5000);
92 void activateWindow();
96 void messageReceived(
const QString &message);
100 void sysInit(
const QString &appId = QString());
105 #endif // QTSINGLEAPPLICATION_H The QtSingleApplication class provides an API to detect and communicate with running instances of an ...
void initialize(bool dummy=true)