Skip to content

Commit

Permalink
Overview Data Table - Part 1 of 4
Browse files Browse the repository at this point in the history
A new overview tile that can be placed on trends or activity view to
display a table of data.

.. It uses a program to fetch the data to display via 3 functions:
   * names() returns a list of column names
   * units() returns a list of column unit names
   * values() returns a list of values to show

.. If there are more values than names then it is assumed there
   are multiple rows to be shown.

.. When adding a data tile an example program is provided to
   demonstrate how this works (will need to also document this
   on the wiki, or possibly a video tutorial).
  • Loading branch information
liversedge committed Jul 27, 2021
1 parent b9fbcce commit 7f00593
Show file tree
Hide file tree
Showing 5 changed files with 534 additions and 44 deletions.
15 changes: 15 additions & 0 deletions src/Charts/Overview.cpp
Expand Up @@ -161,6 +161,12 @@ OverviewWindow::getConfiguration() const
config += "\"polarized\":" + QString("%1").arg(zone->polarized) + ",";
}
break;
case OverviewItemType::DATATABLE:
{
DataOverviewItem *data = reinterpret_cast<DataOverviewItem*>(item);
config += "\"program\":\"" + QString("%1").arg(Utils::jsonprotect(data->program)) + "\",";
}
break;
case OverviewItemType::KPI:
{
KPIOverviewItem *kpi = reinterpret_cast<KPIOverviewItem*>(item);
Expand Down Expand Up @@ -486,6 +492,15 @@ OverviewWindow::setConfiguration(QString config)
}
break;

case OverviewItemType::DATATABLE:
{
QString program=Utils::jsonunprotect(obj["program"].toString());
add = new DataOverviewItem(space, name, program);
add->datafilter = datafilter;
space->addItem(order,column,span,deep, add);
}
break;

case OverviewItemType::KPI :
{
QString program=Utils::jsonunprotect(obj["program"].toString());
Expand Down

0 comments on commit 7f00593

Please sign in to comment.