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.
Main Page
Modules
Classes
Files
File List
All
Classes
Functions
Enumerations
Groups
Pages
formsimulator.h
1
#ifndef FORMSIMULATOR_H
2
#define FORMSIMULATOR_H
3
4
#include <QDialog>
5
6
#include "ui_formsimulator.h"
7
8
9
namespace
Ui {
10
class
FormSimulator
;
11
}
12
13
class
FormMain
;
14
class
TemplateSimulator
;
15
class
QCloseEvent;
16
17
/// \brief Separate window which contains active simulator.
18
/// \remarks This window can be sticked to main window.
19
class
FormSimulator
:
public
QDialog {
20
Q_OBJECT
21
22
friend
class
FormMain
;
23
24
public
:
25
// Constructors and destructors.
26
explicit
FormSimulator
(
FormMain
*parent = 0);
27
virtual
~
FormSimulator
();
28
29
/// \brief Saves size & position for the window into settings.
30
void
saveState
();
31
32
/// \brief Loads size & position for the window from settings.
33
void
loadState
();
34
35
/// \brief Indicates whether simulator window is sticked to
36
/// main window or not.
37
/// \return Returns true if window is sticked
38
/// or false when it is not.
39
inline
bool
isSticked
()
const
{
40
return
m_isSticked;
41
}
42
43
/// \brief Indicates whether simulator window should be shown
44
/// when application launches.
45
inline
bool
isVisibleOnStartup
()
const
{
46
return
m_isVisibleOnStartup;
47
}
48
49
/// \brief Sets new active simulation widget.
50
/// \param simulation New active simulation widget.
51
/// \remarks This instance of FormSimulator takes ownership
52
/// of added simulation editors. When this method is called
53
/// and there is already some editor set, then this editor
54
/// is deleted.
55
void
setActiveSimulation
(
TemplateSimulator
*simulation);
56
57
public
slots:
58
/// \brief Takes active simulation one step back.
59
///
60
/// This simply calls TemplateSimulator::goBack().
61
void
goBack
();
62
63
/// \brief Starts active simulation.
64
///
65
/// This simply calls TemplateSimulator::startSimulation().
66
void
startSimulation
();
67
68
/// \brief Stops active simulation.
69
///
70
/// This simply calls TemplateSimulator::stopSimulation().
71
void
stopSimulation
();
72
73
/// \brief Conditionally sticks simulator window to its parent.
74
/// \remarks Depends on settings.
75
void
conditionallyAttachToParent
();
76
77
/// \brief Forces this window to align itself next to its parent window.
78
void
attachToParent
();
79
80
/// \brief Allows window to be unattached and allows vertical resize policy.
81
void
unAttachFromParent
();
82
83
/// \brief Sticks or unsticks window.
84
/// \param is_sticked Do we want to stick window?
85
void
setIsSticked
(
bool
is_sticked);
86
87
/// \brief Displays simulator window.
88
void
show
();
89
90
protected
:
91
/// \brief Executed when simulator window is closed.
92
/// \param e Event argument.
93
void
closeEvent
(QCloseEvent *e);
94
95
signals:
96
/// \brief Emitted when simulator window is closed.
97
void
closed
();
98
99
/// \brief Emitted if "stop" feature for active simulation is changed, in other
100
/// words, if simulation is started/stopped.
101
void
stopEnableChanged
(
bool
enabled);
102
103
private
:
104
void
setupPhoneWidget();
105
void
setupIcons();
106
107
private
:
108
Ui::FormSimulator *m_ui;
109
FormMain
*m_mainWindow;
110
bool
m_isVisibleOnStartup;
111
bool
m_isSticked;
112
bool
m_isActive;
113
TemplateSimulator
*m_activeSimulation;
114
};
115
116
#endif // FORMSIMULATOR_H
FormSimulator::setActiveSimulation
void setActiveSimulation(TemplateSimulator *simulation)
Sets new active simulation widget.
Definition:
formsimulator.cpp:60
FormSimulator::attachToParent
void attachToParent()
Forces this window to align itself next to its parent window.
Definition:
formsimulator.cpp:131
FormSimulator::stopSimulation
void stopSimulation()
Stops active simulation.
Definition:
formsimulator.cpp:97
FormSimulator
Separate window which contains active simulator.
Definition:
formsimulator.h:19
FormMain
Main application window.
Definition:
formmain.h:53
FormSimulator::isVisibleOnStartup
bool isVisibleOnStartup() const
Indicates whether simulator window should be shown when application launches.
Definition:
formsimulator.h:45
FormSimulator::conditionallyAttachToParent
void conditionallyAttachToParent()
Conditionally sticks simulator window to its parent.
Definition:
formsimulator.cpp:105
FormSimulator::show
void show()
Displays simulator window.
Definition:
formsimulator.cpp:124
FormSimulator::isSticked
bool isSticked() const
Indicates whether simulator window is sticked to main window or not.
Definition:
formsimulator.h:39
FormSimulator::stopEnableChanged
void stopEnableChanged(bool enabled)
Emitted if "stop" feature for active simulation is changed, in other words, if simulation is started/...
FormSimulator::goBack
void goBack()
Takes active simulation one step back.
Definition:
formsimulator.cpp:83
FormSimulator::closed
void closed()
Emitted when simulator window is closed.
FormSimulator::closeEvent
void closeEvent(QCloseEvent *e)
Executed when simulator window is closed.
Definition:
formsimulator.cpp:160
FormSimulator::startSimulation
void startSimulation()
Starts active simulation.
Definition:
formsimulator.cpp:89
FormSimulator::setIsSticked
void setIsSticked(bool is_sticked)
Sticks or unsticks window.
Definition:
formsimulator.cpp:111
FormSimulator::loadState
void loadState()
Loads size & position for the window from settings.
Definition:
formsimulator.cpp:53
FormSimulator::unAttachFromParent
void unAttachFromParent()
Allows window to be unattached and allows vertical resize policy.
Definition:
formsimulator.cpp:142
FormSimulator::saveState
void saveState()
Saves size & position for the window into settings.
Definition:
formsimulator.cpp:44
TemplateSimulator
Base widget which represents simulator of the template.
Definition:
templatesimulator.h:41
data
Martin
Coding
Projekty
buildmlearn-toolkit
portage
src
gui
formsimulator.h
Generated on Mon Aug 18 2014 15:48:51 for BuildmLearn Toolkit by
1.8.7