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
formsettings.h
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 #ifndef FORMSETTINGS_H
32 #define FORMSETTINGS_H
33 
34 #include "ui_formsettings.h"
35 
36 #include <QDialog>
37 
38 
39 namespace Ui {
40  class FormSettings;
41 }
42 
43 /// \brief Structure holding some initial values.
45 
46  public:
48  }
49 };
50 
51 /// \brief Form for displaying and editting settings.
52 class FormSettings : public QDialog {
53  Q_OBJECT
54 
55  public:
56  /// \brief Constructor.
57  /// \param parent Parent widget.
58  explicit FormSettings(QWidget *parent = 0);
59  virtual ~FormSettings();
60 
61  private:
62  void createConnections();
63 
64  // Does check of controls before dialog can be submitted.
65  bool doSaveCheck();
66 
67  private slots:
68  // Displays "restart" dialog if some critical settings changed.
69  void promptForRestart();
70 
71  // Saves settings into global configuration.
72  void saveSettings();
73 
74  void loadGeneral();
75  void saveGeneral();
76 
77  void loadGenerationStuff();
78  void saveGenerationStuff();
79 
80  void selectTempDirectory();
81  void selectOutputDirectory();
82 
83  void loadExternalUtilites();
84  void saveExternalUtilites();
85 
86  void checkJava(const QString& new_path);
87  void checkZip(const QString& new_path);
88  void checkSignApk(const QString& new_path);
89 
90  void selectJava();
91  void selectZip();
92  void selectSignApk();
93 
94  void loadInterface();
95  void saveInterface();
96  void onSkinSelected(QTreeWidgetItem *current, QTreeWidgetItem *previous);
97 
98  void loadShortcuts();
99  void saveShortcuts();
100 
101  void loadLanguage();
102  void saveLanguage();
103 
104  void loadBrowser();
105  void saveBrowser();
106  void changeDefaultBrowserArguments(int index);
107  void selectBrowserExecutable();
108 
109  void loadProxy();
110  void saveProxy();
111  void displayProxyPassword(int state);
112  void onProxyTypeChanged(int index);
113 
114  private:
115  Ui::FormSettings *m_ui;
116  TemporarySettings m_initialSettings;
117  QStringList m_changedDataTexts;
118 };
119 
120 #endif // FORMSETTINGS_H
Form for displaying and editting settings.
Definition: formsettings.h:52
FormSettings(QWidget *parent=0)
Constructor.
Structure holding some initial values.
Definition: formsettings.h:44