Krita Source Code Documentation
Loading...
Searching...
No Matches
qtsingleapplication.h
Go to the documentation of this file.
1// Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef QTSINGLEAPPLICATION_H
5#define QTSINGLEAPPLICATION_H
6
7#include <kritaui_export.h>
8#include <QApplication>
9
10class QtLocalPeer;
11
12class KRITAUI_EXPORT QtSingleApplication : public QApplication
13{
14 Q_OBJECT
15
16public:
17 QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
18 QtSingleApplication(const QString &id, int &argc, char **argv);
19#if QT_VERSION < 0x050000
20 QtSingleApplication(int &argc, char **argv, Type type);
21# if defined(Q_WS_X11)
22 QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
23 QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
24 QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
25# endif // Q_WS_X11
26#endif // QT_VERSION < 0x050000
27
28 bool isRunning();
29 QString id() const;
30
31 void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
32 QWidget* activationWindow() const;
33
34 // Obsolete:
35 void initialize(bool dummy = true)
36 { isRunning(); Q_UNUSED(dummy) }
37
38public Q_SLOTS:
39 bool sendMessage(const QString &message, int timeout = 5000);
40 void activateWindow();
41
42
43Q_SIGNALS:
44 void messageReceived(const QString &message);
45
46
47private:
48 void sysInit(const QString &appId = QString());
50 QWidget *actWin;
51};
52
53#endif // QTSINGLEAPPLICATION_H
The QtSingleApplication class provides an API to detect and communicate with running instances of an ...
void initialize(bool dummy=true)
void messageReceived(const QString &message)
rgba colormap[256]
Definition pixels.c:25