added widget for displaying info about identities. Not ready yet

This commit is contained in:
csoler 2020-07-08 23:35:44 +02:00
parent 6d665868e8
commit bac8e0be70
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
5 changed files with 107 additions and 1 deletions

View file

@ -0,0 +1,43 @@
/*******************************************************************************
* gui/statistics/Histogram.h *
* *
* Copyright (c) 2020 Retroshare Team <retroshare.project@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <vector>
#include <iostream>
class QPainter;
class Histogram
{
public:
Histogram(double start, double end, int bins);
void draw(QPainter *painter) const ;
void insert(double val);
private:
double mStart;
double mEnd;
std::vector<uint32_t> mBins;
friend std::ostream& operator<<(std::ostream& o,const Histogram& h);
};