mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 09:34:10 -05:00
added widget for displaying info about identities. Not ready yet
This commit is contained in:
parent
6d665868e8
commit
bac8e0be70
5 changed files with 107 additions and 1 deletions
43
retroshare-gui/src/gui/statistics/Histogram.h
Normal file
43
retroshare-gui/src/gui/statistics/Histogram.h
Normal 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);
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue