4#ifndef QGUIAPPLICATION_H
5#define QGUIAPPLICATION_H
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qcoreapplication.h>
9#include <QtGui/qwindowdefs.h>
10#include <QtGui/qinputmethod.h>
11#include <QtCore/qlocale.h>
12#include <QtCore/qpoint.h>
13#include <QtCore/qsize.h>
29#define qApp (static_cast<QGuiApplication *>(QCoreApplication::instance()))
34#define qGuiApp (static_cast<QGuiApplication *>(QCoreApplication::instance()))
41 WRITE setApplicationDisplayName NOTIFY applicationDisplayNameChanged)
44 NOTIFY layoutDirectionChanged)
46 Q_PROPERTY(
bool quitOnLastWindowClosed READ quitOnLastWindowClosed
47 WRITE setQuitOnLastWindowClosed)
48 Q_PROPERTY(
QScreen *primaryScreen READ primaryScreen NOTIFY primaryScreenChanged STORED
false)
58 static void setApplicationDisplayName(
const QString &
name);
63 static void setDesktopFileName(
const QString &
name);
70 static void setWindowIcon(
const QIcon &
icon);
84 qreal devicePixelRatio()
const;
87 static QCursor *overrideCursor();
88 static void setOverrideCursor(
const QCursor &);
89 static void changeOverrideCursor(
const QCursor &);
90 static void restoreOverrideCursor();
94 static void setFont(
const QFont &);
96#ifndef QT_NO_CLIPBOARD
101 static void setPalette(
const QPalette &pal);
103 static Qt::KeyboardModifiers keyboardModifiers();
104 static Qt::KeyboardModifiers queryKeyboardModifiers();
105 static Qt::MouseButtons mouseButtons();
114 static void setDesktopSettingsAware(
bool on);
115 static bool desktopSettingsAware();
121 static QFunctionPointer platformFunction(
const QByteArray &function);
123 static void setQuitOnLastWindowClosed(
bool quit);
134#ifndef QT_NO_SESSIONMANAGER
136 bool isSessionRestored()
const;
139 bool isSavingSession()
const;
155#ifndef QT_NO_SESSIONMANAGER
160#if QT_DEPRECATED_SINCE(6, 0)
176#ifndef QT_NO_GESTURES
181#ifndef QT_NO_SESSIONMANAGER
188#include <QtGui/qguiapplication_platform.h>
The QClipboard class provides access to the window system clipboard.
virtual bool compressEvent(QEvent *, QObject *receiver, QPostEventList *)
virtual bool notify(QObject *, QEvent *)
Sends event to receiver: {receiver}->event(event).
friend class QGuiApplication
static int exec()
Enters the main event loop and waits until exit() is called.
The QCursor class provides a mouse cursor with an arbitrary shape.
static Qt::LayoutDirection layoutDirection()
static QIcon windowIcon()
static bool quitOnLastWindowClosed()
void primaryScreenChanged(QScreen *screen)
static QString desktopFileName()
void commitDataRequest(QSessionManager &sessionManager)
void applicationStateChanged(Qt::ApplicationState state)
void focusObjectChanged(QObject *focusObject)
This signal is emitted when final receiver of events tied to focus is changed.
void fontDatabaseChanged()
This signal is emitted when the available fonts have changed.
static QString applicationDisplayName()
void screenRemoved(QScreen *screen)
This signal is emitted whenever a screen is removed from the system.
static bool isLeftToRight()
Returns true if the application's layout direction is Qt::LeftToRight; otherwise returns false.
void lastWindowClosed()
This signal is emitted from exec() when the last visible \l{Primary and Secondary Windows}{primary wi...
static QScreen * primaryScreen()
void applicationDisplayNameChanged()
void focusWindowChanged(QWindow *focusWindow)
This signal is emitted when the focused window changes.
static bool isRightToLeft()
Returns true if the application's layout direction is Qt::RightToLeft; otherwise returns false.
static QString platformName()
void layoutDirectionChanged(Qt::LayoutDirection direction)
void saveStateRequest(QSessionManager &sessionManager)
void screenAdded(QScreen *screen)
This signal is emitted whenever a new screen screen has been added to the system.
The QIcon class provides scalable icons in different modes and states.
The QPalette class contains color groups for each widget state.
\inmodule QtCore\reentrant
The QScreen class is used to query screen properties. \inmodule QtGui.
The QSessionManager class provides access to the session manager.
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Combined button and popup list for selecting options.
HighDpiScaleFactorRoundingPolicy
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
static QT_BEGIN_NAMESPACE QWindow * topLevelAt(const QPoint &pos)
#define QT_DEPRECATED_VERSION_X_6_0(text)