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
formhelp.cpp
1 /*
2  Copyright (c) 2012, BuildmLearn Contributors listed at http://buildmlearn.org/people/
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 
11  * Redistributions in binary form must reproduce the above copyright notice,
12  this list of conditions and the following disclaimer in the documentation
13  and/or other materials provided with the distribution.
14 
15  * Neither the name of the BuildmLearn nor the names of its
16  contributors may be used to endorse or promote products derived from
17  this software without specific prior written permission.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30 
31 #include "gui/formhelp.h"
32 
33 #include "miscellaneous/iconfactory.h"
34 
35 #include <QShowEvent>
36 
37 
38 FormHelp::FormHelp(bool do_not_show_again_enabled, QWidget *parent)
39  : QDialog(parent),
40  m_ui(new Ui::FormHelp),
41  m_displayNeverShowCheckbox(do_not_show_again_enabled) {
42  m_ui->setupUi(this);
43 
44  setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
45  setWindowIcon(IconFactory::instance()->fromTheme("application-help"));
46 
47  //: About toolkit dialog title.
48  setWindowTitle(tr("Help"));
49 
50  // Establish connections.
51  connect(this, SIGNAL(accepted()), this, SLOT(onAccepted()));
52 
53  //: Help HTML contents, translate including HTML markup!!!
54  QString help_contents = tr("<body>"
55  "<h2 style=\"text-align: center\">Welcome to help</h2>"
56  ""
57  "<p style=\"text-align: center\">"
58  "<a href=\"#introduction\">Introduction</a> | "
59  "<a href=\"#getting-started\">Getting started</a> | "
60  "<a href=\"#saved-projects\">Working with saved projects</a> | "
61  "<a href=\"#simulator\">Simulator</a> | "
62  "<a href=\"#mobile-applications\">Generating mobile applications</a> | "
63  "<a href=\"#upload-store\">Submitting mobile applications to BuildmLearn Store</a> | "
64  "<a href=\"#settings\">Settings and other facts</a>"
65  "</p>"
66  ""
67  "<a name=\"introduction\"></a><h3 style=\"text-align: center\">Introduction</h3>"
68  "<p>"
69  "BuildmLearn Toolkit is an application which helps you to create interactive mobile applications in a WYSIWYG way. You do not need to know anything about programming, no extra skills are required."
70  "</p>"
71  "<p>"
72  "The toolkit comes with a number of useful mobile application templates that you can choose from. Each template can be customised with your learning material (be it from textbook chapters or other sources) to create m-Learning applications."
73  "</p>"
74  "<p>"
75  "Each mobile application template that comes with the toolkit is designed for specific purposes, however you are free to use the templates as they suit your learning material."
76  "</p>"
77  ""
78  "<a name=\"getting-started\"></a><h3 style=\"text-align: center\">Getting started</h3>"
79  "<p>"
80  "You can start a new mobile application project by going into main menu and selecting \"Project -> New project\". The toolkit contains several templates to start with, including template for quiz-like applications or template for learning of word spellings. Please choose the one that suits your learning material the most."
81  "</p>"
82  "<p>"
83  "After creating a new project, you will see that main window of BuildmLearn Toolkit contains user interface which expects your input, this is the \"editor\" of your project. Please add your custom learning material into the editor, you will find options for adding as much content as you wish. There are also fields where you should input the name of your mobile application and your name (i.e. the name of the author)."
84  "</p>"
85  "<a name=\"saved-projects\"></a><h3 style=\"text-align: center\">Working with saved projects</h3>"
86  "<p>"
87  "You can save your work so that you can carry it to another computer and/or continue in your work later. You can do this by selecting \"Project -> Save project as...\". Projects are stored in files \"*.buildmlearn\" extension."
88  "</p>"
89  "<p>"
90  "If you wish to work with a previously saved project, go to \"Project -> Load project\" and select your saved project file to load it. You may continue to work on this project and generate mobile applications as well."
91  "</p>"
92  ""
93  "<a name=\"simulator\"></a><h3 style=\"text-align: center\">Simulator</h3>"
94  "<p>"
95  "Toolkit comes with a mobile phone simulator, using which you may test your mobile application and adjust your content before you finalize it. "
96  "</p>"
97  "<p>"
98  "When you have added some custom content into the editor, go to Simulator menu and choose \"Run new simulation\". A simulator window will show up and you will then be able to test your mobile applications on the simulator. You may stop the simulator when you are done with testing the application and continue to add content to the editor or generate your mobile applications."
99  "</p>"
100  ""
101  "<a name=\"mobile-applications\"></a><h3 style=\"text-align: center\">Generating mobile applications</h3>"
102  "<p>"
103  "After you have added your learning material to the toolkit and have tested it on the simulator, it is time to generate your mobile application. By generating mobile applications you then have the ability to share this application with other people (your students, other teachers, etc.)."
104  "</p>"
105  "<p>"
106  "To generate your mobile application, go to \"Project -> Generate mobile application\". Note that this option would only be available when you have added your learning material to the template. Choosing this option would create an application installer file for you to distribute. You may share this file with your students so that they can install the applications on their mobile phones or tablet devices."
107  "</p>"
108  "<p>"
109  "Note: You need to have JRE (Java Runtime Environment) installed in order for this feature to work."
110  "</p>"
111  ""
112  "<a name=\"upload-store\"></a><h3 style=\"text-align: center\">Submitting mobile applications to BuildmLearn Store</h3>"
113  "<p>"
114  "BuildmLearn Store is a collection of m-Learning applications which is available on Google Play store. Anyone can download the store to access the applications in the BuildmLearn store. Basically, choosing to submit your applications to the BuildmLearn store may facilitate an easy distribution to your target audience and also many other store users who may benefit from your learning material."
115  "</p>"
116  "<p>"
117  "You have an option to submit your mobile applications to the BuildmLearn store. To do this choose \"Project -> Submit application to store\". You will be asked to fill some basic information about the application before submitting."
118  "</p>"
119  "<p>"
120  "Once you have submitted your mobile application to the store, it would go through a quick review before it appears on the BuildmLearn store. You will get an email notification when the application is available on the BuildmLearn store, so please provide a valid email address while submitting."
121  "</p>"
122  ""
123  "<a name=\"settings\"></a><h3 style=\"text-align: center\">Settings and other facts</h3>"
124  "<p>"
125  "BuildmLearn Toolkit has many options that can be tweaked in 'Tools -> settings'. The settings provided are self explanatory. The toolkit is a portable application which does not store anything to system registry. The only system folders it uses are user-specific folders."
126  "</p>"
127  "</body>");
128 
129  m_ui->m_txtHelp->setText(help_contents);
130 }
131 
132 FormHelp::~FormHelp() {
133  delete m_ui;
134 }
135 
136 void FormHelp::showEvent(QShowEvent *e) {
137  QDialog::showEvent(e);
138 
139  if (!e->spontaneous()) {
140  m_ui->m_cmbDoNotShowAgain->setEnabled(m_displayNeverShowCheckbox);
141  }
142 }
143 
144 void FormHelp::onAccepted() {
145  if (m_ui->m_cmbDoNotShowAgain->isEnabled()) {
146  qApp->settings()->setValue(APP_CFG_GUI,
147  "show_help_startup",
148  !m_ui->m_cmbDoNotShowAgain->isChecked());
149  }
150 }
FormHelp(bool do_not_show_again_enabled, QWidget *parent=0)
Constructor.
Definition: formhelp.cpp:38
Form for displaying application help.
Definition: formhelp.h:46
static IconFactory * instance()
Singleton getter.
Definition: iconfactory.cpp:48