BuildmLearn Toolkit  2.0.4
BuildmLearn Toolkit is an easy-to-use program that helps users make mobile apps without any knowledge of application development.
 All Classes Functions Enumerations Groups Pages
TemplateCore Class Referenceabstract

The core class container for single template. More...

#include <templatecore.h>

Collaboration diagram for TemplateCore:
Collaboration graph

Public Types

enum  GenerationResult {
  Success, ZipProblem, SignApkProblem, JavaProblem,
  BundleProblem, CopyProblem, Aborted, OtherProblem
}
 Possible results of generation of bundle data.
 

Signals

void generationProgress (int percent_completed, const QString &progress_info)
 Emitted when there is something new concerning generating of mobile APK application. More...
 

Public Member Functions

 TemplateCore (TemplateEntryPoint *entry_point, QObject *parent=0)
 
virtual GenerationResult generateMobileApplication (const QString &input_apk_file, QString &output_file)=0
 Generates APK file from current project with active settings. More...
 
virtual void launch ()
 Called after this template is fully loaded in toolkit. More...
 
virtual TemplateEntryPointentryPoint () const
 Access to entry point of the template. More...
 
virtual TemplateEditoreditor () const
 Access to editor widget of the template. More...
 
virtual TemplateSimulatorsimulator () const
 Access to simulator widget of the template. More...
 
QString assignedFile () const
 Access to assigned XML "bundle" file. More...
 
void setAssignedFile (const QString &assigned_file)
 Sets new assigned file. More...
 

Protected Attributes

TemplateEntryPointm_entryPoint
 
TemplateEditorm_editor
 
TemplateSimulatorm_simulator
 
QString m_assignedFile
 

Detailed Description

The core class container for single template.

Definition at line 43 of file templatecore.h.

Member Function Documentation

QString TemplateCore::assignedFile ( ) const

Access to assigned XML "bundle" file.

Returns
Returns full path to assigned XML "bundle" file.

Template core gets assigned path to XML "bundle" file, when it is loaded from that XML bundle file or when it is saved into some XML bundle file.

Note
This is used when using "Save" functionality, it asks if currently active core has assigned some file and if it does, then "Save" feature saves unsaved work into that file, otherwise it transfers the flow to "Save as" feature.

Definition at line 50 of file templatecore.cpp.

50  {
51  return m_assignedFile;
52 }
virtual TemplateEditor* TemplateCore::editor ( ) const
inlinevirtual

Access to editor widget of the template.

Returns
Returns editor widget pointer.

Definition at line 84 of file templatecore.h.

84  {
85  return m_editor;
86  }

Here is the caller graph for this function:

virtual TemplateEntryPoint* TemplateCore::entryPoint ( ) const
inlinevirtual

Access to entry point of the template.

Returns
Returns entry point pointer.

Definition at line 78 of file templatecore.h.

78  {
79  return m_entryPoint;
80  }

Here is the caller graph for this function:

virtual GenerationResult TemplateCore::generateMobileApplication ( const QString &  input_apk_file,
QString &  output_file 
)
pure virtual

Generates APK file from current project with active settings.

Returns
Returns true on success, otherwise returns false.
Warning
This is used only if template can actually generate mobile application, so that editor of the template must contain sufficient data for doing so.

Implemented in QuizCore, LearnSpellingsCore, FlashCardCore, and BasicmLearningCore.

Here is the caller graph for this function:

void TemplateCore::generationProgress ( int  percent_completed,
const QString &  progress_info 
)
signal

Emitted when there is something new concerning generating of mobile APK application.

Parameters
percent_completedPercent of mobile application generating completed.
progress_infoDescription text of status of current generating process.

Here is the caller graph for this function:

void TemplateCore::launch ( )
virtual

Called after this template is fully loaded in toolkit.

Note
Template is fully loaded only and only if its editor is set as active and its simulator is set as active. During "launching" usually some common signals are emitted and input data of editor are checked.

Definition at line 45 of file templatecore.cpp.

45  {
46  m_editor->launch();
47  m_simulator->launch();
48 }
virtual void launch()
Called when core with this simulator widget is fully loaded from XML bundle or newly created...
virtual void launch()
Executed when given template with this editor is launched.

Here is the call graph for this function:

void TemplateCore::setAssignedFile ( const QString &  assigned_file)

Sets new assigned file.

Parameters
assigned_fileNew assigned file.

Definition at line 54 of file templatecore.cpp.

54  {
55  m_assignedFile = assigned_file;
56 }

Here is the caller graph for this function:

virtual TemplateSimulator* TemplateCore::simulator ( ) const
inlinevirtual

Access to simulator widget of the template.

Returns
Returns simulator widget pointer.

Definition at line 90 of file templatecore.h.

90  {
91  return m_simulator;
92  }

Here is the caller graph for this function:


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