kuniqueapplication.h
/* This file is part of the KDE libraries
Copyright (c) 1999 Preston Brown <pbrown@kde.org>
Copyright (c) 2000-2001 Waldo Bastian <bastian@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KUNIQUEAPP_H
#define _KUNIQUEAPP_H
#include <kapplication.h>
#include <dcopobject.h>
class KUniqueApplicationPrivate;
class KDECORE_EXPORT KUniqueApplication : public KApplication, public DCOPObject
{
Q_OBJECT
public:
KUniqueApplication( bool allowStyles=true,
bool GUIenabled=true,
bool configUnique=false);
#ifdef Q_WS_X11
KUniqueApplication( Display *display,
Qt::HANDLE visual=0,
Qt::HANDLE colormap=0,
bool allowStyles=true,
bool configUnique=false);
#endif
static void addCmdLineOptions();
static bool start();
virtual ~KUniqueApplication();
bool process(const QCString &fun, const QByteArray &data,
QCString &replyType, QByteArray &replyData);
virtual int newInstance();
bool restoringSession();
static void setHandleAutoStarted();
private:
void delayRequest(const QCString &fun, const QByteArray &data);
private slots:
void processDelayed();
void newInstanceNoFork();
static KInstance* initHack( bool configUnique );
private:
static bool s_nofork;
static bool s_multipleInstances;
static bool s_uniqueTestDone;
static bool s_handleAutoStarted;
protected:
virtual void virtual_hook( int id, void* data );
private:
KUniqueApplicationPrivate *d;
};
#endif
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:94
KApplication::addCmdLineOptions
static void addCmdLineOptions()
Add Qt and KDE command line options to KCmdLineArgs.
Definition: kapplication.cpp:1484
KInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:43
KUniqueApplication
Maintains only a single instance of a running application at a time.
Definition: kuniqueapplication.h:48
DCOPObject
DCOPObject::process
virtual bool process(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)

KDE Home | KDE Accessibility Home | Description of Access Keys