mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
stats: remove theme-access from QtQuick root node
To make the QtQuick code more general, remove the access to the StatsTheme, which only makes sense for the statistics module. Store the background color in a separate variable, since that will be needed by any potential users of the code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1a3bc9bf71
commit
845ac82b57
2 changed files with 13 additions and 5 deletions
|
|
@ -53,6 +53,7 @@ public:
|
|||
QQuickWindow *w() const; // Make window available to items
|
||||
QSizeF size() const;
|
||||
QRectF plotArea() const;
|
||||
void setBackgroundColor(QColor color); // Chart must be replot for color to become effective.
|
||||
void setTheme(bool dark); // Chart must be replot for theme to become effective.
|
||||
const StatsTheme &getCurrentTheme() const;
|
||||
void addQSGNode(QSGNode *node, ChartZValue z); // Must only be called in render thread!
|
||||
|
|
@ -143,6 +144,7 @@ private:
|
|||
|
||||
StatsState state;
|
||||
const StatsTheme *currentTheme;
|
||||
QColor backgroundColor;
|
||||
std::vector<std::unique_ptr<StatsSeries>> series;
|
||||
std::unique_ptr<StatsGrid> grid;
|
||||
std::vector<ChartItemPtr<QuartileMarker>> quartileMarkers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue