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
00052 class KDEUI_EXPORT KUniqueApplication : public KApplication
00053 {
00054 Q_OBJECT
00055 public:
00065 explicit KUniqueApplication( bool GUIenabled=true,
00066 bool configUnique=false);
00067
00068 #ifdef Q_WS_X11
00069
00085 explicit KUniqueApplication( Display *display,
00086 Qt::HANDLE visual=0,
00087 Qt::HANDLE colormap=0,
00088 bool configUnique=false);
00089 #endif
00090
00097 static void addCmdLineOptions();
00098
00103 enum StartFlag
00104 {
00116 NonUniqueInstance = 0x1
00117 };
00118 Q_DECLARE_FLAGS(StartFlags,StartFlag)
00119
00120
00154 static bool start(StartFlags flags);
00155
00156 static bool start();
00157
00161 virtual ~KUniqueApplication();
00162
00204 virtual int newInstance();
00205
00210 bool restoringSession();
00211
00215 static void setHandleAutoStarted();
00216
00217 private:
00218 friend class KUniqueApplicationAdaptor;
00219 class Private;
00220 Private * const d;
00221
00222 Q_PRIVATE_SLOT(d, void _k_newInstanceNoFork())
00223 };
00224 Q_DECLARE_OPERATORS_FOR_FLAGS(KUniqueApplication::StartFlags)
00225
00226 #endif