1#ifndef APPLICATIONWRAPPER_H
2#define APPLICATIONWRAPPER_H
27 return application_wrapper_a.internal_app_code == application_wrapper_b.internal_app_code;
71 inline void set_app_path(
const QString& app_path)
noexcept { this->app_path = app_path; }
89 inline QStringList
args()
const {
return app_args; }
141 QProcess* appProcess {
nullptr };
144 QStringList app_args;
145 const AppCode internal_app_code;
156 void do_fin_hook(
int exitCode, QProcess::ExitStatus status);
161 void def_error_handler();
The ApplicationWrapper class is the process wrapper.
Definition applicationwrapper.h:16
void self_depatched_success()
self_depatched_success signals is using for depatch time success
void install_finhook(HandlingFinHook hook)
Installs a hook called when the application finishes.
Definition applicationwrapper.h:118
void(*)(ApplicationWrapper *wrapper) ErrorDepatchHook
Function pointer type for handling depatch errors.
Definition applicationwrapper.h:121
QProcess * process_handle() const
Returns the internal QProcess handle.
Definition applicationwrapper.h:96
QStringList args() const
Returns the argument list for the application.
Definition applicationwrapper.h:89
QString AppCode
AppCode is used to uniquely identify applications.
Definition applicationwrapper.h:56
void install_args(const QStringList &args) noexcept
Sets the arguments to pass to the application on launch.
Definition applicationwrapper.h:83
virtual bool depatchable()
depatchable
Definition applicationwrapper.h:109
void install_error_handler(ErrorDepatchHook hook)
Installs an error handler hook for depatch failures.
Definition applicationwrapper.h:127
void bindAppWidget(AppWidget *appWidget) noexcept
Bind the UI widget associated with the application.
Definition applicationwrapper.h:47
void self_mission_finished()
self_mission_finished mission finished
AppCode app_code() const
Returns the installed app code.
Definition applicationwrapper.h:62
AppWidget * app_widget() const
Returns the bound application widget.
Definition applicationwrapper.h:53
Q_DISABLE_COPY(ApplicationWrapper)
Disable copy constructor and assignment operator. This class is not copyable.
void(*)(ApplicationWrapper *wrapper, int exit_hook, QProcess::ExitStatus status) HandlingFinHook
Function pointer type for handling application finish hooks.
Definition applicationwrapper.h:112
void set_app_path(const QString &app_path) noexcept
Sets the file system path to the application executable.
Definition applicationwrapper.h:71
QString get_app_path() const
Returns the application executable path.
Definition applicationwrapper.h:77
friend bool operator==(const ApplicationWrapper &application_wrapper_a, const ApplicationWrapper &application_wrapper_b)
provide a function for compares
Definition applicationwrapper.h:26
virtual void depatch_app()
Launches the application (depatch).
Definition applicationwrapper.cpp:36
DesktopMainWindow is the main frontend window of the application. For beginners, this is the starting...
Definition desktopmainwindow.h:33