Some more comments to iot-dashboard

This commit is contained in:
Olivier Goffart 2021-05-18 16:51:02 +02:00
parent 73ddea74a8
commit 24bafdb2f9
3 changed files with 26 additions and 14 deletions

View file

@ -87,6 +87,9 @@ void HumidityWidget::update_fake_humidity()
int main()
{
DashboardBuilder builder;
// The widgets and their position is hardcoded for now, but one could imagine getting this
// from a config file, and istentiating the widgets with a factory function
builder.add_top_bar_widget(std::make_shared<ClockWidget>());
builder.add_grid_widget(std::make_shared<PlaceholderWidget>("Usage"), { 0, 0, 2 });
builder.add_grid_widget(std::make_shared<PlaceholderWidget>("IndoorTemperature"), { 0, 1 });