42 #include "qtsingleapplication.h" 43 #include "qtlocalpeer.h" 136 void QtSingleApplication::sysInit(
const QString &appId)
139 peer =
new QtLocalPeer(
this, appId);
155 : QApplication(argc, argv, GUIenabled)
168 : QApplication(argc, argv)
173 #if QT_VERSION < 0x050000 181 : QApplication(argc, argv, type)
187 # if defined(Q_WS_X11) 195 : QApplication(dpy, visual, cmap)
208 : QApplication(dpy, argc, argv, visual, cmap)
221 : QApplication(dpy, argc, argv, visual, cmap)
226 #endif // QT_VERSION < 0x050000 242 return peer->isClient();
261 return peer->sendMessage(message, timeout);
271 return peer->applicationId();
290 if (activateOnMessage)
326 actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
328 actWin->activateWindow();
bool sendMessage(const QString &message, int timeout=5000)
QtSingleApplication(int &argc, char **argv, bool GUIenabled=true)
void setActivationWindow(QWidget *aw, bool activateOnMessage=true)
QWidget * activationWindow() const
void messageReceived(const QString &message)