KDEUI
kuniqueapplication.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KUNIQUEAPP_H
00022 #define KUNIQUEAPP_H
00023
00024 #include <kapplication.h>
00025
00055 class KDEUI_EXPORT KUniqueApplication : public KApplication
00056 {
00057 Q_OBJECT
00058 public:
00068 explicit KUniqueApplication( bool GUIenabled=true,
00069 bool configUnique=false);
00070
00071 #ifdef Q_WS_X11
00072
00088 explicit KUniqueApplication( Display *display,
00089 Qt::HANDLE visual=0,
00090 Qt::HANDLE colormap=0,
00091 bool configUnique=false);
00092 #endif
00093
00100 static void addCmdLineOptions();
00101
00106 enum StartFlag
00107 {
00119 NonUniqueInstance = 0x1
00120 };
00121 Q_DECLARE_FLAGS(StartFlags,StartFlag)
00122
00123
00157 static bool start(StartFlags flags);
00158
00159 static bool start();
00160
00164 virtual ~KUniqueApplication();
00165
00207 virtual int newInstance();
00208
00213 bool restoringSession();
00214
00218 static void setHandleAutoStarted();
00219
00220 private:
00221 friend class KUniqueApplicationAdaptor;
00222 class Private;
00223 Private * const d;
00224
00225 Q_PRIVATE_SLOT(d, void _k_newInstanceNoFork())
00226 };
00227 Q_DECLARE_OPERATORS_FOR_FLAGS(KUniqueApplication::StartFlags)
00228
00229 #endif