1
/***************************************************************************
2
* -------------------------------------------------------------------- *
3
* Copyright (C) 2008, Nicolas Ternisien <nicolas.ternisien@gmail.com> *
4
* -------------------------------------------------------------------- *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
***************************************************************************/
11
#ifndef CHART_WIDGET_H
12
#define CHART_WIDGET_H
25
class Chart : public QWidget {
27
Chart(QWidget* parent = NULL);
29
void setMemoryInfos(t_memsize* memoryInfos);
30
void setFreeMemoryLabel(QLabel* freeMemoryLabel);
32
static QString formattedUnit(t_memsize value);
36
bool drawChart(t_memsize total, const QList<t_memsize>& used, const QList<QColor>& colors, const QList<QString>& texts);
38
t_memsize* memoryInfos;
40
QLabel* freeMemoryLabel;
44
class ChartWidget : public QWidget {
48
* Initialize the list view item and task.
50
ChartWidget(const QString& title, const QString& hint, Chart* chartImplementation, QWidget* parent = NULL);
52
void setMemoryInfos(t_memsize* memoryInfos);
61
QLabel* freeMemoryLabel;
65
#endif // CHART_WIDGET_H