26 #include "kdeversion.h"
36 #include <QtGui/QPixmap>
37 #include <QtGui/QIcon>
40 typedef unsigned long Atom;
41 #if !defined(Q_WS_X11)
45 #include <QtGui/QApplication>
50 #include <QtGui/QX11Info>
56 #define kapp KApplication::kApplication()
58 class KApplicationPrivate;
85 Q_CLASSINFO(
"D-Bus Interface",
"org.kde.KApplication")
118 explicit KApplication(Display *display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
137 KApplication(Display *display,
int& argc,
char** argv,
const QByteArray& rAppName,
138 bool GUIenabled=
true);
174 inline KDE_DEPRECATED
bool isRestored()
const {
return QApplication::isSessionRestored(); }
183 void disableSessionManagement();
191 void enableSessionManagement();
198 void commitData( QSessionManager& sm );
205 void saveState( QSessionManager& sm );
215 bool sessionSaving()
const;
223 inline KDE_DEPRECATED QPixmap icon()
const {
225 return windowIcon().pixmap(size,size);
233 inline KDE_DEPRECATED QPixmap miniIcon()
const {
235 return windowIcon().pixmap(size,size);
249 void setTopWidget(
QWidget *topWidget );
259 #ifndef KDE_NO_DEPRECATED
260 static KDE_DEPRECATED
QString tempSaveName(
const QString& pFilename );
272 static QString checkRecoverFile(
const QString& pFilename,
bool& bRecover );
281 static inline KDE_DEPRECATED Display *getDisplay() {
return QX11Info::display(); }
294 void installX11EventFilter(
QWidget* filter );
300 void removeX11EventFilter(
const QWidget* filter );
324 QByteArray startupId()
const;
333 void setStartupId(
const QByteArray& startup_id );
338 void clearStartupId();
343 void setSynchronizeClipboard(
bool synchronize);
349 unsigned long userTimestamp()
const;
358 void updateRemoteUserTimestamp(
const QString& service,
int time = 0 );
375 static inline KDE_DEPRECATED
QString geometryArgument() {
384 bool notify(
QObject* receiver, QEvent* event );
389 int xErrhandler( Display*,
void* );
394 int xioErrhandler( Display* );
399 void iceIOErrorHandler( _IceConn *conn );
412 Q_SCRIPTABLE
void updateUserTimestamp(
int time = 0 );
415 Q_SCRIPTABLE
void reparseConfiguration();
416 Q_SCRIPTABLE
void quit();
458 KApplication(Display *display, Qt::HANDLE visual, Qt::HANDLE colormap,
464 bool x11EventFilter( XEvent * );
478 friend class KApplicationPrivate;
479 KApplicationPrivate*
const d;
481 Q_PRIVATE_SLOT(d,
void _k_x11FilterDestroyed())
482 Q_PRIVATE_SLOT(d,
void _k_checkAppStartedSlot())
483 Q_PRIVATE_SLOT(d,
void _k_slot_KToolInvocation_hook(
QStringList&, QByteArray&))
Controls and provides information to all KDE applications.
int IconSize(KIconLoader::Group group)
static KCmdLineArgs * parsedArgs(const QByteArray &id=QByteArray())
static KApplication * KApp
Current application object.
bool isSet(const QByteArray &option) const
Small icons, e.g. for buttons.
QString getOption(const QByteArray &option) const
KAction * quit(const QObject *recvr, const char *slot, QObject *parent)
Quit the program.
static bool loadedByKdeinit
QString randomString(int length)