summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/theme/thememanager_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/theme/thememanager_p.h')
-rw-r--r--src/datavisualization/theme/thememanager_p.h63
1 files changed, 34 insertions, 29 deletions
diff --git a/src/datavisualization/theme/thememanager_p.h b/src/datavisualization/theme/thememanager_p.h
index c6e6a107..473c2ed7 100644
--- a/src/datavisualization/theme/thememanager_p.h
+++ b/src/datavisualization/theme/thememanager_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc
+** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
@@ -33,7 +33,7 @@
#include "abstract3dcontroller_p.h"
#include "q3dtheme.h"
-QT_DATAVISUALIZATION_BEGIN_NAMESPACE
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class ThemeManager : public QObject
{
@@ -42,40 +42,45 @@ public:
ThemeManager(Abstract3DController *controller);
~ThemeManager();
- void setTheme(Q3DTheme *theme);
- Q3DTheme *theme() const;
+ void addTheme(Q3DTheme *theme);
+ void releaseTheme(Q3DTheme *theme);
+ void setActiveTheme(Q3DTheme *theme);
+ Q3DTheme *activeTheme() const;
+ QList<Q3DTheme *> themes() const;
+
+ static void setPredefinedPropertiesToTheme(Q3DTheme *theme, Q3DTheme::Theme type);
protected:
void connectThemeSignals();
- void useTheme(Q3DTheme::Theme type);
- QLinearGradient createGradient(const QColor &color, float colorLevel);
- void setBaseColors(const QList<QColor> &colors);
- void setBackgroundColor(const QColor &color);
- void setWindowColor(const QColor &color);
- void setTextColor(const QColor &color);
- void setTextBackgroundColor(const QColor &color);
- void setGridLineColor(const QColor &color);
- void setSingleHighlightColor(const QColor &color);
- void setMultiHighlightColor(const QColor &color);
- void setLightColor(const QColor &color);
- void setBaseGradients(const QList<QLinearGradient> &gradients);
- void setSingleHighlightGradient(const QLinearGradient &gradient);
- void setMultiHighlightGradient(const QLinearGradient &gradient);
- void setLightStrength(float strength);
- void setAmbientLightStrength(float strength);
- void setHighlightLightStrength(float strength);
- void setLabelBorderEnabled(bool enabled);
- void setFont(const QFont &font);
- void setBackgroundEnabled(bool enabled);
- void setGridEnabled(bool enabled);
- void setLabelBackgroundEnabled(bool enabled);
- void setColorStyle(Q3DTheme::ColorStyle style);
+ static QLinearGradient createGradient(const QColor &color, float colorLevel);
+ static void setBaseColors(Q3DTheme *theme, const QList<QColor> &colors);
+ static void setBackgroundColor(Q3DTheme *theme, const QColor &color);
+ static void setWindowColor(Q3DTheme *theme, const QColor &color);
+ static void setTextColor(Q3DTheme *theme, const QColor &color);
+ static void setTextBackgroundColor(Q3DTheme *theme, const QColor &color);
+ static void setGridLineColor(Q3DTheme *theme, const QColor &color);
+ static void setSingleHighlightColor(Q3DTheme *theme, const QColor &color);
+ static void setMultiHighlightColor(Q3DTheme *theme, const QColor &color);
+ static void setLightColor(Q3DTheme *theme, const QColor &color);
+ static void setBaseGradients(Q3DTheme *theme, const QList<QLinearGradient> &gradients);
+ static void setSingleHighlightGradient(Q3DTheme *theme, const QLinearGradient &gradient);
+ static void setMultiHighlightGradient(Q3DTheme *theme, const QLinearGradient &gradient);
+ static void setLightStrength(Q3DTheme *theme, float strength);
+ static void setAmbientLightStrength(Q3DTheme *theme, float strength);
+ static void setHighlightLightStrength(Q3DTheme *theme, float strength);
+ static void setLabelBorderEnabled(Q3DTheme *theme, bool enabled);
+ static void setFont(Q3DTheme *theme, const QFont &font);
+ static void setBackgroundEnabled(Q3DTheme *theme, bool enabled);
+ static void setGridEnabled(Q3DTheme *theme, bool enabled);
+ static void setLabelBackgroundEnabled(Q3DTheme *theme, bool enabled);
+ static void setColorStyle(Q3DTheme *theme, Q3DTheme::ColorStyle style);
private:
- QScopedPointer<Q3DTheme> m_theme;
+ Q3DTheme *m_activeTheme;
+ QList<Q3DTheme *> m_themes; // List of all added themes
Abstract3DController *m_controller;
};
-QT_DATAVISUALIZATION_END_NAMESPACE
+QT_END_NAMESPACE_DATAVISUALIZATION
#endif