summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@theqtcompany.com>2015-08-13 10:46:50 +0300
committerTitta Heikkala <titta.heikkala@theqtcompany.com>2015-09-07 07:56:05 +0000
commitdab4dfead39d02e711a9f2b5bfd7a42b30125fba (patch)
tree653b26cf1beaaa3aedc287ca8c41fd3f1968c0f5 /tests/manual
parent05fa3caa787974595a2692f708a75813a515adda (diff)
Added minor ticks to value axis
Added possibility to set minor tick for value axis. By default the count of minor ticks is zero. The arrow of minor ticks follows the color and pen of the arrows of the major ticks as it's part of axis. Change-Id: I8a422caaeedcd18ee6144e8636e3903d16f0632c Task-number: QTRD-3294 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/chartviewer/window.cpp81
-rw-r--r--tests/manual/chartviewer/window.h9
-rw-r--r--tests/manual/polarcharttest/mainwindow.cpp58
-rw-r--r--tests/manual/polarcharttest/mainwindow.h8
-rw-r--r--tests/manual/polarcharttest/mainwindow.ui1000
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml13
6 files changed, 635 insertions, 534 deletions
diff --git a/tests/manual/chartviewer/window.cpp b/tests/manual/chartviewer/window.cpp
index ee0c249d..73600d94 100644
--- a/tests/manual/chartviewer/window.cpp
+++ b/tests/manual/chartviewer/window.cpp
@@ -23,6 +23,7 @@
#include <QtCharts/QChartView>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QLegend>
+#include <QtCharts/QValueAxis>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QFormLayout>
#include <QtWidgets/QComboBox>
@@ -50,6 +51,10 @@ Window::Window(const QVariantHash &parameters, QWidget *parent)
m_legendComboBox(0),
m_templateComboBox(0),
m_viewComboBox(0),
+ m_xTickSpinBox(0),
+ m_yTickSpinBox(0),
+ m_minorXTickSpinBox(0),
+ m_minorYTickSpinBox(0),
m_openGLCheckBox(0),
m_zoomCheckBox(0),
m_scrollCheckBox(0),
@@ -78,6 +83,14 @@ Window::Window(const QVariantHash &parameters, QWidget *parent)
settingsLayout->addItem(m_widgetHash["templateComboBox"]);
settingsLayout->addItem(m_widgetHash["scrollCheckBox"]);
settingsLayout->addItem(m_widgetHash["zoomCheckBox"]);
+ settingsLayout->addItem(m_widgetHash["xTickLabel"]);
+ settingsLayout->addItem(m_widgetHash["xTickSpinBox"]);
+ settingsLayout->addItem(m_widgetHash["yTickLabel"]);
+ settingsLayout->addItem(m_widgetHash["yTickSpinBox"]);
+ settingsLayout->addItem(m_widgetHash["minorXTickLabel"]);
+ settingsLayout->addItem(m_widgetHash["minorXTickSpinBox"]);
+ settingsLayout->addItem(m_widgetHash["minorYTickLabel"]);
+ settingsLayout->addItem(m_widgetHash["minorYTickSpinBox"]);
settingsLayout->addStretch();
m_baseLayout->setOrientation(Qt::Horizontal);
@@ -114,6 +127,10 @@ void Window::connectSignals()
QObject::connect(m_form, SIGNAL(geometryChanged()), this , SLOT(handleGeometryChanged()));
QObject::connect(m_viewComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI()));
QObject::connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI()));
+ QObject::connect(m_xTickSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateUI()));
+ QObject::connect(m_yTickSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateUI()));
+ QObject::connect(m_minorXTickSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateUI()));
+ QObject::connect(m_minorYTickSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateUI()));
QObject::connect(m_antialiasCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI()));
QObject::connect(m_openGLCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI()));
QObject::connect(m_zoomCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateUI()));
@@ -128,6 +145,14 @@ void Window::createProxyWidgets()
{
m_themeComboBox = createThemeBox();
m_viewComboBox = createViewBox();
+ m_xTickSpinBox = new QSpinBox();
+ m_xTickSpinBox->setMinimum(2);
+ m_xTickSpinBox->setValue(5);
+ m_yTickSpinBox = new QSpinBox();
+ m_yTickSpinBox->setMinimum(2);
+ m_yTickSpinBox->setValue(5);
+ m_minorXTickSpinBox = new QSpinBox();
+ m_minorYTickSpinBox = new QSpinBox();
m_antialiasCheckBox = new QCheckBox(tr("Anti-aliasing"));
m_animatedComboBox = createAnimationBox();
m_legendComboBox = createLegendBox();
@@ -141,6 +166,14 @@ void Window::createProxyWidgets()
m_widgetHash["antialiasCheckBox"] = m_scene->addWidget(m_antialiasCheckBox);
m_widgetHash["animatedComboBox"] = m_scene->addWidget(m_animatedComboBox);
m_widgetHash["legendComboBox"] = m_scene->addWidget(m_legendComboBox);
+ m_widgetHash["xTickLabel"] = m_scene->addWidget(new QLabel("X Tick"));
+ m_widgetHash["xTickSpinBox"] = m_scene->addWidget(m_xTickSpinBox);
+ m_widgetHash["yTickLabel"] = m_scene->addWidget(new QLabel("Y Tick"));
+ m_widgetHash["yTickSpinBox"] = m_scene->addWidget(m_yTickSpinBox);
+ m_widgetHash["minorXTickLabel"] = m_scene->addWidget(new QLabel("Minor X Tick"));
+ m_widgetHash["minorXTickSpinBox"] = m_scene->addWidget(m_minorXTickSpinBox);
+ m_widgetHash["minorYTickLabel"] = m_scene->addWidget(new QLabel("Minor Y Tick"));
+ m_widgetHash["minorYTickSpinBox"] = m_scene->addWidget(m_minorYTickSpinBox);
m_widgetHash["openGLCheckBox"] = m_scene->addWidget(m_openGLCheckBox);
m_widgetHash["themeLabel"] = m_scene->addWidget(new QLabel("Theme"));
m_widgetHash["animationsLabel"] = m_scene->addWidget(new QLabel("Animations"));
@@ -288,6 +321,10 @@ void Window::updateUI()
checkAnimationOptions();
checkLegend();
checkState();
+ checkXTick();
+ checkYTick();
+ checkMinorXTick();
+ checkMinorYTick();
}
void Window::checkView()
@@ -299,6 +336,50 @@ void Window::checkView()
}
}
+void Window::checkXTick()
+{
+ foreach (QChart *chart, m_grid->charts()) {
+ if (qobject_cast<QValueAxis *>(chart->axisX())) {
+ QValueAxis *valueAxis = qobject_cast<QValueAxis *>(chart->axisX());
+ valueAxis->setGridLineVisible();
+ valueAxis->setTickCount(m_xTickSpinBox->value());
+ }
+ }
+}
+
+void Window::checkYTick()
+{
+ foreach (QChart *chart, m_grid->charts()) {
+ if (qobject_cast<QValueAxis *>(chart->axisY())) {
+ QValueAxis *valueAxis = qobject_cast<QValueAxis *>(chart->axisY());
+ valueAxis->setGridLineVisible();
+ valueAxis->setTickCount(m_yTickSpinBox->value());
+ }
+ }
+}
+
+void Window::checkMinorXTick()
+{
+ foreach (QChart *chart, m_grid->charts()) {
+ if (qobject_cast<QValueAxis *>(chart->axisX())) {
+ QValueAxis *valueAxis = qobject_cast<QValueAxis *>(chart->axisX());
+ valueAxis->setMinorGridLineVisible();
+ valueAxis->setMinorTickCount(m_minorXTickSpinBox->value());
+ }
+ }
+}
+
+void Window::checkMinorYTick()
+{
+ foreach (QChart *chart, m_grid->charts()) {
+ if (qobject_cast<QValueAxis *>(chart->axisY())) {
+ QValueAxis *valueAxis = qobject_cast<QValueAxis *>(chart->axisY());
+ valueAxis->setMinorGridLineVisible();
+ valueAxis->setMinorTickCount(m_minorYTickSpinBox->value());
+ }
+ }
+}
+
void Window::checkLegend()
{
Qt::Alignment alignment(m_legendComboBox->itemData(m_legendComboBox->currentIndex()).toInt());
diff --git a/tests/manual/chartviewer/window.h b/tests/manual/chartviewer/window.h
index 26e13f92..c3762c68 100644
--- a/tests/manual/chartviewer/window.h
+++ b/tests/manual/chartviewer/window.h
@@ -22,6 +22,7 @@
#include <QtCharts/QChartGlobal>
#include <QtCore/QHash>
#include <QtWidgets/QComboBox>
+#include <QtWidgets/QSpinBox>
QT_BEGIN_NAMESPACE
class QCheckBox;
@@ -69,6 +70,10 @@ private:
inline void checkTheme();
inline void checkState();
inline void checkTemplate();
+ inline void checkXTick();
+ inline void checkYTick();
+ inline void checkMinorXTick();
+ inline void checkMinorYTick();
QMenu *createMenu();
QAction *createMenuAction(QMenu *menu, const QIcon &icon, const QString &text, const QVariant &data);
void initializeFromParamaters(const QVariantHash &parameters);
@@ -80,6 +85,10 @@ private:
QGraphicsWidget *m_form;
QComboBox *m_themeComboBox;
+ QSpinBox *m_xTickSpinBox;
+ QSpinBox *m_yTickSpinBox;
+ QSpinBox *m_minorXTickSpinBox;
+ QSpinBox *m_minorYTickSpinBox;
QCheckBox *m_antialiasCheckBox;
QComboBox *m_animatedComboBox;
QComboBox *m_legendComboBox;
diff --git a/tests/manual/polarcharttest/mainwindow.cpp b/tests/manual/polarcharttest/mainwindow.cpp
index cf825501..c8ae0ea8 100644
--- a/tests/manual/polarcharttest/mainwindow.cpp
+++ b/tests/manual/polarcharttest/mainwindow.cpp
@@ -52,6 +52,8 @@ MainWindow::MainWindow(QWidget *parent) :
m_titleVisible(true),
m_gridVisible(true),
m_arrowVisible(true),
+ m_minorGridVisible(true),
+ m_minorArrowVisible(true),
m_angularShadesBrush(new QBrush(Qt::NoBrush)),
m_radialShadesBrush(new QBrush(Qt::NoBrush)),
m_labelBrush(new QBrush(Qt::black)),
@@ -62,6 +64,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_radialShadesPen(new QPen(Qt::NoPen)),
m_gridPen(new QPen(QRgb(0x010101))), // Note: Pure black is default color, so it gets overridden by
m_arrowPen(new QPen(QRgb(0x010101))), // default theme if set to that initially. This is an example of workaround.
+ m_minorGridPen(new QPen(QBrush(QRgb(0x010101)), 1, Qt::DashLine)),
m_backgroundPen(new QPen(Qt::NoPen)),
m_plotAreaBackgroundPen(new QPen(Qt::NoPen)),
m_labelFormat(QString("%.2f")),
@@ -126,6 +129,8 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->angularTicksSpin, SIGNAL(valueChanged(int)), this, SLOT(angularTicksChanged(int)));
connect(ui->radialTicksSpin, SIGNAL(valueChanged(int)), this, SLOT(radialTicksChanged(int)));
+ connect(ui->angularMinorTicksSpin, SIGNAL(valueChanged(int)), this, SLOT(angularMinorTicksChanged(int)));
+ connect(ui->radialMinorTicksSpin, SIGNAL(valueChanged(int)), this, SLOT(radialMinorTicksChanged(int)));
connect(ui->anglesSpin, SIGNAL(valueChanged(int)), this, SLOT(anglesChanged(int)));
connect(ui->radialMinSpin, SIGNAL(valueChanged(double)), this, SLOT(radialMinChanged(double)));
connect(ui->radialMaxSpin, SIGNAL(valueChanged(double)), this, SLOT(radialMaxChanged(double)));
@@ -142,6 +147,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->titleFontSizeSpin, SIGNAL(valueChanged(int)), this, SLOT(titleFontSizeChanged(int)));
connect(ui->titleComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(titleIndexChanged(int)));
connect(ui->gridComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(gridIndexChanged(int)));
+ connect(ui->minorGridComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(minorGridIndexChanged(int)));
connect(ui->arrowComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(arrowIndexChanged(int)));
connect(ui->logBaseSpin, SIGNAL(valueChanged(double)), this, SLOT(logBaseChanged(double)));
connect(ui->angularAxisComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(angularAxisIndexChanged(int)));
@@ -439,6 +445,8 @@ void MainWindow::setAngularAxis(MainWindow::AxisMode mode)
m_angularAxis->setGridLineVisible(m_gridVisible);
m_angularAxis->setLinePen(*m_arrowPen);
m_angularAxis->setLineVisible(m_arrowVisible);
+ m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
+ m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
m_chart->addAxis(m_angularAxis, QPolarChart::PolarOrientationAngular);
@@ -507,6 +515,8 @@ void MainWindow::setRadialAxis(MainWindow::AxisMode mode)
m_radialAxis->setGridLineVisible(m_gridVisible);
m_radialAxis->setLinePen(*m_arrowPen);
m_radialAxis->setLineVisible(m_arrowVisible);
+ m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
+ m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
m_chart->addAxis(m_radialAxis, QPolarChart::PolarOrientationRadial);
@@ -572,6 +582,22 @@ void MainWindow::radialTicksChanged(int value)
static_cast<QDateTimeAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
}
+void MainWindow::angularMinorTicksChanged(int value)
+{
+ // Minor tick valid only for QValueAxis
+ m_angularMinorTickCount = value;
+ if (m_angularAxisMode == AxisModeValue)
+ static_cast<QValueAxis *>(m_angularAxis)->setMinorTickCount(m_angularMinorTickCount);
+}
+
+void MainWindow::radialMinorTicksChanged(int value)
+{
+ // Minor tick valid only for QValueAxis
+ m_radialMinorTickCount = value;
+ if (m_radialAxisMode == AxisModeValue)
+ static_cast<QValueAxis *>(m_radialAxis)->setMinorTickCount(m_radialMinorTickCount);
+}
+
void MainWindow::anglesChanged(int value)
{
m_labelsAngle = value;
@@ -860,6 +886,36 @@ void MainWindow::gridIndexChanged(int index)
m_radialAxis->setGridLineVisible(m_gridVisible);
}
+void MainWindow::minorGridIndexChanged(int index)
+{
+ delete m_minorGridPen;
+
+ switch (index) {
+ case 0:
+ m_minorGridPen = new QPen(Qt::NoPen);
+ m_minorGridVisible = false;
+ break;
+ case 1:
+ m_minorGridPen = new QPen(Qt::black);
+ m_minorGridPen->setStyle(Qt::DashLine);
+ m_minorGridVisible = true;
+ break;
+ case 2:
+ m_minorGridPen = new QPen(Qt::green);
+ m_minorGridPen->setStyle(Qt::DotLine);
+ m_minorGridPen->setWidth(1);
+ m_minorGridVisible = true;
+ break;
+ default:
+ break;
+ }
+
+ m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
+ m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
+ m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
+ m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
+}
+
void MainWindow::arrowIndexChanged(int index)
{
delete m_arrowPen;
@@ -913,6 +969,7 @@ void MainWindow::angularAxisIndexChanged(int index)
break;
case 1:
setAngularAxis(AxisModeValue);
+ angularMinorTicksChanged(ui->angularMinorTicksSpin->value());
break;
case 2:
setAngularAxis(AxisModeLogValue);
@@ -936,6 +993,7 @@ void MainWindow::radialAxisIndexChanged(int index)
break;
case 1:
setRadialAxis(AxisModeValue);
+ radialMinorTicksChanged(ui->radialMinorTicksSpin->value());
break;
case 2:
setRadialAxis(AxisModeLogValue);
diff --git a/tests/manual/polarcharttest/mainwindow.h b/tests/manual/polarcharttest/mainwindow.h
index 0f813fe4..d267481e 100644
--- a/tests/manual/polarcharttest/mainwindow.h
+++ b/tests/manual/polarcharttest/mainwindow.h
@@ -51,6 +51,8 @@ public:
public slots:
void angularTicksChanged(int value);
void radialTicksChanged(int value);
+ void angularMinorTicksChanged(int value);
+ void radialMinorTicksChanged(int value);
void anglesChanged(int value);
void angularMinChanged(double value);
void angularMaxChanged(double value);
@@ -67,6 +69,7 @@ public slots:
void titleFontChanged(const QFont &font);
void titleFontSizeChanged(int value);
void gridIndexChanged(int index);
+ void minorGridIndexChanged(int index);
void arrowIndexChanged(int index);
void angularRangeChanged(qreal min, qreal max);
void radialRangeChanged(qreal min, qreal max);
@@ -109,6 +112,8 @@ private:
int m_angularTickCount;
int m_radialTickCount;
+ int m_angularMinorTickCount;
+ int m_radialMinorTickCount;
qreal m_labelsAngle;
qreal m_angularMin;
qreal m_angularMax;
@@ -120,6 +125,8 @@ private:
bool m_titleVisible;
bool m_gridVisible;
bool m_arrowVisible;
+ bool m_minorGridVisible;
+ bool m_minorArrowVisible;
QBrush *m_angularShadesBrush;
QBrush *m_radialShadesBrush;
QBrush *m_labelBrush;
@@ -130,6 +137,7 @@ private:
QPen *m_radialShadesPen;
QPen *m_gridPen;
QPen *m_arrowPen;
+ QPen *m_minorGridPen;
QPen *m_backgroundPen;
QPen *m_plotAreaBackgroundPen;
QString m_labelFormat;
diff --git a/tests/manual/polarcharttest/mainwindow.ui b/tests/manual/polarcharttest/mainwindow.ui
index cc4b1994..58ee203c 100644
--- a/tests/manual/polarcharttest/mainwindow.ui
+++ b/tests/manual/polarcharttest/mainwindow.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1193</width>
- <height>956</height>
+ <height>1004</height>
</rect>
</property>
<property name="windowTitle">
@@ -35,231 +35,13 @@
<property name="title">
<string>Settings</string>
</property>
- <widget class="QSpinBox" name="radialTicksSpin">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>90</y>
- <width>71</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>90</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Radial Tick count</string>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>120</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Angular Tick count</string>
- </property>
- </widget>
- <widget class="QSpinBox" name="angularTicksSpin">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>120</y>
- <width>71</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QSpinBox" name="anglesSpin">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>150</y>
- <width>71</width>
- <height>22</height>
- </rect>
- </property>
- <property name="minimum">
- <number>-9999</number>
- </property>
- <property name="maximum">
- <number>9999</number>
- </property>
- <property name="singleStep">
- <number>5</number>
- </property>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>150</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Label angles</string>
- </property>
- </widget>
- <widget class="QLabel" name="label_4">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>180</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Angular min</string>
- </property>
- </widget>
- <widget class="QLabel" name="label_5">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>210</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Angular max</string>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="angularMinSpin">
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>180</y>
- <width>91</width>
- <height>22</height>
- </rect>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-999999999.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999999999.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>10.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="angularMaxSpin">
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>210</y>
- <width>91</width>
- <height>22</height>
- </rect>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-999999999.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999999999.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>10.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="radialMaxSpin">
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>270</y>
- <width>91</width>
- <height>22</height>
- </rect>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-999999999.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999999999.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>10.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="radialMinSpin">
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>240</y>
- <width>91</width>
- <height>22</height>
- </rect>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-999999999.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999999999.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>10.000000000000000</double>
- </property>
- </widget>
- <widget class="QLabel" name="label_11">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>270</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Radial max</string>
- </property>
- </widget>
- <widget class="QLabel" name="label_12">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>240</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Radial min</string>
- </property>
- </widget>
<widget class="QComboBox" name="angularShadesComboBox">
<property name="geometry">
<rect>
<x>10</x>
- <y>300</y>
- <width>171</width>
- <height>22</height>
+ <y>313</y>
+ <width>187</width>
+ <height>20</height>
</rect>
</property>
<item>
@@ -282,9 +64,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>330</y>
- <width>171</width>
- <height>22</height>
+ <y>339</y>
+ <width>175</width>
+ <height>20</height>
</rect>
</property>
<item>
@@ -303,75 +85,13 @@
</property>
</item>
</widget>
- <widget class="QLabel" name="label_13">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>360</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Label format</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="labelFormatEdit">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>360</y>
- <width>81</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label_14">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>390</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Label font size</string>
- </property>
- </widget>
- <widget class="QFontComboBox" name="labelFontComboBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>420</y>
- <width>171</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QSpinBox" name="labelFontSizeSpin">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>390</y>
- <width>81</width>
- <height>22</height>
- </rect>
- </property>
- <property name="minimum">
- <number>-100000</number>
- </property>
- <property name="maximum">
- <number>100000</number>
- </property>
- </widget>
<widget class="QComboBox" name="animationsComboBox">
<property name="geometry">
<rect>
<x>10</x>
- <y>480</y>
- <width>171</width>
- <height>22</height>
+ <y>471</y>
+ <width>104</width>
+ <height>20</height>
</rect>
</property>
<item>
@@ -399,9 +119,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>450</y>
- <width>171</width>
- <height>22</height>
+ <y>445</y>
+ <width>134</width>
+ <height>20</height>
</rect>
</property>
<property name="currentIndex">
@@ -423,29 +143,13 @@
</property>
</item>
</widget>
- <widget class="QSpinBox" name="titleFontSizeSpin">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>510</y>
- <width>81</width>
- <height>22</height>
- </rect>
- </property>
- <property name="minimum">
- <number>-100000</number>
- </property>
- <property name="maximum">
- <number>100000</number>
- </property>
- </widget>
<widget class="QComboBox" name="titleComboBox">
<property name="geometry">
<rect>
<x>10</x>
- <y>570</y>
- <width>171</width>
- <height>22</height>
+ <y>551</y>
+ <width>130</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -483,36 +187,13 @@
</property>
</item>
</widget>
- <widget class="QFontComboBox" name="titleFontComboBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>540</y>
- <width>171</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label_15">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>510</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Title font size</string>
- </property>
- </widget>
<widget class="QComboBox" name="gridComboBox">
<property name="geometry">
<rect>
<x>10</x>
- <y>600</y>
- <width>171</width>
- <height>22</height>
+ <y>577</y>
+ <width>104</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -544,9 +225,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>630</y>
- <width>171</width>
- <height>22</height>
+ <y>603</y>
+ <width>114</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -578,9 +259,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
- <width>171</width>
- <height>22</height>
+ <y>23</y>
+ <width>134</width>
+ <height>20</height>
</rect>
</property>
<property name="currentIndex">
@@ -616,9 +297,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
- <width>171</width>
- <height>22</height>
+ <y>49</y>
+ <width>126</width>
+ <height>20</height>
</rect>
</property>
<property name="currentIndex">
@@ -650,188 +331,13 @@
</property>
</item>
</widget>
- <widget class="QLabel" name="label_16">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>660</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Log Base</string>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="logBaseSpin">
- <property name="geometry">
- <rect>
- <x>90</x>
- <y>660</y>
- <width>91</width>
- <height>22</height>
- </rect>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-999999999.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999999999.000000000000000</double>
- </property>
- <property name="value">
- <double>8.000000000000000</double>
- </property>
- </widget>
- <widget class="QCheckBox" name="niceNumbersCheckBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>690</y>
- <width>91</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Nice Numbers</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="dateFormatEdit">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>710</y>
- <width>81</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label_17">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>710</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>DateTime format</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="moreCategoriesCheckBox">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>690</y>
- <width>141</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>More Categories</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series1checkBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>730</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>1</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series2checkBox">
- <property name="geometry">
- <rect>
- <x>40</x>
- <y>730</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>2</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series3checkBox">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>730</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>3</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series4checkBox">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>750</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>4</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series5checkBox">
- <property name="geometry">
- <rect>
- <x>40</x>
- <y>750</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>5</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series6checkBox">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>750</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>6</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="series7checkBox">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>740</y>
- <width>31</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>7</string>
- </property>
- </widget>
<widget class="QComboBox" name="themeComboBox">
<property name="geometry">
<rect>
<x>10</x>
- <y>770</y>
- <width>171</width>
- <height>22</height>
+ <y>814</y>
+ <width>131</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -888,8 +394,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>800</y>
- <width>171</width>
+ <y>840</y>
+ <width>117</width>
<height>16</height>
</rect>
</property>
@@ -901,9 +407,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>820</y>
- <width>171</width>
- <height>22</height>
+ <y>877</y>
+ <width>195</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -935,9 +441,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>850</y>
- <width>171</width>
- <height>22</height>
+ <y>903</y>
+ <width>165</width>
+ <height>20</height>
</rect>
</property>
<property name="sizePolicy">
@@ -965,6 +471,434 @@
</property>
</item>
</widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>207</y>
+ <width>185</width>
+ <height>100</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="2" column="1">
+ <widget class="QDoubleSpinBox" name="radialMinSpin">
+ <property name="decimals">
+ <number>5</number>
+ </property>
+ <property name="minimum">
+ <double>-999999999.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999999999.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Radial max</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Radial min</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Angular max</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="angularMinSpin">
+ <property name="decimals">
+ <number>5</number>
+ </property>
+ <property name="minimum">
+ <double>-999999999.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999999999.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Angular min</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QDoubleSpinBox" name="radialMaxSpin">
+ <property name="decimals">
+ <number>5</number>
+ </property>
+ <property name="minimum">
+ <double>-999999999.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999999999.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QDoubleSpinBox" name="angularMaxSpin">
+ <property name="decimals">
+ <number>5</number>
+ </property>
+ <property name="minimum">
+ <double>-999999999.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999999999.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>10.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>365</y>
+ <width>210</width>
+ <height>74</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>Label format</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="labelFormatEdit"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>Label font size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="labelFontSizeSpin">
+ <property name="minimum">
+ <number>-100000</number>
+ </property>
+ <property name="maximum">
+ <number>100000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QFontComboBox" name="labelFontComboBox"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>497</y>
+ <width>190</width>
+ <height>48</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Title font size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="titleFontSizeSpin">
+ <property name="minimum">
+ <number>-100000</number>
+ </property>
+ <property name="maximum">
+ <number>100000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QFontComboBox" name="titleFontComboBox"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>655</y>
+ <width>168</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Log Base</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDoubleSpinBox" name="logBaseSpin">
+ <property name="decimals">
+ <number>5</number>
+ </property>
+ <property name="minimum">
+ <double>-999999999.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999999999.000000000000000</double>
+ </property>
+ <property name="value">
+ <double>8.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>692</y>
+ <width>198</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QCheckBox" name="niceNumbersCheckBox">
+ <property name="text">
+ <string>Nice Numbers</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="moreCategoriesCheckBox">
+ <property name="text">
+ <string>More Categories</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>729</y>
+ <width>221</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_17">
+ <property name="text">
+ <string>DateTime format</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="dateFormatEdit"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>766</y>
+ <width>136</width>
+ <height>42</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_5">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="series1checkBox">
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="series2checkBox">
+ <property name="text">
+ <string>2</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QCheckBox" name="series3checkBox">
+ <property name="text">
+ <string>3</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" rowspan="2">
+ <widget class="QCheckBox" name="series7checkBox">
+ <property name="text">
+ <string>7</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="series4checkBox">
+ <property name="text">
+ <string>4</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="series5checkBox">
+ <property name="text">
+ <string>5</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="series6checkBox">
+ <property name="text">
+ <string>6</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>75</y>
+ <width>178</width>
+ <height>126</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Angular Tick count</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="anglesSpin">
+ <property name="minimum">
+ <number>-9999</number>
+ </property>
+ <property name="maximum">
+ <number>9999</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="radialMinorTicksSpin"/>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Radial Tick count</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Angular Minor Tick count</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="radialTicksSpin"/>
+ </item>
+ <item row="4" column="1">
+ <widget class="QSpinBox" name="angularMinorTicksSpin"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Radial Minor Tick count</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="angularTicksSpin"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Label angles</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QComboBox" name="minorGridComboBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>630</y>
+ <width>141</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <item>
+ <property name="text">
+ <string>Invisible minor grid</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Black minor grid</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Custom minor grid pen</string>
+ </property>
+ </item>
+ </widget>
</widget>
</item>
</layout>
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml
index dedd14d9..67f7de2a 100644
--- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml
@@ -61,6 +61,10 @@ Row {
onClicked: axis.gridVisible = !axis.gridVisible;
}
Button {
+ text: "axis minor grid visible"
+ onClicked: axis.minorGridVisible = !axis.minorGridVisible;
+ }
+ Button {
text: "axis shades visible"
onClicked: axis.shadesVisible = !axis.shadesVisible;
}
@@ -102,10 +106,17 @@ Row {
}
Button {
text: "axis tick count -"
-
onClicked: axis.tickCount--;
}
Button {
+ text: "axis minor tick count +"
+ onClicked: axis.minorTickCount++;
+ }
+ Button {
+ text: "axis minor tick count -"
+ onClicked: axis.minorTickCount--;
+ }
+ Button {
text: "axis reverse"
onClicked: axis.reverse = !axis.reverse;
}