|
| App (int &argc, char **argv, int flags=ApplicationFlags) |
| Creates a new app with it's arguments.
|
|
| ~App () |
| Destructor.
|
|
QString | instanceID () const |
| READ accessor for App::instanceID.
|
|
bool | forwardMasterLog () const |
| READ accessor for App::forwardMasterLog.
|
|
bool | autoStartMaster () const |
| READ accessor for App::autoStartMaster.
|
|
bool | ignoreMultiStarts () const |
| READ accessor for App::ignoreMultiStarts.
|
|
bool | autoDeleteTerminals () const |
| READ accessor for App::autoDeleteTerminals.
|
|
bool | autoKillTerminals () const |
| READ accessor for App::autoKillTerminals.
|
|
void | setParserSetupFunction (const std::function< void(QCommandLineParser &)> &function) |
| Sets the function to be called for the creation of the parser (Instead of overriding) More...
|
|
void | setStartupFunction (const std::function< int(const QCommandLineParser &)> &function) |
| Sets the function to be called to startup the application (Instead of overriding) More...
|
|
void | setShutdownRequestFunction (const std::function< bool(const QCommandLineParser &, int &)> &function) |
| Sets the function to be called to handle shutdown requests (Instead of overriding) More...
|
|
void | setShutdownRequestFunction (const std::function< bool(Terminal *, int &)> &function) |
| Sets the function to be called to handle shutdown requests (Instead of overriding) More...
|
|
int | exec () |
| Executes the application event loop. More...
|
|
QList< Terminal * > | connectedTerminals () const |
| READ accessor for App::connectedTerminals.
|
|
| QCoreApplication (int &argc, char **argv) |
|
virtual bool | notify (QObject *receiver, QEvent *event) |
|
void | installNativeEventFilter (QAbstractNativeEventFilter *filterObj) |
|
void | removeNativeEventFilter (QAbstractNativeEventFilter *filterObject) |
|
void | aboutToQuit () |
|
| QObject (QObject *parent) |
|
virtual bool | eventFilter (QObject *watched, QEvent *event) |
|
virtual const QMetaObject * | metaObject () const |
|
QString | objectName () const |
|
void | setObjectName (const QString &name) |
|
bool | isWidgetType () const |
|
bool | isWindowType () const |
|
bool | signalsBlocked () const |
|
bool | blockSignals (bool block) |
|
QThread * | thread () const |
|
void | moveToThread (QThread *targetThread) |
|
int | startTimer (int interval, Qt::TimerType timerType) |
|
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
|
void | killTimer (int id) |
|
T | findChild (const QString &name, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const |
|
const QObjectList & | children () const |
|
void | setParent (QObject *parent) |
|
void | installEventFilter (QObject *filterObj) |
|
void | removeEventFilter (QObject *obj) |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const |
|
bool | disconnect (const QObject *receiver, const char *method) const |
|
void | dumpObjectTree () |
|
void | dumpObjectInfo () |
|
void | dumpObjectTree () const |
|
void | dumpObjectInfo () const |
|
bool | setProperty (const char *name, const QVariant &value) |
|
QVariant | property (const char *name) const |
|
QList< QByteArray > | dynamicPropertyNames () const |
|
void | destroyed (QObject *obj) |
|
void | objectNameChanged (const QString &objectName) |
|
QObject * | parent () const |
|
bool | inherits (const char *className) const |
|
void | deleteLater () |
|
|
QStringList | arguments () |
|
void | setAttribute (Qt::ApplicationAttribute attribute, bool on) |
|
bool | testAttribute (Qt::ApplicationAttribute attribute) |
|
void | setOrganizationDomain (const QString &orgDomain) |
|
QString | organizationDomain () |
|
void | setOrganizationName (const QString &orgName) |
|
QString | organizationName () |
|
void | setApplicationName (const QString &application) |
|
QString | applicationName () |
|
void | setApplicationVersion (const QString &version) |
|
QString | applicationVersion () |
|
void | setSetuidAllowed (bool allow) |
|
bool | isSetuidAllowed () |
|
QCoreApplication * | instance () |
|
int | exec () |
|
void | processEvents (QEventLoop::ProcessEventsFlags flags) |
|
void | processEvents (QEventLoop::ProcessEventsFlags flags, int maxtime) |
|
void | exit (int returnCode) |
|
bool | sendEvent (QObject *receiver, QEvent *event) |
|
void | postEvent (QObject *receiver, QEvent *event, int priority) |
|
void | sendPostedEvents (QObject *receiver, int event_type) |
|
void | removePostedEvents (QObject *receiver, int eventType) |
|
bool | hasPendingEvents () |
|
QAbstractEventDispatcher * | eventDispatcher () |
|
void | setEventDispatcher (QAbstractEventDispatcher *eventDispatcher) |
|
bool | startingUp () |
|
bool | closingDown () |
|
QString | applicationDirPath () |
|
QString | applicationFilePath () |
|
qint64 | applicationPid () |
|
void | setLibraryPaths (const QStringList &paths) |
|
QStringList | libraryPaths () |
|
void | addLibraryPath (const QString &path) |
|
void | removeLibraryPath (const QString &path) |
|
bool | installTranslator (QTranslator *translationFile) |
|
bool | removeTranslator (QTranslator *translationFile) |
|
QString | translate (const char *context, const char *sourceText, const char *disambiguation, int n) |
|
QString | translate (const char *context, const char *key, const char *disambiguation, Encoding encoding, int n) |
|
void | flush () |
|
bool | isQuitLockEnabled () |
|
void | setQuitLockEnabled (bool enabled) |
|
void | quit () |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
bool | disconnect (const QMetaObject::Connection &connection) |
|
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
|
The background process application. The main class of QtBackgroundProcess.
Use this class instead of QCoreApplication to create a background process. You will either have to override the startup/shutdown functions or set them with function objects.
- See also
- App::setupParser, App::startupApp, App::requestAppShutdown
Definition at line 34 of file app.h.
QtBackgroundProcess::App::autoDeleteTerminals |
|
readwrite |
If true, the master process will automatically delete terminals that have been disconnected.
Default: true
If a terminal gets disconnected, the master can automatically delete it. Each terminal has it's own property to enable/disable auto deletion. By setting this property, you can set the default for newly created terminals. Disable it, if you handle terminals by yourself.
- Note
- To change the Terminal::autoDelete for all already connected terminals, pass
true
as second parameter to the set accessor
- See also
- App::autoKillTerminals, Terminal::autoDelete
Definition at line 48 of file app.h.
QtBackgroundProcess::App::autoKillTerminals |
|
readwrite |
If true, the master process will automatically close terminals after it received the parameters.
Default: false
If you don't want terminals to be able to attach to the master, and only want to use them to receive new commands, you can enable this property. After receiving the command, the master automatically disconnects the terminal and deletes it.
- Note
- Setting this to true will prevent terminals from beeing added to the terminal list, and will not emit newTerminalConnected() anymore. However, commandReceived() with the command of the terminal is still beeing used.
-
To kill all already connected terminals, pass
true
as second parameter to the set accessor
- See also
- App::autoDeleteTerminals, App::commandReceived
Definition at line 50 of file app.h.
QtBackgroundProcess::App::forwardMasterLog |
|
readwrite |
Specifies, whether the master should forward debug output to all terminals.
Default: false
If enabled, the master process will forward everything it writes to the logfile to all connected terminals as well. This includes all qDebug, qWarning, etc. kinds of messages. If you want this to work for all master messages, even before the startup function was called, set this true in terminal scope, i.e. the main function. This property has no effect on terminals.
- See also
- GlobalTerminal, Terminal, App::startupApp
Definition at line 42 of file app.h.
QtBackgroundProcess::App::ignoreMultiStarts |
|
readwrite |
If true, "start" commands will be ignored, if the master is already running.
Default: false
By default, start commands will be passed to the master as is, if it is already running. If you don't want this to happen, because you treat starts differently, set this property to true. This will cause terminals that try to call start on a running master to discard all arguments and connect with an empty arguments list.
- Note
- This property only prevents explicit start calls. It does not interfere with the App::autoStartMaster property.
- See also
- App::autoStartMaster, App::startupApp
Definition at line 46 of file app.h.
QtBackgroundProcess::App::instanceID |
|
readwrite |
The current id of the singleton instance of the master process.
Default: empty, until exec() is called
The instance ID is an id that is generated for an application to identify it on runtime. It is the same for multiple instances of an application run by the same user/session, but unique for every "application". It is used internally for the singleton instance and to connecte the terminals to the correct master. Unless you need to run multiple master instances of the same application, there is typically no need to modify this variable.
The id will be generated automatically as soon as you call App::exec. If you need the id before that, you can generate it using App::createDefaultInstanceID.
- Note
- The instance id is generated by using various information about the application. This includes properties that can be set in the main, like QCoreApplication::setOrganizationName. In order to include those, the generation is lazy. If you need to generate it on your own, make shure to do so after those initializations.
- See also
- App::exec
Definition at line 40 of file app.h.