##// END OF EJS Templates
Default theme background, removed extra themes
Tero Ahola -
r692:339ba14ee2ea
parent child
Show More
@@ -64,9 +64,7 public:
64 64 m_themeComboBox->addItem("Dark", QChart::ChartThemeDark);
65 65 m_themeComboBox->addItem("Brown Sand", QChart::ChartThemeBrownSand);
66 66 m_themeComboBox->addItem("Blue NCS", QChart::ChartThemeBlueNcs);
67 m_themeComboBox->addItem("Vanilla", QChart::ChartThemeVanilla);
68 67 m_themeComboBox->addItem("Icy", QChart::ChartThemeIcy);
69 m_themeComboBox->addItem("Grayscale", QChart::ChartThemeGrayscale);
70 68 m_themeComboBox->addItem("Scientific", QChart::ChartThemeScientific);
71 69 connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this ,SLOT(updateTheme()));
72 70 QCheckBox *antialiasCheckBox = new QCheckBox("Anti aliasing");
@@ -308,9 +308,7 public:
308 308 m_themeComboBox->addItem("Dark", QChart::ChartThemeDark);
309 309 m_themeComboBox->addItem("BrownSand", QChart::ChartThemeBrownSand);
310 310 m_themeComboBox->addItem("BlueNcs", QChart::ChartThemeBlueNcs);
311 m_themeComboBox->addItem("Vanilla", QChart::ChartThemeVanilla);
312 311 m_themeComboBox->addItem("Icy", QChart::ChartThemeIcy);
313 m_themeComboBox->addItem("Grayscale", QChart::ChartThemeGrayscale);
314 312 m_themeComboBox->addItem("Scientific", QChart::ChartThemeScientific);
315 313
316 314 m_aaCheckBox = new QCheckBox();
@@ -77,7 +77,7 int main(int argc, char *argv[])
77 77
78 78 DrilldownChart* drilldownChart = new DrilldownChart(&window);
79 79 drilldownChart->setRenderHint(QPainter::Antialiasing);
80 drilldownChart->setChartTheme(QChart::ChartThemeVanilla);
80 drilldownChart->setChartTheme(QChart::ChartThemeLight);
81 81 drilldownChart->setAnimationOptions(QChart::AllAnimations);
82 82
83 83 QPieSeries* yearSeries = new QPieSeries(&window);
@@ -23,9 +23,7 public:
23 23 ThemeDark,
24 24 ThemeBrownSand,
25 25 ThemeBlueNcs,
26 ThemeVanilla,
27 26 ThemeIcy,
28 ThemeGrayscale,
29 27 ThemeScientific
30 28 };
31 29 DeclarativeChart(QDeclarativeItem *parent = 0);
@@ -35,9 +35,7
35 35 #include "chartthemedark_p.h"
36 36 #include "chartthemebrownsand_p.h"
37 37 #include "chartthemebluencs_p.h"
38 #include "chartthemevanilla_p.h"
39 38 #include "chartthemeicy_p.h"
40 #include "chartthemegrayscale_p.h"
41 39 #include "chartthemescientific_p.h"
42 40
43 41 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -70,12 +68,8 ChartTheme* ChartTheme::createTheme(QChart::ChartTheme theme)
70 68 return new ChartThemeBrownSand();
71 69 case QChart::ChartThemeBlueNcs:
72 70 return new ChartThemeBlueNcs();
73 case QChart::ChartThemeVanilla:
74 return new ChartThemeVanilla();
75 71 case QChart::ChartThemeIcy:
76 72 return new ChartThemeIcy();
77 case QChart::ChartThemeGrayscale:
78 return new ChartThemeGrayscale();
79 73 case QChart::ChartThemeScientific:
80 74 return new ChartThemeScientific();
81 75 default:
@@ -16,12 +16,13 QTCOMMERCIALCHART_BEGIN_NAMESPACE
16 16 This enum describes the theme used by the chart.
17 17
18 18 \value ChartThemeDefault Follows the GUI style of the Operating System
19 \value ChartThemeVanilla
19 \value ChartThemeLight
20 \value ChartThemeBlueCerulean
21 \value ChartThemeDark
22 \value ChartThemeBrownSand
23 \value ChartThemeBlueNcs
20 24 \value ChartThemeIcy
21 \value ChartThemeGrayscale
22 25 \value ChartThemeScientific
23 \value ChartThemeBlueCerulean
24 \value ChartThemeLight
25 26 \value ChartThemeCount Not really a theme; the total count of themes.
26 27 */
27 28
@@ -35,9 +35,7 public:
35 35 ChartThemeDark,
36 36 ChartThemeBrownSand,
37 37 ChartThemeBlueNcs,
38 ChartThemeVanilla,
39 38 ChartThemeIcy,
40 ChartThemeGrayscale,
41 39 ChartThemeScientific,
42 40 ChartThemeCount
43 41 };
@@ -52,9 +52,7 THEMES += themes/chartthemedefault_p.h \
52 52 themes/chartthemebrownsand_p.h \
53 53 themes/chartthemebluencs_p.h \
54 54 themes/chartthemeicy_p.h \
55 themes/chartthemegrayscale_p.h \
56 themes/chartthemescientific_p.h \
57 themes/chartthemevanilla_p.h
55 themes/chartthemescientific_p.h
58 56
59 57 HEADERS += $$PUBLIC_HEADERS
60 58 HEADERS += $$PRIVATE_HEADERS
@@ -30,6 +30,7 public:
30 30 m_axisLabelBrush = QBrush(QRgb(0xffffff));
31 31 m_gridLinePen = QPen(QRgb(0x84a2b0));
32 32 m_gridLinePen.setWidth(1);
33 m_backgroundShades = BackgroundShadesNone;
33 34 }
34 35 };
35 36
@@ -30,6 +30,7 public:
30 30 m_axisLabelBrush = QBrush(QRgb(0x404044));
31 31 m_gridLinePen = QPen(QRgb(0xe2e2e2));
32 32 m_gridLinePen.setWidth(1);
33 m_backgroundShades = BackgroundShadesNone;
33 34 }
34 35 };
35 36
@@ -30,6 +30,7 public:
30 30 m_axisLabelBrush = QBrush(QRgb(0x404044));
31 31 m_gridLinePen = QPen(QRgb(0xd4cec3));
32 32 m_gridLinePen.setWidth(1);
33 m_backgroundShades = BackgroundShadesNone;
33 34 }
34 35 };
35 36
@@ -30,6 +30,7 public:
30 30 m_axisLabelBrush = QBrush(QRgb(0xffffff));
31 31 m_gridLinePen = QPen(QRgb(0x86878c));
32 32 m_gridLinePen.setWidth(1);
33 m_backgroundShades = BackgroundShadesNone;
33 34 }
34 35 };
35 36
@@ -63,8 +63,13 public:
63 63 GetGValue(colorWindow),
64 64 GetBValue(colorWindow)));
65 65 // Axes and other
66 m_backgroundShadesBrush = QBrush(QColor(0xaf, 0xaf, 0xaf, 0x50));
67 m_backgroundShades = BackgroundShadesVertical;
66 m_masterFont = QFont("arial");
67 m_axisLinePen = QPen(0xd6d6d6);
68 m_axisLinePen.setWidth(1);
69 m_axisLabelBrush = QBrush(QRgb(0x404044));
70 m_gridLinePen = QPen(QRgb(0xe2e2e2));
71 m_gridLinePen.setWidth(1);
72 m_backgroundShades = BackgroundShadesNone;
68 73
69 74 #elif defined(Q_OS_LINUX)
70 75 // TODO: replace this dummy theme with linux specific theme
@@ -74,15 +79,21 public:
74 79 m_seriesColors << QRgb(0xfc5751);
75 80 generateSeriesGradients();
76 81
82 // Background
77 83 QLinearGradient backgroundGradient;
78 84 backgroundGradient.setColorAt(0.0, QRgb(0xffffff));
79 backgroundGradient.setColorAt(1.0, QRgb(0xe9e9e9));
85 backgroundGradient.setColorAt(1.0, QRgb(0xffffff));
80 86 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
81 87 m_chartBackgroundGradient = backgroundGradient;
82 88
83 89 // Axes and other
84 m_backgroundShadesBrush = QBrush(QColor(0xaf, 0xaf, 0xaf, 0x50));
85 m_backgroundShades = BackgroundShadesVertical;
90 m_masterFont = QFont("arial");
91 m_axisLinePen = QPen(0xd6d6d6);
92 m_axisLinePen.setWidth(1);
93 m_axisLabelBrush = QBrush(QRgb(0x404044));
94 m_gridLinePen = QPen(QRgb(0xe2e2e2));
95 m_gridLinePen.setWidth(1);
96 m_backgroundShades = BackgroundShadesNone;
86 97
87 98 #elif defined(Q_OS_MAC)
88 99 // TODO: replace this dummy theme with OSX specific theme
@@ -92,15 +103,21 public:
92 103 m_seriesColors << QRgb(0xfc5751);
93 104 generateSeriesGradients();
94 105
106 // Background
95 107 QLinearGradient backgroundGradient;
96 108 backgroundGradient.setColorAt(0.0, QRgb(0xffffff));
97 backgroundGradient.setColorAt(1.0, QRgb(0xe9e9e9));
109 backgroundGradient.setColorAt(1.0, QRgb(0xffffff));
98 110 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
99 111 m_chartBackgroundGradient = backgroundGradient;
100 112
101 113 // Axes and other
102 m_backgroundShadesBrush = QBrush(QColor(0xaf, 0xaf, 0xaf, 0x50));
103 m_backgroundShades = BackgroundShadesVertical;
114 m_masterFont = QFont("arial");
115 m_axisLinePen = QPen(0xd6d6d6);
116 m_axisLinePen.setWidth(1);
117 m_axisLabelBrush = QBrush(QRgb(0x404044));
118 m_gridLinePen = QPen(QRgb(0xe2e2e2));
119 m_gridLinePen.setWidth(1);
120 m_backgroundShades = BackgroundShadesNone;
104 121
105 122 #else
106 123 // TODO: replace this dummy theme with generic (not OS specific) theme
@@ -110,15 +127,21 public:
110 127 m_seriesColors << QRgb(0xfc5751);
111 128 generateSeriesGradients();
112 129
130 // Background
113 131 QLinearGradient backgroundGradient;
114 132 backgroundGradient.setColorAt(0.0, QRgb(0xffffff));
115 backgroundGradient.setColorAt(1.0, QRgb(0xafafaf));
133 backgroundGradient.setColorAt(1.0, QRgb(0xffffff));
116 134 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
117 m_backgroundGradient = backgroundGradient;
135 m_chartBackgroundGradient = backgroundGradient;
118 136
119 137 // Axes and other
120 m_backgroundShadesBrush = QBrush(QColor(0xaf, 0xaf, 0xaf, 0x50));
121 m_backgroundShades = BackgroundShadesVertical;
138 m_masterFont = QFont("arial");
139 m_axisLinePen = QPen(0xd6d6d6);
140 m_axisLinePen.setWidth(1);
141 m_axisLabelBrush = QBrush(QRgb(0x404044));
142 m_gridLinePen = QPen(QRgb(0xe2e2e2));
143 m_gridLinePen.setWidth(1);
144 m_backgroundShades = BackgroundShadesNone;
122 145 #endif
123 146 }
124 147 };
@@ -27,6 +27,7 public:
27 27 m_axisLabelBrush = QBrush(QRgb(0x3f3f3f));
28 28 m_gridLinePen = QPen(QRgb(0x0f0f0f));
29 29 m_gridLinePen.setWidth(2);
30 m_backgroundShades = BackgroundShadesNone;
30 31 }
31 32 };
32 33
@@ -29,6 +29,7 public:
29 29 m_axisLabelBrush = QBrush(QRgb(0x404044));
30 30 m_gridLinePen = QPen(QRgb(0xe2e2e2));
31 31 m_gridLinePen.setWidth(1);
32 m_backgroundShades = BackgroundShadesNone;
32 33 }
33 34 };
34 35
@@ -25,10 +25,10 public:
25 25 m_axisLinePen = QPen(QRgb(0x0f0f0f));
26 26 m_axisLinePen.setWidth(2);
27 27 m_axisLabelBrush = QBrush(QRgb(0x3f3f3f));
28 m_backgroundShadesBrush = QBrush(QColor(0xff, 0xad, 0x00, 0x50));
29 m_backgroundShades = BackgroundShadesHorizontal;
30 28 m_gridLinePen = QPen(QRgb(0x0f0f0f));
31 29 m_gridLinePen.setWidth(2);
30 m_backgroundShadesBrush = QBrush(QColor(0xff, 0xad, 0x00, 0x50));
31 m_backgroundShades = BackgroundShadesHorizontal;
32 32 }
33 33 };
34 34
@@ -115,11 +115,13 void MainWidget::initThemeCombo(QGridLayout *grid)
115 115 {
116 116 QComboBox *chartTheme = new QComboBox();
117 117 chartTheme->addItem("Default");
118 chartTheme->addItem("Vanilla");
118 chartTheme->addItem("Light");
119 chartTheme->addItem("Blue Cerulean");
120 chartTheme->addItem("Dark");
121 chartTheme->addItem("Brown Sand");
122 chartTheme->addItem("Blue NCS");
119 123 chartTheme->addItem("Icy");
120 chartTheme->addItem("Grayscale");
121 124 chartTheme->addItem("Scientific");
122 chartTheme->addItem("Unnamed1");
123 125 connect(chartTheme, SIGNAL(currentIndexChanged(int)),
124 126 this, SLOT(changeChartTheme(int)));
125 127 grid->addWidget(new QLabel("Chart theme:"), 8, 0);
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now