mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
#include "multiple_boxes_view.h"
|
|
#include <assert.h>
|
|
|
|
using namespace Shared;
|
|
|
|
namespace Statistics {
|
|
|
|
MultipleBoxesView::MultipleBoxesView(Store * store, BoxView::Quantile * selectedQuantile) :
|
|
MultipleDataView(store),
|
|
m_boxView1(store, 0, nullptr, selectedQuantile, Palette::Red),
|
|
m_boxView2(store, 1, nullptr, selectedQuantile, Palette::Blue),
|
|
m_boxView3(store, 2, nullptr, selectedQuantile, Palette::Green),
|
|
// TODO Share colors with stats/store_controller
|
|
m_bannerView()
|
|
{
|
|
for (int i = 0; i < Store::k_numberOfSeries; i++) {
|
|
BoxView * boxView = dataViewAtIndex(i);
|
|
boxView->setDisplayBannerView(false);
|
|
//histView->setDisplayLabels(false); //TODO
|
|
}
|
|
}
|
|
|
|
BoxView * MultipleBoxesView::dataViewAtIndex(int index) {
|
|
assert(index >= 0 && index < 3);
|
|
BoxView * views[] = {&m_boxView1, &m_boxView2, &m_boxView3};
|
|
return views[index];
|
|
}
|
|
|
|
int MultipleBoxesView::seriesOfSubviewAtIndex(int index) {
|
|
assert(index >= 0 && index < numberOfSubviews() - 1);
|
|
return static_cast<BoxView *>(subviewAtIndex(index))->series();
|
|
}
|
|
|
|
}
|