summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-12-02 08:43:02 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-12-02 09:01:25 +0200
commit94235c2e633845951ce6c947965789bb3f8ee7c4 (patch)
tree60f902b9defe670736dff4bf33d13ef5bfb57804 /tests
parent91c9f6791af049b873b7c60a88aa226eaec70c18 (diff)
Theme documented
Task-number: QTRD-2633 Change-Id: Ib274ec236f50145df8fd4c2d83f62d4a9154687a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/barstest/chart.cpp24
-rw-r--r--tests/multigraphs/data.cpp10
-rw-r--r--tests/qmlcamera/qml/qmlcamera/main.qml2
-rw-r--r--tests/scattertest/scatterchart.cpp24
-rw-r--r--tests/surfacetest/graphmodifier.cpp2
-rw-r--r--tests/surfacetest/main.cpp2
6 files changed, 32 insertions, 32 deletions
diff --git a/tests/barstest/chart.cpp b/tests/barstest/chart.cpp
index cd7098ff..83209cc1 100644
--- a/tests/barstest/chart.cpp
+++ b/tests/barstest/chart.cpp
@@ -111,7 +111,7 @@ GraphModifier::GraphModifier(Q3DBars *barchart, QColorDialog *colorDialog)
m_graph->addAxis(m_genericRowAxis);
m_graph->addAxis(m_genericColumnAxis);
- m_graph->setTheme(new Q3DTheme(QDataVis::ThemeStoneMoss));
+ m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeStoneMoss));
m_graph->setShadowQuality(QDataVis::ShadowQualitySoftMedium);
m_temperatureData->setItemLabelFormat(QStringLiteral("1: @valueTitle for @colLabel @rowLabel: @valueLabel"));
@@ -523,12 +523,12 @@ void GraphModifier::changePresetCamera()
void GraphModifier::changeTheme()
{
- static int theme = QDataVis::ThemeQt;
+ static int theme = Q3DTheme::ThemeQt;
- m_graph->setTheme(new Q3DTheme((QDataVis::Theme)theme));
+ m_graph->setTheme(new Q3DTheme((Q3DTheme::Theme)theme));
- if (++theme > QDataVis::ThemeIsabelle)
- theme = QDataVis::ThemeQt;
+ if (++theme > Q3DTheme::ThemeIsabelle)
+ theme = Q3DTheme::ThemeQt;
}
void GraphModifier::changeLabelStyle()
@@ -681,10 +681,10 @@ void GraphModifier::changeColorStyle()
{
int style = m_graph->theme()->colorStyle();
- if (++style > QDataVis::ColorStyleRangeGradient)
- style = QDataVis::ColorStyleUniform;
+ if (++style > Q3DTheme::ColorStyleRangeGradient)
+ style = Q3DTheme::ColorStyleUniform;
- m_graph->theme()->setColorStyle(QDataVis::ColorStyle(style));
+ m_graph->theme()->setColorStyle(Q3DTheme::ColorStyle(style));
}
void GraphModifier::useOwnTheme()
@@ -695,7 +695,7 @@ void GraphModifier::useOwnTheme()
theme->setAmbientLightStrength(0.3f);
theme->setBackgroundColor(QColor(QRgb(0x99ca53)));
theme->setBaseColor(QColor(QRgb(0x209fdf)));
- theme->setColorStyle(QDataVis::ColorStyleUniform);
+ theme->setColorStyle(Q3DTheme::ColorStyleUniform);
theme->setGridLineColor(QColor(QRgb(0x99ca53)));
theme->setHighlightLightStrength(7.0f);
theme->setLabelBackgroundEnabled(true);
@@ -704,8 +704,8 @@ void GraphModifier::useOwnTheme()
theme->setLightStrength(6.0f);
theme->setMultiHighlightColor(QColor(QRgb(0x6d5fd5)));
theme->setSingleHighlightColor(QColor(QRgb(0xf6a625)));
- theme->setTextBackgroundColor(QColor(0xf6, 0xa6, 0x25, 0xa0));
- theme->setTextColor(QColor(QRgb(0x404044)));
+ theme->setLabelBackgroundColor(QColor(0xf6, 0xa6, 0x25, 0xa0));
+ theme->setLabelTextColor(QColor(QRgb(0x404044)));
theme->setWindowColor(QColor(QRgb(0xffffff)));
m_graph->setTheme(theme);
@@ -749,5 +749,5 @@ void GraphModifier::setGradient()
m_graph->theme()->setSingleHighlightGradient(singleHighlightGradient);
m_graph->theme()->setMultiHighlightGradient(multiHighlightGradient);
- m_graph->theme()->setColorStyle(QDataVis::ColorStyleObjectGradient);
+ m_graph->theme()->setColorStyle(Q3DTheme::ColorStyleObjectGradient);
}
diff --git a/tests/multigraphs/data.cpp b/tests/multigraphs/data.cpp
index 53236e39..27f5f449 100644
--- a/tests/multigraphs/data.cpp
+++ b/tests/multigraphs/data.cpp
@@ -45,7 +45,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_started(false)
{
// Initialize surface
- m_surface->setTheme(new Q3DTheme(QDataVis::ThemeIsabelle));
+ m_surface->setTheme(new Q3DTheme(Q3DTheme::ThemeIsabelle));
QLinearGradient gradient;
gradient.setColorAt(0.0, Qt::black);
gradient.setColorAt(0.33, Qt::blue);
@@ -61,7 +61,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_surface->addSeries(new QSurface3DSeries(new QHeightMapSurfaceDataProxy()));
// Initialize scatter
- m_scatter->setTheme(new Q3DTheme(QDataVis::ThemeStoneMoss));
+ m_scatter->setTheme(new Q3DTheme(Q3DTheme::ThemeStoneMoss));
m_scatter->setSelectionMode(QDataVis::SelectionNone);
m_scatter->theme()->setGridEnabled(false);
m_scatter->setObjectType(QDataVis::MeshPoint);
@@ -70,7 +70,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_scatter->addSeries(new QScatter3DSeries);
// Initialize bars
- m_bars->setTheme(new Q3DTheme(QDataVis::ThemeQt));
+ m_bars->setTheme(new Q3DTheme(Q3DTheme::ThemeQt));
m_bars->setSelectionMode(QDataVis::SelectionItemAndRow | QDataVis::SelectionSlice);
m_bars->theme()->setGridEnabled(false);
m_bars->setBarType(QDataVis::MeshBar, false);
@@ -180,7 +180,7 @@ void Data::scrollDown()
void Data::useGradientOne()
{
- m_surface->setTheme(new Q3DTheme(QDataVis::ThemeIsabelle));
+ m_surface->setTheme(new Q3DTheme(Q3DTheme::ThemeIsabelle));
QLinearGradient gradient;
gradient.setColorAt(0.0, Qt::black);
gradient.setColorAt(0.33, Qt::blue);
@@ -192,7 +192,7 @@ void Data::useGradientOne()
void Data::useGradientTwo()
{
- m_surface->setTheme(new Q3DTheme(QDataVis::ThemeQt));
+ m_surface->setTheme(new Q3DTheme(Q3DTheme::ThemeQt));
QLinearGradient gradient;
gradient.setColorAt(0.0, Qt::white);
gradient.setColorAt(0.8, Qt::red);
diff --git a/tests/qmlcamera/qml/qmlcamera/main.qml b/tests/qmlcamera/qml/qmlcamera/main.qml
index 8358a369..929330c8 100644
--- a/tests/qmlcamera/qml/qmlcamera/main.qml
+++ b/tests/qmlcamera/qml/qmlcamera/main.qml
@@ -48,7 +48,7 @@ Item {
shadowQuality: Bars3D.ShadowQualityMedium
selectionMode: Bars3D.SelectionItem
theme: Theme3D {
- type: Bars3D.ThemeRetro
+ type: Theme3D.ThemeRetro
font.pointSize: 35
labelBackgroundEnabled: true
}
diff --git a/tests/scattertest/scatterchart.cpp b/tests/scattertest/scatterchart.cpp
index f0cf362f..46662ca4 100644
--- a/tests/scattertest/scatterchart.cpp
+++ b/tests/scattertest/scatterchart.cpp
@@ -37,7 +37,7 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
m_selectedItem(-1),
m_targetSeries(0)
{
- m_chart->setTheme(new Q3DTheme(QDataVis::ThemeStoneMoss));
+ m_chart->setTheme(new Q3DTheme(Q3DTheme::ThemeStoneMoss));
QFont font = m_chart->theme()->font();
font.setPointSize(m_fontSize);
m_chart->theme()->setFont(font);
@@ -159,12 +159,12 @@ void ScatterDataModifier::changePresetCamera()
void ScatterDataModifier::changeTheme()
{
- static int theme = QDataVis::ThemeQt;
+ static int theme = Q3DTheme::ThemeQt;
- m_chart->setTheme(new Q3DTheme(QDataVis::Theme(theme)));
+ m_chart->setTheme(new Q3DTheme(Q3DTheme::Theme(theme)));
- if (++theme > QDataVis::ThemeIsabelle)
- theme = QDataVis::ThemeQt;
+ if (++theme > Q3DTheme::ThemeIsabelle)
+ theme = Q3DTheme::ThemeQt;
}
void ScatterDataModifier::changeLabelStyle()
@@ -425,13 +425,13 @@ void ScatterDataModifier::setGradient()
m_chart->setItemGradient(barGradient);
m_chart->setSingleHighlightGradient(singleHighlightGradient);
- QDataVis::ColorStyle oldStyle = m_chart->colorStyle();
- if (oldStyle == QDataVis::ColorStyleUniform)
- m_chart->setColorStyle(QDataVis::ColorStyleObjectGradient);
- else if (oldStyle == QDataVis::ColorStyleObjectGradient)
- m_chart->setColorStyle(QDataVis::ColorStyleRangeGradient);
- if (oldStyle == QDataVis::ColorStyleRangeGradient)
- m_chart->setColorStyle(QDataVis::ColorStyleUniform);
+ Q3DTheme::ColorStyle oldStyle = m_chart->colorStyle();
+ if (oldStyle == Q3DTheme::ColorStyleUniform)
+ m_chart->setColorStyle(Q3DTheme::ColorStyleObjectGradient);
+ else if (oldStyle == Q3DTheme::ColorStyleObjectGradient)
+ m_chart->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
+ if (oldStyle == Q3DTheme::ColorStyleRangeGradient)
+ m_chart->setColorStyle(Q3DTheme::ColorStyleUniform);
}
void ScatterDataModifier::addSeries()
diff --git a/tests/surfacetest/graphmodifier.cpp b/tests/surfacetest/graphmodifier.cpp
index 38ad4971..fb9e9ec2 100644
--- a/tests/surfacetest/graphmodifier.cpp
+++ b/tests/surfacetest/graphmodifier.cpp
@@ -342,7 +342,7 @@ void GraphModifier::selectedPointChanged(const QPoint &point)
void GraphModifier::changeTheme(int theme)
{
- m_graph->setTheme(new Q3DTheme(QDataVis::Theme(theme)));
+ m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme)));
}
diff --git a/tests/surfacetest/main.cpp b/tests/surfacetest/main.cpp
index 0f891442..f05de5e9 100644
--- a/tests/surfacetest/main.cpp
+++ b/tests/surfacetest/main.cpp
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
QSize screenSize = surfaceGraph->screen()->size();
// Set to default, should be same as the initial on themeList
- surfaceGraph->setTheme(new Q3DTheme(QDataVis::Theme(initialTheme)));
+ surfaceGraph->setTheme(new Q3DTheme(Q3DTheme::Theme(initialTheme)));
QWidget *container = QWidget::createWindowContainer(surfaceGraph);
container->setMinimumSize(QSize(screenSize.width() / 2, screenSize.height() / 2));