QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RSingleApplication Class Reference

#include <RSingleApplication.h>

Inheritance diagram for RSingleApplication:

Public Slots

void activateWindow ()
 
void registerGlobalShortcut (int key, int modifiers)
 
bool sendMessage (const QString &message, int timeout=5000)
 

Signals

void fileOpenRequestReceived (const QString &fileName)
 
void globalShortcutPressed (int key, int modifiers)
 
void messageReceived (const QString &message)
 

Public Member Functions

QWidget * activationWindow () const
 
QString id () const
 
bool isRunning ()
 
bool notify (QObject *receiver, QEvent *e)
 
 RSingleApplication (const QString &id, int &argc, char **argv, bool GUIenabled=true)
 
 RSingleApplication (int &argc, char **argv, bool GUIenabled=true)
 
void setActivationWindow (QWidget *aw, bool activateOnMessage=true)
 
 ~RSingleApplication ()
 

Static Public Member Functions

static RSingleApplicationgetInstance ()
 

Protected Member Functions

virtual bool event (QEvent *e)
 

Private Member Functions

void sysInit (const QString &appId=QString())
 

Private Attributes

QWidget * actWin
 
QList< QPair< int, int > > globalShortcuts
 
QMutex mutexEvents
 
QThread * mutexEventsLocker
 
RLocalPeerpeer
 

Static Private Attributes

static RSingleApplicationsingleInstance = NULL
 Copyright (c) 2011-2018 by Andrew Mustun.
 

Constructor & Destructor Documentation

◆ RSingleApplication() [1/2]

RSingleApplication::RSingleApplication ( int & argc,
char ** argv,
bool GUIenabled = true )

◆ RSingleApplication() [2/2]

RSingleApplication::RSingleApplication ( const QString & id,
int & argc,
char ** argv,
bool GUIenabled = true )

◆ ~RSingleApplication()

RSingleApplication::~RSingleApplication ( )

Member Function Documentation

◆ activateWindow

void RSingleApplication::activateWindow ( )
slot

◆ activationWindow()

QWidget * RSingleApplication::activationWindow ( ) const

◆ event()

bool RSingleApplication::event ( QEvent * e)
protectedvirtual

◆ fileOpenRequestReceived

void RSingleApplication::fileOpenRequestReceived ( const QString & fileName)
signal

◆ getInstance()

RSingleApplication * RSingleApplication::getInstance ( )
static

◆ globalShortcutPressed

void RSingleApplication::globalShortcutPressed ( int key,
int modifiers )
signal

◆ id()

QString RSingleApplication::id ( ) const

◆ isRunning()

bool RSingleApplication::isRunning ( )

◆ messageReceived

void RSingleApplication::messageReceived ( const QString & message)
signal

◆ notify()

bool RSingleApplication::notify ( QObject * receiver,
QEvent * e )

◆ registerGlobalShortcut

void RSingleApplication::registerGlobalShortcut ( int key,
int modifiers )
inlineslot

◆ sendMessage

bool RSingleApplication::sendMessage ( const QString & message,
int timeout = 5000 )
slot

◆ setActivationWindow()

void RSingleApplication::setActivationWindow ( QWidget * aw,
bool activateOnMessage = true )

◆ sysInit()

void RSingleApplication::sysInit ( const QString & appId = QString())
private

Member Data Documentation

◆ actWin

QWidget* RSingleApplication::actWin
private

◆ globalShortcuts

QList<QPair<int, int> > RSingleApplication::globalShortcuts
private

◆ mutexEvents

QMutex RSingleApplication::mutexEvents
private

◆ mutexEventsLocker

QThread* RSingleApplication::mutexEventsLocker
private

◆ peer

RLocalPeer* RSingleApplication::peer
private

◆ singleInstance

RSingleApplication * RSingleApplication::singleInstance = NULL
staticprivate

Copyright (c) 2011-2018 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.


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