-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainapplication.h
120 lines (63 loc) · 2.17 KB
/
mainapplication.h
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef MAINAPPLICATION_H
#define MAINAPPLICATION_H
#include <Necessary>
#include "mongoheaders.h"
#include "SerikBelediyesiWebSayfasi/src/body.h"
#include "SerikBelediyesiWebSayfasi/srcV2/device/deviceitem.h"
#include <random>
using bsoncxx::builder::basic::document;
using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::array;
using bsoncxx::builder::basic::make_document;
using bsoncxx::builder::basic::make_array;
using namespace Wt;
#include <filesystem>
///
/// \brief The MainApplication class
/// This is Web Application Server. Contruct and Manage Page. Deliver the some neccessary variabla from platform or host
class MainApplication : public WApplication
{
public:
explicit MainApplication(const WEnvironment& env);
~MainApplication();
void initCSSFiles();
///
/// \brief start initializing www.serikbelediyesi.com
///
void init();
void showYapilandirmaEmlak();
void ShowForeGround();
// bool loadDilekce( const std::string &oid );
bool loadTalep( const std::string &oid );
bool loadGundem( const std::string& oid );
bool loadNost();
void LoadDeviceStatus();
void bakim( const std::string &message );
private:
mongocxx::client* mClient;
mongocxx::database db;
mongocxx::gridfs::bucket Bucket;
///
/// \brief p_wtTheme
/// Bootstrap Theme
std::shared_ptr<Wt::WBootstrapTheme> p_wtTheme;
///
void deleteOldCollectionandFiles();
bool fileExist( const std::string &fileOid );
};
class tWidget : public WContainerWidget
{
public:
tWidget() {
setContentAlignment(AlignmentFlag::Center);
// decorationStyle().setBorder(WBorder(BorderStyle::Solid));
setAttributeValue(Style::style,Style::background::url("img/01.jpg")+Style::background::size::contain
+Style::background::repeat::norepeat
+Style::background::position::center_center);
setHeight(450);
// addWidget(cpp14::make_unique<WText>("Yeni Web Sayfamız Çok Yakında..."));
setMargin(20,Side::Bottom|Side::Top);
// setMargin(50,Side::Bottom);
}
};
#endif // MAINAPPLICATION_H