##// END OF EJS Templates
Removed default theme, now using light as the default
Tero Ahola -
r853:9dc445f7b1fb
parent child
Show More
@@ -48,10 +48,9 ThemeWidget::ThemeWidget(QWidget* parent) :
48 m_valueCount(7),
48 m_valueCount(7),
49 m_dataTable(generateRandomData(m_listCount,m_valueMax,m_valueCount)),
49 m_dataTable(generateRandomData(m_listCount,m_valueMax,m_valueCount)),
50 m_themeComboBox(createThemeBox()),
50 m_themeComboBox(createThemeBox()),
51 m_antialiasCheckBox(new QCheckBox("Anti aliasing")),
51 m_antialiasCheckBox(new QCheckBox("Anti-aliasing")),
52 m_animatedComboBox(createAnimationBox()),
52 m_animatedComboBox(createAnimationBox()),
53 m_legendComboBox(createLegendBox())
53 m_legendComboBox(createLegendBox())
54
55 {
54 {
56 connectSignals();
55 connectSignals();
57 // create layout
56 // create layout
@@ -141,7 +140,6 QComboBox* ThemeWidget::createThemeBox() const
141 {
140 {
142 // settings layout
141 // settings layout
143 QComboBox* themeComboBox = new QComboBox();
142 QComboBox* themeComboBox = new QComboBox();
144 themeComboBox->addItem("Default", QChart::ChartThemeDefault);
145 themeComboBox->addItem("Light", QChart::ChartThemeLight);
143 themeComboBox->addItem("Light", QChart::ChartThemeLight);
146 themeComboBox->addItem("Blue Cerulean", QChart::ChartThemeBlueCerulean);
144 themeComboBox->addItem("Blue Cerulean", QChart::ChartThemeBlueCerulean);
147 themeComboBox->addItem("Dark", QChart::ChartThemeDark);
145 themeComboBox->addItem("Dark", QChart::ChartThemeDark);
@@ -57,7 +57,6 MainWidget::MainWidget(QWidget* parent)
57
57
58 // chart settings
58 // chart settings
59 m_themeComboBox = new QComboBox();
59 m_themeComboBox = new QComboBox();
60 m_themeComboBox->addItem("Default", QChart::ChartThemeDefault);
61 m_themeComboBox->addItem("Light", QChart::ChartThemeLight);
60 m_themeComboBox->addItem("Light", QChart::ChartThemeLight);
62 m_themeComboBox->addItem("BlueCerulean", QChart::ChartThemeBlueCerulean);
61 m_themeComboBox->addItem("BlueCerulean", QChart::ChartThemeBlueCerulean);
63 m_themeComboBox->addItem("Dark", QChart::ChartThemeDark);
62 m_themeComboBox->addItem("Dark", QChart::ChartThemeDark);
@@ -57,7 +57,7 ChartPresenter::ChartPresenter(QChart* chart,ChartDataSet* dataset):QObject(char
57 m_backgroundPadding(10)
57 m_backgroundPadding(10)
58 {
58 {
59 createConnections();
59 createConnections();
60 setTheme(QChart::ChartThemeDefault,false);
60 setTheme(QChart::ChartThemeLight, false);
61 }
61 }
62
62
63 ChartPresenter::~ChartPresenter()
63 ChartPresenter::~ChartPresenter()
@@ -49,7 +49,7
49 #include "splinechartitem_p.h"
49 #include "splinechartitem_p.h"
50
50
51 //themes
51 //themes
52 #include "chartthemedefault_p.h"
52 #include "chartthemesystem_p.h"
53 #include "chartthemelight_p.h"
53 #include "chartthemelight_p.h"
54 #include "chartthemebluecerulean_p.h"
54 #include "chartthemebluecerulean_p.h"
55 #include "chartthemedark_p.h"
55 #include "chartthemedark_p.h"
@@ -61,7 +61,7
61 QTCOMMERCIALCHART_BEGIN_NAMESPACE
61 QTCOMMERCIALCHART_BEGIN_NAMESPACE
62
62
63 ChartTheme::ChartTheme(QChart::ChartTheme id) :
63 ChartTheme::ChartTheme(QChart::ChartTheme id) :
64 m_masterFont(QFont("arial", 12)),
64 m_masterFont(QFont("arial", 14)),
65 m_labelFont(QFont("arial", 10)),
65 m_labelFont(QFont("arial", 10)),
66 m_titleBrush(QColor(QRgb(0x000000))),
66 m_titleBrush(QColor(QRgb(0x000000))),
67 m_axisLinePen(QPen(QRgb(0x000000))),
67 m_axisLinePen(QPen(QRgb(0x000000))),
@@ -94,7 +94,7 ChartTheme* ChartTheme::createTheme(QChart::ChartTheme theme)
94 case QChart::ChartThemeBlueIcy:
94 case QChart::ChartThemeBlueIcy:
95 return new ChartThemeBlueIcy();
95 return new ChartThemeBlueIcy();
96 default:
96 default:
97 return new ChartThemeDefault();
97 return new ChartThemeSystem();
98 }
98 }
99 }
99 }
100
100
@@ -58,7 +58,7 public:
58 };
58 };
59
59
60 protected:
60 protected:
61 explicit ChartTheme(QChart::ChartTheme id = QChart::ChartThemeDefault);
61 explicit ChartTheme(QChart::ChartTheme id = QChart::ChartThemeLight);
62 public:
62 public:
63 static ChartTheme* createTheme(QChart::ChartTheme theme);
63 static ChartTheme* createTheme(QChart::ChartTheme theme);
64 QChart::ChartTheme id() const {return m_id;}
64 QChart::ChartTheme id() const {return m_id;}
@@ -30,8 +30,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30
30
31 This enum describes the theme used by the chart.
31 This enum describes the theme used by the chart.
32
32
33 \value ChartThemeDefault Follows the GUI style of the Operating System
33 \value ChartThemeLight The default theme
34 \value ChartThemeLight
35 \value ChartThemeBlueCerulean
34 \value ChartThemeBlueCerulean
36 \value ChartThemeDark
35 \value ChartThemeDark
37 \value ChartThemeBrownSand
36 \value ChartThemeBrownSand
@@ -40,8 +40,7 class QTCOMMERCIALCHART_EXPORT QChart : public QGraphicsWidget
40
40
41 public:
41 public:
42 enum ChartTheme {
42 enum ChartTheme {
43 ChartThemeDefault,
43 ChartThemeLight = 0,
44 ChartThemeLight,
45 ChartThemeBlueCerulean,
44 ChartThemeBlueCerulean,
46 ChartThemeDark,
45 ChartThemeDark,
47 ChartThemeBrownSand,
46 ChartThemeBrownSand,
@@ -2,7 +2,7 INCLUDEPATH += $$PWD
2 DEPENDPATH += $$PWD
2 DEPENDPATH += $$PWD
3
3
4 THEMES += \
4 THEMES += \
5 $$PWD/chartthemedefault_p.h \
5 $$PWD/chartthemesystem_p.h \
6 $$PWD/chartthemelight_p.h \
6 $$PWD/chartthemelight_p.h \
7 $$PWD/chartthemebluecerulean_p.h \
7 $$PWD/chartthemebluecerulean_p.h \
8 $$PWD/chartthemedark_p.h \
8 $$PWD/chartthemedark_p.h \
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now