Generator responsible for generating APK mobile applications.
More...
#include <templategenerator.h>
|
| TemplateGenerator (QObject *parent=0) |
|
Generator responsible for generating APK mobile applications.
Definition at line 10 of file templategenerator.h.
void TemplateGenerator::generateMobileApplication |
( |
TemplateCore * |
core | ) |
|
|
slot |
Generates new APK application using given core.
- Parameters
-
- Warning
- State and progress of creating of application is reported via signalling. No return values are used.
Definition at line 21 of file templategenerator.cpp.
22 if (qApp->closeLock()->tryLock()) {
24 QString input_file_name = QInputDialog::getText(qApp->mainForm(), tr(
"Specify application output file name"),
25 tr(
"Type here custom output application file name or leave the default value intact if you are satisfied with it."),
27 qApp->templateManager()->applicationFileName(core->
editor()->
projectName()), &ok);
29 if (!ok || input_file_name.isEmpty()) {
32 qApp->closeLock()->unlock();
37 if (!input_file_name.endsWith(
".apk")) {
38 input_file_name +=
".apk";
52 if (result == TemplateCore::Success) {
59 qApp->closeLock()->unlock();
62 qApp->trayIcon()->showMessage(tr(
"Cannot generate application"),
63 tr(
"Master generation lock is locked, try to\ngenerate application later."),
64 QSystemTrayIcon::Warning);
virtual QString projectName()=0
Access to project name of current editor.
virtual TemplateEditor * editor() const
Access to editor widget of the template.
void generationProgress(int progress, const QString &message)
Emitted when there is some progress in generating APK application.
virtual GenerationResult generateMobileApplication(const QString &input_apk_file, QString &output_file)=0
Generates APK file from current project with active settings.
void generationFinished(TemplateCore::GenerationResult result_code, const QString &output_file=QString())
Emitted if generating process is finished.
void generationStarted()
Emitted if generating process is started.
GenerationResult
Possible results of generation of bundle data.
Emitted if generating process is finished.
- Parameters
-
result_code | Result code of generating process. |
output_file | If generating succeeded, then this contains output APK file path. |
void TemplateGenerator::generationProgress |
( |
int |
progress, |
|
|
const QString & |
message |
|
) |
| |
|
signal |
Emitted when there is some progress in generating APK application.
- Parameters
-
progress | Number of percent passed. |
message | Progress message description. |
The documentation for this class was generated from the following files: