Select one of the symbols to view example projects that use it.
 
Outline
#include <gui/home_automation_screen/HomeAutomationPresenter.hpp>
#include <gui/home_automation_screen/HomeAutomationView.hpp>
#include <gui/common/FrontendApplication.hpp>
HomeAutomationPresenter::HomeAutomationPresenter(HomeAutomationView &)
HomeAutomationPresenter::~HomeAutomationPresenter()
HomeAutomationPresenter::activate()
HomeAutomationPresenter::deactivate()
HomeAutomationPresenter::roomUpdated(RoomTemperatureInfo &)
HomeAutomationPresenter::roomSelected(uint8_t)
HomeAutomationPresenter::newRoomTemperature(int16_t)
HomeAutomationPresenter::newScheduleAccepted()
HomeAutomationPresenter::getSelectedRoom()
HomeAutomationPresenter::exitScreen()
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/gui/src/home_automation_screen/HomeAutomationPresenter.cpp
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ #include <gui/home_automation_screen/HomeAutomationPresenter.hpp> #include <gui/home_automation_screen/HomeAutomationView.hpp> #include <gui/common/FrontendApplication.hpp> HomeAutomationPresenter::HomeAutomationPresenter(HomeAutomationView& v) : view(v) { }{ ... } HomeAutomationPresenter::~HomeAutomationPresenter() { }{ ... } void HomeAutomationPresenter::activate() { for (uint8_t i = 0; i < model->getNumberOfRooms(); i++) { view.insertRoom(model->getRoomTemperatureInfo(i)); }for (uint8_t i = 0; i < model->getNumberOfRooms(); i++) { ... } roomSelected(model->getSelectedRoom()); }{ ... } void HomeAutomationPresenter::deactivate() { }{ ... } void HomeAutomationPresenter::roomUpdated(RoomTemperatureInfo& room) { view.updateRoom(room); }{ ... } void HomeAutomationPresenter::roomSelected(uint8_t roomId) { model->setSelectedRoom(roomId); view.setSelectedMenuItem(model->getRoomTemperatureInfoById(roomId)); }{ ... } void HomeAutomationPresenter::newRoomTemperature(int16_t temperature) { model->setRoomTemperature(temperature); }{ ... } void HomeAutomationPresenter::newScheduleAccepted() { view.saveScheduleInfo(model->getRoomTemperatureInfoById(model->getSelectedRoom())); }{ ... } RoomTemperatureInfo& HomeAutomationPresenter::getSelectedRoom() { return model->getRoomTemperatureInfo(model->getSelectedRoom()); }{ ... } void HomeAutomationPresenter::exitScreen() { static_cast<FrontendApplication*>(Application::getInstance())->gotoMenuScreen(); }{ ... }