-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
376 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,72 @@ | ||
#include "baskanwidget.h" | ||
|
||
BaskanWidget::BaskanWidget() | ||
BaskanWidget::BaskanWidget(mongocxx::database *_db) | ||
:DataBaseWidget (_db) | ||
{ | ||
|
||
setPadding(90,Side::Top); | ||
setWidth(WLength("100%")); | ||
|
||
auto mContainer = addWidget(cpp14::make_unique<WContainerWidget>()); | ||
mContainer->addStyleClass(Bootstrap::Grid::container_fluid); | ||
|
||
auto rContainer = mContainer->addWidget(cpp14::make_unique<WContainerWidget>()); | ||
rContainer->addStyleClass(Bootstrap::Grid::row); | ||
rContainer->setMaximumSize(1024,WLength::Auto); | ||
|
||
|
||
//FOTO | ||
{ | ||
auto fotoWidget = rContainer->addWidget(cpp14::make_unique<WContainerWidget>()); | ||
fotoWidget->addStyleClass(Bootstrap::Grid::col_full_12); | ||
fotoWidget->setHeight(350); | ||
fotoWidget->setAttributeValue(Style::style,Style::background::url("v2/baskan/baskan1.png") | ||
+Style::background::size::contain | ||
+Style::background::repeat::norepeat | ||
+Style::background::position::center_center); | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
// TEXT | ||
{ | ||
auto textWidget = rContainer->addWidget(cpp14::make_unique<WContainerWidget>()); | ||
textWidget->addStyleClass(Bootstrap::Grid::col_full_12); | ||
textWidget->setAttributeValue(Style::style,Style::background::color::color(Style::color::White::Snow)); | ||
|
||
auto filter = document{}; | ||
|
||
try { | ||
filter.append(kvp("type","Başkan")); | ||
} catch (bsoncxx::exception &e) { | ||
|
||
} | ||
|
||
try { | ||
filter.append(kvp("baskan","Enver APUTKAN")); | ||
} catch (bsoncxx::exception &e) { | ||
|
||
} | ||
|
||
|
||
try { | ||
auto val = this->collection("Yonetim").find_one(filter.view()); | ||
|
||
if( !val.value().view().empty() ) | ||
{ | ||
auto str = val.value().view()["html"].get_utf8().value.to_string(); | ||
auto text = textWidget->addWidget(cpp14::make_unique<WText>(str,TextFormat::UnsafeXHTML)); | ||
} | ||
|
||
} catch (mongocxx::exception &e) { | ||
|
||
} | ||
|
||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#ifndef BASKANWIDGET_H | ||
#define BASKANWIDGET_H | ||
|
||
#include "SerikBelediyesiWebSayfasi/BaseClass/databasewidget.h" | ||
|
||
|
||
class BaskanWidget : public DataBaseWidget | ||
{ | ||
public: | ||
BaskanWidget(); | ||
BaskanWidget(mongocxx::database* _db); | ||
}; | ||
|
||
#endif // BASKANWIDGET_H | ||
#endif // BASKANWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.