mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Statistics graph painting
This commit is contained in:
@ -20,6 +20,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class StatisticsGraphWidget;
|
||||
@ -55,8 +57,14 @@ public:
|
||||
explicit StatisticsGraphWidget(QWidget* parent);
|
||||
virtual ~StatisticsGraphWidget() override;
|
||||
|
||||
virtual QSize sizeHint() const override;
|
||||
virtual QSize minimumSizeHint() const override;
|
||||
|
||||
void setStatistics(Statistics statistics);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent* event) override;
|
||||
|
||||
private:
|
||||
Ui::StatisticsGraphWidget* ui;
|
||||
|
||||
@ -66,14 +74,20 @@ private:
|
||||
int colorRectangleWidth = 0;
|
||||
int linesWidthLeft = 0;
|
||||
int linesWidthRight = 0;
|
||||
int markerSize = 0;
|
||||
int normalLineWidth = 0;
|
||||
int selectedLineWidth = 0;
|
||||
int colorRectangeLeftMargin = 0;
|
||||
|
||||
int titleWidth = 0;
|
||||
int titleHeight = 0;
|
||||
int textHeight = 0;
|
||||
int textMargin = 0;
|
||||
int textLineHeight = 0;
|
||||
|
||||
std::vector<int> textWidths;
|
||||
|
||||
QSize minimalWidgetSize = 0;
|
||||
QSize minimalWidgetSize;
|
||||
};
|
||||
|
||||
GeometryHint getGeometryHint() const;
|
||||
@ -83,6 +97,8 @@ private:
|
||||
QFont getTextFont() const;
|
||||
|
||||
Statistics m_statistics;
|
||||
std::vector<QRect> m_colorBoxes;
|
||||
size_t m_selectedColorBox = -1;
|
||||
};
|
||||
|
||||
} // namespace pdfplugin
|
||||
|
Reference in New Issue
Block a user