- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Friends

# QCoreApplication Class Reference

Search for all occurrences

## Detailed Description

Definition at line 71 of file qcoreapplication.h.

`#include <qcoreapplication.h>`

Inheritance diagram for QCoreApplication:
[legend]

List of all members.

## Public Types
enum | Encoding { CodecForTr, UnicodeUTF8, DefaultCodec = CodecForTr }
typedef bool(* | EventFilter )(void *message, long *result)
## Public Slots
static void | quit ()
## Signals
void | aboutToQuit ()
void | unixSignal (int)
## Public Member Functions
| QCoreApplication (int &argc, char **argv)
| ~QCoreApplication ()
virtual bool | notify (QObject *, QEvent *)
EventFilter | setEventFilter (EventFilter filter)
bool | filterEvent (void *message, long *result)
## Static Public Member Functions
static QStringList | arguments ()
static void | setAttribute (Qt::ApplicationAttribute attribute, bool on=true)
static bool | testAttribute (Qt::ApplicationAttribute attribute)
static void | setOrganizationDomain (const QString &orgDomain)
static QString | organizationDomain ()
static void | setOrganizationName (const QString &orgName)
static QString | organizationName ()
static void | setApplicationName (const QString &application)
static QString | applicationName ()
static void | setApplicationVersion (const QString &version)
static QString | applicationVersion ()
static QCoreApplication * | instance ()
static int | exec ()
static void | processEvents (QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
static void | processEvents (QEventLoop::ProcessEventsFlags flags, int maxtime)
static void | exit (int retcode=0)
static bool | sendEvent (QObject *receiver, QEvent *event)
static void | postEvent (QObject *receiver, QEvent *event)
static void | postEvent (QObject *receiver, QEvent *event, int priority)
static void | sendPostedEvents (QObject *receiver, int event_type)
static void | sendPostedEvents ()
static void | removePostedEvents (QObject *receiver)
static void | removePostedEvents (QObject *receiver, int eventType)
static bool | hasPendingEvents ()
static bool | startingUp ()
static bool | closingDown ()
static QString | applicationDirPath ()
static QString | applicationFilePath ()
static qint64 | applicationPid ()
static void | setLibraryPaths (const QStringList &)
static QStringList | libraryPaths ()
static void | addLibraryPath (const QString &)
static void | removeLibraryPath (const QString &)
static void | installTranslator (QTranslator *messageFile)
static void | removeTranslator (QTranslator *messageFile)
static QString | translate (const char *context, const char *key, const char *disambiguation=0, Encoding encoding=CodecForTr)
static QString | translate (const char *context, const char *key, const char *disambiguation, Encoding encoding, int n)
static void | flush ()
## Protected Member Functions
bool | event (QEvent *)
virtual bool | compressEvent (QEvent *, QObject *receiver, QPostEventList *)
| QCoreApplication (QCoreApplicationPrivate &p)
## Properties
QString | applicationName
QString | applicationVersion
QString | organizationName
QString | organizationDomain
## Friends
class | QEventDispatcherUNIXPrivate
class | QApplication
class | QApplicationPrivate
class | QETWidget
class | Q3AccelManager
class | QShortcutMap
class | QWidget
class | QWidgetPrivate
class | QClassFactory
bool | qt_sendSpontaneousEvent (QObject *, QEvent *)
Q_CORE_EXPORT QString | qAppName ()

## Member Typedef Documentation

typedef bool(* EventFilter)(void *message, long *result)

Search for all occurrences

Definition at line 172 of file qcoreapplication.h.

## Member Enumeration Documentation

enum Encoding

Search for all occurrences

Enumerator:

  CodecForTr | Search for all occurrences
  UnicodeUTF8 | Search for all occurrences
  DefaultCodec | Search for all occurrences

Definition at line 138 of file qcoreapplication.h.

    { CodecForTr, UnicodeUTF8, DefaultCodec = CodecForTr };

## Constructor & Destructor Documentation

QCoreApplication | ( | int & | argc,
|  | char ** | argv
| ) |  |

~QCoreApplication | ( |  | ) |

QCoreApplication | ( | QCoreApplicationPrivate & | p | ) | `[protected]`

## Member Function Documentation

static QStringList arguments | ( |  | ) | `[static]`

Search for all occurrences

static void setAttribute | ( | Qt::ApplicationAttribute | attribute,
|  | bool | on = `true`
| ) |  | `[static]`

Search for all occurrences

static bool testAttribute | ( | Qt::ApplicationAttribute | attribute | ) | `[static]`

Search for all occurrences

static void setOrganizationDomain | ( | const QString & | orgDomain | ) | `[static]`

Search for all occurrences

static QString organizationDomain | ( |  | ) | `[static]`

Search for all occurrences

static void setOrganizationName | ( | const QString & | orgName | ) | `[static]`

Search for all occurrences

static QString organizationName | ( |  | ) | `[static]`

Search for all occurrences

static void setApplicationName | ( | const QString & | application | ) | `[static]`

Search for all occurrences

static QString applicationName | ( |  | ) | `[static]`

Search for all occurrences

static void setApplicationVersion | ( | const QString & | version | ) | `[static]`

Search for all occurrences

static QString applicationVersion | ( |  | ) | `[static]`

Search for all occurrences

static QCoreApplication* instance | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 102 of file qcoreapplication.h.

    { return self; }

static int exec | ( |  | ) | `[static]`

Search for all occurrences

Reimplemented in QApplication.

static void processEvents | ( | QEventLoop::ProcessEventsFlags | flags = `QEventLoop::AllEvents` | ) | `[static]`

Search for all occurrences

static void processEvents | ( | QEventLoop::ProcessEventsFlags | flags,
|  | int | maxtime
| ) |  | `[static]`

Search for all occurrences

static void exit | ( | int | retcode = `0` | ) | `[static]`

Search for all occurrences

Examples:
  AutoExtract/AutoExtract.cpp.

bool sendEvent | ( | QObject * | receiver,
|  | QEvent * | event
| ) |  | `[inline, static]`

Search for all occurrences

Definition at line 214 of file qcoreapplication.h.

    {  if (event) event->spont = false; return self ? self->notifyInternal(receiver, event) : false; }

static void postEvent | ( | QObject * | receiver,
|  | QEvent * | event
| ) |  | `[static]`

Search for all occurrences

static void postEvent | ( | QObject * | receiver,
|  | QEvent * | event,
|  | int | priority
| ) |  | `[static]`

Search for all occurrences

static void sendPostedEvents | ( | QObject * | receiver,
|  | int | event_type
| ) |  | `[static]`

Search for all occurrences

void sendPostedEvents | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 220 of file qcoreapplication.h.

    { sendPostedEvents(0, 0); }

static void removePostedEvents | ( | QObject * | receiver | ) | `[static]`

Search for all occurrences

static void removePostedEvents | ( | QObject * | receiver,
|  | int | eventType
| ) |  | `[static]`

Search for all occurrences

static bool hasPendingEvents | ( |  | ) | `[static]`

Search for all occurrences

virtual bool notify | ( | QObject * | ,
|  | QEvent * |
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented in QApplication.

static bool startingUp | ( |  | ) | `[static]`

Search for all occurrences

static bool closingDown | ( |  | ) | `[static]`

Search for all occurrences

static QString applicationDirPath | ( |  | ) | `[static]`

Search for all occurrences

static QString applicationFilePath | ( |  | ) | `[static]`

Search for all occurrences

static qint64 applicationPid | ( |  | ) | `[static]`

Search for all occurrences

static void setLibraryPaths | ( | const QStringList & |  | ) | `[static]`

Search for all occurrences

static QStringList libraryPaths | ( |  | ) | `[static]`

Search for all occurrences

static void addLibraryPath | ( | const QString & |  | ) | `[static]`

Search for all occurrences

static void removeLibraryPath | ( | const QString & |  | ) | `[static]`

Search for all occurrences

static void installTranslator | ( | QTranslator * | messageFile | ) | `[static]`

Search for all occurrences

static void removeTranslator | ( | QTranslator * | messageFile | ) | `[static]`

Search for all occurrences

static QString translate | ( | const char * | context,
|  | const char * | key,
|  | const char * | disambiguation = `0`,
|  | Encoding | encoding = `CodecForTr`
| ) |  | `[static]`

Search for all occurrences

static QString translate | ( | const char * | context,
|  | const char * | key,
|  | const char * | disambiguation,
|  | Encoding | encoding,
|  | int | n
| ) |  | `[static]`

Search for all occurrences

static void flush | ( |  | ) | `[static]`

Search for all occurrences

EventFilter setEventFilter | ( | EventFilter | filter | ) |

Search for all occurrences

bool filterEvent | ( | void * | message,
|  | long * | result
| ) |  |

Search for all occurrences

static void quit | ( |  | ) | `[static, slot]`

Search for all occurrences

void aboutToQuit | ( |  | ) | `[signal]`

Search for all occurrences

void unixSignal | ( | int |  | ) | `[signal]`

Search for all occurrences

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

Reimplemented in QApplication.

virtual bool compressEvent | ( | QEvent * | ,
|  | QObject * | receiver,
|  | QPostEventList * |
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented in QApplication.

## Friends And Related Function Documentation

friend class QEventDispatcherUNIXPrivate `[friend]`

Search for all occurrences

Definition at line 201 of file qcoreapplication.h.

friend class QApplication `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 202 of file qcoreapplication.h.

friend class QApplicationPrivate `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 203 of file qcoreapplication.h.

friend class QETWidget `[friend]`

Search for all occurrences

Reimplemented in QApplication.

Definition at line 204 of file qcoreapplication.h.

friend class Q3AccelManager `[friend]`

Search for all occurrences

Reimplemented in QApplication.

Definition at line 205 of file qcoreapplication.h.

friend class QShortcutMap `[friend]`

Search for all occurrences

Definition at line 206 of file qcoreapplication.h.

friend class QWidget `[friend]`

Search for all occurrences

Reimplemented from QObject.

Reimplemented in QApplication.

Definition at line 207 of file qcoreapplication.h.

friend class QWidgetPrivate `[friend]`

Search for all occurrences

Reimplemented in QApplication.

Definition at line 208 of file qcoreapplication.h.

friend class QClassFactory `[friend]`

Search for all occurrences

Definition at line 211 of file qcoreapplication.h.

bool qt_sendSpontaneousEvent | ( | QObject * | ,
|  | QEvent * |
| ) |  | `[friend]`

Search for all occurrences

Q_CORE_EXPORT QString qAppName | ( |  | ) | `[friend]`

Search for all occurrences

## Property Documentation

QString applicationName `[read, write]`

Search for all occurrences

Definition at line 74 of file qcoreapplication.h.

QString applicationVersion `[read, write]`

Search for all occurrences

Definition at line 75 of file qcoreapplication.h.

QString organizationName `[read, write]`

Search for all occurrences

Definition at line 76 of file qcoreapplication.h.

QString organizationDomain `[read, write]`

Search for all occurrences

Definition at line 77 of file qcoreapplication.h.

The documentation for this class was generated from the following file:

- QtCore/qcoreapplication.h

QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication
QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication QCoreApplication