mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: create themes on demand
Create the themes only when needed (singleton pattern). If the themes should do more than colors, such as for example fonts, it is not clear whether that can be done before main() runs. By creating the themes on demand, the Qt UI should be initialized in the constructors of the themes. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7f1107408d
commit
5f91c69f9c
4 changed files with 21 additions and 10 deletions
|
@ -54,7 +54,7 @@ public:
|
|||
QQuickWindow *w() const; // Make window available to items
|
||||
QSizeF size() const;
|
||||
QRectF plotArea() const;
|
||||
void setTheme(int idx); // Invalid indexes will result in the default theme. Chart must be replot for theme 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!
|
||||
void registerChartItem(ChartItem &item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue