summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/theme/thememanager_p.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-27 13:10:44 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-27 13:13:58 +0200
commitb368e57e59351736f9ad06834a743a7c1b49d368 (patch)
tree3b7d42569905d8cde0ca7571cd664428354a50dd /src/datavisualization/theme/thememanager_p.h
parenteb3d0514ca886db33776522ea00f27b69bc86ad1 (diff)
parent05d06fbc61f07e400b519a9b020c2473398627c1 (diff)
Merge branch 'develop'v1.0.0-beta1
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