QtBase  v6.3.1
Classes | Macros | Typedefs | Functions
qcoreapplication.h File Reference
#include <QtCore/qglobal.h>
#include <QtCore/qstring.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qeventloop.h>
#include <QtCore/qobject.h>
#include <QtCore/qnativeinterface.h>
#include <QtCore/qdebug.h>
#include <QtCore/qcoreapplication_platform.h>
Include dependency graph for qcoreapplication.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QCoreApplication
 The QCoreApplication class provides an event loop for Qt applications without UI. More...
 

Macros

#define qApp   QCoreApplication::instance()
 
#define Q_DECLARE_TR_FUNCTIONS(context)
 
#define Q_COREAPP_STARTUP_FUNCTION(AFUNC)
 

Typedefs

typedef void(* QtStartUpFunction) ()
 
typedef void(* QtCleanUpFunction) ()
 

Functions

Q_CORE_EXPORT void qAddPreRoutine (QtStartUpFunction)
 
Q_CORE_EXPORT void qAddPostRoutine (QtCleanUpFunction)
 
Q_CORE_EXPORT void qRemovePostRoutine (QtCleanUpFunction)
 
Q_CORE_EXPORT QString qAppName ()
 

Macro Definition Documentation

◆ Q_COREAPP_STARTUP_FUNCTION

#define Q_COREAPP_STARTUP_FUNCTION (   AFUNC)
Value:
static void AFUNC ## _ctor_function() { \
qAddPreRoutine(AFUNC); \
} \
Q_CONSTRUCTOR_FUNCTION(AFUNC ## _ctor_function)

Definition at line 241 of file qcoreapplication.h.

◆ Q_DECLARE_TR_FUNCTIONS

#define Q_DECLARE_TR_FUNCTIONS (   context)
Value:
public: \
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1) \
{ return QCoreApplication::translate(#context, sourceText, disambiguation, n); } \
private:
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
The QString class provides a Unicode character string.
Definition: qstring.h:388
GLfloat n
#define tr(X)

Definition at line 227 of file qcoreapplication.h.

◆ qApp

#define qApp   QCoreApplication::instance()

Definition at line 72 of file qcoreapplication.h.

Typedef Documentation

◆ QtCleanUpFunction

typedef void(* QtCleanUpFunction) ()

Definition at line 234 of file qcoreapplication.h.

◆ QtStartUpFunction

typedef void(* QtStartUpFunction) ()

Definition at line 233 of file qcoreapplication.h.

Function Documentation

◆ qAddPostRoutine()

Q_CORE_EXPORT void qAddPostRoutine ( QtCleanUpFunction  p)
related

Definition at line 292 of file qcoreapplication.cpp.

Here is the caller graph for this function:

◆ qAddPreRoutine()

Q_CORE_EXPORT void qAddPreRoutine ( QtStartUpFunction  p)

Definition at line 275 of file qcoreapplication.cpp.

◆ qAppName()

Q_CORE_EXPORT QString qAppName ( )

Definition at line 223 of file qcoreapplication.cpp.

Here is the caller graph for this function:

◆ qRemovePostRoutine()

Q_CORE_EXPORT void qRemovePostRoutine ( QtCleanUpFunction  p)
related

Definition at line 301 of file qcoreapplication.cpp.